Xamarin Deploying iOS App Ad Hoc Failing to Install - ios

I am trying to deploy an iOS app Ad Hoc to an iPhone for beta testing. I've been developing the app on Windows VS, I have a Macbook air with all the necessary software (Xcode, VS, etc), and I have paired to it with VS on my Windows machine. I have also followed the following steps:
Created an Apple Developer account
Created an App ID with the bundle identifier as the same exact one as the one in info.plist
Created a signing certificate using my Macbook Air, downloaded it, and installed it into XCode
Created a provisioning profile with the App ID and the certificate, and made sure to include the device that I want to load the app onto.
Made sure everything above was set to "distribution" and "ad hoc" as needed.
Set Bundle Signing in my iOS project properties to Manual Provisioning, and selected the Signing Identity and Provisioning Profile to the ones that I created for this deployment.
Set the build to Release and the target to Remote Device
Ensured that the deployment target in info.plist was set to the highest available, which is 15.4, though my iPhone is at 15.6 (could this be the problem?)
Set the IPA Packaging Options to "Build iTunes Package Archive (IPA)"
Set "Include iTunesArtwork images and the iTunesMetadata.plist" to true in the same area
Successfully built the iOS project and produced a .ipa file
After all that, I've been trying to get the .ipa onto my phone, which is definitely the device I added to the provisioning profile.
I've tried two methods to do this, and both have failed:
Connecting my phone to my Windows machine and opening iTunes. Dragging the .ipa file onto the device. The app shows up on my phone, but when I try to open it, I get this error:
"This app could not be installed because its integrity could not be verified". Though it should have been.. The device is linked to the provisioning profile that was used to create the darn thing.
Connected my phone to my Macbook Air and accessed the device through XCode > Window > Devices and Simulators. I emailed myself the .ipa file and downloaded it onto the machine (the Microsoft docs explicitly state that emailing the .ipa should work just fine). In the "Intalled apps" section of the device, I clicked the little '+' and then pointed it to the downloaded .ipa. After a few seconds, it pops up an alert window that says "Unable to install *.iOS".
Other things I have tried since this has been a problem:
Recreating the above steps by re-registering my device, creating new certificates, downloading, installing, all that business.
Messing with the deployment target version.
Jumping out from behind the couch and startling it to make it do what it's supposed to.
I swear I'm done with Xamarin forever after this problem is solved, but all the headaches I've experienced have made me think twice about whether to even bother with .NET Maui haha thanks for any help you can provide

Firstly, the error This app could not be installed because its integrity could not be verified" may be caused by the proper certificate or the test devices are not visible in 'Devices' (UDIDs added) in developer.apple.com/account.I found two simialr issues, you can refer to them: link1, link2.
Secondly, have you follow this docs on how to generate the IPA file?

Related

Visual studio unable to locate provisioning profiles for Xamarin.iOS

I am trying to setup my environment to deploy my app to a real IPhone for testing because I dont want to work with simulators and etc. It apparently requires provisioning profiles. I dont have a paid apple developer account and I learned that it is not required. These are the steps I have done so far:
Open xcode on my mac go to Preferences> Accounts> Add new Apple ID. I added one of my apple IDs.
I then added a new project select a team and selected necessary options to create the project
I went to project propertiesi setup the iOS version.
I went to signing and enabled automaticly manage signing. It did something and created a certificate for me.
I deployed the app once to my phone which worked fine.
I later opened visual studio on my windows machine.
Paired my mac with my visual studio.
Went to info.plist and copied my bundle identifier from xcode to visual studio.
Enabled Manual provisioning but no developer profiles. Restarted VS but no luck
I basically followed this site
https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/device-provisioning/free-provisioning?tabs=windows
I tried without selecting a specific provisioning profile (it was in developer (automatic))
It seemed to be going well until it gave this error
error MT1007: Failed to launch the application '/Users/xxxxxxx/Library/Caches/Xamarin/mtbs/builds/App8/4ae6e8b79af6f5c06054809bff907c4f900782cdb32378817eb5bbdd1fa2e996/bin/iPhone/Debug/device-builds/iphone11.8-14.2/App8.app' on the device 'iPhone': Failed to launch the application 'com.xxxxxxxxxxxxxx.App8' on the device 'iPhone': Invalid Service Error (error: 0xe8000022) 0
I found the solution to my problem. The site https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/device-provisioning/free-provisioning?tabs=windows showed illustrations of choosing specific provisional profiles
However I didn't get this kind of choosing
Mine had
Developer (automatic)
No profiles found (or something in english: my VS is not in english)
but apparently it is not required to choose the exact profile from VS. I was able to deploy the app by just compiling the app as usual (after following the steps of course). However there is a problem with launching the app which requires me to go to settings and trust my apple id or something which is not important.

Beta from Crashlytics fail to install build on testers' devices

