美文网首页
Mac配置Jenkins二,使用Shell脚本打包

Mac配置Jenkins二,使用Shell脚本打包

作者: 独孤流 | 来源:发表于2023-05-23 01:24 被阅读0次

使用shell脚本自动打包

# https://www.jianshu.com/p/9ee046d931a7
xcworkspacePath="xxx/xxx.xcworkspace"
SCHEMECA="xxxx"
archivePath="xxx/xxx.xcarchive"
ipa_dir_path="xxx/xxx"
exportOptionsPlistPath="xx/xx.plist"

#### Clean ######
xcodebuild clean -workspace "$xcworkspacePath" \
-scheme "$SCHEMECA" \
-configuration "Release"

#### Archive ######
xcodebuild archive -workspace "$xcworkspacePath" \
-scheme "$SCHEMECA" \
-configuration "Release" \
-archivePath "$archivePath"

### Export #####
xcodebuild -exportArchive \
-archivePath "$archivePath" \
-exportPath "$ipa_dir_path" \
-exportOptionsPlist "$exportOptionsPlistPath"


M1芯片电脑不能运行模拟器

M1芯片的电脑Xcode模拟器运行不了处理

1、开启rosetta2
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
2、在Podfile文件的地步增加如下配置
post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
        end
    end
end
3、Xcode14.3 不能archive的问题处理

参考:Xcode 14.3 Archive 失败
Pods->Targets Support Files->Pods-xxxx-framworks.sh,修改配置

# 找到
source="$(readlink "${source}")"
# 替换为
source="$(readlink -f "${source}")"
image.png

相关文章

网友评论

      本文标题:Mac配置Jenkins二,使用Shell脚本打包

      本文链接:https://www.haomeiwen.com/subject/ojtxedtx.html