公司要求要在 Jenkins 上打生产包
很久前配置了旧平台,一直可以正常编译打包
最近推了一个新平台,要求迁移过去,然后 shell 脚本和旧平台一样
但 xcodebuild 的时候就报莫名其妙的错误
命令:
xcodebuild archive -workspace "${targetStr}.xcworkspace" -scheme $targetStr -configuration Release IPHONEOS_DEPLOYMENT_TARGET=8.0 -archivePath $archivePath
部分报错(除了 AFNetworking,还有其他第三方框架也报):
In file included from /Users/省略路径 /Classes/System/PrefixHeader.pch:34:
In file included from /Users/省略路径 /Classes/Main/Tool/Network/RequestTool.h:10:
In file included from /Users/省略路径 /Classes/Main/Tool/Network/NetworkRequestTool.h:9:
/Users/省略路径 /Pods/Headers/Public/AFNetworking/AFNetworking.h:1:1: error: expected identifier or '('
../../../AFNetworking/AFNetworking/AFNetworking.h
^
In file included from /Users/省略路径 /Classes/System/PrefixHeader.pch:34:
In file included from /Users/省略路径 /Classes/Main/Tool/Network/RequestTool.h:10:
/Users/省略路径 /Classes/Main/Tool/Network/NetworkRequestTool.h:16:1: error: unexpected '@' in program
@property (copy, nonatomic) NSString *requestMethod;
^
/Users/省略路径 /Classes/Main/Tool/Network/NetworkRequestTool.h:18:4: error: expected a type
+ (NetworkRequestTool *)sharedInstance;
^
/Users/省略路径 /Classes/Main/Tool/Network/NetworkRequestTool.h:18:1: error: missing context for method declaration
+ (NetworkRequestTool *)sharedInstance;
^
/Users/省略路径 /Classes/Main/Tool/Network/NetworkRequestTool.h:20:1: error: expected method body
- (void)getSeriviceWithSuccess:(void (^)(id responseObject))success
^
/Users/省略路径 /Classes/Main/Tool/Network/NetworkRequestTool.h:23:1: error: missing context for method declaration
- (void)postSeriviceWithSuccess:(void (^)(id responseObject))success
^
/Users/省略路径 /Classes/Main/Tool/Network/NetworkRequestTool.h:26:1: error: expected method body
- (void)postSeriviceWithConstructingBodyWithBlock:(void(^)(id<AFMultipartFormData> formData))constructingBodyWithBlock success:(void (^)(id responseObject))success failure:(void (^)(NSError *error))failure;
^
/Users/省略路径 /Classes/Main/Tool/Network/NetworkRequestTool.h:28:1: error: '@end' must appear in an Objective-C context
@end
^
In file included from /Users/省略路径 /Classes/System/PrefixHeader.pch:34:
/Users/a 省略路径 /Classes/Main/Tool/Network/RequestTool.h:37:44: error: no type or protocol named 'AFMultipartFormData'
constructingBodyWithBlock:(void(^)(id<AFMultipartFormData> formData))constructingBodyWithBlock
^
/Users/省略路径 /Classes/Main/Tool/Network/RequestTool.h:43:42: error: no type or protocol named 'AFMultipartFormData'
constructingBodyWithBlock:(void(^)(id<AFMultipartFormData> formData))constructingBodyWithBlock
^
/Users/省略路径 /Classes/Main/Tool/Network/RequestTool.h:49:49: error: no type or protocol named 'AFMultipartFormData'
constructingBodyWithBlock:(void(^)(id<AFMultipartFormData> formData))constructingBodyWithBlock
^
/Users/省略路径 /Classes/Main/Tool/Network/RequestTool.h:55:48: error: no type or protocol named 'AFMultipartFormData'
ConstructingBodyWithBlock:(void(^)(id<AFMultipartFormData> formData))constructingBodyWithBlock
^
In file included from /Users/省略路径 /Classes/Main/Tool/Refresh/RefreshHeader.h:9:
/Users/省略路径 /Pods/Headers/Public/MJRefresh/MJRefreshNormalHeader.h:1:1: error: expected identifier or '('
../../../MJRefresh/MJRefresh/Custom/Header/MJRefreshNormalHeader.h
^
** ARCHIVE FAILED **
The following build commands failed:
ProcessPCH /Users/省略路径 /PrefixHeader.pch.pch ./xxxxx/Classes/System/PrefixHeader.pch normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
ProcessPCH /Users/省略路径 /PrefixHeader.pch.pch ./xxxxx/Classes/System/PrefixHeader.pch normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
1
louzhumuyou 2017-10-16 20:54:41 +08:00
应该分开看,直接 xcodebuild 在新平台上能打包吗?不通过 Jenkins 调度,如果不行的话,应该是新机器配置的问题,xcode9 升级后,我维护的打包平台也需要解决一堆兼容问题,比如 oclint,比如 slather。。。。
|
2
Jackiehu 2017-11-01 11:35:43 +08:00
fastlane gym --export_method ad-hoc --output_name XXX --clean
fastlane 打包就这一句话搞定 |
3
dsqtb 2017-12-03 12:35:03 +08:00
嗯,fastlane 还是比较好用,
|