I'm sending my app to testers with Beta from Crashlytics which is an amazing tool to do app testing.
I had every new tester's device UDID registered in my developer account and then distribute a new build.
My testers got email invitation and accessed app's installation which could not be completed on their device.
They kept seeing an alert showing up with message:
Unable to download app - MyApp could not be installed at this time -
Done / Retry
Testers' testing status are "installed" in my Crashlytics dashboard but they're actually not able to finish installation.
Please help me find any possible factor causing this problem.
Perhaps the provisioning profile embedded in the build has been invalidated. Use Xcode to create a new archive, then use Fabric to upload a new build with that archive.
Discussion:
In my case, I had deleted the provisioning profile in the Apple Developer Member Center that had been embedded in each of my Fabric Beta builds. This caused the app testers had previously installed to immediately crash when they tried to launch it (embarrassing). It also caused the "Unable to download app - MyApp could not be installed at this time - Done / Retry" issue when testers tried to (re)install the app via Fabric Beta. Uploading a new build with my new provisioning profile embedded fixed the issue (each tester had to install the new build).
I've run into this problem back on iOS8 and just recently saw it again for iOS9, the only thing that solved the install issue was for my users to delete any previous version that they had downloaded, restart their phone, and try again.
You can also verify with them if Crashlytics properly installed on their iDevice, I've seen more than once where the configuration profile caused the issue, it's worth removing that (Settings -> General -> Configuration Profile (towards the bottom)) and retrying the install.
This is usually caused by one of two problems:
Incorrect provisioning profile/code signing settings. Double- and triple-check that the following settings are the same for the project and the provisioning profile: bundle identifier, development vs. distribution, adhoc.
Caching - sometimes, even when you've done everything correctly, things still just go awry. In such cases, you can try: deleting the previous version of the app from your phone, cleaning your project, deleting and re-downloading provisioning profiles, and building the app again.
RubyMotion Solution
For me, it was because I was using a development distribution profile, but with the wrong entitlements. Well, entitlement, singular.
I still had the 'beta-report-active' entitlement enabled, which was not included with the development distribution profile I am using. It is instead included with the production distribution profile (which is needed to distribute to TestFlight). However, I just wanted to deploy to my local phone, and not air my dirty app laundry to my entire internal test group, so this is where I found myself.
In any case, removing the 'beta-report-active' entitlement fixed my issue.
I tried the normal route of checking for proper certs and also deleting the app and provisioning profile along with rebooting device. In my case it was installing on device A and not device B. Device A was older iPhone 5c running iOS 9 and device B was newer iPhone 8 running iOS 11.x. When I archived the app for distribution I was selecting device A during the archive. Once I selected "Generic Device" it worked. But I'm sure I've built in the past selecting a specific device instead of generic and it worked. I was using Xcode 8.2, but I don't believe the Xcode version matters.

Enterprise Deployment w/New Device

Attempting to deploy an Enterprise application wirelessly, with partial success. I do have the Enterprise Developers Kit, I've created the provisioning profile, added the devices ID's, uploaded the mobile provisioning profile, the ipa, and the P-list.
When I install the app through xCode directly onto the iPad, then attempt to download it wirelessly, it works fine. When I attempt to use it on a device that hasn't had that direct install, it downloads about 66%-75% of the way, right when the title shows up on the app, then says "Unable to Download Application".
Any ideas?
So, if you're on here, you should check to see if your iPad or iPhone is up to date with whatever version you archived it with on xCode. I updated the iPad to 5.1.1 and it installed just fine. My bad.

Archived IPA won't install onto my phone

I've done this a few times before with my own apps.
I've started working for a client and using there account I've created the necessary files on the dev portal. Downloaded and install them on my machine.
Followed the instructions to create an archived IPA for adhoc distribution.
Drag it into iTunes.
Then drag it to my device in iTunes. When i start dragging the app icon a red badge appears, but the app never starts to sync onto the phone.
I opened the ipa and looked at the mobile provisioning file and I see that my phones UDID is
included there.
Can anybody give me some insight into what the problem may be?
I had this happen when I could see myself in the provisioning profile under its code-signing identity but I was not on the distribution profile. And the issue relied on the build settings.
Go to your project -> Build Settings and check under Code Signing. Confirm that you are using the correct developer profile. Pay extra attention to mismatches between bundle identifiers.
Check the validity of the distribution profile in the same area.
Archive and make sure you are using the correct build configuration. When creating the ipa file confirm for the correct distribution profile again.
Hope that helps
There can be many reasons for that. one thing that cross my mind:
Check if their device iOS version is not higher then the SDK you are using or lower then your deployment target.
I can also recommend to use Testflight service (search Test Flight iOS in google), it is perfect for distributing builds to customers.

Workflow when using Appcelerator and IOS Deployment

I'm using Appcelerator to build smartphone apps, only iPhone right now but the plan is to expand into Android territory later.
I'm having some problems (as many others I understand) with understanding the provisioning profiles and ad-hoc deployment.
I have created a provisioning profile that contains the UDID's of my iPhone, my iPad and my sons iPhone. I build using Titanium Studio, and then select the "Install to IOS Device" to build an app and also an "ipa" file. Syncing with iTunes to my own devices.
I'm now planning to use TestFlight with the ipa file to distribute beta versions. It seems to work OK with the existing UDID's in the profile. The problem is now when I add more UDID's. Do I have to update the profile manually (on developer.apple.com), download it and fully rebuild my app for every added UDID? Or is there a simpler way? As I understand it, the profile is embedded into the "ipa" file, so does that mean I HAVE to rebuild?
"Do I have to update the profile manually (on developer.apple.com), download it and fully rebuild my app for every added UDID?"
Yep, it's exactly as you say. When you build your app, the provisioning profile the app is built against is embedded within the .ipa file. This is used to determine which devices can run the app, as TestFlight illustrates after the .ipa file is upload - all devices within that profile that match devices you've registered with TestFlight are listed. So after changing the device provisioning, you'll need to download and install the provisioning profile by dropping it into XCode, and then rebuild the app.

Resources