ios - 构建 Cocoapods 模块错误 [ARC] xcodebuild : Returned an unsuccessful exit code

标签 ios objective-c swift cocoapods

<分区>

我是 iOS 开发的新手,这是我在 SO 的第一个问题。在我的公司,我们正在尝试将我们的应用程序转换为 Cocoapods 模块,以帮助创建具有相似功能的不同应用程序。到目前为止,我们实现了编译 POD 模块,但是当我们尝试从工作区示例中的模块导入类时,我们得到一个“无法构建模块‘ProjectCore’

#import <ProjectCore/myProjectCoreClass.h>

没有得到更多关于建筑失败的细节。我错过了什么吗?有什么方法可以知道构建过程哪里失败了?

谢谢。

深入检查指南并尝试使用 lint 检查建筑物后:

pod lib lint --verbose --allow-warnings

我的项目只在部分模块中使用ARC,所以podspec是这样的。

Pod::Spec.new do |s|
s.name             = 'ProjectCore'
s.version          = '0.1.3'
s.summary          = 'A short description of ProjectCore.'


s.description      = 'This is our core a git with cocoapods - ProjectCore.'

s.homepage         = 'https://bitbucket.org/projectcore/ios_projectcore'
s.license          = { :type => 'MIT', :file => 'LICENSE' }
s.author           = { 'Comapny' => 'info@company.com' }
s.source           = { :git => 'https://bitbucket.org/projectcore/ios_projectcore.git', :tag => s.version.to_s }

s.ios.deployment_target = '9.0'


s.frameworks = 'CoreData', 'SystemConfiguration', 'Accelerate', 'CoreGraphics', 'CoreLocation', 'CoreText', 'GLKit', 'ImageIO', 'OpenGLES', 'QuartzCore', 'UIKit', 'AdSupport', "GoogleMapsCore", "GoogleMapsBase", "GoogleMaps", "Crashlytics", "Fabric"
s.library = 'z', 'c++', 'xml2'
s.vendored_frameworks   = "StaticLibraries/GoogleMapsServices/GoogleMaps.framework", "StaticLibraries/GoogleMapsServices/GoogleMapsBase.framework", "StaticLibraries/GoogleMapsServices/GoogleMapsCore.framework", 'StaticLibraries/FabricCrashlytics/Crashlytics.framework', 'StaticLibraries/FabricCrashlytics/Fabric.framework'
s.vendored_libraries = 'StaticLibraries/GoogleAnalyticsServices/*.a', 'StaticLibraries/GoogleConversionTracking/*.a'
s.xcconfig = {'OTHER_LDFLAGS' => '-ObjC', 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES', 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2'}


arc_files = 'ProjectCore/**/ActionMenuHelper.{h,m}',
'ProjectCore/**/UnitsFormatter.{h,m}',
'ProjectCore/**/BSKeyboardControls/**/*.{h,m}',
'ProjectCore/**/CellMenuLeft.{h,m}',
'ProjectCore/**/CheckInternetConnection.{h,m}',
(...)

s.requires_arc = false
s.source_files = 'ProjectCore/**/*.{h,m,swift}','StaticLibraries/GoogleAnalyticsServices/*.h','StaticLibraries/GoogleConversionTracking/**/*.h','StaticLibraries/ZLib/*.h','StaticLibraries/XMLParser/*.h'

s.exclude_files = arc_files
s.subspec 'ARC' do |sp|
sp.requires_arc = true
sp.source_files = arc_files
end

s.resource_bundle  = { 'ProjectCore' => 'ProjectCore/**/*.{png,jpg,xib,strings}' }


s.dependency 'FBSDKLoginKit', '~> 4.11'
s.dependency 'FBSDKShareKit', '~> 4.11'
s.dependency 'NSHash', '~> 1.1'
(...)

end

但我唯一的错误是这个:

- ERROR | [ProjectCore/ARC] xcodebuild: Returned an unsuccessful exit code.

最佳答案

Creating your own CocoaPod is fairly straight forward. If you already have a separate component, you're most of the way there. This guide is an overview to the entire process, with the other guides in this section serving as more of a deep-dive for more advanced users.

https://guides.cocoapods.org/making/making-a-cocoapod.html

关于ios - 构建 Cocoapods 模块错误 [ARC] xcodebuild : Returned an unsuccessful exit code,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45028871/

相关文章:

ios - 从 XMPP roaster 获取用户列表的最佳方法是什么?

ios - 显示远程通知期间应用崩溃

objective-c - 跳过 IOS 8 中的打印 UI?

ios nsarray/nsmutablearray 对自定义对象进行分组/求和

objective-c - 如何在NSMutableArray中存储和检索数组

ios - 适用于 iOS 和 macOS 的 Swift 框架

iphone - 如何通过蓝牙将iphone/ipad与其他设备连接?

ios - 使用 Swift 的位置 BLE GPS 解码 location_and_speed

ios - 复杂 UITableViewCell 的问题

ios - 64 位二进制和 iOS 6 支持