zoukankan      html  css  js  c++  java
  • iOS xcodebuile 自动编译打包ipa

    xcodebuild -alltargets clean
     
    
    首先进入到工程文件所在的目录。比如我的文件某个工程放在(.xcodeproj文件所在的目录) /Users/xxx/xxx
    
    然后ce /Users/xxx/xxx 到这个目录下
    
    第一步先编译生成testDemo.xcarchive 文件。 
    
     xcodebuild -archivePath "testDemo.xcarchive" -project PcAppleSdkDemo.xcodeproj -sdk iphoneos  -scheme "PcAppleSdkDemo" -configuration "Release Adhoc" archive
    
    //这里生成的testDemo.xcarchive文件目录与.xcodeproj是同一目录
    
    //-archivePath  生成的.xcarchive 名字
    
    //-project   目标文件名
    
    //-scheme  项目的目标文件名 
    
     
    
    第二步把生成的testDemo.xcarchive文件打包成ipa 格式。 
    
     xcodebuild -exportArchive -exportFormat IPA -exportProvisioningProfile "qingyunDeveloper" -archivePath "testDemo.xcarchive" -exportPath "testDemo.ipa"
    
    成功后显示
    
    ** EXPORT SUCCEEDED **
    
    //这时的ipa 文件存放目录与.xcodeproj是同一目录
    
    //-exportProvisioningProfile 这个是选择的证书   你的证书名是什么这里就填写什么。
    

    //参考资料 : http://minhdanh2002.blogspot.jp/2014/06/archiving-ios-projects-from-command.html

    //

    这里会生成.app文件。然后用.app打包

     xcodebuild -project PlaycoolSdkDemo.xcodeproj -sdk iphoneos 

    //xcodebuild -project Reporter.xcodeproj -scheme "InternalTest" -configuration "Release Adhoc" clean
    
    //xcodebuild -project Reporter.xcodeproj -sdk iphoneos  -scheme "InternalTest" -configuration "Release Adhoc"  //这里会生成.app文件。然后用.app打包
    
    //xcrun -sdk iphoneos PackageApplication -v "Internaltest/TestApp.app" -o "InternalTestRelease.ipa" --sign "iPhone Distribution: My Company Pte Ltd (XCDEFV)"
    //如果证书在xcode 里正常设置好了。就按这种格式导出
    // xcrun -sdk iphoneos PackageApplication -v /Users/chenqing/Sqy/iOSProject/Unity/TestUnityDemo1/build/ProductName.app -o /Users/chenqing/Sqy/iOSProject/Unity/TestUnityDemo1/uniii.ipa
  • 相关阅读:
    金额小写转大写
    python3 简单抓取网页
    解决IOS下 input 只有底部边框时,出现 四周虚线框的问题
    如何判断是否为PC端 还是 移动端
    PHP如何获取当前主机、域名、网址、路径、端口等参数
    常用less变量定义
    PHP生成验证码2
    extract高级用法 编写简历MVC模式
    js获取文档高度
    Mysql Master-Slave 简单介绍
  • 原文地址:https://www.cnblogs.com/qingjoin/p/3919735.html
Copyright © 2011-2022 走看看