Certificates and regulations for building iOS in {N}

I followed the steps mentioned in this answer to create a development certificate and provisioning profile. I am trying to implement FCM and run a Nativescript application on a real device. Below are the steps that I took to create the project:

  • Imported provisioning using appbuilder provision import path/to/provision
  • Installed development certificate in the key chain.
  • Exported .p12 file and saved to local disk.
  • Imported certificate with appbuilder certificate import path/to/p12/cert
  • Creating an assembly using appbuilder build ios --provision "XXXX" --certificate "XXXX"

But it gives me an error

The certificate is not included in security certificates.

Please correct me if I did something wrong. Suggest some solution if you went through this as I am new to this stuff and Nativescript.

PS I also tried to provide the appbuilder site, it also shows some warning in the certificate field

Here is APNS Resolution

enter image description here


UPDATE


As @Eddy Verbruggen mentioned (author of NativeScript Firebase plugin )

I asked Telerik after this letter, and they confirmed it as an error in their browser, and I hope that it will be fixed in the near future. They created a ticket for him.

+5
source share
2 answers

In the tutorial, he did not check the push notification in the id application, make sure that you included the Push notification in your application identifier as a screenshot and has a green circle

enter image description here

+2
source

The certificate is not included in security certificates.

This error message is usually generated if there are no corresponding public keys in the .mobileprovision profile with the cryptographic identifier you are using.

You can confirm that .mobileprovison is associated with this particular certificate by extracting the .p12 public key and looking for a match in the <key>DeveloperCertificates</key> array in the .mobileprovison xml part.

You can extract the public key from the cryptographic identifier .p12 using openssl .

 openssl pkcs12 -in <path_to_.p12> -clcerts -nokeys -out <path_to_resulting_public_key.pem> && cat <path_to_resulting_public_key.pem> 

Once you know the public key, make sure it is listed in <key>DeveloperCertificates</key> in your .mobileprovison file. You can do this by running the command below or simply open .mobileprovision with a text editor such as notepad ++

 security cms -D -i <path_to_.mobileprovision> | grep -f <path_to_resulting_public_key.pem> 

I also recommend deleting all .mobileprovision files and certificates from the application profile and then re-import the specified elements. You can do this by running the following commands:

 appbuilder certificate // List certificates appbuilder certificate remove <name or index> // Delete cerificates appbuilder provision // List provisions appbuilder provision remove <provision_id> // Delete provisions appbuilder provision remove <provision_id> // Delete provisions appbuilder provision import path/to/provision appbuilder certificate import path/to/p12/cert 

EDIT:
NOTE. You can also find the following {N} plugin - https://github.com/NativeScript/push-plugin

Steps to create an APNS certificate and a mobileprovision file.

  • Be sure to create and add a couple of relevant certificates and training profiles in AppBuilder. For more information about certificates and provisioning profiles, see Configure Code Signing for iOS Applications .
  • Ensure that the application identifier in the provisioning profile is enabled for push notifications. In the Identifiers section of the iOS Developer Center, select your identifier from the list and view the allowed services. If necessary, click "Edit" and enable the missing features. If you change an existing application identifier, be sure to create the appropriate provisioning profile and import it into AppBuilder.
  • Make sure you set the correct application identifier for your application in the Project Properties dialog box.
  • Make sure you create the Apple Push Notification SSL service SSL certificate in the Certificates section of the iOS Developer Center and add it to AppBuilder.
  • Ensure that the Apple Push Notify SSL service SSL certificate type matches your certificate type and preparation profile for signing your application code. For example, both must be for development or for production.
  • Make sure you export the P12 file for the Apple Push Notification SSL Cryptographic Authentication Service. For more information on how to export cryptographic identifiers from AppBuilder, see Export Cryptographic Identification .
+1
source

Source: https://habr.com/ru/post/1257716/


All Articles