iOS4 and wireless application deploy

小技巧 同时被 3 个专栏收录
7 篇文章 0 订阅
1 篇文章 0 订阅
1 篇文章 0 订阅

Starting from iOS4 it is possible to publish applications on to a generic webserver and allow people to download an application with just a single “tap” without using iTunes or Xcode.

The operation is quite straightforward and also well documented in the related Apple Documentation. This is only possible, of course, if you have a valid developer certificate and a list of UUIDs of the devices enabled to run the application onto. Such list is part of the so called “provisioning profile” that is generated through the Apple Developer Portal. The idea is that this method is useful for enterprise development (aka Ad Hoc) and you don’t want to deal with colleagues asking for a new deploy or for the latest version every time you update your application or fix some bug.

So let’s start setting up our system. Fire up Xcode and select Build -> Build and Archive. The Organiser will pop-up. Select the build you want to publish and click on the Share...button above the list. Select then the identity you want to sign your code with (usually this is the same you use for signing the code for a standard deploy on the device). Click, then, onDistribuite for Enterprise..

At this point a form will appear asking you from which URL the application should be downloaded from. Let’s suppose your website is available at www.example.com and your application (the file .ipa) is hosted at www.example.com/download/myapp.ipa, thenhttp://www.example.com/download/myapp.ipa should go in that field. [See the update below]
Fill the other fields as you wish; you can get more information about that in the Apple Documentation

Once you filled the form and clicked OK select the place where to save the generated files (ipa and plist).
Congrats you are done!

Now the tricky parts comes when you have to deal with the webserver-side code. I have created a small example page below.
Remember that you have to put on your website all the files: myapp.ipa, myapp.plist and myapp.mobileprovision.

?
01
02
03
04
05
06
07
08
09
10
11
12
13
<!DOCTYPE HTML>
< html >
   < head >
     < title >Install your application</ title >
   </ head >
   < body >
     < ul >
       < li > < a href = "http://www.example.com/download/myapp.mobileprovision" >Install Team Provisioning File</ a ></ li >
       < li >< a href = "itms-services://?action=download-manifest&url=http%3A%2F%2Fwww.example.com%2Fdownload%2Fmyapp.plist" >Install Application</ a ></ li >
     </ ul >
     </ div >
   </ body >
</ html >

Please notice that the second href is nothing just a plain old-fashioned URL. Nothing special into that. If you are wondering about those weird %2F and %3A they are normal urlencodedsymbols (for ‘/’ and ‘:’ resp.).
Once you did this you are definitely done.

Maybe if I find some time in the near future I will upload a php page that updates automagically the links to the new application snapshot you publish.

Happy sharin’ :)

[UPDATE 11st January 2011]
Please remember that in the URL textfield you should put exactly the link to the file that is going to be hosted on your website. Is it then necessary that you put the same filename both in that URL field as well as in the filename field where Xcode asks you where to put your archived application (the ipa and plist files).

  • 0
    点赞
  • 0
    评论
  • 0
    收藏
  • 扫一扫,分享海报

©️2021 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值