question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installing Expo react-native-unimodules

See original GitHub issue

(Sorry in advance if this wouldn’t generally be considered a bug)

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

Expo provides a lot of very helpful libraries for React Native and with the Bare Workflow this should easily integrate with any plain React Native project. Their instructions here (https://docs.expo.io/bare/installing-unimodules/) provide the steps which just involve installing an npm package and then modifying a few ios files, followed by installing pods. In theory this should also work with a react-native-tvos project.

React Native version:

Run react-native info in your terminal and copy the results here. info Fetching system and libraries information… System: OS: macOS 10.15.6 CPU: (12) x64 Intel® Core™ i7-8850H CPU @ 2.60GHz Memory: 1.98 GB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 12.18.3 - ~/.nvm/versions/node/v12.18.3/bin/node Yarn: 1.22.4 - ~/.yarn/bin/yarn npm: 6.14.8 - ~/.nvm/versions/node/v12.18.3/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.9.1 - /Users/asharafshahi/.rvm/rubies/ruby-2.7.0/bin/pod SDKs: iOS SDK: Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2 Android SDK: Not Found IDEs: Android Studio: 4.0 AI-193.6911.18.40.6626763 Xcode: 12.4/12D4e - /usr/bin/xcodebuild Languages: Java: 13.0.1 - /usr/bin/javac Python: 2.7.16 - /usr/local/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: Not Found react-native-macos: Not Found react-native-tvos: 0.63.3-0 npmGlobalPackages: react-native: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. react-native init TestApp --version=react-native@npm:react-native-tvos@latest
  2. npm install react-native-unimodules
  3. change ios/TestApp/AppDelegate.h (see https://docs.expo.io/bare/installing-unimodules)
  4. change ios/TestApp/AppDelegate.m (see link above)
  5. change ios/Podfile (see link above)
  6. npx pod-install
  7. cd TestApp && react-native run-ios --simulator “Apple TV” --scheme “TestApp-tvOS”

Expected Results

Describe what you expected to happen. I should be able to start up a boilerplate react-native-tvos project and also add this to my App.js file: import { Constants } from ‘react-native-unimodules’;

Snack, code example, screenshot, or link to a repository:

  • Xcode Build Fails with three errors
  • Property ‘moduleRegistryAdapter’ not found on object of type ‘AppDelegate *’
  • No known class method for selector ‘extraModulesForBridge:’
  • Unknown receiver ‘_moduleRegistryAdapter’; did you mean ‘UMModuleRegistryAdapter’? Replace ‘_moduleRegistryAdapter’ with ‘UMModuleRegistryAdapter’

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
douglowdercommented, May 21, 2021

Ok I got a project to at least compile with the unimodules. See https://github.com/react-native-tvos/react-native-unimodules-example .

  • I had to add the tvOS platform to all the Expo and Unimodule podspecs
  • A few code changes were needed (e.g. removing the webview for tvOS)
  • Some podspecs were trying to provide prebuilt frameworks that are only built for iOS, so I stripped that out so all pods are built from source
1reaction
douglowdercommented, Feb 1, 2021

Thanks for the extra information! I’ll add this to the backlog, it may take some effort to get this to work 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add Expo to an existing project
The following instructions apply to installing the latest version of Expo modules in React Native 0.68. Terminal. Copy. npm install expo.
Read more >
React Native Unimodules - GitHub
This repo has been deprecated in favor of expo/expo monorepo. ... Read installation instructions in the installing react-native-unimodules guide.
Read more >
Migrate from react-native-unimodules to Expo modules
In this article you can read how to migrate from the old react-native-unimodules to the brand new Expo modules wth the expo package....
Read more >
react-native-unimodules - npm
Learn more about this library and learn how to install it on the Installing react-native-unimodules documentation page.
Read more >
Confusion on the deprecation of React Native Unimodules
As of Expo SDK 43, react-native-unimodules is deprecated in favor of the expo package. Please refer to the Installing Expo modules guide.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found