Xamarin.iOS - Using IPhoneSimulator's Keychain with a free iOS Development certificate - xamarin

I have troubles with saving an account credentials inside an IPhoneSimulator's Keychain. I cannot use AccountSaver.Create().Save(credentials, "app") without Entitlements.plist. However when I add it to my project, compilation error shows up:
Could not find any available provisioning profiles for iOS.
I've added iOS Development certifcate to my account on Mac and tried to create a free provisioning profile but failed due to a lack of IPhone device.
Suprisingly, when I tried to build dummy project with added Keychain to Entitlements inside Xcode on my Mac and run it on a simulator no compilation errors occured.
My questions are: Do I have to make Apple Developer Account to test my Xamarin.iOS app inside IPhoneSimulator or is it possible without it and I'm doing something wrong? If so, what should I do to be able to compile my app?
I use Visual Studio 2017 on Windows 8 connected to a Mac Agent (Mac Mini).
P.S.: Most posts states, that simulator doesn't need provisioning profile, but according to this thread:
Starting with Xamarin.iOS 8.10, if the Entitlements.plist file is set at all for the iPhoneSimulator build configuration, then codesigning is required and thus an iOS code signing certificate is required to be installed in your keychain. ~ Xamarin Forum

Some time has passed since I asked this question, but I think it deserves an answer not only in the comments.
As #wottle wrote it is required to be enrolled i Apple Developer Program in order to have access to Keychain.
I sugest also to use Xamarin.Essentials' SecureStore instead of AccountSaver.

We have a bunch of Apple Store applications that had their Apple Distribution profiles expired. The issue was gone once we regenerated the Apple Distribution Certificate and created a new Distribution Profile for the impacted Applications.

Related

XCode - Always have to reset signing identities and re-download provisioning profiles

