Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating the IPA file of my Xamarin App without an iOS device

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.

like image 584
ganchito55 Avatar asked Sep 19 '17 19:09

ganchito55


People also ask

Can I build xamarin iOS on Windows?

To build Xamarin. iOS apps with Visual Studio 2019 or Visual Studio 2022 on Windows, you will need: A Windows machine with Visual Studio 2019 or Visual Studio 2022 installed. This can be a physical or a virtual machine.


1 Answers

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)

enter image description here

  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. enter image description here

  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. enter image description here

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

  5. Make sure the bundle identifier is the same as the one used in Xcode. enter image description here

  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. enter image description here

  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.

like image 86
Kevin Li Avatar answered Oct 12 '22 23:10

Kevin Li