I am currently using Xcode 8.1, cocoa pods 1.2.0.beta.1, and launching my app on a simulator with iOS 10.1. My app builds just fine, however after launching the app in a simulator, I receive the following error:
dyld: Library not loaded: @rpath/AFNetworking.framework/AFNetworking
Referenced from: /Users/XXXXX/Library/Developer/CoreSimulator/Devices/XXXXX/data/Containers/Bundle/Application/XXXXX/XXXXX.app/XXXXX
Reason: image not found
My Podfile is:
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
platform :ios, '8.0'
target "XXXXX" do
platform :ios, '8.0'
use_frameworks!
pod 'AFNetworking'
...
end
post_install do | installer |
require 'fileutils'
FileUtils.cp_r('Pods/Target Support Files/Pods-XXXXX/Pods-XXXXX-acknowledgements.plist', 'Pods-Acknowledgements.plist', :remove_desve_destination => true)
end
I have already tried de-integrating and re-installing my cocoa pods, changing the Pods-XXXXX.framework to optional, disabling Bitcode, and cleaning the workspace. None of those options (or any combination of them) has worked. Any help is much appreciated.
use_frameworks! declares that you want to use dynamic frameworks, instead of static libraries. With Xcode 9.0 and CocoaPods 1.5. 0 released, you could use static libraries with swift if you do not use use_frameworks! . One problem with use_frameworks! is that all your framework in Pods/Products are frameworks.
Use the keyboard shortcut shift-command-L (⇧⌘L) to open the library. This opens the snippet browser in the source editor or the object browser in Interface Builder. Use shift-command-M (⇧⌘M) to open the media library.
For those who find this issue in the future, it has been solved by cleaning the build folder by doing Option+Shift+Command+K. This solves the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With