When i start my app with XCode, i have a crash but no error
App is just stopping on this thread
What can i do to have more informations about the issue ?
When i start my app with XCode, i have a crash but no error
App is just stopping on this thread
What can i do to have more informations about the issue ?
If you are using custom frameworks, you need to put it inside the "Embedded Binaries" section located in the Xcode project under the tab Target / General.
For me a simple Clean
and Rebuild
sorted it out. Hope it helps.
Adding the framework to the embedded binary asset list fixed this. Here is what the setup of a foreign framework looks like in final form in the Xcode GUI as an Embedded Framework (Xcode 9.2, personally I like a visual bread crumb trail better ;-) ):
Did Apple intentionally crash the runtime to somehow tell the developer about the problem that you cannot use non-Apple frameworks as simply linked frameworks in iOS development? It would be better to have it come up as a build error I would think... with a button that said "move it!"
The use of Embedded Binaries keeps the end user from having to add the Framework independently of your app (or have you do with an installer). In the case of the iPhone (iOS), that is impossible, but on macOS, it is possible but can get messy fast.
For the end user, it is much nicer to simply drag and drop an app to install it on macOS, which is where embedded becomes a benefit. Embedding also avoids the classic "DLL conflicts" of having external versions of your framework to manage. (disk space is cheap, my customer's time is precious).
I fixed the error in my project just now!
If you are using swift framework in Object-C project, I advice you to change the build settings.
Always Embed Swift Standard Libraries option to YES. like this:
hope this was useful to you.
Finally solved!
What worked for me was to make the framework "optional" instead of "required".
Hope that helps!
Unchecking "Guard Malloc" in diagnostics worked for me.
I encountered an error with the same signature (my project was in Obj-C) and discovered I had forgotten to link with the appropriate framework. The error message in the debug log that led to finding the error was:
dyld: Symbol not found: _OBJC_CLASS_$_SFSafariViewController
For my specific error, adding SafariServices.framework in the Targets --> Build Phases --> "Link Binary With Libraries" resolved the issue. While you probably don't have the same specific error and resolution, checking the debug log for clues is useful.
1) Continue the execution to see if any message shows up in debugger such as "MyFramework.framework" not found. If that is the case, follow this discussion: OS X Framework Library not loaded: 'Image not found' For me this answer worked:https://stackoverflow.com/a/44796734/4060763
2) Make sure you have added your binaries through "Embed Binaries" section.
3) Make sure you have enabled signing of frameworks in build phase section.
4) Make sure the embedded frameworks are not symlinks.
5) You can make the linked frameworks optional instead of required in "Link binary with libraries" phase. This will tell iOS to not look for these frameworks during launch. But anyway you need to fix the errors to use those frameworks!
6) Check if all the info.plist entries are good. In my case, I was using a Mac info.plist file for iOS. It was looking for some xib file which was not present in iOS project.
7) Do a clean and build after any such change. This is required because xcode does not copy/change these files if they already exist.
8) Remove the app from iPad and then install. Same reason as 7.
To answer the original question "What can i do to have more informations about the issue ?", this Apple forum thread provides a very simple tip: simply run your crashing app outside XCode (i.e. stop it from XCode, then run it manually on your device). This will produce a crash log containing more details about what happened. You can then review this log from XCode Window menu / Devices and Simulators -> View Device Logs.
If you're using a framework written in Swift in an Objective-C application, you need to include the Swift toolchain in the app that consumes the framework.
The way I've found to do this is to create a dummy swift file in the app so that XCode recognizes swift and appropriately adds it to the project. You can then delete the dummy file.
I would love if someone knew of a better way to explicitly add swift to an objective-c project without adding a swift file.
I find the right way to resolve it.
Make sure the AppleWWDRCA.cer
be set system default mode, then it will work:
I had just missed applying the "Privacy - Camera Usage Description" in the info.plist.
Don't know if this info helps anybody else though...
I have fixed my error in my project.
1. Check other threads when error happened.I found my error is about camera.
if you use Carthage build framework, after drag the framework to your proj, you should add it to General/Embeded Binaries.
I've just had the same issue and the reason why was due to the fact that I've revoked my Developer Certificates and created new ones with Xcode 10, after a fresh macOS Mojave update (for some it deleted all login credentials and outdated some keychain certificates).
So, All I had to do was to remove the installed apps from my device and run them through Xcode again, in order for it to install the right new Provisioning Profile in my device :)
I was facing the same issue. Setting 'Always Embed Swift Standard Libraries' to Yes in Build Settings of my target worked for me.
I got it sorted by "pod install" command.