Creating APN Development Profile Error, "Valid signing identity not found" - xcode4.5

I have an iOS App projects that needs push notifications. I followed tutorials on how to create a provisioning profiles for APN such as
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
https://www.youtube.com/watch?v=nFjEcLCTPM0
but I am always having this error in Provisioning Profile section under Devices
Valid Signing Identity not found
and in Code Signing Identities i have the error
Profile doesn't match any valid certificate/private key pair in your settings
Or is it somehow related to the fact that I already have 2 existing provisioning profiles for an app? I will greatly appreciate tips to fix this problem. Thanks!

Create the provisioning profile using xCode organizer instead of iOS Dev Centre.
Generate CSR using Keychain Access. You can specify any email
address
Create an APP ID at iOS Dev Center. Specify the certSigningRequest file created in step 1
Create the Provisioning Profile using xCode organizer
Generate the PEM files

Related

Huawei Map Kit - Certificates

Summary of our problem:
We released last week our app bundle in the Huawei AppGallery.
We used the Huawei Map Kit in order to integrate Maps. However, there seems to be a problem with map kit.
We receive the error messages:
V/HmsMapKit_MapDataVersionClient_15: build request with apiKey
D/HmsMapKit_AuthenticateClient_86: response code : 401
E/HmsMapKit_TileCache_38: startUrlRequest Identity fail, do not has permission get tile. authResult :010002
What we have done so far:
Enable mapkit in AppGallery connect
Add sha256 fingerprints of the signed bundle to the app in AppGallery conncet
Build the app with agconnect-services.json
Initializing mapkit with the api key setup on the huawei developer page
Encode the API key as below: URLEncoder.encode("", "utf-8")
Tested the rc before uploading where it worked perfectly fine
As we are having troubles in identifying the cause for our problem, it would be very helpful to get further advice.
Thank you very much in advance.
Seems to be you are.using signing by AppGallery.
If so, you have to add one more SHA-256 to project settings, which you can get from application singing settings in console
According to this Docs,It's most likely caused by the following:
When localy building apk works but store submitted apk does not work, it is most likely the signing issue.
And for App bundle signing, there are 2 ways.
AppGallery Connect generates a new signature key for your new app
App Signing allows you to upload your own signature key
NOTE
Once a signature key is generated in AppGallery Connect or uploaded by you, it cannot be modified.
so depends on the approach, you might already have a signature key that is fixed already.
and it seems in this case you have your own signature key.
when we need to use upload key to sign apk before submit to AppGallery, do not use signature key to sign for upload apk, in this case, also upload key certificate and upload key to AppGallery.
need to make sure signature key certificate and upload key certificate are correct if used.

Apple rejected the app due to "Token mismatch" authentication error in a Flutter app with Firebase Phone Authentication

Firebase Authentication with phone number is configured and tested on iOS via Testflight but seems that is not working when Apple is reviewing the app.
We provided a whitelisted phone number which worked with the build downloaded from Testflight.
I've found a couple of similar issues in GitHub but all was fixed... I'm using the latest version of Firebase auth plugin.
I added a GitHub issue as well but no reaction there: https://github.com/FirebaseExtended/flutterfire/issues/3800
Did somebody had to deal with this ?
Finally the app passed Apple review. Below is what we did, in case somebody will encounter this in the future:
We had two APN's created in Apple Developer account. The second one was configured in Firebase Console
===> we removed the first so now we have only one APN in Apple Dev account
In Firebase Console we had also certificates uploaded (Firebase states that
those are not used if a .p8 key is uploaded)
===> we removed the unused APN certificate and used only the APN .p8 key.
Resubmitted the app to review and it passed.

Sign-in for Apple using Firebase in Unity on Android throws 'client does not match api key' exception

