Tag: cocoapods

沙盒与Podfile.lock-ios不同步

尝试从谷歌的多个答案后,我有以下错误。 PhaseScriptExecution Check\ Pods\ Manifest.lock /Users/apple/Library/Developer/Xcode/DerivedData/Build/Intermediates/FoodSpot.build/Debug- iphonesimulator/FoodSpotTests.build/Script-36819C3C1B6A30F50091382D.sh cd "/Users/apple/Downloads/FoodSpot 2" /bin/sh -c /Users/apple/Library/Developer/Xcode/DerivedData/Build/Intermediates/FoodSpot.build/Debug-iphonesimulator/FoodSpotTests.build/Script-36819C3C1B6A30F50091382D.sh 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. 我已经更新和安装了很多次,但是没用。

无法使用Xcode 7和带有Podfile的GoogleMaps将IOS应用上传到iTunes

我有一个使用Xcode 7重build的应用程序。这个应用程序一直在使用GoogleMaps IOS SDK。 同时(很大的错误),我正在更新代码到Xcode 7(用于IOS 9支持),我决定升级到最新版本的GoogleMaps API。 该版本要求项目使用Podfiles。 我有多个目标,让Podfiles工作是一个痛苦,但我得到它的工作。 该应用程序在模拟器中编译并运行良好。 当我归档项目并尝试将应用程序上传到App Store时,问题就出现了。 我得到以下错误: 我不知道该怎么做。 我似乎无法find有关此错误的任何信息。 这里是我的Podfile的副本: # Podfile source 'https://github.com/CocoaPods/Specs.git' platform :ios, '7.0' # Common Pods def common_pods pod 'GoogleMaps' end # Target List target 'app1' do common_pods end target 'app2' do common_pods end target 'app3' do common_pods end 由于我不控制Google API,我无法更改他们的Info.plist文件。 我错过了什么吗?

