Swift App Opens on Simulator But Not on Device

一世执手 提交于 2020-01-01 10:13:06

问题


I've been working on my iOS app for a while, and it builds and runs fine on the simulator, but when I try to run it on my device, a few things happen:

  • The app launch screen appears
  • The app crashes and my Xcode output is as follows:

    dyld: Library not loaded: @rpath/libswiftCore.dylib
    Referenced from:/private/var/mobile/Containers/Bundle/Application/18932CDB-57DA-4A87-B154-45B9F3CD01D0/Up & Down - Minimalistic, Beautiful Counter.app/Up & Down - Minimalistic, Beautiful Counter
    Reason: no suitable image found.  Did find:
    /private/var/mobile/Containers/Bundle/Application/18932CDB-57DA-4A87-B154-45B9F3CD01D0/Up & Down - Minimalistic, Beautiful Counter.app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x100110000, size=0x0015C000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/18932CDB-57DA-4A87-B154-45B9F3CD01D0/Up & Down - Minimalistic, Beautiful Counter.app/Frameworks/libswiftCore.dylib
    (lldb) 
    
  • The following message also appears, with a few other similar errors:

    dyld`dyld_fatal_error:             Thread 1: EXC_BREAKPOINT (code=1,subcode=0x1200f5088)
    ->  0x1200f5088 <+0>: brk    #0x3
    

So I don't waste your time, I would like to warn you that I have tried to clean and build, revoke and renew certificates, delete all breakpoints, and restart both Xcode and my iPhone.

Any ideas on how to make my app run on my device? Thanks!!!


回答1:


My project has Cocapods and I'm using multiple schemes. Running pod update fixed something wrong that happened during a merge and now it runs fine.



来源:https://stackoverflow.com/questions/31102120/swift-app-opens-on-simulator-but-not-on-device

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!