构建Cocoapods模块错误[ARC] xcodebuild:返回不成功的退出代码

时间:2017-07-11 08:09:02

标签: ios objective-c swift cocoapods

我在iOS开发中很安静,这是我在SO的第一个问题。在我的公司,我们正在尝试在Cocoapods模块中转换我们的应用程序,以帮助创建具有类似功能的不同应用程序。到目前为止,我们已经完成了编译POD模块的工作,但是当我们尝试从工作区的模块中导入类时,我们得到了一个"无法构建模块' ProjectCore& #39;

#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.

1 个答案:

答案 0 :(得分:1)

  

创建自己的CocoaPod非常简单。如果你已经   有一个单独的组件,你大部分都在那里。本指南是   整个过程的概述,以及其他指南   对于更高级的用户而言,这一部分更深入。

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