如何在不管理UDID和重新编译的情况下无线分发ios应用程序 [英] How to distribute ios application wirelessly without managing UDIDs and recompilation

查看:66
本文介绍了如何在不管理UDID和重新编译的情况下无线分发ios应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要知道人们用什么方法无线地分发(内部)iPad应用程序的演示而无需管理UDID?

I need to know what methods people are using to distribute (internally) demo of iPad application wirelessly without having to manage UDID?

我不需要像testflight或betabuilder,所有这些都要求我在apple provisioning配置文件门户中管理UDID。

I do not need a solution like testflight or betabuilder, all these requires me to manage UDID in the apple provisioning profile portal.

我问这个问题,因为我看到另一个工作室做得更聪明了现在,我想知道他们是如何做到的 - 通过他们给我们的链接,我们可以通过简单的HTML无线安装他们的演示应用程序,并且我的iPad中神奇地出现了配置文件。所有这一切都没有告诉他们我的iPad的UDID,因此绝对没有他们重新编译项目。

I am asking this question because I am seeing another studio doing a much smarter way right now and I wish to know how they did it - With a link they gave to us, we can install their demo application from a simple HTML over the air, and a provisioning profile magically appears in my iPad. All this happened without me telling them the UDID of my iPad, and therefore definitely without them to recompile the project.

他们是如何做到的?

推荐答案

我已经无线发布我的应用程序几个月了,没有任何问题。当然,我是根据企业许可证分发的,每年花费299美元,用于内部业务。这可能适用于普通的开发人员许可证,但您必须进行一些测试以确保。我想如果它确实有效,那么这个过程是一样的。我正在使用XCode 4,所以如果您使用的是其他版本,可能会略有不同。基本上,您必须向您的资源添加Entitlements.plist文件:

I've been distributing my apps wirelessly for several months now with no problems. Granted, I am distributing under the Enterprise license, which costs $299 a year and is intended for internal business use. This may work with a normal developer license, but you'd have to do some testing to make sure. I imagine the process is the same if it does work. I'm using XCode 4, so this may be slightly different if you're using a different version. Basically, you have to add an Entitlements.plist file to your resources:

New->File->Code Signing->Entitlements

在您分发之前,您必须更改:

and before you distribute, you have to change:

"Can be debugged" to NO

确保使用正确的代码签名配置文件设置项目。现在转到:

Make sure your project is set up with the correct Code signing profiles. Now go to:

Product->archive

然后使用您新建的条目,点击:
分享

then with your newly built entry, click on: Share

Select "iOS App Store Package (.ipa)"

并选择您想要的正确分发配置文件使用。单击下一步,然后选择要将.ipa文件保存到的位置。在您单击保存之前,您需要检查

and choose the proper distribution profile you want to use. Click next, then choose a location to save the .ipa file to. Before you click Save, you need to check

Save for Enterprise Distribution

.ipa文件需要保存在FTP服务器上,或者至少是我的工作方式。对于应用程序URL字段,请使用要保存的.ipa文件的路径,例如,

The .ipa file needs to be saved on an FTP Server, or at least that's how I got it to work. For the "Application URL" field, use the path to the .ipa file you are going to save, for example,

ftp://ftp.company.com/Installers/myApp.ipa

给它一个标题,然后在大图像URL和小图像URL为它提供了通向大型(512x512)和小型(72x72)图标文件的路径(我正在为iPad开发,因此iPhone可能会有所不同)。例如,

