Monday, September 30, 2013

Create ipa and plist file and upload files on server for Enterprise Application through Terminal !

cd "Applications path"

#Compile the build

xcodebuild -target AppTargetName -sdk iphoneos -configuration Release

#Archive the build

/usr/bin/xcrun -sdk iphoneos PackageApplication -v $applicationPath -o $ipaPath --sign Barclays --embed $mobileprovisionPath


#create the plist

echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
<plist version=\"1.0\">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>$urlForIpa</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>$bundleIdentifier</string>
<key>bundle-version</key>
<string>$bundleVersion</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>AppName</string>
</dict>
</dict>
</array>
</dict>
</plist>" > "projectName.plist"

                

#upload files on server

Below values depends on your server inputs values !

curl --form ipa=@$ipaPath --form plist=@$plistPath --form os=$os --form branch=$branch --form type=$type --form version=$bundleVersion --form file_size=22MB --form info=$bundleVersion --form releasenotes=@$releasenotes --form smartphones=$smartphones --form tablets=$tablets $urlToUploadfiles



1 comment: