#!/bin/sh #项目路径 kProjectPlace=/Volumes/mac\ data/___PROJECT/_housemart #sdk版本 kSdkVersion=iphoneos6.1 #项目名字 kProjectName=Housemart #编译后app路径 kAppPath=build/Release-iphoneos/${kProjectName}.app #打包后指定存放ipa文件的路径 kTargetAppPath=/Users/mac/Desktop/${kProjectName}_sh.ipa #进入项目目录 cd "$kProjectPlace" #清理缓存 xcodebuild clean #以指定sdk版本编译 xcodebuild -sdk $kSdkVersion #打包到指定路径 xcrun -sdk $kSdkVersion PackageApplication -v "$kAppPath" -o "$kTargetAppPath"