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

12,907

Solution 1

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.

Solution 2

Answer

Yes, You don't need to connect any physical device to generate an IPA.

Steps

  1. Select Relaese mode
  2. Select Generic device from build only device

    enter image description here

    For more information about configuration, Please have a look below images

    enter image description here

    enter image description here

Solution 3

To output an ipa file and distribute it for testing:

  1. Set your configuration as Ad-Hoc
  2. Make sure you are having correct provisioning profiles setup in iOS Bundle Signing section in Project properties. enter image description here
  3. Make sure in iOS IPA Options, you have checked Build Itunes Package Archive enter image description here

Solution 4

No you do not need to connect a physical device to generate an IPA.

I normally set Solution Configurations to Ad-Hoc and Solution Platforms to Any CPU.

I also ensure I have a provisioning profile correctly set up containing the device UDID's I want to test on and usually use a wildcard project ID. Make sure this is selected in the project options.

Here is a good article on how to set up a device, signing certificate and provisioning profile

Share:
12,907

Related videos on Youtube

ganchito55
Author by

ganchito55

Computer Engineer + Master degree in Intelligent Systems Microsoft Student Partner at USAL Backend developer at Idealista I write articles in Somos Binarios and Lenguaje de programacion.

Updated on September 15, 2022

Comments

  • ganchito55
    ganchito55 over 1 year

    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.

  • ganchito55
    ganchito55 over 6 years
    With this options I got the following error: No valid iOS code signing keys found in keychain. You need to request a codesigning certificate from developer.apple.com
  • ganchito55
    ganchito55 over 6 years
    So, If you don't know the UDID of the devices there is no option?
  • ganchito55
    ganchito55 over 6 years
    It seems that I need to have an iOS device associate to my Apple ID account in order to get the provisioning profile.
  • lowleetak
    lowleetak over 6 years
    Yes, you need a valid provisioning profiles. You can refer this post developer.xamarin.com/guides/ios/getting_started/installatio‌​n/…
  • Pavan V Parekh
    Pavan V Parekh over 6 years
    @ganchito55, Yes, it is right. As per your question, you want to generate IPA without any physical device. and You can generate IPA in release mode.
  • Steve Chadbourne
    Steve Chadbourne over 6 years
    An Ad-Hoc build requires you provide the UDID's of the devices you want it to run on and generate a provisioning profile containing them
  • Wessam El Mahdy
    Wessam El Mahdy about 6 years
    @lowleetak my configuration doesn't contain Ad-Hoc, just release and debug, please advice.
  • lowleetak
    lowleetak about 6 years
    @Wessam you can always create new solution configuration and modify the configuration according to your needs. In my answer, it is just to make sure that "Build IPA" options is checked in the configuration you use to build for AdHoc release.
  • Wessam El Mahdy
    Wessam El Mahdy about 6 years
    @lowleetak Thanks. Is it possible to use free provision to get the Ad-Hoc visible? and Could I create a provision profile without any physical devise plugged?
  • lowleetak
    lowleetak about 6 years
    @Wessam yes you can use free provision. In fact, you can create configuration without any provision. Also, you do not need device plug in to your machine to create provisioning profiles.