Automating iPhone & iPad Deployment(from http://www.krypted.com)

The iPhone Configuration Utility is used to “image” iPhone, iPadand iPod Touch. The reason I quoted image was because you aren’tlaying bits down as you would in a traditional imaging scenario.Instead, you are sending a profile and possibly some applicationsto the device. This is done through a configuration profile, whichis a property list, prefixed with a .mobileconfig extension.

The iPhone Configuration Utility stores its data in the~/Library/MobileDevice directory. Here, you will find twodirectories:

  • Devices – Contains the Device data for each device that hasbeen docked to the iPhone Configuration Utility.
  • Configuration Profiles – Contains the profiles that you willassign to devices in the form of .mobileconfig plists.

Both of these can be managed from the command line and thereforegenerated en masse. First, let’s look at creating Devices. If yougo into the Devices directory you will see a .deviceinfo file foreach device that you have interacted with through iPhoneConfiguration Utility, prefixed by the UDID of the device. Here,you can view one as a standard property list, which appears in avery simplistic fashion as follows:

    <?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”>
    <plistversion=”1.0″>
    <dict>
    <key>UniqueChipID</key>
    <integer>0</integer>
    <key>applicationDictionaries</key>
    <array/>
    <key>configurationProfiles</key>
    <array/>
    <key>deviceActivationState</key>
    <string>WildcardActivated</string>
    <key>deviceBuildVersion</key>
    <string>7E18</string>
    <key>deviceCapacityKey</key>
    <integer>15333203968</integer>
    <key>deviceIdentifier</key>
    <string>12a0b688649cfe0ce5df2ab8b4f9eaaee0d000fc</string>
    <key>deviceLastConnected</key>
    <date>2010-05-27T00:17:17Z</date>
    <key>deviceName</key>
    <string>CharlesEdge’s iPhone</string>
    <key>devicePhoneNumber</key>
    <string>1 (310)555-1212</string>
    <key>deviceProductVersion</key>
    <string>3.1.3</string>
    <key>deviceSerialNumber</key>
    <string>12345678901</string>
    <key>deviceType</key>
    <string>iPhone</string>
    <key>provisioningProfiles</key>
    <array/>
    </dict>
    </plist>


To find a UDID, you can plug a device into iTunes, select thedevice from the Devices list and then click on the Summary tab.Here, you can click on the bold Software Version to see the Buildversion, the bold Phone Number to see the IMEI (first click) orICCID (second click) and the bolded Serial Number to see theIdentifier (or UDID).
The serial number can also be obtained from a bar code on thebox that came with the device, although the UDID cannot at thistime. The serial though can then be brought into a database thathas both, to correlate them (assuming you are programmaticallygoing to wrangle this data at a later time) and assign profilesbased on, for example, Open Directory or Active Directory groupmembership of the primary user.
You can copy a template file without unique identifiers andthen use defaults to put the unique data into the file. Or you canuse a series of defaults commands with plistbuddy to create a filefrom scratch. The data can then be viewed in somewhat of a 2dfashion up to this point. The problem is then come in the arrays,which in conjunction with the fact that they reference data fromthe mobileconfig files we’ll look at in a moment, mean that you areusing localized plists to form a relational context to data.
You can then look at a .mobileconfig file, which appears in avery simplistic form as follows:


    <?xml version=”1.0″encoding=”UTF-8″?>
    <!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST1.0//EN”“http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
    <plist version=”1.0″>
    <dict>
    <key>PayloadContent</key>
    <array>
    <dict>
    <key>FullScreen</key>
    <false/>
    <key>IsRemovable</key>
    <true/>
    <key>Label</key>
    <string></string>
    <key>PayloadDescription</key>
    <string>Configures WebClip</string>
    <key>PayloadDisplayName</key>
    <string>WebClip</string>
    <key>PayloadIdentifier</key>
    <string></string>
    <key>PayloadOrganization</key>
    <string></string>
    <key>PayloadType</key>
    <string>com.apple.webClip.managed</string>
    <key>PayloadUUID</key>
    <string>80222944-B43C-4A43-AB93-2998CDCBE808</string>
    <key>PayloadVersion</key>
    <integer>1</integer>
    <key>Precomposed</key>
    <false/>
    <key>URL</key>
    <string></string>
    </dict>
    </array>
    <key>PayloadDescription</key>
    <string>Profiledescription.</string>
    <key>PayloadDisplayName</key>
    <string>ProfileName</string>
    <key>PayloadOrganization</key>
    <string></string>
    <key>PayloadRemovalDisallowed</key>
    <false/>
    <key>PayloadType</key>
    <string>Configuration</string>
    <key>PayloadUUID</key>
    <string>5B0879F3-9BA9-41E7-AC8F-F4703D4400DB</string>
    <key>PayloadVersion</key>
    <integer>1</integer>
    </dict>
    </plist>


You can then create a single ,mobileconfig, make it a templateand make it exactly like you want things to match up as your lowestcommon denominator, or template, user. Those .mobileconfig filesthen get applied to each device, which you could do in batches. Youcan also dynamically copy them to a web server and send anSMS/email to the user to click on them to apply them, or dock thedevice.
You can also add applications using a pre-existing array andcopying it down, although if there are licensing concernssurrounding doing so it would be wise to investigate theramifications of doing so first. Keys and such are defined in theiPhone Enterprise Deployment Guide, along with sample AppleScriptfor creation of files.
You can also copy the database by copying the property listfiles between machines. When iPhone Configuration Utility is openedit will automatically read in the new property lists and displaythe information. Overall, it is going to be as much work as it isto dynamically generate provisioning on the fly using the rubysample code provided by Apple. It is still going to be the fastestpath to market (and support) to go the 3rd party route, using atool where they’ve built all of this out. The options in the iPhoneConfiguration Utility, along with the .mobileconfig files becomesthe baseline that most 3rd party packages use, but overall they’vedone the work to build out the wrappers and if you want to rollyour own you’ll essentially end up building something similar towhat is currently on the market, without support (which for someenvironments is required).
Good luck!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值