Skip to content

Instantly share code, notes, and snippets.

@rikukissa
Last active March 31, 2017 20:15
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rikukissa/7f141a2b497f1bdae1cf0d7eb4f4765e to your computer and use it in GitHub Desktop.
Save rikukissa/7f141a2b497f1bdae1cf0d7eb4f4765e to your computer and use it in GitHub Desktop.
How to install React Native tvOS example with Xcode 7.3.1

1. Clone repository, install dependencies & start the development server

git clone git@github.com:deanmcpherson/react-native-tvos-example.git
cd react-native-tvos-example
npm install
npm start

Open ios/townskTV.xcodeproj in Xcode

2. Set bundle identifier for the project

3. Set Base SDK's

Set townskeTV project's Base SDK to Latest tvOS. Repeat this step for all libraries under townskeTV -> Libraries (React.xcodeproj, RTCActionSheet.xcodeproj...)

4. Add missing files

Open node_modules/react-native/React/Base in Finder and drag & drop RCTTVRemoteHandler.h and RCTTVRemoteHandler.m to Xcode's project navigator under Project navigator -> townskeTV -> Libraries -> React.xcodeproj -> React -> Base

5. Modify RCTLinkingManager.m

Modify line 108 in Project navigator -> townskeTV -> Libraries -> RCTLinking.xcodeproj -> RCTLinkingManager.m from

  } else if (&UIApplicationLaunchOptionsUserActivityDictionaryKey &&
             self.bridge.launchOptions[UIApplicationLaunchOptionsUserActivityDictionaryKey]) {

to

} else if (self.bridge.launchOptions[UIApplicationLaunchOptionsUserActivityDictionaryKey]) {

6. Delete and remove reference to LaunchScreen.xib

Project navigator -> townskeTV -> townskeTV -> LaunchScreen.xib

7. Select Apple TV simulator & run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment