8

I debug a simple swift app , it can normally running in the simulator, but on a real machine running on the crash immediately .

system version , ios 8 xcode version , 6.0.1

crash log

dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /private/var/mobile/Containers/Bundle/Application/002E2F03-EE10-433B-B95F-AE3760E777DA/sMdp.app/sMdp Reason: no suitable image found. Did find: /private/var/mobile/Containers/Bundle/Application/002E2F03-EE10-433B-B95F-AE3760E777DA/sMdp.app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x100104000, size=0x00194000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/002E2F03-EE10-433B-B95F-AE3760E777DA/sMdp.app/Frameworks/libswiftCore.dylib

CodaFi
  • 43,043
  • 8
  • 107
  • 153
yong gao
  • 81
  • 1
  • 2
  • See http://stackoverflow.com/questions/26024100/dyld-library-not-loaded-rpath-libswiftcore-dylib try reissuing your certificates. Worked for me. – cudds Oct 03 '14 at 17:01
  • tell a lie - the same thing. Got rejected. I cannot reproduce the crash – cudds Oct 04 '14 at 05:47
  • Uh,but my development environment will crash as long as the real machine debugging, Is not related to the environment? I installed two versions of xcode, one is 5.1.1, one is 6.0.1 – yong gao Oct 08 '14 at 07:43
  • http://stackoverflow.com/a/26383255/1163992 Did u tried these – qwerty Oct 24 '14 at 11:14
  • I estimate the Apple fixes this bug, with xcode6.1, no problem, thank you! – yong gao Nov 15 '14 at 06:54

2 Answers2

1

This issues seems to be caused by the certificate. Apple filled the Organization Unit in the certificate. So you need to request a new certificate en install that one. The field will be filled and your app will work properly.

Source (and credits to those guys): https://www.airsignapp.com/ios-apps-using-swift-crash-when-signed-with-inhouse-certificate/

Aron K.
  • 250
  • 3
  • 8
  • Very important: revoking your signature is pretty much instant; it means the old certificate is immediately unusable! This lesson we learned the hard way when about 600 ipads were rendered useless since the app wouldn't reinstall/boot anymore – Kevin R Dec 11 '14 at 15:19
  • Worked for me only when deleting and creating in XCode, developer.apple.com's "Certificates, Identifiers & Profiles" tool apparently created new bad certs. – Graham P Heath Dec 15 '14 at 18:59
1

Just go to your certificates in Keychain , Right Click -> Get Info -> Trust - > find a field with name "When using this certificate"-> Select "use system default" option.

Harsh K
  • 77
  • 1
  • 10