How to generate the signing certificate fingerprint of phone app on HarmonyOS watch to be communicated with? - huawei-mobile-services

I have a problem getting the signing certificate fingerprint for my Android app for the communication between phone and Huawei GT2 Pro that is a HarmonyOS watch. I follow the instruction of Wear Engine SDK integration process at the Huawei developer website (https://developer.huawei.com/consumer/en/doc/development/connectivity-Guides/service-introduction-0000000000018585) to develop my app on both phone and watch. However, it is not very clear to me how to generate the signing certificate fingerprint. Can someone help to describe the process?

Assume you are at the debug stage. You need use the debug certificate, i.e., the .cer certificate that you obtain in AppGallery Connect (AGC) to generate the signing certificate fingerprint. Here is the procedure:
Step 1 – use Huawei DevEco Studio to generate a key store (in p12 format) and a certificate signing request file (.csr);
Step 2- login your Huawei account on AGC, and use the .csr file to apply and download the debug .cer certificate file from the Certificate management that is under the Users and permissions on AGC;
Step 3 – open the .cer file and copy information in the last paragraph to the new text .cer file, and then open the new .cer file and click Details, then Public key to obtain the pubKey;
Step 4 - use a 3rd party online tool tomeko.net to encode the pubKey to base64 format, finally the base64Encode(pubKey) is the signing certificate fingerprint. You can find the detail of pubKey and base64 generation in https://developer.huawei.com/consumer/en/doc/development/connectivity-Guides/signature-0000001053969657.

Related

Huawei sign in failed with status code 28

Even though I used last sdk, Huawei sign failed with status code 28. What causes this error?
Error 6003 indicates that this fault is caused by an incorrect signing certificate fingerprint.
You could:
Ensure that the app’s certificate signature is the same as that configured in AppGallery Connect.
.Open the APK file of the app, extract the META-INF directory from the
file, obtain the CERT.RSA file in the directory, and run the keytool
-printcert -file META-INF/CERT.RSA command to display the signature certificate information.
.Check the SHA-256 certificate fingerprint configured in AppGallery
Connect by referring to Configuring the Signing Certificate
Fingerprint. If the information is the same as the preceding
information displayed, the certificate fingerprint is correct.
2.Ensure that the appid parameter in the manifest file is correct.
You can perform the check in either of the following ways: View the
parameter directly in the manifest file under the project. Decompile
the packaged APK file, and view the parameter. You can use any
decompliation tool for that.
Check whether the app is hardened or re-signed.
Check whether HUAWEI App Signing is enabled. According to the official document, if the service is enabled, the generated certificate fingerprint must be added in AppGallery Connect.
About Error Code 6003, you are advised to check whether the appid is the same as the appid on AppGalleryConnect.
Ensure that the certificate fingerprint has been configured, and the certificate for packing the signature on the local client is the same as the certificate for configuring the fingerprint in AppGallery Connect. And the JSON file is stored in the project-level directory instead of the application-level directory, check the following items configuration process carefully.
1.Check whether the fingerprint certificate is correctly configured when you apply for related services. Open the APK file of an app, extract the META-INF directory from the file, obtain the CERT.RSA file in the directory, and run the keytool -printcert -file META-INF/CERT.RSA command to print the signature certificate information.
2.HMS Core (APK) will cache the signature file. You need to find HMS Core (APK) on the Apps page of your device and clear its cache, restart your app, and perform the previous operation again.
3.Sign in to AppGallery Connect, click My apps. On the page that is displayed, go to Develop > Project settings > conventional, check whether SHA-256 certificate fingerprint is consistent with the fingerprint in step 1.

I can't figure out any other possible reason. can you help me?

When I integrate the HMS Core SDK into my app or game, result code 6003 is
always returned during an API call. The official document indicates that this fault is caused by an incorrect signing certificate fingerprint. But I have checked that the app's certificate signature is the same as that configured in AppGallery Connect.
Official document
Step 1: Ensure that the app's certificate signature is the same as that configured in AppGallery Connect.
Open the APK file of the app, extract the META-INF directory from the file, obtain the CERT.RSA file in the directory, and run the keytool -printcert -file META-INF/CERT.RSA command to display the signature certificate information.
Check the SHA-256 certificate fingerprint configured in AppGallery Connect by referring to Configuring the Signing Certificate Fingerprint. If the information is the same as the preceding information displayed, the certificate fingerprint is correct.
Step 2: Ensure that the appid parameter in the manifest file is correct.
You can perform the check in either of the following ways:
• View the parameter directly in the manifest file under the project.
• Decompile the packaged APK file, and view the parameter. You can use any decompliation tool for that.
Step 3: Check whether the app is hardened or re-signed.
Since AppGallery Connect does not re-sign an app currently, you need to locate the fault if your app has been hardened or re-signed by yourself.
Step 4: Check whether HUAWEI App Signing is enabled.
Huawei provides the App Signing service for developers to let Huawei host their app's signature key and use it for the APK file to be distributed.
According to the official document, if the service is enabled, the generated certificate fingerprint must be added in AppGallery Connect.

Implementing APN's, get valid signing identity not found when install development profile?

For APN's i'm following raywenderlich tutorial from here
i already have developer certificate installed in xcode, when i create AppId and configure it to push notification and create certificate(SSL) it adds a development certificate under certificate section..it's Ok.when i go to create provisioning profile it shows me only one certificate to choose(not newly created APN certificate). i created profile with that certificate but whenever i go to install it, it say "valid signing identity not found".
Please note that I've installed both iOS Development and APNs Development iOS certificates in xcode. I've searched similar question on stackoverfllow but still no luck.What I'm doing wrong?
I'm not sure what you are doing wrong. But here is the general procedure:
Go to developer.apple.com and login
Go to Certificates, Identifiers and profiles
Create a certificates for iOS app development and APNS. For creating a certificate you need to upload a CSR (use Keychain Access to do this) from your Mac. Once you upload the CSR from your Mac, download the App and APNS certificates to your machine - If you don't upload the CSR from your machine, you will get a valid signing identity not found error.
Points to remember:
When creating APNS certificate, chooose the appropriate App ID. By choosing wrong ID push notifications wont work.
When creating the provisioning profile, choose the App certificate you created in the above steps.
Thats the gist, you should be able to figure out things I missed by following on screen instructions.
I got the solution private key(.p12 file) was missing in keychain.

Valid Signing identity Not Found in Xcode

Actually i developed an app using my own developer certificates and provisioning profile.
Now i need to publish it on my client developer account and my client sent his distribution certificate along with provisioning .And I have installed the certificate and then i drag the provisioning profile to xcode, and i have got error message like "Valid signing identity not found"
Please assits me.
Change code sign in project settings.
You need the private keys that were used to sign the certificate. If you don't have them
anymore you can generate a new signing request.
You need p12 file from your client to use its developer certificate and provisioning profile.When your client provide you that p12 file than double click that file and its run perfectly.
And for geting p12 file ,select the cert, and open the arrow to also select the private key and export them together as a .p12 file from Keychain Access.
There are several ways to solve this issue.
The first one is, to export your developer certificate including the associated key from your keychain and importing it on your client machine.
The other way would be (If your client machine would use another apple dev account) to go through those steps listed here Apple Certification & Provisioning
I would recommend to delete the old certificates from xcode, sometimes xcode might lag otherwise

Lost Private Key For iPhone Distribution Certificate. What could be solutions?

I have lost my private key for iPhone Distribution Certificate during an OS upgrade.
Now I want to upload a new iPhone App to the App Store and that requires me to sign the App with an iPhone Distribution Profile/Certificate. Is there any way to create a new iPhone Distribution Certificate. I did not find any "New.." option there on the developer portal.
One more question: must I have to sign the code with an iPhone Distribution Certificate to submit on the App Store? Or can I sign and upload it on the App Store with an iPhone Development certificate?
Thanks In Advance...
Revoke your current certificate, wait a few seconds and refresh the page and you should see a button "Request Certificate". You'll have to follow the Certificate Signing Request instructions again, and upload the .csr file. You'll then have to wait for your Team Administrator (could well be you) to Accept the new certificate before downloading it and installing in your KeyChain.
You'll have to create a new provisioning profile for the App, using the new certificate.
Hope this helps :)
Yes you can have a solution for this
Revoke certificate you have in distribution and get CSR again (it should be from Mac where you need key) and creat new certificate. Once you do this you will have certificate, now go to profile, you will find profile invalid, edit it and take new certificate you created and regenerate again. Download certificate and profile and use in code and you are good to go