We've had a rough time all around trying to get the app to anything other than a simulator (which appears to be a very common issue, as per our countless searches).
The first part was getting the Ad-Hoc Provisioning Profile, installing it, and finally getting our Visual Studio Xamarin iOS project to use it and successfully build.
It kept failing on build, complaining about the signing key or profile. We got past that piece.
Platform: Active (iPhone)
- General tab
- SDK version: (blank)
- Linker behavior: Link SDK assemblies only
- [ x ] Optimize PNG images for iOS
- Advanced tab
- Supported architectures: ARMv7 + ARM64
iOS On-Demand Resources:
- Initial tags: (blank)
- Pre-fetch Order: (blank)
- [ x ] Embed on-demand resources in the app bundle
iOS IPA Options tab:
- [ x ] Build ad-hoc/enterprise package (IPA)
- iTunes Metadata: (blank)
- Package name: (blank)
- [ ] Include Artwork in IPA (we've tried checked and unchecked)
iOS Bundle Signing tab:
- Identity: Distribution (Automatic)
- Provisioning profile: Automatic
- Custom entitlements: Entitlements.plist
- Custom resource rules: (blank)
- Additional arguments: (blank)
- Target Framework: Xamarin.iOS
- Output type: Console Application
- Startup object: (Not set)
- Icon and manifest (selected)
- Icon: (Default Icon)
- Manifest: Properties\app.manifest
The Business logic is in a PCL.
This all works in an emulator (for Android) and the simulator (iOS).
We've tried two different iPhones (an old and new one). All of them are running iOS versions that we are targeting (iOS 10.2 or something like that).
The UDIDs of all of these iPhones are in the Provisioning Portal and the Ad-Hoc Profile that is available when we are building the app.
It is noteworthy that this project will refuse to build Ad-Hoc without that particular profile (not a surprise).
We are able to build the app.
The build takes about 5-10 minutes to complete.
The build (from Visual Studio) generates both an IPA in the bin directory on the PC and somewhere else on the Mac.
We take the location provided in the output window of the build to locate the IPA files.
The actual generation of the IPA file was a major achievement for us, as this is the first time using Xamarin and making an iOS app.
We then proceeded to connect the iPhone to the Mac, open the IPA file in iTunes, and dragged the app onto iPhone.
We started cheering when we saw the iPhone installing the app. It showed the icon for our app with an installation overlay, showing progress of the installation. Once it got to 100%, it disappeared immediately from the app menu and we could find no trace of it on the device.
We tried to find some sort of error log, but we didn't find one. We don't know where to look.
In Visual Studio, we opened the Device Log, selected the iPhone connected to the Mac.
It was a very chatty window. We were hoping to see what was happening by paying attention to that window during the installation process on the phone.
However, once it started installing, the device log went silent--even after the installation failed.
We opened Xcode, went to the iPhone in a window there, clicked a + button to install an application. When it tried installing through that mechanism, it complained about an invalid profile.
I'm not sure what to do. We've looked and looked at the AdHoc profile, double-checked that the UDIDs are in the profile, etc.
Can anyone please give us a clue as to why this may be happening/how to fix this?
Thank you and God bless!