Can't run app on device after upgrade to xcode

2019-06-17 07:41发布

问题:

I updated my iphone 6 to ios 9 and I also updated Xcode to version 7.0. When I run my project on the simulator, the app works fine. When I try to run the app on my device the app crashes and I see this:

dyld`dyld_fatal_error: -> 0x120049088 <+0>: brk #0x3

Originally I was using cocoapods and getting an error that said "Image not found" for each of my frameworks I had configured. I removed cocoapods and manually added all the frameworks but now I'm getting the error above. Any help would be appreciated.

Thanks

回答1:

I had this issue. Clean, Xcode update, deletion of derived data - all didn't help.

What helped was based on this answer:

  1. Go to "Build Phase" section of your target settings.
  2. Click on the + button in the top left and select "New Copy Files Phase".
  3. Under the Copy File Phase, select the "Destination" dropdown and select "Frameworks".
  4. Drag and drop your framework from the project navigator into the "Name" section.


回答2:

Sometimes you need to use Clean & Build (Cmd+Shift+K), most of the times it helps to eliminate weird problems like this one. If this doesn't help - try cleaning ~/Library/Developer/Xcode/DerivedData.