dyld`__abort_with_payload: With no error message

2019-01-16 17:48发布

When i start my app with XCode, i have a crash but no error

App is just stopping on this thread

enter image description here

What can i do to have more informations about the issue ?

标签: ios xcode xcode8
17条回答
祖国的老花朵
2楼-- · 2019-01-16 18:39

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.

查看更多
爷的心禁止访问
3楼-- · 2019-01-16 18:41

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 ;-) ): enter image description here

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).

查看更多
Fickle 薄情
4楼-- · 2019-01-16 18:45

For me a simple Clean and Rebuild sorted it out. Hope it helps.

查看更多
走好不送
5楼-- · 2019-01-16 18:46

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.

查看更多
劳资没心,怎么记你
6楼-- · 2019-01-16 18:46

I was facing the same issue. Setting 'Always Embed Swift Standard Libraries' to Yes in Build Settings of my target worked for me.

查看更多
登录 后发表回答