pod安装失败,错误:在Pod中安装iOS时,由“Podfile”需要库(来自`../`)`

我正在做一个椰子树。 我正在使用pod lib create MyLibrary来创build一个新的cocoapods。 完成后,我将两个文件添加到MyLibrary / Pod / Classes /中。 我提交并添加一个标签,然后推送到原始主。 并通过validationMyLibrary.podspec。 因此,我进入pod lib create MyLibrary时创build的示例文件夹。 并在terminal上进行pod install 。 但是我收到错误: Analyzing dependencies Fetching podspec for `MyLibrary` from `../` [!] Unable to satisfy the following requirements: – `MyLibrary (from `../`)` required by `Podfile` podspec设置都是正确的,就像这个s.source_files = 'Pod/Classes/*.{h,m}' ,并且它通过了validation。 所以我认为pod spec文件没有问题。 看起来pod安装无法findPod文件夹。 但是它就在那里。 我是新来的这个做椰子树。 所以,如果有什么不清楚的,请告诉我。 我不知道我在这里做错了什么。

访问pod中的资源

我想将图片资源包含在cocoapod库中,但是我无法访问它们。 我已阅读这些资源寻求帮助: Cocoapods资源 Cocoapods资源包 Mokacoding资源包 大卫波特资源包 但是,没有人指出我获取资源的方向。 我已经尝试了以下内容: [UIImage imageWithData:[NSData dataWithContentsOfURL:[(NSBundle *)[NSBundle bundleWithIdentifier:@"Assets"] URLForResource:@"my-image@2x" withExtension:@"png"]]] [UIImage imageWithData:[NSData dataWithContentsOfURL:[(NSBundle *)[NSBundle bundleWithIdentifier:@"Assets"] URLForResource:@"my-image" withExtension:@"png"]]] [UIImage imageWithData:[NSData dataWithContentsOfURL:[(NSBundle *)[NSBundle bundleWithIdentifier:@"Assets.bundle"] URLForResource:@"my-image" withExtension:@"png"]]] [UIImage imageWithData:[NSData dataWithContentsOfURL:[(NSBundle *)[NSBundle mainBundle] URLForResource:@"my-image" withExtension:@"png"]]] [[UIImage imageWithData:[NSData dataWithContentsOfURL:[(NSBundle *)[NSBundle mainBundle] URLForResource:@"my-image@2x" withExtension:@"png"]]] [UIImage imageNamed:@"my-asset"] [UIImage imageNamed:@"my-asset@2x.png"] 但是他们都没有工作。 我已经安装了我的podspec这些替代品,既不与上述工作: s.resources = ['Pod/Assets/*.{png, jpg}', 'Pod/Assets/**/*.{png, jpg}'] […]

为CocoaPods的窗格设置部署目标

我使用CocoaPods来pipe理项目中的依赖关系。 我写了Podfile: target 'MyApp' do platform :ios, '8.0' # Uncomment this line if you're using Swift or would like to use dynamic frameworks #use_frameworks! # Pods for MyApp pod 'KeepLayout', :git => 'https://github.com/iMartinKiss/KeepLayout', :tag => 'v1.6.0' pod 'EasyMapping' target 'MyAppTests' do inherit! :search_paths # Pods for testing end target 'MyAppUITests' do inherit! :search_paths # Pods […]

从CocoaPods资源包加载图像

我正在创build一个私有库,其中包含库中组件引用的资源。 该库与使用CocoaPods的应用程序共享。 在库的.podspec中,我已经包含了这样一行: s.resource_bundles = {'IXMapKitResources' => ['IXMapKit/Resources/*']} 捆绑中的资源之一是具有多个图像集的资产目录,其中之一被称为“IXMKAnnotationIcons-Normal-Accident”。 以下代码返回一个零: UIImage * image = [UIImage imageNamed: @"IXMKAnnotationIcons-Normal-Accident"]; 我在mokacoding.com上find了一篇关于如何从一个pod加载字体的文章 ,但是这对我来说并不适用: – (UIImage *) ixmk_imageNamed: (NSString *) name { NSString * IXMKResourceBundleName = @"IXMapKitResources.bundle"; NSString * resourceName = [NSString stringWithFormat: @"%@/%@", IXMKResourceBundleName, name]; NSString * imageTypeString = [self ixmk_stringForImageType: imageType]; NSURL * url = [[NSBundle mainBundle] URLForResource: […]

如何在多个Framework子项目中使用CocoaPods

首先,我已经打开了use_framework! 在Podfile中。 假设主项目是MAIN_APP,两个子项目是FRAMEWORK_A和FRAMEWORK_B。 MAIN_APP需要FRAMEWORK_A和FRAMEWORK_B,而FRAMEWORK_B也需要FRAMEWORK_A。 所有项目/目标都使用CocoaPods来pipe理第三方库。 现在,我的Podfile看起来像: target :MAIN_APP do project 'MAIN_APP' pod 'PodA' end target :FRAMEWORK_A do project 'FRAMEWORK_A' pod 'PodB' end target :FRAMEWORK_B do project 'FRAMEWORK_B' pod 'PodC' end 我手动添加FRAMEWORK_A构buildFRAMEWORK_B的设置,FRAMEWORK_A和FRAMEWORK_B构buildMAIN_APP的设置。 所有代码编译良好,但是当运行MAIN_APP崩溃时,因为无法加载PodB框架。 我知道我可以手动添加PodB到MAIN_APP和FRAMEWORK_B,但是可以在Podfile中定义这种目标依赖项吗? 顺便说一句,当pod install ,我得到了警告: [!] Podfile包含框架目标,Podfile不包含主机目标(embedded框架的目标)。 如果这个项目是做框架开发的,你可以忽略这个消息。 否则,将一个目标添加到embedded这些框架的Podfile以使该消息消失(例如,testing目标)。 据我所知,我可以使用宿主目标的嵌套目标,如: target :FRAMEWORK_A target :MAIN_APP end end 所以CocoaPods将设置MAIN_APP来使用FRAMEWORK_A并从FRAMEWORK_Ainheritancepod依赖。 但似乎我不能做到像多个依赖: target :FRAMEWORK_A target :MAIN_APP end end […]

使用cocoapods更改导入的库

我正在使用cocoapods开展一个项目,突然间我发现自己在一个库中做了一些改动。 我如何确保这些更改永远不会被pod update覆盖? 有什么方法可以在没有更新github项目的情况下在一个pod中引入更改? 更新:分叉项目 我试图分叉项目,并创build一个新的specfile指向新的项目。 我能够安装基本的东西,但是,出于某种原因,有一些依赖已安装,但不能在pods项目内引用。 目前我在我的podsfile中有这个: 'WhirlyGlobe', :podspec => 'https://raw.github.com/tiagoalmeida/WhirlyGlobe/master/WhirlyGlobe.podspec' 图书馆的叉子在https://github.com/tiagoalmeida/WhirlyGlobe UPDATE2:缺less标题 我发现没有生成用于boost和Eigen(从WhrilyGlobe使用)的头(Pods / Headers)。 更新3:试图做一些关于标题 我试图看看在这个线程中的一些configuration,我已经尝试了FAQ中的解决scheme,但我相信我的问题是不同的。 标题实际上是缺less的。 UPDATE4:攻击cocoapods版本 我卸载了cocoapods并安装了版本0.20.2(在尝试使用我的fork之前工作),并保持不变:/。

如何使用特定版本的CocoaPods

是否有可能以某种方式特定的版本的CocoaPods我想在升级或安装Podfile时使用? 我已经遇到了几次Podfiles与CocoaPods的一个版本正确工作,但不与其他人。 例如,我正在查找的语法如下所示: pod -v 0.34 install

Cocoapods OpenCV 2.4.10链接器错误

我正在尝试使用OpenCV 2.4.10构build一个简单的项目,但是我得到了一堆像这样的错误: 架构x86_64的未定义符号: “_jpeg_free_large”,引用自: _free_pool in opencv2(jmemmgr.o) “_jpeg_free_small”,引用自: _free_pool in opencv2(jmemmgr.o) opencv2中的_self_destruct(jmemmgr.o) 这里是ViewController.m #import "ViewController.h" #import <opencv2/opencv.hpp> @interface ViewController () @end @implementation ViewController – (void)viewDidLoad { [super viewDidLoad]; cv::Mat greyMat; } Podfile platform :ios, '8.1' pod 'OpenCV', '2.4.10' 当我使用版本2.4.9.1或2.4.9时,项目构build得很好。 我也能够用我在podspec 2.4.10中find的从URL下载的框架文件来构build这个项目。