Home > Net >  Shared framework between iOS and tvOS
Shared framework between iOS and tvOS

Time:10-09

I am trying to build a crossplatform framework that can be embeded both in and iOS and a tvOS application.

This framework does NOT contain anything related to UI but is a wrapper around CoreBluetooth.

enter image description here

What I explored ?

It compiles when I set the base sdk to tvOS, and when I set the base sdk to iOS. But I do not know how to make it work for both

enter image description here

Do you know how I could have both at the same time ?

Thanks

Stan

CodePudding user response:

You'll have to create two different targets in your xcodeproj, one for iOS, and one for tvOS.

enter image description here

Then simply add both target as Target Membership for your swift files.

enter image description here

  • Related