cocoapods

DEBUG preprocessor macro not defined for CocoaPods targets

限于喜欢 提交于 2019-11-29 02:14:43
问题 I'm having issues with a pod called DCIntrospect-ARC which should only work in DEBUG mode. It checks if the DEBUG macro is defined before running. However, it is not defined in the CocoaPods target and even though I am running in debug mode in Xcode it fails to run because the DEBUG macro is not defined. I can define the DEBUG macro in the podspec using s.xcconfig = { "GCC_PREPROCESSOR_DEFINITIONS" => '$(inherited) DEBUG=1' } but this defined DEBUG for all build configurations and not only

Pods was rejected as an implicit dependency for 'libPods.a' because its architectures 'XXX' didn't contain all required architectures

别说谁变了你拦得住时间么 提交于 2019-11-29 02:05:34
问题 A friend updated Cocoapods in our project. When I pulled the latest stuff from git I got the following error: Pods was rejected as an implicit dependency for 'libPods.a' because its architectures 'x86_64' didn't contain all required architectures 'i386' This results in ld: library not found for -lPods-___PODLIBRARY____ clang: error: linker command failed with exit code 1 (use -v to see invocation) I have searched around for hours now trying to find it. The most common fixes I've tried are..

No such module … in Xcode

旧城冷巷雨未停 提交于 2019-11-29 02:02:21
I've run into a problem with Xcode (using Swift) that has me completely stumped. I realize that this question has been asked and answered, but none of the answers have worked for me, and my situation seems to be a bit different than the others, as all of my pods are failing (not just a specific one). They all worked fine a week ago. I use Cocoapods for some of the more common Swift frameworks (e.g. Alamofire, Eureka, Kingfisher, SwiftyJSON, etc.). They were all working fine in Xcode 7. However, one of the (automatic) updates bumped up my Xcode version, after which it became mandatory to

unable to use cocoapods after updating

≯℡__Kan透↙ 提交于 2019-11-29 02:01:53
I have updates Ruby , Gems and Cocoapods on my mac OSX 10.9.5, after the update I am unable to execute the command pod install I'm getting the below error from terminal /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.2/lib/cocoapods/user_interface/error_report.rb:13:in `report': incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError) from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.2/lib/cocoapods/command.rb:61:in `report_error' from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:300:in `handle_exception' from /Library/Ruby/Gems/2.0.0/gems/claide-0

Module compiled with Swift 4.1.2 cannot be imported in Swift 4.1.50: Xcode 10 Error

筅森魡賤 提交于 2019-11-29 01:23:44
Swift 4.2 came out and I'm receiving this error message in my project when using ObjectMapper and some other pods too: Module compiled with Swift 4.1.2 cannot be imported in Swift 4.1.50 So how do I tell Xcode to start updating my project and migrate it to Swift 4.2? In Swift 4.2 there is a change in implementation of Implicitly Unwrapped Optional (IUO) , as per the swift blog now implicit unwrapped optional T! will be considered as T? with and extra flag for the compiler to know it is an implicit unwrap optional. The new mental model for IUOs is one where you consider ! to be a synonym for ?

How to use images asset catalog in cocoapod library for iOS

て烟熏妆下的殇ゞ 提交于 2019-11-29 01:09:20
I have a cocoapod library which contains assets in 2 formats: a .storyboard XCode asset catalog .xcassets (with images) my podspec file contains the definition for the resource bundle: s.resource_bundle = {'SparkSetup' => ['Resources/**/*.{xcassets,storyboard}']} and I have a separate target in the pod project to create a resource bundle by using those files + a plist file for that bundle. thing is that when I use the pod in an app project - I can see the storyboard/xcassets files being in the pod target and I can access and run the storyboard easily but the images referenced in the storyboard

Error with cocoapods link_with after update to 1.0.0

