Appium - Developer Certificate issues - ios

my client is in onshore and he has given me an .IPA file provision profiled(with my device UDID) with developer certificate not with distribution(As mentioned in the appium docs).The problem is when I try to run the Appium code I'm getting "Target failed to run.Permisson to debug [app name] was denied.The app must be signed with a development identity (i.e. iOS Developer)" error. Any suggestions what might be the problem? And also please let me know.
1)Do i still need a developer account if i have a signed .ipa file?
2)While automation with appium, do I need any additional certificates from developers?

This error is not from Appium, it is actually from Xcode. If you try the following steps, you will possibly see the same error message:
Install the app on the iPhone using the .ipa file.
Open the Xcode which is compatible with iOS version on the iPhone.
Right click on Xcode and open developer tools->Instruments.
Click on Automation and connect your device.Search for the Target app to be tested and click on record.
If the xcode is able to launch the app that means the app is properly signed and it can be used on xcode.Else it means it is not signed correctly.
If you can reproduce the above error with the steps, just show dev and let them know that their signature is not good.
Additionally,
1).You do not need a developer account if you already have a signed ipa
2).You also do not need any additional certificates from developers.

Related

Not getting untrusted developer prompt with Apple Enterprise with MAUI

I'm signing an app using an Apple Enterprise certificate and an in-house provisioning profile. I've added the IPA, along with the manifest.plist, to an HTTPS page and I can install the icon at least, with the itms-services://?action=download-manifest&url= link. If I view the device with the Apple Configurator app I can verify the provisioning profile was installed on the device.
BUT: when I try to open the app I don't get the expected message Untrusted Enterprise Developer and I don't see the option to trust the profile in Settings > General > Device Management. Instead I get a message This app cannot be installed because its integrity could not be verified. I see the same message in console logs as well as "A valid provisioning profile for this executable was not found".
This is a MAUI app but I'm getting the same problem if I create an app in Xamarin with the same app id. HOWEVER: if I create an app with the same app id in Xcode it works fine. All three are using the same manifest.plist, app id, version, build number, etc.
It's got to be a certificate issue, right? But I've checked a million times to make sure dotnet publish is using the correct cert. I've un-zipped the IPA after it's built and verified the correct provisioning profile was added. I've re-signed with Xcode and tried using that IPA. I'm not sure what else to try and I don't know why it works with an Xcode project but not Xamarin / MAUI.
Anyone have any ideas?
After much trial and error I was able to solve this by building using the command line only and not putting any of the Codesign information in a PropertyGroup in the .csproj. According to the documentation this shouldn't be necessary but it's working for me now.
My full build command is:
dotnet publish -f:net7.0-ios -c:Release /p:RuntimeIdentifier=ios-arm64 /p:ArchiveOnBuild=true /p:CodeSignProvision="your provisioning profile name" /p:CodesignKey="Your distribution certificate name”

Xamarin Deploying iOS App Ad Hoc Failing to Install

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?

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.

Unable to Download App + App is No Longer Available

We have an app that was distributed using Enterprise Distribution Profile. Now, the same app is working for some but others are reporting the following issues.
Existing/Installed app throws this error, and doesn't open:
{App Name} Is No Longer Available
Users who try to download the app from the Enterprise link are reporting this error:
Unable to Download App - {App Name} could not be installed at this time.
Done Retry
Users running iOS 8.4.1 are specifically reporting these issues. I regenerated the profile and rebuild the app. This seems to have fixed the issue for some users, but not for all.
What's the real problem here? Thoughts?
Most common causes of this issue:
URL in the plist that references the ipa is invalid.
Device storage is full
The provisioning profile is a developer provisioning profile
The ad hoc distribution provisioning profile is corrupted and the device is having an issue with it.
The device was restored from a backup and is causing a conflict for over-the-air distribution
There was a network timeout
Architecture settings of the build and the device are incompatible (can sometimes happen when "Build Active Architecture Only" is on when
building).
Not Using Mobile Safari.
To find out the exact cause of this issue:
Connect the device to your Mac.
In Xcode, open the Devices window.
Choose your device from list on the left.
View the console for the device.
Now install the app it will show the exact cause of problem
My guess, since it is only happening on some device, is that you could be using a developer provisioning profile, or maybe you are building for only one architecture, so it will only work on some devices that match the built architecture.
Please look at the device console during an install attempt to get a detailed error that should point you down the correct path for a fix.
I have the same problem.
We have found a temporary solution.
To install beta builds we are installing our apps via itunes and an ipa file

over the air ad hoc distribution "Unable to download"

I am trying to distribute an iphone app ad hoc internally for a beta test to 3 users, myself (iphone 4) and two others (iPad 2, iphone 3G). My device served as the development device as well. I followed all of the Apple documentation, archived the app and prepared it for enterprise deployment. I put it on my web server with the .plist manifest file. To test it out, I installed it on my own device (which again, is the development device), and it worked swell. So then I sent the link to my other 2 users, who then reported that they received a message that said they are "unable to download." So first I thought that it might be a problem with the UDID, which it is not. I had my user's download a UDID sender-app, and they matched up perfectly. That was after I asked this question:
What is the MIME type for .mobileprovision
in which I wanted to know the MIME type for a .mobileprovision file. I took this info, and then also sent out a link to the provisioning profile. Both of my test users could download and install the .mobileprovision file fine; the problem was when they again, tried to install the app. One user got a message that said "cannot connect to server www.myserver.com" while the other one installed 80% of the app, before getting the "unable to download" message with 2 options: "retry" and "done."
I am at a loss. Does anybody have any ideas? I am desperate! Thanks in advance!
For the ones who don't use testflight, check the Deployment Target under the Summary page. Maybe you set it too high, which is not always necessary.
Once I created a new App which Xcode automatically set the latest target for me, which was 5.1.1, but the user was using 5.0.x. I changed it back to 4.0 with very small code change(weak->assign), and then it worked.
Try using TestFlightApp.com. It's free, and basically helps automate the process of doing over-the-air ad-hoc testing.
"Unable to download" seems to be a catch-all message that something is not right - either your ipa and your mobileprovision file don't match, or your provision file doesn't include the right UDID, or possibly there are just connectivity issues.
I know it's probably too late to help you, but i had a similiar problem.
The application would download, and then when i could see "Installing" there was a popup with message described by OP. The asnwear was to remove provisioning profile from ipad and restart the device.
Settings/general/profile/remove
As a note, the first provisioning profile was uploaded to device via cable from macbook.
This is an another case of the problem. You should register device's UDID first, before exporting ipa. The devices that registered UDID after exporting ipa, those are unable to download the ipa.

Resources