Tag: cocoapods

如何构build一个弱链接的CocoaPods库的iOS框架

我正在尝试使用Xcode 6提供的用于创buildCocoa Touch Frameworks的新模板来构buildiOS框架(Test.framework)。 该框架具有在Podfile中指定的不同的依赖关系(如AFNetworking或FacebookSDK)。 我不希望依赖关系被包含在框架中,我只是想和他们联系起来。 问题是当我构build框架时,libPods.a被链接并包含在内。 问:如何链接libPods.a库,但不包含在框架中? 更多细节: 我已经阅读了弱链接: https : //developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html但我没有太多的经验与项目设置玩,所以我'我不是一个亲。 我试图把libPods.a作为一个“可选”,但没有任何改变,依赖依然包括在内。 我试图从“构build阶段链接二进制库”部分删除libPods.a,但我得到这个错误(清理项目文件夹后,再次build设): ld: library not found for -lPods-MyFramework-AFNetworking 我试图从“其他链接器标志”删除所有的标志,但它给了我未定义的符号: Undefined symbols for architecture armv7: "_OBJC_CLASS_$_FBSession", referenced from: objc-class-ref in TestClass.o ld: symbol(s) not found for architecture armv7 这里是包含库的干净项目的源代码: https : //www.dropbox.com/sh/0ymuzw6kiagz02j/AABzyHiZVaQQvBEnjBgRBq3ua?dl=0

Xcode 7.0.1与CocaoPods应用程序编译错误退出代码1

我最近升级到最新的Xcode,并添加了一堆新的代码,并修复了所有正常的编译错误后,我得到了以下,我不知道如何纠正这个错误。 任何build议,请。 PhaseScriptExecution Copy\ Pods\ Resources /Users/dpreston10/Library/Developer/Xcode/DerivedData/Pesto-dxseswuhgbzbluabjffcnlgzjelu/Build/Intermediates/Pesto.build/Debug-iphoneos/Pesto.build/Script-EF1179D6E7811474BD220AEA.sh cd /Users/dpreston10/Dropbox/Pesto /bin/sh -c /Users/dpreston10/Library/Developer/Xcode/DerivedData/Pesto-dxseswuhgbzbluabjffcnlgzjelu/Build/Intermediates/Pesto.build/Debug-iphoneos/Pesto.build/Script-EF1179D6E7811474BD220AEA.sh /Users/dpreston10/Dropbox/Pesto/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle /Users/dpreston10/Dropbox/Pesto/Pods/JSQMessagesViewController/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle ibtool –reference-external-strings-file –errors –warnings –notices –output-format human-readable-text –compile /Users/dpreston10/Library/Developer/Xcode/DerivedData/Pesto-dxseswuhgbzbluabjffcnlgzjelu/Build/Products/Debug-iphoneos/Pesto.app/JSQMessagesViewController.nib /Users/dpreston10/Dropbox/Pesto/Pods/JSQMessagesViewController/JSQMessagesViewController/Controllers/JSQMessagesViewController.xib –sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk 2015-10-03 16:35:22.011 Interface Builder Cocoa Touch Tool[12168:7780607] CoreUI: CUICatalog: couldn't get 'kMGArtworkGraphicsFeatureSetClass' from MGCopyAnswer got '{ ArtworkDeviceIdiom = pad; ArtworkDeviceScaleFactor = "-1"; DevicePerformanceMemoryClass = 1; }' 2015-10-03 16:35:22.011 Interface […]

离子3 – 与cocoapods xcode错误

我尝试构build一个带有推送通知的离子3应用程序,并且在部署iOS时遇到了一些问题。 我在xcode中有这3个错误: 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. 我已经尝试了很多我在网上find的解决scheme: 使用命令“pod install”,“pod update” 删除并安装CocoaPods 更新CocoaPods 删除“Pods”文件夹,“Podfile.lock”和“Podfile”并运行“pod install”命令。 从链接二进制从库中删除libPods-myApp.a。 但没有什么是有效的… 我真的不知道我要做什么。 我的Podfile: # DO NOT MODIFY — auto-generated by Apache Cordova […]

框架的Info.plist中没有CFBundleIdentifier

我在使用cocoapods安装并运行后,发现Bridge.h导入的问题。 我有: #import <TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.h> #import <DateTools/DateTools.h> 但它没有工作,因为我的头文件夹是空的,所以我复制这两个文件夹到头文件夹,并硬编码的path: #import </Users/username/Documents/new_ios/ios-app/Pods/Headers/TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.h> #import </Users/username/Documents/new_ios/ios-app/Pods/Headers/DateTools/DateTools.h> 这工作和应用程序生成,但是当我跑它给了这个错误: The operation couldn't be completed. (LaunchServicesError error 0.) The operation couldn't be completed. (LaunchServicesError error 0.) 这里是控制台输出: 6/2/16 4:41:24.961 PM uploadDSYM[3519]: Fabric.framework/run 1.4.0 6/2/16 4:41:24.981 PM uploadDSYM[3521]: Fabric.framework/run 1.4.0 6/2/16 4:41:25.011 PM appleeventsd[51]: SecTaskLoadEntitlements failed error=22 6/2/16 4:41:25.019 PM sharedfilelistd[251]: SecTaskLoadEntitlements failed error=22 […]

