zoukankan      html  css  js  c++  java
  • XCode打包脚本

    #!/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
     
     
    本文参考:
  • 相关阅读:
    Java多线程:ThreadLocal
    selenium安装环境
    http常用标签
    http与https区别,get与post请求区别
    测试评审清单
    python面向对象之方法
    python正则之模式re.I re.M
    python 正则之字母匹配
    python正则之特殊表达式 .*?{}
    python正则之match search findall
  • 原文地址:https://www.cnblogs.com/meteoric_cry/p/4718842.html
Copyright © 2011-2022 走看看