I'm building mobile apps using Xamarin-Visual Studio. I have a MacBook Air that is my iOS build host.
Every day or two I have to reset my XCode signing identities, re-download my provisioning profiles, and then reboot the MacBook. If I don't, I am unable to install the IPA on an iOS device (it creates an IPA file but just won't install to device).
Any ideas why?
XCode version is 7.3.1. My setup was working fine for months. It started doing this for no apparent reason about a week ago. I'll also add that I have another build environment with an iMac that started doing the same thing at about the same time.
Absolutely nothing has changed with my Mac and Windows environments (although I'm not sure Windows/Xamarin have anything to do with this. Seems like more of a glitch on the Mac side).
Thanks in advance!
Making comment above an answer since there has been no activity on this since:
If you are sharing a signing identity with other team members, if another team member needs to use the singing identity, they will need to reset it and redownload the profile. And when they do, you will have to do the same when you need to use it again. Resetting the signing identity basically creates a new certificate (with the same name) and thus invalidates the profile that used the "old" certificate.

How to make build from iOS app when Team account missing?

I have installed new inHouse provisioning profiles, however when I archive my build in Xcode, I am presented with a message saying the iOS development team is missing. I have xcode 6.4.
I know that you are able to build and sign an app if you don't have a developer team membership in Xcode.
Anyone know what is wrong?
Also another strange thing when I go into keychain to check if profiles and keys are there, they are not stored under the "Login" section like other profiles, but in "System". Is this ok?
Thanks
In order to archive your build (either for the App Store or Adhoc) it must be codesigned by Xcode. This requires a signing identity. Signing identities are only obtainable through the developer console at http://developer.apple.com/ and requires being a member of the apple developer program to access.
Sorry to break the news but without a developer membership you won't be able to archive your app for a device, but run it in the simulator only.

Problems with certificates, provisioning profiles, and bundle ids. iOS development

I have had many problems with certificates, provisioning profiles and bundle ids in the past and here is the latest.
When trying to run my App on an iOS device I get the following error:
Your application failed code-signing checks. Check your certificates, provisioning profiles, and bundle ids. Probably your device is not part of the selected provisioning profile (error: 0xe8008015).
I am aware of the following questions that touch similar topics but I seem to have perhaps a combination of them with something else:
Invalid Provisioning Profile- Missing Code-Signing Certificate
Xcode fails with “Code Signing” Error
why does xamarin suddenly not let me deploy to iOS devices
iOS 8, How to use device for development?
In the past the following things fixed a similar type of error message, however, this time the error at most changed slightly:
Go to Apple Member center and check that the device I am using is listed under "iOS devices"
Go to "Provisioning Profile" -> "Development" and check the profile is active
3.Check the device is listed in the provisioning profile. Re-download the provisioning profile.
4.Clean and build the solution a lot.
Any help would be appreciated.
I am using a macbook air running OSX 10.9.5 and iPad with iOS 8.2.
Xamarin version 5.7.2
Xcode version 6.01
As I was typing the last line of my question it occurred to me that I should check if my Xcode is up to date: It wasn't!
Solution:
Updated Xcode to the latest version (i.e. 6.2). In the update details it says: "Adds support for iOS 8.2 and WatchKit to create apps...".
While Xcode was updating I also did the following:
Correct a spelling mistake in my bundle identifier (To be EXACTLY the same as in my provisioning profile).
In Apple member center I had the possibility to update the list of devices. This is since I renewed my licence not long ago and it gave me the option to reset my previous list. I just followed the instructions and left exactly the same devices as I had previously.
After X-code updated I cleaned the solution and DONE.
I had few things going on so perhaps this won't be really useful to anyone but who knows... I hope this helps

Building iPhone apps through Corona: How do I create a fake signing identity and provision file?

I'm using Corona to create a game but to build the app for iOS I need to specify in Corona which provisioning profile to use (which I have to copy to their certain folder).
They state that either a development or adhoc provisioning profile can work.
How do I create a fake ad hoc provisioning profile?
I tried using and old mobileprovision.mobileprovision file that I had but it obviously didn't work because Corona stated that the certficate was not installed.
Here is a link of the whole process to setup for building for iOS (legal):
http://developer.anscamobile.com/content/building-devices-iphoneipad
I am running Mac OSX 10.6.6 with xCode 3.2.6 and iOS SDK 4.3.
In short: you can’t. Provisioning profiles are part of the code-signing process; non-jailbroken iOS devices will not run code that has not been cryptographically signed with a valid provisioning profile.
To run your code on a device, you either need to jailbreak it (so it’ll accept non-Apple-signed code) or cough up the $99/year to become a member of the iOS developer program (so you can give your code a valid signature). Only the latter option will allow you to then submit your app to the App Store, and it’s a lot less hassle, so you’re probably best off just going with that.
You can test Corona apps in the simulator for free, but you have to be a licensed developer in order to deploy to device.
You could try bundling your own IPA file, but I think the IPA will only transfer if the iDevice is jailbroken. This process worked for me on my jailbroken iPhone. https://stackoverflow.com/a/10171462/708807
This is a fake Hoc provisioning profile http://www.instructables.com/id/How-to-use-Adobes-iPhone-Packager-without-an-Appl/step2/Exporting-the-App/

How can I self-sign in Xcode for iPhone?

How can I self-sign an iPhone application using Xcode? I have done the following:
Created a cert following these instructions
Modified my /Developer/Platforms/iPhoneOS.platform/Info.plist to include the two keys
<key>PROVISIONING_PROFILE_ALLOWED</key>
<string>NO</string>
<key>PROVISIONING_PROFILE_REQUIRED</key>
<string>NO</string>
I have changed the info.plist associated with the project to say
<key>SignerIdentity</key>
<string>Apple iPhone OS Application Signing</string>
I have changed the project properties to refer to the signing authority with the name iPhone Developer, which is the name of my certificate.
The error is currently a valid provisioning profile matching the applications identifier... cannot be found.
Note: I am pretty sure that this can be done without a $99 cert from Apple. Also, I am not trying to build for the simulator but rather for the iPhone/iPod Touch itself.
Any insight would be appreciated.
Perhaps Relevant link.
Have you tried http://iphonedevwiki.net/index.php/Xcode#Developing_without_Provisioning_Profile? The link you've provided only works for SDK 2.x.
The error message is because you do not have the proper provisioning profile through the developer site of Apple, which follows from paying the $99 yearly. It may somehow work on a jail broken device which is not how Xcode is designed to be used.

Resources