在没有iOS设备的情况下生成我的Xamarin App的IPA文件 [英] Generating the IPA file of my Xamarin App without an iOS device

查看:1015
本文介绍了在没有iOS设备的情况下生成我的Xamarin App的IPA文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从Visual Studio 2017和Windows为Android和iOS设备创建了一个Xamarin Forms应用程序。为了测试和构建iOS应用程序,我使用了Mac和Xamarin Mac Agent。



现在我必须为内部测试构建一个IPA文件,但是我无法这样做是因为当我为iOS模拟器构建我的项目时,它没有生成IPA文件。我也尝试使用Ad-hoc和AppStore构建选项。



我知道使用XCode 7+你可以创建一个IPA文件进行内部测试而无需Apple Developer帐户,但我需要有一个物理iOS设备才能获得IPA文件吗?



我希望你能帮助我。

解决方案


我知道使用XCode 7+,你可以创建一个IPA文件进行内部测试而不需要Apple开发者账户,但我是否需要有一个物理iOS设备,以获取IPA文件?


根据您的描述,您想要创建一个没有注册


  1. 转到Xcode-> Target-> General。将捆绑标识符设置为与您在Visual Studio Xamarin项目中设置的相同。这非常重要,因为Xcode将根据Bundle Identifier和您的iOS设备的UDID生成配置文件。


  2. 转到签名部分。选中自动管理签名复选框。在团队下拉列表中选择您的个人团队。现在,Xcode将自动为您生成配置文件。


  3. 现在,转到Visual Studio,选择一个配置来设置设置,这里我使用 Ad-Hoc iPhone 。转到 iOS捆绑包签名标签,选择包含Apple ID的签名标识符。并选择您的Provisioning Profile,其中包含您之前设置的Bundle Identifier。


  4. 检查 iOS IPA选项中的构建iTunes资料包存档(IPA)复选框,适用于Ad-Hoc和iPhone。


  5. 确保捆绑包标识符与Xcode中使用的标识符相同。


  6. 构建项目。然后右键单击您的项目,单击在文件资源管理器中打开文件夹。在bin \iPhone \Ad-Hoc文件夹中找到IPA。


  7. 此IPA通过免费配置生成。因此,它无法通过iTunes安装。但它可以通过Xcode-> Window-> Device安装。单击+并选择您的IPA进行安装。


  8. 安装IPA后,您无法立即使用它。你需要先信任它。转到iPhone上的设置 - >常规 - >配置文件和设备管理。找到Apple ID电子邮件命名的个人资料。点击并信任它。


  9. 现在您可以运行您的应用。


BTW,最佳解决方案是注册 Apple开发者计划 ,然后你可以部署到多达100个设备进行测试,并可以通过OTA或其他没有Xcode的工具进行部署。


I have created a Xamarin Forms App for both Android and iOS devices from Visual Studio 2017 and Windows. To test and build the iOS app, I have used a Mac with Xamarin Mac Agent.

Now I have to build an IPA file for internal testing, however I'm unable to do it because when I build my project for the iOS simulator, it's not generated the IPA file. I have also tried to use both Ad-hoc and AppStore build options.

I know that with XCode 7+ you can create an IPA file for internal testing without an Apple Developer Account, but do I need to have a physical iOS device in order to get the IPA file?

I hope you can help me.

解决方案

I know that with XCode 7+ you can create an IPA file for internal testing without an Apple Developer Account, but do I need to have a physical iOS device in order to get the IPA file?

According to your description, you want to create an IPA for device without enrolling an Apple Developer Program.

Unfortunately, you need to have a physical iOS device to achieve that if you want to create an IPA without an Apple Developer Account. And the generated IPA only can be installed in the iOS devices you connected to the Xcode.

You can follow these steps to generate an IPA without an Apple Developer Account with Xcode and Visual Studio:

  1. Create an Apple ID which is free. Or use the exist one.
  2. Add the Apple ID in the Accounts of your Xcode, it shows as Personal Team for free account. (Xcode->Preferences->Accounts)

  1. Go to Xcode->Target->General. Set Bundle Identifier to be the same as the one you set in your Visual Studio Xamarin project. This is very important, because Xcode will generate a provisioning profile according to the Bundle Identifier and your iOS device's UDID.

  2. Go to Signing section. Check the Automatically manage signing checkbox. Select your personal team in the Team dropdownlist. Now, Xcode will generate a provisioning profile for you automatically.

  3. Now, go to Visual Studio, choose one configuration to set the settings, here I use the Ad-Hoc and iPhone. Go to iOS Bundle Signing tab, select the Signing Identifier which contains your Apple ID. And Select your Provisioning Profile which contains the Bundle Identifier you set before.

  4. Check the Build iTunes Package Archive(IPA) checkbox in iOS IPA Options, for Ad-Hoc and iPhone.

  5. Make sure the bundle identifier is the same as the one used in Xcode.

  6. Build your project. Then right click your project, click "Open folder in File Explorer". Find the IPA in bin\iPhone\Ad-Hoc folder.

  7. This IPA generates with a free provisioning. So, It can't be installed via iTunes. But it can be installed via Xcode->Window->Device. Click the "+" and select your IPA to install it.

  8. When the IPA is installed, you can't use it immediately. You need to trust it first. Go to Settings->General->Profiles&Device Management on your iPhone. Find the profile which is named by your Apple ID email. Click and Trust it.

  9. Now you can run your app.

BTW, the best solution is to enroll the Apple Developer Program, then you can deploy to up to 100 devices for test and can deploy via OTA or other tools without Xcode.

这篇关于在没有iOS设备的情况下生成我的Xamarin App的IPA文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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