故事扮演 提交于 2019-11-29 01:02:28
I have updated cocoapods today to 1.0.0 version. I got this string when I update the pods: [!] Invalid Podfile file: [!] The specification of link_with in the Podfile is now unsupported, please use target blocks instead.. I have removed link_with in my podFile but I can't build the project because I have many Match-O-Linkers. Any one knows how should I fix this problem? This is my Podfile right now: source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' inhibit_all_warnings! pod 'pop', '~> 1.0' pod 'AFNetworking', '~> 1.3' pod 'SDWebImage', '~> 3.7' pod 'GoogleAnalytics', '~> 3'

Unable to install 'cocoapods' gem from rubygems.org (bad response backend read error)

本秂侑毒 提交于 2019-11-29 00:58:27
问题 I'm getting an error when I run 'gem install cocoapods' on OSX Mavericks. $ gem install cocoapods ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why: Unable to download data from https://rubygems.org/ - bad response backend read error 503 (https://rubygems.global.ssl.fastly.net/quick/Marshal.4.8/cocoapods-0.27.1.gemspec.rz) ERROR: Possible alternatives: cocoapods Please note that I can download the cocoapods-0.27.1.gemspec.rz directly. I am running the latest version of XCode

使用 CocoaPods 管理依赖库

痴心易碎 提交于 2019-11-29 00:52:18
文本首发于 Ryan’s Zone 本篇内容将介绍Mac和iOS开发中必备的一个依赖库管理工具 CocoaPods 。 CocoaPods是什么 在iOS开发中势必会用到一些第三方依赖库,比如大家都熟悉的ASIHttpRequest、AFNetworking、JSONKit等。使用这些第三方类库能极大的方便项目的开发,但是,集成这些依赖库需要我们手动去配置,例如集成ASIHttpRequest库时除了加入源码以外还需要手动去添加一些系统框架,比如CFNetwork、MobileCoreServices等,如果这些第三方库发生了更新,还需要手动去更新项目。这就显得非常麻烦。有麻烦自然有解决办法,CocoaPods就是为了解决这个问题而生的。通过CocoaPods,我们可以将第三方的依赖库统一管理起来,配置和更新只需要通过简单的几行命令即可完成,大大的提高了实际开发中的工作效率,使我们的主要精力集中到更重要的事情上去。 安装CocoaPods 我的环境为Mac OS X 10.9.1,安装CocoaPods之前,先确保本地有Ruby环境,因为CocoaPods运行于Ruby之上,默认情况下,Mac是自带了Ruby环境的,可以通过命令行“`ruby -v“`查看当前Ruby的版本,我用的是1.9.3p448。接下来我们就可以通过如下命令安装CocoaPods了。 $ sudo gem

CocoaPods安装和使用及问题:Setting up CocoaPods master repo

纵饮孤独 提交于 2019-11-29 00:52:06
目录 CocoaPods是什么? 如何下载和安装CocoaPods? 如何使用CocoaPods? 场景1:利用CocoaPods,在项目中导入AFNetworking类库 场景2:如何正确编译运行一个包含CocoPods类库的项目 CocoaPods是什么? 当你开发iOS应用时,会经常使用到很多第三方开源类库,比如JSONKit,AFNetWorking等等。可能某个类库又用到其他类库,所以要使用它,必须得另外下载其他类库,而其他类库又用到其他类库,“子子孙孙无穷尽也”,这也许是比较特殊的情况。总之小编的意思就是,手动一个个去下载所需类库十分麻烦。另外一种常见情况是,你项目中用到的类库有更新,你必须得重新下载新版本,重新加入到项目中,十分麻烦。如果能有什么工具能解决这些恼人的问题,那将“善莫大焉”。所以,你需要 CocoaPods。 CocoaPods应该是iOS最常用最有名的类库管理工具了,上述两个烦人的问题,通过cocoaPods,只需要一行命令就可以完全解决,当然前提是你必须正确设置它。重要的是,绝大部分有名的开源类库,都支持CocoaPods。所以,作为iOS程序员的我们,掌握CocoaPods的使用是必不可少的基本技能了。 如何下载和安装CocoaPods? 在安装CocoaPods之前,首先要在本地安装好Ruby环境。至于如何在Mac中安装好Ruby环境