-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Today Extension example fails with EXC_BAD_ACCESS #929
Comments
I'm also looking for up-to-date documentation for how to add different types of app extensions to an iOS app. |
Did anyone find some news? I am also looking for this. |
Nope. Still waiting for a response from the Nativescript team. |
Hello @kspearrin I just walked through the article and got the same error. After adding the ios runtime project to the widget's .xcodeproj so I can have the debug symbols, I saw the problem was missing metadata. So there are couple more things you need to do in order to run the widget:
so your main.m looks like this:
P.S. The article and docs will be updated. |
Thanks @tdermendjiev . That fixed it! Do the linker flags only need to be set for debug, or release too? Also, it is not clear to me how these xcodeproj adjustments are suppose to be persisted since the nativescript |
The linker flags need to be set for release as well. Currently these settings are not supported out of Xcode which means they will be overridden. I will research what is needed to implement Today extensions support meanwhile you can vote for this feature. Thank you! |
The current solution is far from perfect and requires quite a lot of manual changes. If you follow the updated steps in the tutorial, however, it does work. That said, we've logged a new issue for app extensions support: NativeScript/nativescript-cli#3965. It is still not planned for implementation but at least can be voted for. We would definitely welcome any contributions that can help us reach there! |
If there is no issue for your problem, tell us about it
I am trying to follow along with the Today extension example discussed here: https://www.nativescript.org/blog/making-a-today-widget-in-ios-with-nativescript-and-ui-for-nativescript
Which has example code from this repository here: https://github.com/NativeScript/ios-runtime/tree/master/examples/TodayExtension
Trying to to complete this example results in a runtime error when trying to launch the TodayWidget extension directly from Xcode:
at
runtime = [[TNSRuntime alloc] initWithApplicationPath:[NSBundle mainBundle].bundlePath];
in
platforms/ios/TodayWidget/main.m
I found this old issue of a user with the same problem: #503
An answer was posted in an old
ios-runtime-docs
repo which no longer exists so I cannot see what the fix for the problem was.All in all, it seems like docs for iOS app extension support are not very complete or very outdated which is unfortunate since we need support for extensions to be able to switch to NativeScript from Xamarin. Perhaps some additional guidance or updated documentation could also be provided for using app extensions with NativeScript?
Please, provide the following version numbers that your issue occurs with:
Please, tell us how to recreate the issue in as much detail as possible.
Follow the tutorial at https://www.nativescript.org/blog/making-a-today-widget-in-ios-with-nativescript-and-ui-for-nativescript to add an app extension to the HelloWorld app. Then try to launch the extension from Xcode.
The text was updated successfully, but these errors were encountered: