Unable to test on iPhoneSimulator with Xamarin Studio - ios

I'm currently developping an app on Xamarin Studio with Xamarin.Forms the app works fine in android but on ios i can't even build my app ...
At first i had the "no valid ios code signing keys found in keychain" error so i did add my Apple Id on XCode has I saw on a forum and I did follow the tutorial on how to add a developer certificate i did refresh my provisioning profiles on xcode and added them all (iOS Development, iOS Distribution, Developer ID Application, etc) .
Now I have another error still on build that say "Error executing task DetectSigningIdentity: Directory '/Users/.../Library/MobileDevice/Provisioning Profiles' not found."
I don't understand since i'm just trying to execute it on the iPhoneSimulator in Debug mode and i should have the certificate iOS Developer ....
Any idea on how to solve this ?

Create a new solution in XCode with the same bundle identifer as your xamarin project. After creating a new solution you get a new page where you can click on fix issue.
Connect your apple device and click on fix issue it will maybe solve your problem

You are actually very close. Now that you have created your provisioning profiles, all you have to do is download them (or at least one) and execute them. That will automatically place the profile at the path that is reported on your error. After that you'll be good to go.

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.

Xamarin VS2019 cannot test iOS app using paired mac

I have a xamarin project in VS2019 on a windows pc, that I am trying to test on a paired mac.
When I try to start testing the app in the simulator I get the following message:
Xamarin Simulator
Failed to install
//Users/administrator/Library/Caches/Xamarin/mtbs/buildsxxx.Touch/c186893d4554f91f3322b4d0409a1518/bin/iPhoneSimulator/Debug/xxxTouch.app
to D18C5658-ECBB-4492-A7B9-14710340A89F. The app directory
'/Users/administrator/Library/Caches/Xamarin/mtbs/builds/xxx.Touch/c186893d4554f91f3322b4d0409a1518/bin/iPhoneSimulator/Debug/xxxTouch.app'
does not exist.
What is meant by this? Does it mean there are no built files on the mac? Is there a folder missing in the iPhone simulator?
Sometimes I do also get the following error:
Could not find any available provisioning profiles for ApplicationName
on iOS.
Is it really necessary to have this provisioning since I just want to test it on a virtual device?
I am running the app using the debug profile and the iPhoneSimulator
Thanks for any help!
Thank you for the suggestions!, Finally I was able to get it to work simply by using the automatic provisioning in the IOS bundle signing project properties tab.
I read that you could not use this option without a apple developer program account.
I don't have a developer program account, but it seems to work nonetheless.

Error with installation IOS app to device builded in VS with Xamarin

I try to build app, created in VS with Xamarin, to test it on real device (on iPhoneSimulator it works without problem). I use AdHoc build with all needed certificates and provisions (created like Xamarin tutorial describes). But when I try to upload IPA file to device through ITunes, it finish unsuccessfully. On iPhone it just disappear after uploading complete, on iPad it throw error message with "Application is unable to be install". Both devices was added to provision profile. Provision profile is active.
All help will be appreciated
You can find a more descriptive reason if you open the "Deploying to Device" Window
Problem was solved this way - copied project to Visual Studio for Mac, installed on host-build machine, building app, move project back. Now app is uploading without problems.

'Create provisioning profile' button next to 'iOS development' on XCode is not present

I am trying to create a free provisioning profile on XCode for an app I am developing using Xamarin. But the Create button next to iOS development is not there:
Please help.
I had the exact same problem and here is how I fixed it:
First, Go to: this xamarin help guide
On there I skipped step 2,3,4 and went straight from 1 to 5.
Finish 5 and 6. Then your General->Signing page will have a status failed message.
Now, to fix that and before you get to step 7 make sure you have
your device selected at the top like this
Then proceed with the instructions on the Xamarin page from step 6 and to the finish, I did not bother going back to step 2,3 or 4, just skip those. Make sure you have the same info in your test app in Xcode as you have in info.plist in the .iOS project in Xamarin.
Now I have my Xamarin Forms app running from Xamarin studio on my device, select (Release | Iphone) and select yourself as a trusted developer in settings on your ios device if you run into that.
If you have already one developer certificate available at developer portal, then you can not create new. You have to revoke old one and then you can create new development certificate.
Open Developer portal and revoke development certificate and try again.
The main idea is to create provisioning in the apple developer account and import/download them in Mac or xcode and use them from there.
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html

Appcode will not run an App that has no developer certificate

I have an app I am writing for iOS that will run just fine in Xcode but AppCode by Jetbrains says :
Error:Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “(null)” were found.
So what I've been doing was keeping Xcode running so that I can hit the "play" button to deploy/compile my app while doing my actual work in AppCode.
Any ideas what could cause this?
madhurtanwani's link above helped, but I had to scroll to find the solution.
Here is the section that explains the issue and how to solve it:
It looks like in AppCode you are building for a device and in Xcode for a simulator. Simulator does not perform code signing, so you don't get an error there.
If all you want to do is to run the app in a simulator, then in the toolbar change the selection from "iOS Device" to a desired simulator. To be able to sign the app you need to make sure that you have correct provisioning profile and certificate installed and check your codesign build settings.
I had a similar issue and this link on their support site helped me: https://devnet.jetbrains.com/message/5509981#5509981
The crux is that on Xcode I was building for a simulator and in AppCode it was building for an actual device (which requires signing)
I had slightly different problem, and were using real device in both Xcode and AppCode.
I've changed team in one of my projects, and while Xcode were working completely fine, AppCode gave me error: No signing certificates found
The only thing that worked for me is changing Code Signing Identity from Apple Development to iOS Developer in Build Settings in Xcode:

Resources