Author Topic: How to share custom iOS framework code with a tvOS app  (Read 8686 times)


  • Administrator
  • *****
  • Posts: 719
    • View Profile
How to share custom iOS framework code with a tvOS app
« on: November 07, 2015, 06:54:55 PM »
To share custom iOS framework code with a tvOS app, you need to create a tvOS version of the custom framework, by following these basic steps (assuming you already have a custom iOS framework project):

1. Open your custom iOS framework project in Xcode, and select File > New > Target from the Xcode menu.

2. In the panel on the left in the New Target dialog, select tvOS > Framework & Library

3. On the right side of the dialog, select TV Framework and click Next.

4. In the next step of the dialog, specify the options for your new target. NOTE: Set Embed in Application to your tvOS app, and your tvOS framework will automatically be linked to your tvOS project.

5. Click Finish

Now you're ready to add code files to your custom tvOS framework. Just remember you can add a reference to a source code file in your tvOS framework without duplicating the code file

Note that not all iOS frameworks are available to tvOS apps. Check out this link for a complete list:

All the best!
Kevin McNeish
Author of Learn to Code in Swift:
Check out our Robot Tic-Tac-Toe app: