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
Related
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.
I'm learning iOS just now.
I cloned from https://github.com/huyouare/SwiftParseChat.git
and I build it but get error.
diff: /../Podfile.lock: No such file or directory
diff: Manifest.lock: No such file or directory error:
The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.`
So I remove the workspace file and pod install.
rm -rf MyProject.xcworkspace
pod install
But I met errors.
Re-creating CocoaPods due to major version update.
Analyzing dependencies
[!] The dependency `Alamofire (~> 1.3)` is not used in any concrete target.
The dependency `APAddressBook` is not used in any concrete target.
The dependency `Bolts` is not used in any concrete target.
The dependency `JSQMessagesViewController (from `https://github.com/galambalazs/JSQMessagesViewController.git`, branch `smooth-scrolling`)` is not used in any concrete target.
The dependency `JSQSystemSoundPlayer` is not used in any concrete target.
The dependency `FBSDKCoreKit` is not used in any concrete target.
The dependency `FBSDKLoginKit` is not used in any concrete target.
The dependency `FBSDKShareKit` is not used in any concrete target.
The dependency `FBAudienceNetwork` is not used in any concrete target.
The dependency `Parse` is not used in any concrete target.
The dependency `ParseUI` is not used in any concrete target.
The dependency `ParseCrashReporting` is not used in any concrete target.
The dependency `ParseFacebookUtils` is not used in any concrete target.
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
The Podfile is :
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, ‘8.0’
use_frameworks!
pod 'Alamofire', '~> 1.3’
pod 'APAddressBook'
pod 'Bolts'
pod 'JSQMessagesViewController', :git => 'https://github.com/galambalazs/JSQMessagesViewController.git', :branch => 'smooth-scrolling'
pod 'JSQSystemSoundPlayer'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'FBAudienceNetwork'
pod 'Parse'
pod 'ParseUI'
pod 'ParseCrashReporting'
pod 'ParseFacebookUtils'
How can I fix this error?
You can modify the podfile like this:
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'SwiftParseChat' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Alamofire', '~> 1.3’
pod 'APAddressBook'
pod 'Bolts'
pod 'JSQMessagesViewController', :git => 'https://github.com/galambalazs/JSQMessagesViewController.git', :branch => 'smooth-scrolling'
pod 'JSQSystemSoundPlayer'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'FBAudienceNetwork'
pod 'Parse'
pod 'ParseUI'
pod 'ParseCrashReporting'
pod 'ParseFacebookUtils'
# Pods for SwiftParseChat
end
Try like this
rm Podfile
pod init
Then new Podfile is created.
Then you can insert necessary API to the new Podfile.
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.
The question is how to cleanly remove Test in cocoapods PodFile ?
I'ved just recently updated cocoapods 1.0.0 to my project
I ran "pod init" to generate a sample PodFile then put in my pods.
Whole bunch of error generated by the xcode test project ProjectNameTests
http://imgur.com/fUOF18i
How can I cleanly remove the tests ? Even if comment it out there is other problems like Bridging-Header.h cannot find dependent header.
In my current PodFile for 1.0.0:
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'ProjectName' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for ProjectName
pod 'FBSDKCoreKit', '~> 4.9'
pod 'FBSDKLoginKit', '~> 4.9'
pod 'FBSDKShareKit', '~> 4.9'
pod 'SwiftyJSON', '~> 2.3.1'
pod 'Alamofire', '~> 3.0'
pod 'Google/Analytics', '~> 1.0.0'
pod 'Fabric'
pod 'Crashlytics'
pod 'AWSS3'
target 'ProjectNameTests' do
inherit! :search_paths
# Pods for testing
end
end
my previous PodFile, no mention for target project or test:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'FBSDKCoreKit', '~> 4.9'
pod 'FBSDKLoginKit', '~> 4.9'
pod 'FBSDKShareKit', '~> 4.9'
pod 'SwiftyJSON', '~> 2.3.1'
pod 'Alamofire', '~> 3.0'
pod 'Google/Analytics', '~> 1.0.0'
pod 'Fabric'
pod 'Crashlytics'
pod 'AWSS3'
The type of errors you'r defining are not because you have a target to the tests in your Podfile. inherit! :search_paths indicates that this target inherits the pods from the target above it.
One thing you might be getting wrong is that the "target 'ProjectName' do" is not regarding your project name but an actual target of your project.
A target can have a different name then your project.
You can also check the official migration guide Migration Guide.
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.