LIbrary not loaded - Reason: Incompatible library version - cocoapods

I just did pod install of an older project (ObjC based) to latest CocoaLumberjack. In simulator everything works, but on device (running iOS 9.1) I get this error:
dyld: Library not loaded: #rpath/CocoaLumberjack.framework/CocoaLumberjack
Referenced from: /var/mobile/Containers/Bundle/Application/69959D96-CAE9-455F-8F74-62A937531E1F/Go 5k.app/Go 5k
Reason: Incompatible library version: Go 5k requires version 2.0.0 or later, but CocoaLumberjack provides version 1.0.0
Any ideas..?
This is my podfile:
use_frameworks!
def shared_ios_pods
# utility
pod 'CocoaLumberjack'
pod 'UICollectionView+NSFetchedResultsController'
pod 'UITableView+NSFetchedResultsController'
pod 'PureLayout'
pod 'UIColor-Utilities'
pod 'KZPropertyMapper', '~> 2.5'
# UI stuff
pod 'M13ProgressSuite'
pod 'JBChartView'
pod 'SAMGradientView'
# Integrations
pod 'YTVimeoExtractor'
pod 'Mixpanel'
pod 'HockeySDK', '~> 3.7'
end
target 'Go 5k' do
platform :ios, '9.0'
shared_ios_pods
end
target 'Go5k watchOS2 Extension' do
platform :watchos, '2.0'
pod 'CocoaLumberjack'
end
This is in Objective-C project and this particular version of CL is I believe Swift based. Not really sure is it relevant.

Fixed by the most unusual way: full clean build + Xcode restart. Jolly wonderful.

Related

Cocoapods cannot install pod

I ran pod install after I updated my Podfile, the LeanCloud pod was not installed, and I got the following message:
Analyzing dependencies
[!] There are only pre-release versions available satisfying the following requirements:
'LeanCloud', '>= 0'
You should explicitly specify the version in order to install a pre-release version
Here is how my Podfile looks like:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'todolist' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for todolist
pod 'Alamofire'
pod 'SwiftyJSON'
pod 'LeanCloud', '>= 0'
end
I'm running on macOS 10.12.3, with Cocoapods Version 1.2.0
You have to specify which version of a dependency you’d like to use. Take a look here how versioning works:
== 1.0 means “Use exactly version 1.0”
>= 1.0 means “Use version 1.0 or higher”
~> 1.0 means “Use any version that’s compatible with 1.0″, essentially meaning any version up until the next major release. That is:
If you specify ~> 1.7.5, then any version from 1.7.5 up to, but not including 2.0, is considered compatible.
Likewise, if you specify ~> 2.0 then Cocoapods will use a version 2.0 or later, but less than 3.0.
Compatibility is based on Semantic Versioning
From here, you have to choose which LeanCloud version you want to use. Then change it accordingly in your pod file based on those steps above.
I am not very good in English
I think you did not specify a mobile version
platform :ios, '9.0' <-You should try to open this sentence
Somehow I got it to work by move the line pod LeanCloud to be the first pod, and ran pod update.
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'todolist' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for todolist
pod 'LeanCloud'
pod 'Alamofire'
pod 'SwiftyJSON'
end
⇒ pod update
Update all pods
Updating local specs repositories
CocoaPods 1.2.1.beta.1 is available.
To update use: sudo gem install cocoapods --pre
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.1.beta.1
Analyzing dependencies
Downloading dependencies
Installing Alamofire 4.2.0 (was 4.4.0)
Installing LeanCloud (10.0.0)
Using SwiftyJSON (3.1.4)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 3 total pods installed.

Unable to find a specification for `Alamofire (~> 3.5)`

target 'MyApp' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MyApp
pod 'Alamofire', '~> 3.5' end
target 'MyAppTests' do
inherit! :search_paths
# Pods for testing
end
target 'MyAppUITests' do
inherit! :search_paths
# Pods for testing
end
This is the pod file, swift 2.3, Xcode VERSION 7.3.1. I'm trying to install alamofire , but I'm getting the error above, i searched google , but there wasn't any useful things to do. any help?
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
target 'MyProject' do
use_frameworks!
# Pods for MyProject
pod 'Alamofire', '~> 4.7'
end
Hopefully this must work. Check for your Pod version also.
First of all try make higher deployment target
if not work then
Try to run these command one by one
pod repo remove master
pod setup
pod update

Unable to find a specification for '[Any pod libraries]'

I don't know what's wrong with my cocoapods. It always show this error on every pod libraries every time I run pod install. For instance "AFNetworking"
[!] Unable to find a specification for `AFNetworking (~> 3.0)`
I tried the following but nothing help:
pod repo update
sudo rm -fr ~/.cocoapods/repos/master
pod setup
pod install
I tried to update my cocoapods to 1.1.1, Xcode to 8.2 and Mac OS to 10.12.2 but problem remain.
My cocoapods can't even search. It show this error every time I run "pod search AFNetworking"
[!] Unable to find a pod with name, author, summary, or description matching `AFNetworking`
Here is my podfile look like:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
target 'Leader' do
use_frameworks!
pod 'AFNetworking', '~> 3.0'
end
I did try to uninstall and reinstall cocoapods back but nothing help.
Please follow below format in your pod file its working in project.
#Uncomment this line to define a global platform for your project
platform :ios, '8.0'
#Uncomment this line if you're using Swift
use_frameworks!
target 'applicationName' do
pod 'AFNetworking', '~> 3.0'
end
If you find any issue please let me know.

Swift cocoapod install framework (Alamofire) occur Syntax error in xcode

I have some problem in installing some external framework. Therefore, I try it in a blank project but the error are the same and I am not sure where i did wrong.error image
It is a little uncommon. It seems like I did install a wrong version of framework as in it appear 40+ error in code syntax.
Also, the error are from Alamofire,AmazonS3RequestManager and so on.
It is my podfile and I just put pod install in the target file directory
source 'https://github.com/CocoaPods/Specs.git'
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'test' do
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'AlamofireImage', '~> 2.0'
pod 'Firebase', '>= 2.4.3'
pod 'SwiftValidator', '3.0.1'
pod 'AmazonS3RequestManager', '~> 0.8'
pod 'MBProgressHUD', '~> 0.9.2'
end
The code in your screenshot is for Swift 2.2, so you have to update Xcode to the latest version, Xcode 7.3. Your version is too old.

Alamofire and cocoapods

I'm trying to get my code to link on OS 10.10.3 and XCode 6.3 with Alamofire. My podfile looks like this:
platform :osx, '10.10'
use_frameworks!
target 'worth2' do
pod 'Alamofire', '~> 1.2'
pod 'SwiftyJSON', '~> 2.2'
end
When I go to build my project though, I end up with
dyld: Library not loaded:
#rpath/Alamofire.framework/Versions/A/Alamofire Referenced from:
~/Library/Developer/Xcode/DerivedData/worth2-bskxhwsefwbntgeikvunyfjphixk/Build/Products/Debug/[project-name]
Reason: image not found
I've looked at what sounds like the same issue but it seems like that's for an older version of XCode. Under Targets -> Build Phases -> Target Dependencies, I'm unable to add the frameworks. Apple frameworks show up but not my two libraries.
I think you missed setting the source to cocoapods specs.
source 'https://github.com/CocoaPods/Specs.git'

Resources