Reputation: 1657
So not sure if this is the best place for this, but I haven't been able to find any answers elsewhere:
My Swift port of an existing Obj-C app keeps on getting rejected from the App Store due to crashing. Specifically, the following excerpt from the crash log provided by the App Store:
Dyld Error Message:
Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /private/var/mobile/Containers/Bundle/Application/ED6A7194-EAD0-4FB6-8E81-C4C987E60E08/<AppName>.app/<AppName>
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/ED6A7194-EAD0-4FB6-8E81-C4C987E60E08/
<AppName>..app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x100168000, size=0x00194000 segment=__TEXT in Segment::map()
mapping /private/var/mobile/Containers/Bundle/Application/ED6A7194-EAD0-4FB6-8E81-C4C987E60E08/<AppName>.app/Frameworks/libswiftCore.dylib
Dyld Version: 353.5
I'm unable to reproduce this issue on my end via phone or Simulator (even creating the Archive, submitting it as an Ad Hoc .ipa, and installing it onto my phone works completely fine) -- I'm guessing I'm missing something very dumb? Has anyone run into anything similar? It looks like it's unable to find the swift core libraries, or something similar?
(I have seen other similar questions on SO for which the accepted answers are to set the "Embedded Content Contains Swift Code" to be YES and to verify that the run paths are certain values, which I have done. Again, it works completely fine via Simulator, building directly to phone, and when installing the .ipa
to phone -- I am unable to reproduce the issue myself.)
(EDIT)
According to the logs provided by the App Store review team, they are running it on:
Hardware Model: xxx
OS Version: iOS 8.0.2 (12A405)
Full text of binary images as reported in the supplied crash logs:
Binary Images:
0x120088000 - 0x1200affff dyld arm64 <cde4667c8a4a3f80b7076a4766ee7205> /usr/lib/dyld
0x183b8c000 - 0x183d96fff CFNetwork arm64 <ceef412014a13644a225194906f999cc> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x184120000 - 0x18447bfff CoreFoundation arm64 <ead15232d65b3139ba4866e7adbb5663> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x18447c000 - 0x1845defff CoreGraphics arm64 <fe7274c9c42932baa9c2182f84f6ec57> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
0x18501c000 - 0x185270fff Foundation arm64 <aad23ffe921534c9bb3fd8814a33b0e9> /System/Library/Frameworks/Foundation.framework/Foundation
0x188310000 - 0x188494fff QuartzCore arm64 <395159df77d13406a2eb1e70e482bd25> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
0x18877c000 - 0x188807fff Social arm64 <e63d277e11f43be980638030f382403f> /System/Library/Frameworks/Social.framework/Social
0x188924000 - 0x18893cfff StoreKit arm64 <58c17c55d2c5318c850df4534ca85544> /System/Library/Frameworks/StoreKit.framework/StoreKit
0x188940000 - 0x1889b3fff SystemConfiguration arm64 <3e90833ff4ed3d01983a72d151f9053f> /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration
0x1889b8000 - 0x189320fff UIKit arm64 <406f392b43b23f7daaa5c4345c8be709> /System/Library/Frameworks/UIKit.framework/UIKit
0x194194000 - 0x194195fff libSystem.B.dylib arm64 <debe5bcf0a6d31898e6b46412acfd1c0> /usr/lib/libSystem.B.dylib
0x194c90000 - 0x194e8cfff libobjc.A.dylib arm64 <88bda32a9df13740ba61bef95d96a2b2> /usr/lib/libobjc.A.dylib
Upvotes: 0
Views: 1451
Reputation: 2298
For those who the fix didn't work, try updating the OS to Yosemite. It worked for me!
Upvotes: 0
Reputation: 6795
Hey we hade the same problem, turns out we needed to create a new distribution certificate and provisioning profile in order to include the ability to ship swift code.
Head over to developer.apple.com
to set up your new certificates and provisioning and the re-release your application.
W
Upvotes: 2