Give it a Title, then in "Large Image URL" and "Small Image URL" give it a path to your large (512x512) and small (72x72) icon files, (I'm developing for iPad, so iPhone may be different). For example,

ftp://ftp.company.com/Installers/small.png

保存.ipa文件。现在您需要将.mobileprovision文件放在ftp服务器上。任何想要运行该应用程序的人都需要安装该文件,否则他们将无法运行该文件。现在,我不确定如果你不是企业程序的一部分,你是否需要一个内置了所有设备ID的.mobileprovision文件,但是你可以试试看。一旦您的文件全部在ftp服务器上,您将需要创建一个包含两个文件链接的电子邮件,但.ipa文件的链接必须采用特殊格式。对于配置文件:

Save the .ipa file. Now you need to place your .mobileprovision file on the ftp server. Anyone that wants to run the app needs the file installed or they won't be able to run it. Now, I'm not sure if you will need a .mobileprovision file that has all of the device ID's built into it if you're not part of the enterprise program, but you can try and see. Once your files are all on the ftp server, you'll need to create an email that has links to the two files, but the link for the .ipa file has to be in a special format. For the provisioning file:

ftp://ftp.company.com/Installers/profile.mobileprovision

和.ipa文件:

itms-services:///?action=download-manifest&url=ftp%3A%2F%2Fftp.company.com%2FInstallers%2FmyApp.plist

现在,当您将此电子邮件发送给某人时,他们只需先下载并安装.mobileprovision文件,然后再安装.ipa文件。瞧,他们正在运行你的程序。如果没有企业订阅,请告诉我。我想只要.mobileprovision文件包含设备ID就行了。

Now when you send this email to someone, they just need to first download and install the .mobileprovision file, then the .ipa file. Voila, they are running your program. Let me know if this works without the enterprise subscription. I imagine it would as long as the .mobileprovision file contained the device ID's.

我发现了一种更好的分发应用的方式,但它要求你拥有一个PHP服务器。你要做的是创建一个PHP文件,动态生成plist文件并返回。在大图像,小图像和ipa文件的链接中,您将链接传递给其他PHP文件,这些文件将为您的特定程序返回这些内容。当您想要从链接安装应用程序时,您只需传递这样的URL:

I've found a much better way of distributing apps, but it requires you to have a PHP server. What you do is create a PHP file that generates the plist file on the fly and returns that. In the links for large image, small image and ipa file you pass in links to other PHP files that return those things for your specific program. When you want to install an app from a link, you just pass in the url like this:

itms-services:///?action=download-manifest&url=http://mycompany.com/php/installApp.php?app=myappname

在PHP函数中,您只需将myappname插入到其他PHP调用中,这将从您的服务器中提取正确的文件。使用此方法,您无需为生成的任何应用程序存储plist文件,这样可以更轻松地更新应用程序,因为您不需要每次都重新键入信息,甚至不选中复选框企业分发,只需将ipa文件保存在旧文件上,就可以了。此外,使用此方法可以轻松实现安全性和登录功能。此外,您无需专门安装移动配置文件,因为它在您安装应用程序时会自行安装。它存储在ipa文件中。

In your PHP functions you would just insert myappname into the other PHP calls, which would pull the proper files from your server. Using this method, you don't need to store plist files for any of your apps as they are generated, which makes updating your apps easier since you don't need to retype the information every time, don't even check the checkbox for enterprise distribution, just save the ipa file over the old one and you're good to go. Also, it is easy to implement security and login features with this method. Also, you don't need to specifically install the mobile provision file, as it installs itself when you install the app. It is stored in the ipa file.

为了澄清PHP方法,你创建了一个创建plist文件的php文件。复制从企业分发版本创建的标准plist文件,然后在您的php文件中,设置如下标题:

Just to clarify the PHP method, you create a php file that creates plist files. Copy a standard plist file created from an enterprise distribution build, then in your php file, set the headers like this:

$pathToAddFi = "installers/".$_GET['app'].".plist"; //points to the php server file location of your .ipa files. when you call this php script, you pass in the name of the ipa file you want to install. Note: this location doesn't actually contain any plist files!
$root = "http://yourserver.com/php/root/"; //path to this PHP file's directory

header('content-type: application/xml');
header('Content-Disposition: attachment; filename='.basename($pathToAddFi));
header('Content-Transfer-Encoding: binary');

然后你构建一个字符串替换你的项目的网址,如下所示:

Then you build a string replacing the urls for your items like this:

<string>".$root."ipa_serve.php?app=". $_GET['app']."</string>

并在回显xml字符串之前以最后一个标头结束:

and end it with one last header before you echo the xml string:

header('Content-Length: ' . strlen($myXml));

最后,您创建一个用于提供ipa文件的php文件,一个用于提供大图像的文件,以及一个为您的小图像服务。除非你不熟悉PHP,否则应该相当直接。

Lastly, you create a php file to serve your ipa file, one to serve your large image, and one to serve your small image. Should be fairly straight forward unless you aren't very familiar with PHP.

这篇关于如何在不管理UDID和重新编译的情况下无线分发ios应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