Xamarin/XCode register provisioning profile error - xcode

I have the following problem. I'm creating Xamarin iOS application(by vs for max 2017) and during a building I have this error:
No installed provisioning profiles match the installed iOS signing
identities.
As far as I can understand the solution of this problem is connected with creating provisioning profile by xCode. But when I try to generate provisioning profile(with name testtesyui) by xCode I see this error:
Failed to create provisioning profile.
There are no devices registered in your account on the developer website.
Plug in and select a device to have Xcode register it.
No profiles for 'testtesyui' were found
Xcode couldn't find any iOS App Development provisioning profiles matching 'testtesyui'.
I don't have any real iOS device and I'm planning to use iOS emulator.
Below, I listed screnshoots from xCode ui(I've hid personal data):
xCode account settings,
xCode general settings
Could some one help with this problem? Please let me know if you need more details.
Thanks.
Updating:
I opened info.plist file in vs for mac and I saw the following:
info.plist content.
I've tried to sign in in my apple account, but in the end I saw this message:
signin. As a result, I still cannot select my team.
Could you please give advice where am I wrong?

my problem was in a solution configuration. By some reason, I tryed to build my application in Debug|iPhone mode, not in Debug|iPhoneSimulator mode.
When I switched to Debug|iPhoneSimulator mode, then the build works fine.

You need to enable automatic signing to work with simulator
Once you’ve ensured you have an Apple ID connected to Visual Studio for Mac, you’re ready to enable Automatic Signing
Steps
In your iOS project, open the Info.plist file. In the Signing section, select your team from the Team dropdown:
Then, select the Automatically manage signing  checkbox.
More Info here

Related

iOS 15 Untrusted Developer issue

I have updated recently to a new iOS 15 and after I built and run my application in Xcode, while have been logged in with a same developer account as before iOS 15 installation, I get this message:
The operation couldn’t be completed. Unable to launch com.xyz.xyz.xyz
because it has an invalid code signature, inadequate entitlements or
its profile has not been explicitly trusted by the user.
and the error log:
Could not launch “my-project0name” Domain: IDEDebugSessionErrorDomain
Code: 3 Failure Reason: The operation couldn’t be completed. Unable to
launch com.xyz.xyz.xyz because it has an invalid code signature,
inadequate entitlements or its profile has not been explicitly trusted
by the user. User Info: {
DVTRadarComponentKey = 855031;
IDERunOperationFailingWorker = DBGLLDBLauncher;
RawUnderlyingErrorMessage = "The operation couldn\U2019t be completed. Unable to launch com.xyz.xyz.xyz because it has an invalid
code signature, inadequate entitlements or its profile has not been
explicitly trusted by the user."; }
System Information
macOS Version 11.6 (Build 20G165) Xcode 13.0 (19234) (Build 13A233)
Timestamp: 2021-09-21T12:36:18+02:00
Earlier (on iOS14), this could be solved by going to:
Settings.app -> General -> Profile -> Select Profile -> Trust
But now (on iOS15) I can't actually find it at that location. How would I fix this?
From what i understand, this might be a bug connected to iOS 15 / xcode 13.
I found a solution which is to create a new Apple ID and use it to sign your app in xcode.
You can add a new team by going into "Signing & Capabilities"-tab and select "Add account" where you select a team.
Once you've done this and run the application on your device again, the option to trust the application in Settings > General > Device Management should appear!
As #ujell pointed out. The provisioning profile generated prior iOS 15 is preventing installation on the new release. Therefore, you will need to generate a new provisioning profile for your app. Try the following:
Quit Xcode
Go to the directory of cached provisioning profiles (cd
~/Library/MobileDevice/Provisioning Profiles/)
Back up the existing
files to another directory
Remove all profiles listed under
~/Library/MobileDevice/Provisioning Profiles/
Launch Xcode
Install/run the app on your device
Xcode will detect that there are no eligible profiles on your local system and request a new one during the next build to a device. The new profile will be compliance with iOS 15 provisioning.
NOTE: if it still doesn't work, then install the iOS 15.2 beta release (Build 19C5026i or later) on your device and try the steps above again.
Indeed, it looks like, the problem occurs only with IOS >hardware< real devices running >= iOS 15
I see no option in Settings allowing me to set the app dev as trusted.
This does NOT occur with my older (real) iPad Air, running with iOS 12.5. The app runs immediately without prompting for trust etc.
It also runs without problems on Xcode's simulator devices with iOS 15.
So yes, I think it is an iOS 15 and/or Xcode issue.
reported this to Apple.
Ios15 changes trusted application position to:
settings -> general -> vpn and device manage
then you can see your application under the Developer App, click it and verify it
iOS 13
in your iphone,got to
Settings -> General -> VPN and device management -> Developer app ->Trust and accept
At least my issue was the result of Apple again messing with the code signing creating a ling tail of side effects.
iOS15 code signs differentially on the "new" type of certificates.
I'm developing an app that is connection to a device via WIFI without internet connection.
The initial development was done on Xcode 13.1 and an iOS14 iPad. That worked well. As usual the iPad needed to be on a WIFI with internet connection at the first launch to verify the code signing. After that it was fine to launch the app from Xcode to the iPad while it being on the WIFI without internet connection. The app didn't need any additional code signing verification.
After updating the iPad to iOS15 every launch started to fail with the error unverified when the iPad was on WIFI without internet connection. Launching on the iPAD on WIFI with internet connection was fine.
It seems like iOS15 causes apps to verify code signing on every launch - not only the first any more.
After searching and fiddling with Provisioning Profiles for several days I found out that Apple now has two different types of certificates - an "iOS Development" certificate and a "Apple development" certificate. The latter being the "new" thing.
Deleting my automatically created certificate and creating a "new" - and then a new provisioning profile solved my problems.
My app now only needs to verify code signing at the first launch.
This fixed my code signing / developer verification issues.
iOS 15:
Settings -> General -> VPN and device manage -> business apps -> Tap on your certificate and install it.
Might be a bit late, but to anyone still searching for a solution to this problem, I finally fixed it by turning on automatic date & time settings.
On your iPhone: go to Settings  > General > Date & Time.
Then turn off and on again the "Set Automatically" setting.
For somme absurd and unknown reason that seemed to solve the problem, for me at least.
Hope it helps.
Note: I have an iPhone 7 with iOS 15.6 and i use xCode 13.4.1
Just install the Developer app on the physical host iOS device.
Go to account and signin from you developer apple id
Now under Settings > General > VPN & Device Management you'll be able to see organisations.
Trust the ones you want to
You'll now be able to open the applications signed by that organisation

Xamarin.iOS on macincloud development and automatic provisioning setup

I'm trying to develop a cross-platform app using xamarin forms and mac-in-cloud. Specifically with ios, I'm trying to set-up automatic provisioning since I originally got the error when debugging: >Could not find any available provisioning profile for (app name).iOS on iOS
So, after researching into the issue I put my apple developer acct info in, and when trying to use automatic provisioning. I get an error under Team: >There were errors in the data supplied. Please correct and re-submit. There are no current IOS devices on this team matching the provided device IDs.
Now, following the research rabbit hole, I go to the apple developer portal, try and register device, select macOS, insert Hardware UUID of mac mini into device ID, so on. And no change to error(s).
Question time, am I setting it up completely wrong? Other (older) articles/forums suggest linking an ios device via itunes, however, that seems counterproductive to my objective. Anyways, any help would be greatly appreciated. Apologies for any naiveté.
What are you trying to develop with the mac? Is it a iOS (iPhone) app? If so you can just use the simulator on the mac, and the mac does not need to be registered.
Try manual provisioning in VS
Signing Identity > Development (your name)
Provisioning profile > probably will be vs (something)
Also in VS go to Preferences > Apple Developer Accounts > make sure your account is listed. Then on the right hand side, click 'View Details' then 'Download all profiles'
Restarting VS or the mac may also help.

How to list provisioning profiles and installed iOS signing identities?

Environment:
Visual Studio 2015 on PC
Visual Studio (Xamarin) on Mac
iPad is connected to Mac
My setup used to work fine. From PC, I would be able to debug iOS apps running on the iPad.
Yesterday, I updated the Mac OS as well as my iPad iOS. I may have updated a few other things too. However, now I am running into problems deploying Xamarin iOS apps on the iPad.
I can create an iOS app in xcode and deploy it successfully. However, when I try to build my Xamarin app, I get the error "No installed profiles match the installed iOS signing identities."
There are a few posts on the forum that talk about a similar problem. I have gone through all these posts. I have also downloaded (once again) my iOS certificate from Apple developer portal and added it to my keychain store.
I still don't understand why I get the error. Would appreciate if someone can tell me how I can get the list of installed iOS signing identities and compare them against the list of provisioning profiles.
Also, when I look at my plist.info file, I see that, for key CfBundleIdentifier, the value is replace_bundle_id. I am wondering how I can tie this bundle id back to my provisioning profile. On Apple's portal, I see a bunch of provisioning profiles (I am part of an enterprise team). There is no field called bundle-id on these profiles. All each of them have is an app-id. Where do I related the bundle-id to the provisioning profile? Regards.
Provisioning profiles are all inside the directory: /Users/m.piccotti/Library/MobileDevice/Provisioning Profiles
Usually when I have these kind of problems and no time to understand what's wrong, I simply delete everything inside that directory and I download again all the profiles from Xcode. Naturally you can try this only if you are sure that you'll be able again to download all the provisioning profiles you need.
Or it could be that you have to set the right provisioning profile for the project:
This info is saved into iOS.csproj, the element CodesignProvision.
When you go to Apple Developer portal and check App IDs, you see the Name and ID of your app. The ID is your bundle ID. That you need to enter in your plist.
Based on that Xamarin will find your profiles.
Here is what I did to make it work. This is based on the feedback I received from the other two replies.
From the Apple developer portal, I looked at the ID of my app. This was in the form com.mycompany.myproduct. In my Xamarin iOS app's plist.info, the id was replace_bundle_id. I changed it to match the one from the portal.
Next, I cleaned the "Provisioning Profiles" directory on Mac and used xcode to create a test project and change the bundle id (from project options) to match the one on the portal. xcode automatically created a new profile.
This made the whole thing work. Now I am able to deploy and debug from my PC to iPad via Mac.
Our project was generated by Xamarin wizard a long time ago and used to work just fine until recently. I still do not know why replace_bundle_id worked in the past and stopped working all of a sudden. The only change I had made was that I upgraded the OSes on the Mac as well as my iPad.

Xamarin No installed provisioning profiles match the installed iOS code signing keys

I am trying to run my app locally and not through an emulator.
These are the following things that I have done:
set up the free provisioning profile
"trusted" my iPhone when prompted
Enabled these settings for provisioning profile:
However, I am still getting this error when trying to run the app locally on an iPhone
No installed provisioning profiles match the installed iOS code
signing keys
What else can be done to run my app locally?
Log into the Apple Developer member center and review your certificates. Down to the left you should see the Provisioning Profiles title. Click it and you'll find a list of the profiles you have. Now you need to create one with the same app identifier that your app has in Xamarin (you find it in the Info.plist file).
After that you need to open XCode and download it through Xcode -> Preferences -> Accounts.
Clean, rebuild and debug Xamarin project and try again.
Go to xcode/preference/ account add a apple ID if you don have any...if you have double click in the name ...and look the name appear in iOS Team Provisioning Profile.
Now open in xamarin the info.plist and in Bundle Identifier put this name.
and now should load a provisional profile.

iPhone Debugging: How to resolve 'failed to get the task for process'?

I have just added a provisioning profile to XCode (needed to support notifications and in app purchase), setup as needed the build configuration for ad hoc distribution, and tried to run the app on the device (I have done this several times in the past, without any problem).
The app is installed, but it does not start. On the console, I see the following message:
Error launching remote program: failed to get the task for process 82.
Error launching remote program: failed to get the task for process 82.
The program being debugged is not being run.
The program being debugged is not being run.
However, if I start the application on the device manually, it works as expected. I have recently installed the latest XCode 3.2 for Snow Leopard. Is this a known bug of this version of XCode or am I doing something wrong?
EDIT: It works fine with release distribution using the development provisioning profile.
I have checked again the ad hoc provisioning profile to make sure it includes the device I am using.
The ad-hoc profile doesn't support debugging. You need to debug with a Development profile, and use the Ad-Hoc profile only for distributing non-debuggable copies.
I have had problems debugging binaries on the device via XCode when the app includes an Entitlements.plist file, which is not necessary to install onto the device for debugging. In general, then, I have included this file for release builds (where it is required for the App Store) and removed it for debugging (so I can debug the app from XCode). That may be your problem here.
Update: As of (at least) August 2010 (iPhone 4.1 SDK) the Entitlements.plist is no longer necessary to include in your application in many cases (e.g., distribution through the App Store.) See here for more information on the cases when Entitlements.plist is required:
IMPORTANT: An Entitlements file is generally only needed when building for Ad Hoc Distribution or enabling Keychain data sharing. If neither of these is true, delete the entry in Code Signing Entitlements. (emphasis mine)
I Had the same issue, but resolved it by following simple following steps :
Make sure you have selected debug rather than release.
In Debug configurations, in project settings, you should have selected developer's profile & no need of specifying the entitlements plist.
Also same setting are there under: Targets: , if not manuall change them to the above for the debug config. It will work.
All the best.
This took me a while to figure out.
If you are using a distribution / ad hoc/ profile you cannot test it through xcode. You will get the error: The program being debugged is not being run.
You can build the app, go to the products folder in your app in xcode, click on the file with your project name and choose reveal in finder. You can drag this app into into iTunes and sync and that point you can test your app on your device.
If you are getting such error, the only reason could be you using a Distribution profile rather than a development profile in Xcode or a missing Entitlement property. If you are not using the Entitlements.plist, then the only possible error could be the app is getting packaged with a distribution profile. You could verify this confirming the build logs. To change this, go to Build Setting of the project and verify Code Signing Entity setting. For debugging to work, this setting should be a developer profile for the configuration that you are currently using.
https://developer.apple.com/library/ios/#qa/qa1682/_index.html
For instant results, delete all mobile provisioning profiles from xcode and install the developer profile that you intend to use.
Almost 2hrs on this issue! And finally I solved it by replacing the
iPhone Developer
to
iPhone Developer: My Dev Account Name
for Debug's CODE_SIGN_IDENTITY:
Select Project Target
Build Settings
Search by "code sign"
Modify CODE_SIGN_IDENTITY section's Debug row with "iPhone Developer: My Dev Account Name", not just "iPhone Developer".
I've no idea why it works, but it does! At least for me!
Environment: Xcode 5.0 (5A1412).
Check ur code signing section.make sure that the code signing is iPhoneDeveloper code signe
Open Entitlements.plist and set the boolean value get-task-allow to YES - the debugger can attach now!
Go to Edit Schemes and under Run -> Info -> Build Configuration, change from Ad-Hoc to Debug. Click OK to save.
It might be that you have an expired development profile on your phone.
My development provisioning profile expired several days ago and I had to renew it. I installed the new profile on my phone and came up with the same error message when I tried to run my app. When I looked at the profile settings on my phone I noticed the expired profile and removed it. That cleared the error for me.
I received this error when I tried to launch app from Xcode as I figured I had selected distribution profile only. Build was successful so I created .ipa file. I used testflightapp.com to run the app. You can use iTunes as well.
As stated by Buffernet, you cannot use a distribution provisioning profile to debug. When I switched to a developer provisioning profile, I got the error "A Valid Provisioning Profile For This Executable Was Not Found".
A quick google for this lead me to the article listed below. From there, I realised that I hadn't got a valid development provisioning profile as my iPhone hadn't been added to the Provisioning Portal and all the other stuff involved.
Make sure you run an iPhone developer provisioning profile and your device has been added to the provisioning portal!
http://iosdevelopertips.com/xcode/a-valid-provisioning-profile-for-this-executable-was-not-found.html
Yes , Provisioning profiles which are for distribution purpose, i.e. Distrutions provisioning profiles do not support debugging and gives this error. Simply create and use debug provisioning profile (take care of this when creating provisioning profile from developer.apple.com account).
I just changed my bundleIdentifier name, that seemed to do the trick.
I've patched my project with JailCoder http://jailcoder.com/ and problem resolved.
Just download It and drag your xcode project to It.

Resources