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

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

问题描述

我为来自 Visual Studio 2017 和 Windows 的 Android 和 iOS 设备创建了一个 Xamarin Forms 应用程序.为了测试和构建 iOS 应用程序,我使用了带有 Xamarin Mac Agent 的 Mac.

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

我知道使用 XCode 7+,您可以在没有 Apple 开发者帐户的情况下创建用于内部测试的 IPA 文件,但是我是否需要拥有物理 iOS 设备才能获取 IPA 文件?

希望你能帮我.

解决方案

我知道使用 XCode 7+,您可以在没有 Apple 开发者帐户的情况下创建用于内部测试的 IPA 文件,但是我是否需要拥有物理 iOS 设备才能获取 IPA 文件?

根据您的描述,您希望在不注册

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

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

  3. 现在,转到 Visual Studio,选择一种配置来设置设置,这里我使用 Ad-HociPhone.转到 iOS 捆绑签名 标签,选择包含您的 Apple ID 的签名标识符.并选择您的配置文件,其中包含您之前设置的捆绑标识符.

  4. 选中 iOS IPA 选项中的 Build iTunes Package Archive(IPA) 复选框,适用于 Ad-Hoc 和 iPhone.

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

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

  7. 此 IPA 使用免费配置生成.所以,它不能通过 iTunes 安装.但是可以通过Xcode->Window->Device安装.单击+"并选择您的 IPA 进行安装.

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

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

顺便说一句,最好的办法是注册Apple Developer Program,然后你就可以最多可部署到 100 台设备进行测试,并且无需 Xcode 即可通过 OTA 或其他工具进行部署.

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 biniPhoneAd-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 应用程序的 IPA 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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