Dyld: library not loaded: @ rpath / SwiftyJSON.framework / SwiftyJSON

I am using a simulator to test my application. Today I decided to test it using other devices in the simulator, and, to my surprise, it crashes on startup on some devices, and on others it works fine

My application creates runs:

  • iPad Air
  • mutable iPad
  • iPhone 5s
  • iPhone 6
  • iPhone 6plus
  • resizable iPhone

My application is disconnected:

  • iPad 2
  • iPad Retina
  • iPhone 4S
  • iPhone 5

The error I get is:

dyld: library not loaded: @ rpath / SwiftyJSON.framework / SwiftyJSON

Referenced from: /Users/data/Library/Developer/CoreSimulator/Devices/2ACCFF1F-D35F-444A-B709-2A41AC9CC7D2/data/Containers/Bundle/Application/DA7480F6-4032-4EB5-A51F-5D028088FFE1/Demo Mobile.app/Demo Mobile Reason: no suitable image found. (lldb) 

Sometimes I get additional information:

 Referenced from: /Users/data/Library/Developer/CoreSimulator/Devices/2ACCFF1F-D35F-444A-B709-2A41AC9CC7D2/data/Containers/Bundle/Application/DA7480F6-4032-4EB5-A51F-5D028088FFE1/Demo Mobile.app/Demo Mobile Reason: no suitable image found. Did find: /Users/data/Library/Developer/CoreSimulator/Devices/2ACCFF1F-D35F-444A-B709-2A41AC9CC7D2/data/Containers/Bundle/Application/DA7480F6-4032-4EB5-A51F-5D028088FFE1/Demo Mobile.app/Frameworks/SwiftyJSON.framework/SwiftyJSON: mach-o, but wrong architecture /Users/data/Library/Developer/CoreSimulator/Devices/2ACCFF1F-D35F-444A-B709-2A41AC9CC7D2/data/Containers/Bundle/Application/DA7480F6-4032-4EB5-A51F-5D028088FFE1/Demo Mobile.app/Frameworks/SwiftyJSON.framework/SwiftyJSON: mach-o, but wrong architecture /Users/data/Library/Developer/CoreSimulator/Devices/2ACCFF1F-D35F-444A-B709-2A41AC9CC7D2/data/Containers/Bundle/Application/DA7480F6-4032-4EB5-A51F-5D028088FFE1/Demo Mobile.app/Frameworks/SwiftyJSON.framework/SwiftyJSON: mach-o, but wrong architecture (lldb) 

I installed SwiftyJson via Cocoapods. My subfile contains

 platform :ios, '8.0' use_frameworks! pod 'SQLite.swift', git: 'https://github.com/stephencelis/SQLite.swift.git' target 'thinx Mobile' do pod 'SwiftyJSON', '~> 2.2.1' end 

I tried:

  • clean and rebuild
  • solutions 1, 2, 3 of dyld: library not loaded: @ rpath / libswift_stdlib_core.dylib
+6
ios swift swifty-json
source share
2 answers

After searching for almost one day, I rebuild the project from scratch (new project, new swap file, new files, but copy-paste the source code from the source project in each file), the application compiles now and works fine on every simulator! No mistakes.

But I still have a similar error (but another reason) on real devices. I closed this question, but there is the following question for this problem: dyld: library not loaded: @ rpath / SwiftyJSON.framework / SwiftyJSON

+1
source share

The question is related to the iOS application broken down on the device, dyld: the library is not loaded, Xcode 6 Beta , which solved the problem and is a common answer for this kind of error, I would say

I experienced this at the time of this writing with Xcode 8.0 (Swift 3.0) and SwiftyJSON 3.1.3

0
source share

All Articles