Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

Swift is crashing app on the device with iOS 9 #30

Closed
nikDemyankov opened this issue Oct 16, 2015 · 4 comments
Closed

Swift is crashing app on the device with iOS 9 #30

nikDemyankov opened this issue Oct 16, 2015 · 4 comments
Labels

Comments

@nikDemyankov
Copy link
Member

Continue discussion on Swift crashes, started in issue #26 .

Message from the @hirbod:

Well, as soon as I include this plugin and try to build on REAL device (iOS9, iOS8 just works fine) (simulator just works fine) I get:

dyld: Library not loaded: @rpath/libswiftCore.dylib

Referenced from: /private/var/mobile/Containers/Bundle/Application/...

Reason: no suitable image found. Did find:

/private/var/mobile/Containers/Bundle/Application/1.../Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x100CD0000, size=0x0015C000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/.../Frameworks/libswiftCore.dylib

As soon as I remove this plugin, everything works fine. Now I've submitted my app to the app store yesterday before trying on a real device with iOS 9 (just updated today) , so I'm dead sure that Apple will also will reject my app as it will crash. Do you have a fast fix here @nikDemyankov? Some guys on SO said its related due to old mobile-provisionings (missing OU in subject, but my certs are fine)

Some embedded-framework problem here?

Issue happens only on real device. And only since I've upgrade to iOS 9. iOS 8 worked well. (iPhone 6)

Xcode 7.0.1, newest, Cordova

By the way. I already tried project from scratch, deleted iOS Platform, reinstalled plugin (from npm and from github). Nothing changed. Swift is making problems here.
Also checked the flag "Embedded Code contains Swift". It was already checked. But as soon as I try to run it on my real device, I get this problems.

@nikDemyankov
Copy link
Member Author

@hirbod Are you trying with the existing project, or absolutely new one? If you can create a test project, that crashes on your device, and send it to me - that would really help to find the problem.

Also, open your project in the Xcode, select project (not the target) and then check the following:

  1. Build Settings -> Linking -> Runpath Search Paths. Check that @executable_path/Frameworks is set in there.

    screen shot 2015-10-16 at 09 56 16
  2. In Build Settings enter Swift in the search field and check, that it matches the following:

    screen shot 2015-10-16 at 09 56 29
  3. Try to set Build Settings -> Assets -> Embed asset packs in product bundle to YES:

    screen shot 2015-10-16 at 09 57 04

    Some people said, that this might help.

Also, you can try to delete Xcode's Derived Data directory. That helps sometime.

And I remember, that you already checked the certificates, but please, double-check them. According to https://developer.apple.com/library/ios/qa/qa1886/_index.html - they can lead to the issue you are having.

@hirbod
Copy link

hirbod commented Oct 19, 2015

Will answer soon on this. I think it could be related to project settings. I just checked the targets. Currently I've removed the plugin as I was in hurry, will try these days again

@nikDemyankov nikDemyankov modified the milestone: v1.1.0 Oct 21, 2015
@nikDemyankov
Copy link
Member Author

Updated to v1.1.0. Local development mode is now moved to the separate plugin. Please, read the docs about migration to the new version. Basically, no more Swift in release versions.

@nikDemyankov
Copy link
Member Author

Closing the issue, since it's been quite for a long time. If problem is still there - reopen it and lets continue the discussion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants