Closed AndrewHenderson closed 6 years ago
I found that in order to get the app running in Release Mode, I had to register both my App and the Share Extension App in the same index.js file:
import React from 'react'
import { AppRegistry } from 'react-native'
import App from './app'
import Share from './share'
AppRegistry.registerComponent('App', () => App)
AppRegistry.registerComponent('ShareExt', () => Share)
I have been able to get everything working perfectly in Debug mode. However, when I change to Release mode, the extension crashes immediately upon launching from the Photos app on iPhone.
I have two separate index files - one for my main app and one for my share extension. I tried using the same index file for registering both apps, but the extension would not launch, even in Debug mode. Separating the code and running a very light RN app in the extension index seemed to fix things.