-
Notifications
You must be signed in to change notification settings - Fork 268
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
Storyboard integration doesn't work with Share Extensions #352
Comments
Sorry, haven't tried iOS extensions yet.. How UIStoryboard instance is created in the extension? Manually, with `[UIStoryboard storyboardWithName:bundle:]``? Or it's created by iOS automatically? if automatically, how iOS know storyboard name? Using value for special key in |
Hello Alex, Storyboard instance is created by extension automatically. It is using |
Ok, I'll add support for that soon then Отправлено с iPhone
|
Nice, Thanks ;) |
Hey, @cakper. Can you test latest code with |
Hello, @alexgarbarev - sure - I'll have a look in a sec |
So we had a look at it and it doesn't work as expected. After going though Typhoon code what we found is that Trying to think about right place to inject with factory initialisation for extension - what do you think about swizzling |
Hi @cakper Injection for storyboard doesn't work? Now, about the code. I appreciate your attention to code and good suggestions. TyphoonStartup.m Initial factory loaded at very start of application startup and released after application did finish launching ( at UIApplicationDidFinishLaunchingNotification notification on iOS) TyphoonInitialStoryboardResolver.m Now, back to the problem.
If you have spare time, you can try to debug using information from above and make pull request with fix, I haven't so much time to play with iOS extensions now. (Will fix later) |
Hello
I think problem here is that I did try to run |
@cakper We'll get to this ASAP. Meanwhile if you want to tackle this yourself, it sounds like simply a matter of:
We'll happily accept a pull request for this. |
I'll fix that issue. I hope I'll have time at today's evening |
…nil, when application hasn't AppDelegate (in case of iOS Extension), see #352
@cakper You was totally right. The reason was: TyphoonStartup loads |
Hello,
I've tried to use Typhoon storyboard integration with the Share Extension that I'm working on at the moment and as extension doesn't have AppDelegate it doesn't seem to work properly. Probably that will be the case with all extensions supported by new iOS as they are not normal apps and have different lifecycle.
Manual injection as described on this page: https://github.com/appsquickly/Typhoon/wiki/Activating-Assemblies#instructing-typhoon-to-inject-a-pre-obtained-instance works as expected, but adds a bit of noise to the view controllers (works well as a workaround).
To give a bit more context what was already discussed here is the link to twitter: https://twitter.com/cakper/status/599245416442507264
And sample project created to demonstrate the problem: https://github.com/cakper/TestExtensionApp
https://github.com/cakper/TestExtensionApp/blob/master/Podfile.lock contains versions of the Typhoon and Cocoapods used
Thank you, Kacper :)
The text was updated successfully, but these errors were encountered: