No valid iOS code signing keys found in keychain - ios

I can Archive and Publish an app in debug mode, but when switched to App Mode i get the following error:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: Error: No valid iOS code signing keys found in keychain. You need to request a codesigning certificate from https://developer.apple.com.
the attached file shows i do have the relevant Certificates but Xamarin keeps complaining
The app has been successfully published before but using a different profile on the same mac. Both users key chains contain the same certificates

I resolved that changing plataform build configuration from iPhone to iPhoneSimulator.

got it work in the end by remving all the certificates and then putting them back in the Key chain

I get this error when I open Xamarin University Exercises with Visual Studio 2015. A bug was entered and they decided that it is expected behavior. Xamarin Bug
If you work in Xamarin Studio and set this property for whatever reason, then open it in VS, you may hit this issue with no way to edit / remove the Entitlement setting in the Project Properties.
I guess the Exercises are created with Xamarin Studio.
The accepted workaround is to open the iOS .csproj and manually edit the <CodesignEntitlements></CodesignEntitlements> for the Debug|iPhone PropertyGroup.

I struggled too for the last day to make Xamarin (now Visual Studio for Mac) successfully deploy on my device with the free developer signing (since I'm new in this area and I'm not ready yet to join the developer program yet), and what helped was to first deploy a dummy app with the same bundle identifier from XCode like others suggested on different sources, keep CodesignEntitlements as it is in the .csproj file, but replace CodesignKey's value iPhone Developer like in the answer here: https://stackoverflow.com/questions/58062268/no-valid-ios-code-signing-keys-found-in-keychain-you-need-to-request-a-codesign#=
Hope this will help somebody in the future like it helped me!

Sometimes that happens when you newly start your computer and Visual Studio. Just don't hit green triangle debug Combobox-button and check what is selected in this combobox. If it is "Device" as in picture 1 select a simulator from the list as in picture 2 and start debugging. Else you get this error since VS will try to start debugging in a real device if "Device" selected in the combobox.

you can try either of this
remove any keys, if existing form Entitlements.plist .
Change the proj run mode to debug , select device .

I needed to create Signing Identity certificate from scratch and recreate Provisioning Profiles (on apple developer site). Then download using xcode.

Related

Xcode: Could not locate installed application. Install claimed to have succeeded, but application could not be found on device

I manually deleted my app from the iPhone and now I get this error message when trying to run it again from Xcode.
I cleaned the build folder, restarted the device, Xcode and the Mac, nothing helps.
I also tried everything that's mentioned here: Install claimed to have succeeded, but application could not be found on device
How do I force a re-installation?
As always, when the question is posted on SO, one finds a solution ;)
I edited the Scheme, setting the build configuration from debug to release and that installed the app again. Changed it back to debug and now it's running again as expected.
I ran into the same issue while testing a app on iOS 13 via XCode 11.0. Building via the legacy system solved it (File > Workspace Settings... > Build System > Legacy Build System).
Hope it helps
I had a similar issue after one of Carthage/XCode updates. It means iOS was not able to install app on the phone. XCode apparently is not able to provide this information directly. The first thing to do is open your phone console - go to Window/Devices and Simulators then select your device and click Open Console. In the console you can search for your app name what should provide you more detailed fail info. In my case it was sth like this:
Applications did fail to install: (
"<LSApplicationProxy: 0x118913b60> com.mydomain.myapp (null) <com.mydomain.myapp <INVALID >:0>"
) (appInfos: (null))
There was another console log few rows before flagging the problem:
0x16f4df000 -[MIExecutableBundle codeSigningInfoByValidatingResources:performingOnlineAuthorization:ignoringCachedSigningInfo:checkingTrustCacheIfApplicable:error:]: 789: Code signing identifier (org.alamofire.Alamofire.iphonesimulator) does not match bundle identifier (org.alamofire.Alamofire.iphoneos) for /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.E83T1l/extracted/myapp.app/Frameworks/Alamofire.framework
There was an issue with one of the frameworks Alamofire I'm using in the project. I changed bundle identifier of the project and build framework again what solved the problem.
Hope it helps!
In my case, the problem was an embedded framework that was not being signed. In the General tab of the project settings, setting the embed setting to 'Embed & Sign' did the trick.
In my case it was a problem with new Development certificate. It's created automatically after Xcode updated to 11 and may not be included in current provisioning profile.
I was facing similar issue in Xcode 11.1. I have fix this issue. Not sure about this solution that it will to work for all or not.
My device iOS version was older then the iOS Xcode target build version.
Steps:
I have put Xcode target Device to iPhone device OS version.
Delete derived data
Start xcode and open project
Clean the project and gererate build and install in device
Note: Please check your developer account, certificate validation and already registered device warning.
Hope this solution will help some peoples. Happy coding.
After trying everything here, for me the solution was to change my distribution profile to use the new Apple distribution certificate that covers all apple platforms. This should be compliant with xcode 11 (if you're not experiencing one of the other million problems since the "upgrade").
The cert change is mentioned here:
https://developer.apple.com/documentation/xcode_release_notes/xcode_11_release_notes
Cert creation instructions here:
https://help.apple.com/developer-account/#/devbfa00fef7
Once done, make sure the correct profile is selected in Signing & Capabilities, and 'Apple Distribution' is selected under Build Setting -> Signing for the appropriate build configurations
A solution that solved this issue for me was to check the signing team for my tests target. Selecting the same development team then meant that my app was able to be built and run on device.
Build system: New Build System
Xcode: Version 11.1
Uninstall all the other apps that are under the same "Organization" or "Bundle Identifier" with your current app and try again.
It works for me. Hope it does for you too.
On your iPhone go to Settings/General/Profiles & Devices/Apple Development: "YOUR APPLE ID" and delete all apps from there. It fixed the problem for me.
It happened to me when trying to launch a watchOS app on a real device.
The only solution that worked was:
Delete iOS app from device
Delete watchOS app from device
Close and reopen Xcode
Clean build folder
I did a Product -> Clean then Build, and it was able to run.
Go to settings on your phone and wipe out all certificates and apps and then install your app again. That helped me
Problem occured on XCode 11
TL;DR:
Try changing Embed option in General=>Section Frameworks, Libraries.. to Do Not Embed (although it sounds strange)
In my General=>Section Frameworks, Libraries.. list are Security.framework and the CocoaPods Pods_projectname.framework amongst others. Default setting of these two was Do Not Embed. Sounded strange to me, so I changed it without need alternating to Embed & Sign or Embed Without Signing. With both options the error occured!
On your iPhone go to Settings/General/Profiles & Devices/Apple Deelopment: "YOUR APPLE ID" and delete all apps from there. It fixed the problem for me.
This was the solution that worked for me.
Please double check the bundle ID of the installed application to see if it is re-applied, this will also cause this problem .I uninstall the app and solve the problem.
In my case i have PROD certificate and trying to install the app in the device, later i changed to development certificate it got installed.
As Marcin's answer suggested, I visited the phone console and in my case, it is this error message:
-[MIFreeProfileValidatedAppTracker _onQueue_addReferenceForApplicationIdentifier:bundle:error:]: 182: This device has reached the maximum number of installed apps using a free developer profile: {(
So if you are signing your app with a Personal Team certificate, make sure that you don't have more than 3 apps.
Read more here: Why can I not install more than three apps?
As for me,
I added a custom key-value to Info.plist of main watchOS application file. That was wrong.
After removing it, all works correctly.
It seems this is not allowed but where is no other information about it.
If you have other under-development apps installed, try uninstalling those you are not using, and run Xcode to install your app again. It works for me.

visual studio mac ios bundle signing platform is always iphone simulator

I am having troubles using my iPad as a testing device for my Xamarin.Forms App Running in Visual-Studio-2017. I have already done the requirements to use my own app but it still doesn't show on the devices. Here are the steps I have done so far.
Created my own account on free provisioning as described on this site. https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/device-provisioning/free-provisioning?tabs=macos
Opened my Xcode and created an empty app to setup the free provisioned account as described on the link above.
Fixed my the codedesign keychain access by inputting my Mac password and clicking always allow
Changed my info.plist information on signing as shown below
On bundle options, I have changed my signing identity and provisioning profile created by xcode. and changed the platform to iphone and clicked ok. See the image below.
After I clicked ok, Visual Studio says it was saved. But everytime I checked on my a debug device, it only shows simulators! Shown below:
I have tried restarting visual-studio mac numerous times but still how the same result! My devices hasn't shown at all!
I have scoured the internet and I couldn't find any concrete solution.
I was able to find the solution. Just change the Debug to Debug | iPhone as shown below... And it will show your device.

iTunes software service authentication error domain error 434

I am uploading iPhone application using latest xCode 8. I have good internet connection and all the relevant settings set up at iTunes connect. My distribution profiles are also set up correctly.
I am facing below error:-
iTunes software service authentication error domain error 434
So this has what worked for me:
Preface:
4 days of debugging, recreated certificates numerous times, nothing worked, every time i try to validate/upload via Xcode it says same error "iTunes software service authentication error domain error 434"
Solution without XCode:
Create archive in Xcode
Export IPA in Organiser (Xcode > window > Organiser)
Open Application Loader and manually choose IPA generated
Done
Solution with XCode:
Create archive in Xcode
Click Validate
Unselect BitCode
Check if its validated, mine got validated when i unchecked bitcode
Not Try to genrate similar fashion with Bitcode unselected
If all goes fine now generate with Bitcode Checked(mine worked with these exact steps)
Done
This is a very common error while uploading a build to iTunes Connect.
A simple answer to it : "Just RETRY".
To resolve this error follow these methods.
If you have not added app icons add them and try archiving.
Remove developer account and add account again. Press CMD + , to bring up preferences in Xcode and from accounts remove and add back account. Try archiving this.
Clean project (CMD + Shift + K), close Xcode, restart Xcode and
build project (CMD + B). Check for warnings. ( if you are using
cocapods some times Xcode asks you to change project settings in
warning. Click on warning and fix it. Xcode fixes it automatically)
Simply retry archiving.
ToDo. Add More solutions
In my case the problem was the virus protection software I am using. I turned it off before attempting validation and everything went fine.
This could be the problem of Xcode. You can try two different approaches here.
i) Use Application loader, Download it.
ii) Before using Application Loader please un-install all certificate and upload the ipa file. If it fails via app loader.
then second approach we can use try to upgrade the version of Xcode. Either de-grade it (xcode 7.X) or upgrade it (8.X) some time with some specific version of xcode and and specific version of OS system throw such error.
Try using those hopefully second one can help you to upload the app.
Change the network connection and application submit via Application Loader
Did you set the device to Generic iOS Device before you archived the build? That appears to have fixed it for me on a couple of different occasions.
I got exactly the same error response, read a bunch of posts like this that were uncertain of cause & solution, tried to validate it again with zero changes, and it validated successfully. Go figure...
I had this same issue, but it turned out I used a different profile in the Xcode project, then when I tried to validate the app. It wasn't noticeable since at my company we use multiple Apple id's under the same businessname. Maybe checking this helps?
None of the solutions here worked for me but I was able to solve these errors executing the application on the device that is connected to the computer before archiving it. I tried to archive it again and the validate process was passed.
None of the answers worked for me. Following steps helped me fix it.
Quit the Xcode
Delete all provisioning profiles (/Library/MobileDevice)
Start the code and try to validate without download the provisioning profiles.
The xcode will download the profiles for you.
In my case I had 2 builds in the same app and when I tried to verify one of them it started giving the same error. I removed both builds and re archive. It worked fine after that.
In my case, I have checked iOS provisioning profile from developer website and found the one related to my app was invalid.
I have regenerated (all invalid) provisioning profiles and download it from xCode -> preferences -> accounts. This resolves my case.
I have a different solution. I had "Enable Bitcode" set as false in my target settings but had "Include bitcode" checked as true for the validation. For obvious reasons, the validation would fail every time if I had include bitcode checked. I unchecked include bitcode and it worked just fine after cleaning my project.
it is quite easy, quit and reopen the Xcode project clean the project change the build number and build an archive.it will work

xamarin ios Why cant i select a Simulator

I am very new to Xamarin, and i have been following the Hello.ios QuickStart Tutorial and the app builds, But i cannot select a simulator for debugging.
My only options in debug are Default or IOS Device.
I have made my app the starting application and i have the xcode simulator running. I also went into xcode and updated the simulation to 7.1 i think, but i still cannot select a simulation type.
I even tried to go into project-->Active Configuration and tried to select Debug|iphoneSimulator, but it defaults back to just Debug|iPhone
can anyone help me
Thanks
EDIT
i am also getting this error : no valid ios code signing keys found in keychain
I dont know if that is caused by my issue in my question.
For the code signing issue, remove the entry in the entitlements textbox under:
iOS project => Project Options => iOS Bundle Signing
See http://forums.xamarin.com/discussion/39674/iphonesimulator-build-results-in-no-valid-ios-code-signing-keys-found-in-keychain for more information.
An alternative is to configure a signing certificate using an Apple developer account.
Here is a good walkthrough for setting up a certificate.
http://developer.xamarin.com/guides/ios/getting_started/installation/device_provisioning/

No valid iPhone code signing keys found in keychain

So I downloaded to my Mac Pro the XCode 5 and Xamarin and created Single View Hello World application and excited to launch it through the simulator I run it and?
I got this error No valid iPhone code signing keys found in keychain.
Nice, I read all threads here and there, past and future but non of them helped as I just wanted to run it on the iOS simulator and not on the device.
I have realised that I cannot even switch to a different version of Simulator which are already on the laptop, the Simulator version 6 and 7 when I go to Run - Run With -> There is only Mono Soft Debugger for iPhone.
When I downloaded Tasky example project, this one is working fine and I can switch different types of Simulator.
Any advise which is not listed already on Interent or future networks?
It´s really simple, in the drop down (Solution Platforms) from the toolbar chose the right one, if you´re debugging in an iPhone/iPad chose that, if not change to simulator, the problem will go away, there´s no need for removing anything.
If you can't find the corresponding drop-down menu, check out this tutorial on how to make it visible. Once you can see the Solution Platforms combobox in the toolbar, you can select iPhoneSimulation and the problem will go away.
After two days of no sleep I found a solution for this particular problem, not sure if it is the best one but here you are, one of this should work:
1) Go to Project -> Solution Options -> Configurations
I have removed: Release|iPhone, Debug|iPhone and this is where it started working also for any other project.
2) Maybe before the step 1) just try to change in -> Configurations -> Configurations Mappings the platform from iPhone to iPhoneSimulator.
If this is not going to work, try 1)
I hope this is going to help some of you and save tons of time!!
Cheers
Today I had the same issue after Xamarin upgrade. I tried to run my application in the simulator. The solution was however different.
Please note that all the solutions mentioned here on this page from others might have been right in certain time or are right and works in certain circumstances.
Today's solution:
Go to Project -> "Name of your project" Options -> Build -> iOS Bundle Signing -> Custom Entitlements - remove Entitlements.plist from the textbox -> Click OK
Thanks
I have resetted my Mac Book pro keychain and I encounter this issue.
When that happens, go in XCode and ensure that you are properly logged on into your Apple ID. If so, you should see your development group, you may have to click Join once again.
Read the following post, it explains everything.
One more solution.
In Release configuration I successfully built my app, but in Debug - had the same issue, as in topic.
Go to your startup Project-> Options -> Build -> iOS Bundle Signing.
Then check your Signing Identity and Provisioning Profile for each Configuration Debug and Release.
In my case Release configuration was setup-ed correctly (several days ago by me) with values:
- Signing Identity: Developer(Automatic)
- Provisioning Profile: Automatic
But Debug configuration was silently corrupted somehow:
- Signing Identity: Unknown (Iphone Distribution: name of my company)
- Provisioning Profile: No matching profiles found
Thus, fix your Debug configuration to be equal with Release.
I am on MacOSX and I have encountered this issue on Xamarin Studio when debugging using Debug|iPhoneSimulation.
The error will just keep on repeating. What has worked for me was this link Answered by KMullins
This is due to an expired profile that was renewed.

Resources