cocoapods

How to use Objective-C CocoaPods in a Swift Project

怎甘沉沦 提交于 2019-11-26 10:13:55
问题 Is there a way I can use a CocoaPod written in Objective-C in my Swift project using swift? Do I just make a bridging header? And if so, can I access the objects, classes, and fields defined by the libraries in the CocoaPod in Swift? 回答1: Basic answer to your question is Yes, you can use objective-c code built with CocoaPods. More important question is "How to use such libs?" Answer on this question depends on use_frameworks! flag in your Podfile : Let's imagine that you want use Objective-C

Libraries not found when using CocoaPods with iOS logic tests

房东的猫 提交于 2019-11-26 10:07:15
问题 I am trying to write some iOS logic tests against classes in my project that use functionality from some of the libraries in my podspec. I am using the standard unit test bundle provided in Xcode (although not Application Tests, just Unit Tests). For example, I use Magical Record, and I have that library linked in my podspec. It is present in the Pods project in my workspace, and works as expected when the app is running in the simulator or on the device. When I try to link to the test the

Pod install is staying on “Setting up CocoaPods Master repo”

依然范特西╮ 提交于 2019-11-26 10:06:26
问题 I\'m cloning a project from a git repo, but when I execute pod install the first line I see is \"Setting up CocoaPods Master repo\" and after that I can\'t see anything more, the console stops there. I don\'t know what is happening. Anyone knows what\'s happening here? Why Does CocoaPods stop there? 回答1: You could try running in verbose mode: pod install --verbose This'll show you what cocoapods is up to: Setting up CocoaPods master repo Cloning spec repo `master` from `https://github.com

“file not found” in Bridging Header when importing Objective-C frameworks into Swift project by CocoaPod

喜你入骨 提交于 2019-11-26 10:03:17
问题 I got a swift project ,and use CocoaPod to import the third part repositories. In pod file I use use_frameworks! , so the repositories will build into framework to use. And I import the ObjC framework like #import \"\" or #import <> in my Bridging Header. In this situation, I run the project, it works. but When I archive, “file not found” is found in Bridging Header file. `BridgingHeader.h:5:9: error: \'RESideMenu/RESideMenu.h>\' file not found #import <RESideMenu/RESideMenu.h> <unknown>:0:

target overrides the FRAMEWORK_SEARCH_PATHS build settings

£可爱£侵袭症+ 提交于 2019-11-26 09:39:02
问题 I\'d like to ask and then answer this question. I\'d like to update the CocoaPods built into my app, so I ran pod install from the terminal. That\'s when I got this error: [!] The `APP_NAME [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig\'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. How do you Use the $(inherited)

Cannot install cocoa pods after uninstalling, results in error

ε祈祈猫儿з 提交于 2019-11-26 09:05:05
问题 I removed cocoa pods because it claimed it had installed, but kept saying the command pod wasn\'t found afterward. When trying to reinstall cocoapods ( sudo gem install cocoa pods -v ) I get this error: ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod Any ideas? 回答1: As it has been pointed out below by Ramesh Ramchandaran, this is a cleaner way of doing it, instead of getting around the Security features of OS X. sudo gem install -n /usr/local/bin cocoapods

How to downgrade or install an older version of Cocoapods

依然范特西╮ 提交于 2019-11-26 08:57:31
问题 How can I downgrade Cocoapods to an older version, or how can I install an older version of Cocoapods? 回答1: to remove your current version you could just run: sudo gem uninstall cocoapods you can install a specific version of cocoa pods via the following command: sudo gem install cocoapods -v 0.25.0 You can use older installed versions with following command: pod _0.25.0_ setup 回答2: Actually, you don't need to downgrade – if you need to use older version in some projects, just specify the

How do I specify multiple targets in my podfile for my Xcode project?

孤人 提交于 2019-11-26 08:45:55
问题 I\'m using CocoaPods with my Xcode 4 project and I have three targets for my project (the default, one for building a lite version and one for building a demo version). All the targets use the same libraries, but CocoaPods is only adding the static library and search paths to the primary target. My podfile looks like this: platform :ios, \'5.0\' pod \'TestFlightSDK\', \'>= 1.1\' pod \'MBProgressHUD\', \'0.5\' pod \'iRate\', \'>= 1.6.2\' pod \'TimesSquare\', \'1.0.1\' pod \'AFNetworking\', \'1

Cocoapods Warning - CocoaPods did not set the base configuration of your project because because your project already has a custom config set

℡╲_俬逩灬. 提交于 2019-11-26 07:51:41
问题 After I execute a pod install at the base of my project, I get the following error: CocoaPods did not set the base configuration of your project because because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target BluePlaquesLondonFramework to Pods/Target Support Files/Pods/Pods.debug.xcconfig or include the Pods/Target Support Files/Pods/Pods.debug.xcconfig in your build configuration. This

cocoapods - &#39;pod install&#39; takes forever

一曲冷凌霜 提交于 2019-11-26 07:51:16
问题 I was trying to update the existing pods with pod install command, but it takes forever to run. The verbose mode shows it was stuck at the following line (forever) Updating spec repo master $ /usr/bin/git pull --no-rebase --no-commit There are no network activity after it get stuck. 回答1: I ran into the same problem, and I solved it by running the following commands which is given here pod repo remove master pod setup pod install 回答2: you can run pod install --verbose to see what's going on