XCode打包脚本

简介: #!/bin/bash#for debug#请将 TARGET-NAME 改成项目的 TARGET 名称#放置于 .xcodeproj 同级目录中执行 target_name="xx"tmp_dir="tmp"profile="xxx-xxx-xxx-xxx-xxx"profile_name=...
#!/bin/bash

#for debug
#请将 TARGET-NAME 改成项目的 TARGET 名称
#放置于 .xcodeproj 同级目录中执行
 
target_name="xx"
tmp_dir="tmp"
profile="xxx-xxx-xxx-xxx-xxx"
profile_name="xx-Dev"
sign="iPhone Developer: xxxx"
TIMESTAMP=`date +"%Y%m%d%H%M"`
ipa=ipaName_debug.$TIMESTAMP.ipa
 
#rm -rf $tmp_dir
rm $ipa
 
xcodebuild -target $target_name -sdk iphoneos -configuration Debug ARCHS="armv7 armv7s armv64" CONFIGURATION_BUILD_DIR=$tmp_dir PROVISIONING_PROFILE="$profile"
 
xcodebuild -scheme $target_name -destination generic/platform=iOS archive CODE_SIGN_IDENTITY="$sign" -archivePath $tmp_dir/target.xcarchive PROVISIONING_PROFILE="$profile"
 
xcodebuild -exportArchive -exportFormat IPA -exportProvisioningProfile "$profile_name" -archivePath $tmp_dir/target.xcarchive/ -exportPath ./$ipa
 
#rm -rf $tmp_dir
 
 
  
 
#for relese
 
profile="xxx-xxx-xxx-xxx-xxx"
profile_name="xxx-AdHoc"
sign="iPhone Distribution: xxxxxxxx"
ipa=ipaName_release.$TIMESTAMP.ipa
 
#rm -rf $tmp_dir
rm $ipa
 
xcodebuild -target $target_name -sdk iphoneos -configuration Release ARCHS="armv7 armv7s armv64" CONFIGURATION_BUILD_DIR=$tmp_dir PROVISIONING_PROFILE="$profile"
 
xcodebuild -scheme $target_name -destination generic/platform=iOS archive CODE_SIGN_IDENTITY="$sign" -archivePath $tmp_dir/target.xcarchive PROVISIONING_PROFILE="$profile"
 
xcodebuild -exportArchive -exportFormat IPA -exportProvisioningProfile "$profile_name" -archivePath $tmp_dir/target.xcarchive/ -exportPath ./$ipa
 
#rm -rf $tmp_dir

配置之后,执行上面的脚本就会在.xcodeproject目录下生成debug、release的ipa
 
 
本文参考:
目录
相关文章
|
2月前
|
Linux 数据安全/隐私保护 iOS开发
如何使用 Xcode 打包导出 IPA 文件并进行 iOS 应用内测,无需支付苹果开发者账号费用?
如何使用 Xcode 打包导出 IPA 文件并进行 iOS 应用内测,无需支付苹果开发者账号费用?
|
存储 XML jenkins
iOS 底层原理38:自动化打包(一)Xcode + Shell脚本
iOS 底层原理38:自动化打包(一)Xcode + Shell脚本
2445 1
iOS 底层原理38:自动化打包(一)Xcode + Shell脚本
|
11月前
|
Linux 数据安全/隐私保护 iOS开发
如何使用 Xcode 打包导出 IPA 文件并进行 iOS 应用内测,无需支付苹果开发者账号费用?
苹果开发者账号认证需要支付 688 元,对于初学 iOS 开发的同学来说,仅仅是为了进行内测而不需要上架 App Store,这样的费用是不必要的。
|
11月前
|
数据安全/隐私保护 iOS开发 开发者
2022最新xcode打包IPA(完整详细图文)
本文详细讲述iOS的App开发后如何进行证书的创建和项目中如何配置证书及上传到苹果App管理后台后如何新增与更新版本。
|
11月前
|
Linux 数据安全/隐私保护 iOS开发
如何使用Xcode打包导出IPA文件并进行iOS应用内测,无需支付苹果开发者账号费用?
苹果开发者账号认证需要支付688元,对于初学iOS开发的同学来说,仅仅是为了进行内测而不需要上架App Store,这样的费用是不必要的。但是,有一款名为APP Uploader的软件可以解决这个问题,只需要注册苹果个人开发者账号,无需支付688元认证,即可打包自己开发的iOS应用,并提供给他人测试。
|
11月前
|
Linux 数据安全/隐私保护 虚拟化
Ios上架app无需688,xcode打包导出IPA,供人内测
无需支付688苹果开发者账号,xcode打包导出ipa,提供他人进行内测 众所周知,在开发苹果应用时需要使用签名(证书)才能进行打包安装苹果IPA,作为刚接触ios开发的同学,只是学习ios app开发内测,并没有上架appstore需求
|
11月前
|
Linux 数据安全/隐私保护 虚拟化
xcode 打包导出 ipa
众所周知,在开发苹果应用时需要使用签名(证书)才能进行打包安装苹果 IPA,作为刚接触 ios 开发的同学,只是学习 ios app 开发内测,并没有上架 appstore 需求
|
11月前
|
Linux 数据安全/隐私保护 虚拟化
xcode打包导出ipa
xcode打包导出ipa
|
iOS开发
打包Generic Xcode Archive问题
近期在对项目进行打包,发现打出来的Archive没有bundle ID,什么信息都没有,只是显示Generic Xcode Archive,如图
97 0
|
API iOS开发 开发者
Xcode自动打包和上传蒲公英平台脚本(用python实现)
工作中,特别是所做项目进入测试阶段,肯定会经常打 Ad-hoc 包给测试人员进行测试,但是我们肯定不想每次进行打包的时候都要进行一些工程的设置修改,以及一系列的 next 按钮点击操作,现在就让这些操作都交给脚本化吧!
309 0