cocoapods

what is the usage of “~>” in cocoapods

拟墨画扇 提交于 2019-11-28 20:49:58
问题 I want to know what the "~>" is used for,cause I find they are the same below: pod 'AFNetworking','~> 2.0.3' pod 'AFNetworking','2.0.3' 回答1: Well, ~> (the optimistic operator) is used when you want to specify a version 'up to next major | minor | patch '. For example: ~> 0.1.2 will get you a version up to 0.2 (but not including 0.2 and higher) ~> 0.1 will get you a version up to 1.0 (but not including 1.0 and higher) ~> 0 will get you a version of 0 and higher (same as if it was omitted)

CocoaPods - use specific pod version

☆樱花仙子☆ 提交于 2019-11-28 20:42:40
问题 I am using CocoaPods for a macOS app. I have compilation errors with AFNetworking (current version, 1.2.1) and saw that these didn't exist in the previous version (1.2.0). I did some research but did not find a possibility to define the version of a pod (for example, version 1.2.0 instead of 1.2.1). Is this possible or do I have to wait until there is a new version of that library? 回答1: In your Podfile: pod 'AFNetworking', '1.2.0' Check 'Get started' at http://cocoapods.org Once this is done,

How do I configure my project for Cocoa Pods correctly?

折月煮酒 提交于 2019-11-28 20:37:26
问题 In some of my past projects, Cocoa Pods wasn't configured correctly and it would lead to undesirable things such as needing duplicate Cocoa Pod projects in the Project Navigator, or pod files having to be checked in to version control. How do I install Cocoa Pods correctly and verify that my Directory structure and Project Navigator structures are set up properly? 回答1: The best way to use Cocoa Pods is to follow the official example's lead. This consists of several steps. Setting up Cocoa

CocoaPods dependency only on debug/release build

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 20:13:05
I'm using a pod as an internal library for my project. I want to have some pods included only on release/debug builds, like Reveal/Sparkinspector. Is there any way to define podspec dependencies depending on the currently selected build configuration (build/release)? With the recent release it's officially available now: http://blog.cocoapods.org/CocoaPods-0.34/ Use pod 'Lookback', :configurations => ['Debug'] Matt S. For anyone just finding this, this looks to be scheduled in the next release, per my answer here: https://stackoverflow.com/a/25653469/490180 see the multiple targets section

What's ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES with CocoaPods, Swift 3 and Xcode 8

百般思念 提交于 2019-11-28 20:05:12
after installing cocoapods and adding pod "SwiftCarousel" to pod file and uncomment the platform :ios, '9.0' I got this ERROR ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES and what should I do? mohammed.elias$ pod install Analyzing dependencies Downloading dependencies Installing SwiftCarousel (0.8.0) Generating Pods project Integrating client project [!] Please close any current Xcode sessions and use `scrollView.xcworkspace` for this project from now on. Sending stats Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed. [!] The `scrollViewTests [Debug]` target

Cocoapods can't find header xcode 6

僤鯓⒐⒋嵵緔 提交于 2019-11-28 19:45:15
问题 I have a problem xcode can't find the headers of my pods in my wokspace. The headers search path for the target seems ok Here is the content of my podfile target "MyApp" do pod 'AFNetworking', '~> 2.0' pod 'Reachability' pod 'ViewDeck', '2.2.11' pod 'MBProgressHUD', '~> 0.8' end But when i build the project i have this error in the prefix.pch /Users/...../MyApp-Prefix.pch:17:13: 'AFNetworking.h' file not found I have tried to add platform :ios, "8.0" in my podfile and do a pod update but

Adding several pods increases iOS app launch time by 10+ seconds

社会主义新天地 提交于 2019-11-28 19:38:31
问题 I'm doing an iOS app project in Swift 1.2, using Cocoapods 0.37.2, Xcode 6.3.2. After adding around 8 pods in my project, app launch time greatly increases (around 10 seconds more) on device (iPhone 5). (Note: launch time means the time when you tap the app icon to open the app) It is so slow iOS terminates it because it doesn't launch in time. The top of the crash log is as follows... Application Specific Information: com.tryslowappswift failed to launch in time Elapsed total CPU time

Class X is implemented in both <framework> and <application> one of the two will be used, which one is undefined

蹲街弑〆低调 提交于 2019-11-28 18:28:39
问题 I'm getting this warning: Class X is implemented in both <framework> and <application> one of the two will be used, which one is undefined This warning is covered quite a bit across the web but i haven't found anything that answers the specific problem I'm having. Scenario I've built MyFramework and MyApplication (as a test/demo application for MyFramework). MyFramework uses a CocoaPod (which I'll refer to as CoolPod), which I also want to use in MyApplication (and it is reasonable to assume

How to include AFNetworking as a Framework for using in an iOS App and Extension via CocoaPods

心不动则不痛 提交于 2019-11-28 18:26:16
NB: This is related to this question on project structure, but I have decided to a vastly the use-case to better abstract the problem. Problem How do I include afnetworking in my iOS App and an accompanying iOS Extension ( ios8-extention , ios8-today-widget or ios8-share-extension ) via CocoaPods? Issues For use in Extensions, AFNetworking needs to be build with #define AF_APP_EXTENSIONS , does this mean I need 2 versions AFNetworking? One for the Extension and one for the App? How do I set up the Podfile so frameworks are built and copied to the correct places? Documentation on use_frameworks

How to reference header files in Bridging-Header.h after updating CocoaPods to 0.36.x and above?

喜夏-厌秋 提交于 2019-11-28 18:24:31
问题 After updating to CocoaPods 0.36.x, I am unable to add imports into my Bridging-Header.h file. I get the "DBSphereView.h file not found". The file is indeed present in: "Pods/DBSphereTagCloud/DBSphereView.h" "Headers/public/DBSphereTagCloud/DBSphereView.h" "Headers/private/DBSphereTagCloud/DBSphereView.h" My bridge file: #ifndef Loan_Bridging_Header_h #define Loan_Bridging_Header_h #import "DBSphereView.h" #endif I am able to use Frameworks. I have a reference to a well known Framework