Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails for iOS (RN 0.60.3) with an App extension #25767

Closed
chaitanyadeorukhkar opened this issue Jul 22, 2019 · 3 comments
Closed

Build fails for iOS (RN 0.60.3) with an App extension #25767

chaitanyadeorukhkar opened this issue Jul 22, 2019 · 3 comments
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@chaitanyadeorukhkar
Copy link

Building the app results in an error in RCTRedBox.m
'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead.

Since RN 0.60.3 we moved to a newer RedBox error which uses sharedApplication. This is not allowed in an App extension for iOS. Everything builds fine for Android. This is the only thing blocking us from pushing 0.60.3 to production. Any suggestions would be appreciated. Thanks!

React Native version:

System:
OS: macOS 10.14.5
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 26.13 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 11.12.0 - /usr/local/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.7.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 23.0.1, 25.0.1, 25.0.2, 26.0.3, 27.0.3, 28.0.2, 28.0.3
System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-Q | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.4 AI-183.5429.30.34.5452501
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.3 => 0.60.3
npmGlobalPackages:
react-native-asset: 1.1.2
react-native-cli: 2.0.1
react-native-create-library: 3.1.2
react-native-git-upgrade: 0.2.7

Steps To Reproduce

  1. Create an iOS project with an app extension (share extension)
  2. Try building the project

Describe what you expected to happen:
Build successfully

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

Screenshot 2019-07-22 at 6 13 38 PM

@zhongwuzw
Copy link
Contributor

@deorukhkarchaitanya Thanks for the catch, will fixed in #25769 .

@mahmoudfelfel
Copy link

mahmoudfelfel commented Jul 24, 2019

I'm having a similar issue #25792 in App extension as well after upgrading to 0.60.4, will your PR fix that as well? if not, do you know how can it be fixed?

@djorkaeffalexandre
Copy link

djorkaeffalexandre commented Aug 1, 2019

It works with this:
#25792 (comment)

grabbou pushed a commit that referenced this issue Aug 7, 2019
Summary:
Fixes #25767 .

## Changelog

[iOS] [Fixed] - Don't call sharedApplication in App Extension
Pull Request resolved: #25769

Test Plan: RN works in App Extension.

Reviewed By: cpojer

Differential Revision: D16516104

Pulled By: sammy-SC

fbshipit-source-id: 446fd1d88724b783b2afb2369783b9a85b5cc178
@facebook facebook locked as resolved and limited conversation to collaborators Oct 6, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants