xcode8 自动打包 xcodebuild

Xcode 8.3之前

先编译

xcodebuild -workspace $scheme_name.xcworkspace -scheme $scheme_name -configuration $build_model

生成ipa

xcrun -sdk iphoneos -v PackageApplication ${app_path} -o ${ipa_path}

Xcode8.3 开始不支持PackageApplication命令了

生成 archive

xcodebuild archive -workspace ${work_path} -scheme ${scheme_name} -configuration build_model -archivePath ${archive_path}

导出

xcodebuild -exportArchive -exportOptionsPlist ${plist_path} -archivePath ${archive_path} -exportPath ${ipa_path}

生成之后可以 上传到fir

fir publish ${ipa_file_path} -T $fir_token -c "$fir_log" -Q -q

ipa_file_path: 完整ipa路径
ipa_path是一个目录 会自动创建 scheme_name.ipa 后面的信息不用添加

plist 模板





        teamID
        MYTEAMID123
        method
        app-store
        uploadSymbols
        


method四种方式 等.

method: (String) The method of distribution, which can be set as any of the following:
app-store
enterprise
ad-hoc
development
teamID: (String) The development program team identifier.
uploadSymbols: (Boolean) Option to include symbols in the generated ipa file.
uploadBitcode: (Boolean) Option to include Bitcode.

坑终于踩完了

你可能感兴趣的:(xcode8 自动打包 xcodebuild)