<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.socialstack.dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=85.255.235.105</id>
	<title>SocialStack - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.socialstack.dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=85.255.235.105"/>
	<link rel="alternate" type="text/html" href="https://wiki.socialstack.dev/index.php?title=Special:Contributions/85.255.235.105"/>
	<updated>2026-10-16T08:07:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.36.2</generator>
	<entry>
		<id>https://wiki.socialstack.dev/index.php?title=Apple_Certificates&amp;diff=664</id>
		<title>Apple Certificates</title>
		<link rel="alternate" type="text/html" href="https://wiki.socialstack.dev/index.php?title=Apple_Certificates&amp;diff=664"/>
		<updated>2024-05-08T15:43:07Z</updated>

		<summary type="html">&lt;p&gt;85.255.235.105: /* Get openssl */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Creating and using apple developer certificates for signing app in devops ==&lt;br /&gt;
&lt;br /&gt;
=== Get openssl ===&lt;br /&gt;
&lt;br /&gt;
download open ssl 1.x (later versions are not compatible with mac ios see comment below)&lt;br /&gt;
&lt;br /&gt;
So something like OpenSSL-Win64-1-1-1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
If you are using a build system like cordova and receive an error like this one:&lt;br /&gt;
&lt;br /&gt;
security: SecKeychainItemImport: MAC verification failed during PKCS12 import (wrong password?)&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s because &amp;quot;OpenSSL 3.x changed its default algorithm in pkcs12. Which is not compatible with embedded Security frameworks in macOS/iOS. You could alternatively use OpenSSL 1.x.&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a certificate signing request (CSR) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openssl genpkey -algorithm RSA -out d:\\distribution.key&lt;br /&gt;
&lt;br /&gt;
openssl req -new -key d:\\distribution.key -out d:\\distribution.csr -subj &amp;quot;/emailAddress=you@domain.com, CN=Your Company, C=GB&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a distribution certificate using Apple Developer ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
Go to https://developer.apple.com/account/resources/certificates/list&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Create New Certificate&lt;br /&gt;
**	Choose &amp;quot;Apple Distribution&amp;quot;&lt;br /&gt;
**	Upload the distribution.csr file created above&lt;br /&gt;
**	Download the distribution.cer file&lt;br /&gt;
&lt;br /&gt;
=== Convert into p12 file for devops ===&lt;br /&gt;
&lt;br /&gt;
Using the distribution.cer file you created and downloaded from the apple developer portal and your key file from the first step &lt;br /&gt;
&lt;br /&gt;
You will need to set a password for the certificate (remember this for later.....)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openssl x509 -in d:\\distribution.cer -inform DER -out d:\\distribution.pem -outform PEM&lt;br /&gt;
openssl pkcs12 -export -inkey d:\\distribution.key -in d:\\distribution.pem -out d:\\distribution.p12&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Upload your distribution p12 file into devops ===&lt;br /&gt;
&lt;br /&gt;
Take your shiny new .p12 file and upload it into devops for use by your pipeline&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
Navigate to {project} -&amp;gt; pipelines -&amp;gt; library -&amp;gt; secure files&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may also need to update the password variable used by devops, usually this is called p12passwd and is stored in the build pipeline variables &lt;br /&gt;
&lt;br /&gt;
(DO NOT HARDCODE IT INTO THE YAML BUILD FILE)&lt;br /&gt;
&lt;br /&gt;
=== Provisioning File ===&lt;br /&gt;
&lt;br /&gt;
You will also need to create/update the mobile provisioning file so that it links to your new certificate in the apple developer portal&lt;br /&gt;
&lt;br /&gt;
If you forget this stage you will most likely end up with a very unhelpful error from the build such as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Error: /usr/bin/xcodebuild failed with return code: 65&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
Go to https://developer.apple.com/account/resources/profiles/list&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it&amp;#039;s an existing app, then choose the entry from the list, there should be a single entry per application.&lt;br /&gt;
&lt;br /&gt;
* Choose edit and at the bottom link the new certificate.&lt;br /&gt;
&lt;br /&gt;
* Save the changes&lt;br /&gt;
&lt;br /&gt;
* Download the mobile provision file so for example yourapp.mobileprovision&lt;br /&gt;
&lt;br /&gt;
* Upload the file into the secure files area as per the p12 file earlier&lt;br /&gt;
&lt;br /&gt;
=== Check the build pipeline === &lt;br /&gt;
&lt;br /&gt;
Check the pipeline build file to ensure that the filenames are correct, note the variable for the p12 password $(p12passwd)&lt;br /&gt;
&lt;br /&gt;
You should now have 2 files in the relevant secure files area of the pipeline&lt;br /&gt;
&lt;br /&gt;
*distribution.p12 &lt;br /&gt;
*yourapp.mobileprovision&lt;br /&gt;
&lt;br /&gt;
Ensure they are correctly referenced in the build pipeline&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      - task: InstallAppleCertificate@2&lt;br /&gt;
        displayName: &amp;#039;iOS certificate installation&amp;#039; &lt;br /&gt;
        inputs:&lt;br /&gt;
          certSecureFile: &amp;#039;distribution.p12&amp;#039;&lt;br /&gt;
          certPwd: &amp;#039;$(p12passwd)&amp;#039;&lt;br /&gt;
&lt;br /&gt;
      - task: InstallAppleProvisioningProfile@1&lt;br /&gt;
        displayName: &amp;#039;iOS provisioning profile installation&amp;#039; &lt;br /&gt;
        inputs:&lt;br /&gt;
          provisioningProfileLocation: &amp;#039;secureFiles&amp;#039;&lt;br /&gt;
          provProfileSecureFile: &amp;#039;yourapp.mobileprovision&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
https://help.adobe.com/en_US/air/build/WS5b3ccc516d4fbf351e63e3d118666ade46-7ff0.html#WSfffb011ac560372f284e44b012cd1e700c0-8000&lt;br /&gt;
&lt;br /&gt;
https://gist.github.com/boodle/77436b2d9facb8e938ad&lt;/div&gt;</summary>
		<author><name>85.255.235.105</name></author>
	</entry>
</feed>