Dyld Error Message: Library not loaded: @rpath/libswiftCore.dylib

Originator:kristopherdjohnson
Number:rdar://18633550 Date Originated:13-Oct-2014 12:07 PM
Status:Open Resolved:
Product:Developer Tools Product Version:6.0
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
Developed iOS app in Swift to be distributed via Enterprise developer program distribution method.

App works fine when running development build. Distribution build works fine on iOS 7 devices, but when run on iOS 8, crash with this log:

Incident Identifier: DDA55483-CB29-4812-AB9B-B0C3DA0CC47B
CrashReporter Key:   0e84171feee4b5049eacf41d699b71979cd66260
Hardware Model:      iPhone7,2
Process:             MYAPP [289]
Path:                /private/var/mobile/Containers/Bundle/Application/F38EF58A-1FEB-4AF1-9479-DD2D5C35F630/MYAPP.app/MYAPP
Identifier:          com.example.myapp
Version:             20141013.1 (1.0)
Code Type:           ARM-64 (Native)
Parent Process:      launchd [1]

Date/Time:           2014-10-13 11:22:54.272 -0400
Launch Time:         2014-10-13 11:22:54.266 -0400
OS Version:          iOS 8.0.2 (12A405)
Report Version:      105

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001200d5088
Triggered by Thread:  0

Dyld Error Message:
  Library not loaded: @rpath/libswiftCore.dylib
  Referenced from: /private/var/mobile/Containers/Bundle/Application/F38EF58A-1FEB-4AF1-9479-DD2D5C35F630/MYAPP.app/MYAPP
  Reason: no suitable image found.  Did find:
	/private/var/mobile/Containers/Bundle/Application/F38EF58A-1FEB-4AF1-9479-DD2D5C35F630/MYAPP.app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x100104000, size=0x0018C000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/F38EF58A-1FEB-4AF1-9479-DD2D5C35F630/MYAPP.app/Frameworks/libswiftCore.dylib
  Dyld Version: 353.5

(Note: Application name has been replaced with MYAPP in the above, and application identifier has been replaced with com.example.myapp.)

Steps to Reproduce:
Xcode project attached

Expected Results:
App should run on iOS 8 device

Actual Results:
App crashes immediately every time it is run on iOS 8

Version:
Xcode 6.0 and 6.1 GM 2

Notes:
Full project and crash log attached

Tried re-creating provisioning profiles from scratch. Still crashes.

Configuration:
Problem seen on iPhone 6 and on iPad Air running iOS 8.

Problem does not occur on iPod touch running iOS 7

Attachments:
'MYAPP.zip' and 'crashlog.txt' were successfully uploaded.

====

Update 2014-10-13 15:15

I was able to "fix" this problem by creating a new Distribution certificate and then creating new provisioning profiles with that certificate. So it appears to be related to code signing.

While I no longer have a problem, I don't consider this to be a good resolution. I had to revoke an existing distribution certificate before the portal would allow me to create a new one. If we could create an unlimited number of certificates, then this would just be an annoyance, but being forced to revoke certificates for apps that are already in the field is not a good workaround.

I hope Apple can provide a fix or workaround that does not require revocation of existing certificates, or provide an explanation that convinces us that this problem won't recur.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!