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.

[iOS] Bundle Action Extension with container app

See original GitHub issue

Question Checklist

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:closed
  • Created 4 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dsokalcommented, Mar 2, 2020

Oh, sorry for not covering this:

1reaction
dsokalcommented, Mar 2, 2020

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?

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 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

App Extension Programming Guide: Handling Common ...
Describes how to develop an app extension, which is an executable that adds functionality to other apps.
Read more >
iOS8 extension : share images between container and extension
I'm making an iOS 8 extension. Here's what I'm trying to do: Users select images from the photo library in the container app,...
Read more >
Tutorial: iOS 8 App Extensions - Toptal
The system opens the extension of a user's action from the host app, the extension displays the UI, performs some work, and returns...
Read more >
Core Data and App extensions: Sharing a single database
Within the Collect App, we have a Share extension and an Action ... access to each other's container, even though an app extension...
Read more >
iOS App Extensions: Data Sharing | topolog's tech blog
Then you are able to use UserDefaults container which can be shared between several apps (or between the app and the extension). Let's...
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