[iOS] Bundle Action Extension with container app
See original GitHub issueQuestion Checklist
- I read the Contribution Guidelines.
- I read docs.expo.io (Managed Workflow > Distributing Your App).
- I searched for existing GitHub issues.
Question Subject
Bundle an Action Extension when turtle builds an ejected (but not modified) Expo app
Question Description
Thanks for building turtle CLI - it is phenomenal!
I am building an app with Expo CLI and I would like to add a simple Action Extension in iOS.
I am trying to do so at build time by ejecting to bare on the fly and adding the Action Extension. I am adding the Action Extension by opening ios/MyProject.xcworkspace
in xcode and adding a target to MyProject. I can successfully run the app in the simulator with yarn ios
(react-native run-ios
).
I am then building the application locally with turtle CLI, successfully. As I am not making any fundamental change to my app turtle is able to build the application for both app store and simulator but the Action Extension is not bundled.
My question would be, can you suggest a way to patch turtle CLI so that it can pick up and bundle the Action Extension with the main container app? I’d be happy to contribute back to the project or with a guide once I have managed to make it work for my small app - it seems a feature that many want/need 😃
Thank you in advance for your help!
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (4 by maintainers)
Top GitHub Comments
Oh, sorry for not covering this:
alias turtle_dev=/Users/dsokal/workspace/expo/turtle/bin/turtle.js
)Hello @giuseppeg,
the thing you want to achieve is not really a straightforward task. This is not because of the complexity of your change but rather because of the design of Turtle CLI. Turtle CLI doesn’t compile the Xcode project that appears in your Expo project after ejecting. Turtle CLI, when installed from npm, comes bundled with URLs to “shell apps”. A shell app is a precompiled native project. As for iOS, it is a precompiled Xcode project. Turtle CLI only modifies a few configuration files, packs the app into an IPA archive and signs the file with a distribution certificate and the provisioning profile. This design makes you create your own shell app if you wish to make any change to the Xcode project. What’s even worse (for you) is that each SDK version has its own shell app. If you ever decided to build your shell app you’d need to build it again for each Expo SDK upgrade.
How to build your own shell app?
shell_app_ios_build
job that we run on CircleCI -https://github.com/expo/expo/blob/master/.circleci/config.yml#L649shell_app_android_build
Unfortunately, I think I can’t be of any more help. At the moment we don’t support building apps with modifications in the native code. Because of that, I’m closing the issue, sorry 😦