I'm trying to to get apple sign-in with Firebase for Unity working on android.
I've followed their set-up instructions but my situation is a little more complicated than the standard, I don't want to go into details about the set up, but using the code below:
FederatedOAuthProviderData providerData = new FederatedOAuthProviderData();
providerData.ProviderId = "apple.com";
var scopes = new List<string>();
scopes.Add("email");
scopes.Add("name");
providerData.Scopes = scopes;
whenever I run either
Auth.SignInWithProviderAsync(oAuthProvider)
or
User.LinkWithProviderAsync(provider)
I get the following error:
there was an error while trying to get your package certificate hash. [client does not match api key]
Can anyone tell me exactly what this error is trying to tell me. I have accounts working for GameCenter, GooglePlay, Google and Facebook but all those use the credential flow and not the new provider one.
Cheers.
Adding more info to clarify the set-up:
There's the default app which has it's own firebase project, this is the one with the linked apps, sha-1 etc... this project provides the google-services.json.
There's an accounts firebase project with no apps associated - this firebase project has been set up to support Sign-in with Apple as well as all the other providers we support and has a link to the service ID as per the instructions.
I use the multiple projects feature in our apps creating an accounts app with
FirebaseApp.Create(accountsAppOptions, "Accounts");
Authentication is done through the Auth of this app.
Once a user successfully authenticates with the accounts auth, I mint a custom token using a cloud function and authenticate with the default app using that.
This works well for GooglePlay, GameCenter, Google, Firebase. But I'm wondering whether this flow is supported by Sign-in with apple as it stands?
Definitely make sure you're as up to date as possible with the Firebase Unity SDK. Apple Sign In support is new, so you don't want to miss any potential fixes.
Then, make sure your SHA-1 is up to date for development. If you're signing with your debug keystore, that's specific for each dev machine and can be uploaded in addition to your release keystore. Additionally, not everything requires a SHA-1, but Auth is the hotbed of SHA-1 gated features so it wouldn't be surprising if this was the missing piece of configuration.
Last, make sure you've followed all the setup steps. In particular, if you look at Configure Sign In with Apple, you'll see a link to the Android Configure Sign In with Apple page that includes a good bit of configuration that you have to do to get everything operational. Also make sure you've followed all the steps to Enable Apple as a sign-in provider. This key may not have been fully setup.
I hope this all helps, and I'd love to hear which part of this (if any) solves the issue to see if the docs could be shored up a bit!
--Patrick

Firebase OTP only works in some devices - Swift 4

I am using firebase authentication in my device. I have followed every steps in firebase documentation. The OTP works in the devices that I used for testing purpose. But when I download the app from AppStore, It does not work. Please help me to get rid of this issue. Thanks in advance.
I got the answer.
There were 2 things wrong with what I was done.
When I created SSL certificate (For push notification) from App Ids under 'Certificates, Identifiers & Profiles' tab in developer.apple.com, The certificate was not created for production. So I created one for production.
I forgot to create APNs key. So I created APNs key from Keys under 'Certificates, Identifiers & Profiles' tab in developer.apple.com. Then I uploaded it in the firebase App (console.firebase.google.com). After you select your project, you can find a gear icon in the firebase website. Select project settings from there and click on the cloud messaging tab. And there you can find the option to upload APNs certificate.

Twilio Chat IOS Production APN Certifications Error-52131

I have an issue with receiving notifications on Twilio Chat with Production APN Certifications, i get the error:
Error - 52131
Invalid APNs credentials
Possible Causes
Credential (certificate and private key) is invalid.
Certificate expired.
Possible Solutions
Make sure you have valid certificate and private key provided in your Credential.
When I test my sandbox APN certifcates the push notifications work perfectly.
However when I create APN PUSH SERVICES Certification and upload these and link them to my programmable chat function I get the error message: 52131 - Invalid APNs credentials... https://www.twilio.com/console/runtime/debugger/NOf2857a6c1db54e27984dd8fa9ff5100f
Just to clarify, the push notifications work perfectly on my development project. I use a Sandbox APN certificate, and selected the Sandbox tick box
However in the production version, where I am using:
Specific APN Apple Push Services Certificate, for a unique APP ID I
get the 52131 error.
I did not tick use for sending to Sandbox credential. As it is a
push credentiual
I followed all the instructions perfectly for exporting the
certificate keys.
I also use separate API Keys and a separate Programmable chat.
I get registration of bindings but no notifications as the
certificate is invalid, which I cannot see why as I checked by regenerating a certificate many times
I read in some responses to similar issues having the Sandbox and PUSH SERVICES APN certificate in the same App ID? Or not using the same CertificateSigningRequest to generate the Sandbox and PUSH? Why would this make a difference?
This was the thread: https://github.com/twilio/voice-quickstart-objc/issues/101
Finally after several weeks of emailing Twilio support I found the answer.
Basically the issue was probably because I extracted the Keys from my distribution certificate somehow and not the Push one. So make sure you are extracting the correct keys from the correct certification. Also because I was deleting and removing the push credentials from Twilio so often the bindings to my users were pointing to old Push Credentials that did not exist, so I removed the bindings allowing new bindings to be regenerated connecting to the new Push Certificate SID.
Other things that are important for production notifications on twilio programmable chat:
Make sure your environment entitlements file is set to "production"
Don't check the sandbox option on your production certificate (of
course)
Sometimes there can be issues when creating a Push Certificate using
a certsigningrequest that was used on a sandbox certificate. Try
creating a new Cert Signing file just for production
When you test your Production notifications these will only work on an appstore build built with your distribution certificate. You cannot receive notifications on the simulator (obviously). You cannot receive notifications from an app built using development certifcate...so you need to build and upload your app to testflight to test the notifications then preferably test between two real devices...or just send notifications from the simulator to a device with an appstore/adhoc build on it
I cannot thing of anything else for now that I came across. Twilio support is very good and will try and answer your question if you need help.

Resources