CocoaPods:指向pod规范中的一个分支

我试图从一个版本库的分支安装在一个pod规范的代码,并基于文档,这应该工作: s.dependency 'repository_name', :git => 'https://github.com/account_name/repository_name.git', :branch => 'experimental_branch' 但是我得到一个像[!]不受支持的版本要求的错误。 更新CocoaPods可能会解决这个问题。 它可以直接从pod文件安装: pod 'ObjectiveRecord', :git => 'https://github.com/supermarin/ObjectiveRecord.git', :branch => '2-0-experimental' 有人知道吗? 谢谢!

在主目标中包含Pod,而不是在WatchKit扩展中

我在当前项目中添加了一个WatchKit扩展。 该项目使用Cocoapods 0.36.1来添加一些框架,但现在我想从WatchKit扩展项目中排除一些窗格。 WatchKit扩展项目并不需要我在正常目标中使用的很多框架,但是在更改我的Podfile之后,我无法使Cocoapods正确工作。 我使用use_frameworks! 在我的Podfile中,但运行pod install我得到以下消息: [!] CocoaPods did not set the base configuration of your project 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 `HomeHandler` to `Pods/Target Support Files/Pods-HomeHandler/Pods-HomeHandler.debug.xcconfig` or include the `Pods/Target Support […]

安装老cocoapods?

我的整个项目目前是怪人,因为没有任何依赖符合cocoapods 1.0。 不仅是数百万Podspecs不工作,还有多个其他问题曾经是警告,现在build立停止错误…很令人沮丧。 我已经尝试删除~/.cocoapods , sudo gem uninstall cocoapods和sudo gem install cocoapods -v 0.39.0 ,发生同样的错误。 看起来好像是在安装它呢? cocoapods (0.39.0) cocoapods-core (1.0.0, 0.39.0) cocoapods-deintegrate (1.0.0) cocoapods-downloader (1.0.0, 0.9.3) cocoapods-plugins (1.0.0, 0.4.2) cocoapods-search (1.0.0, 0.1.0) cocoapods-stats (1.0.0, 0.6.2) cocoapods-trunk (1.0.0, 0.6.4) cocoapods-try (1.0.0, 0.5.1) 如何使用100%的旧版本,直到这些库被修复?

Podspec链接二进制库

我正在尝试创build一个Podspec: https : //github.com/sincerely/shiplib-ios-framework Pod Lint通过并将文件添加到项目中,但不链接二进制“Sincerely”文件。 当通过<Sincerely/filename.h>导入时,由于缺less文件导致示例项目生成失败 Pod::Spec.new do |s| s.name = 'ShipLib' s.version = '1.4' … s.source = { :git => 'https://github.com/sincerely/shiplib-ios-framework.git', :tag => 's.version.to_s' } s.library = 'Sincerely' s.source_files = 'Sincerely.framework','Sincerely.framework/Headers/*.h' s.resources = 'Sincerely.framework/Resources/*.{png,nib}' s.frameworks = 'AddressBook', 'AddressBookUI', 'SystemConfiguration', 'CoreTelephony' s.xcconfig = { 'LIBRARY_SEARCH_PATHS' => '$(PODS_ROOT)/ShipLib/' } end 编辑: Pod::Spec.new do |s| s.name […]

Integarte /将cocoapods安装到现有的xcode项目,objective-c或swift

我正在寻找将cocoapods集成到我现有的xcode项目中。 我发现这几个post,但他们是基于问题,而不是我的问题。 不能够访问安装的pods框架 如何将cocoapods添加到现有的工作空间而不是项目 (这是一个工作空间而不是项目) 从现有的Xcode项目中制作一个CocoaPod (这个更多的是将swift和Objective C项目集成在一起) 所以我花了高质量的时间,为我的项目做了。 我在回复post中分享了一步一步的整合。 请随时提出build议和改进。 乐于学习和分享

使用Cocoapods 0.37,Swift框架无法findGoogleAnalytics-iOS-SDK的标头

在Swift项目中使用cocoa pods 0.37.0,使用use_frameworks! 在podfile中设置,我无法访问GoogleAnalytics-iOS-SDK窗格的头文件。 我应该如何访问我的应用中的Google Analytics窗体标题? 我努力了; import GoogleAnalytics_iOS_SDK 在Swift文件中,cocoapods 0.36风格。 但没有框架,所以不好。 #import <GoogleAnalytics_iOS_SDK/GAI.h> 在桥接头,但不起作用(没有模块映射?) 我已经读过,在cocoapods 0.37中只改变了'sourse_files'头文件的行为(见这个提交) 。 这似乎是对0.36中使用这些豆荚造成的use_frameworks问题的回应(参见这个SO问题) 。 随着Cocoapod行为的这种变化,静态库被正确集成(它不是0.36),符号被编译到应用程序中,并在运行时可用。 但是我没有访问标题。