Cannot use silent APNs with Firebase default authUI, always exception - swift

In my Xcode Project I enabled APNs and in the Firebase Console I uploaded the correct APN Key. Still if I initiate the Phonenumber Login Process(with the prebuilt UI) it gives me an exception saying, that I need to add the URL-Type for the ReCaptcha.
How do I configure it to use silent APNs instead?
Error:
Exception: "Please register custom URL scheme 'com.googleusercontent.apps.*******'
in the app's Info.plist file."
Thank you!

Right click on the Info.plist
Choose Open as Source code
Add that to the list inside the :
CFBundleTypeRole
Editor
CFBundleURLSchemes
com.googleusercontent.apps.your-app-id-here
Full doc can be found here Firebase doc

Related

Failure to Launch Apps Due to Package Name Inconsistency

When I used huawei AppLinking Serviceļ¼Œ the app package name is queried to locate the app details page. However, the app package name varies depending on the channel. For example, for a Huawei channel, the package name ends with .huawei, which is different from that in a Google channel.Does this mean it's impossible for an App Linking link to be opened in all local app stores due to package name inconsistency?
Does this mean it's impossible for an App Linking link to be opened in
all local app stores due to package name inconsistency?
The answer is no because there is a solution to this problem.
Perform the following to resolve the issue:
We know that App Linking can redirect users to a custom website if the app has not been installed, so you can use Android intents to create custom links, in which you can configure the package name and fallback URL to be opened. The basic syntax is as follows:
intent:
HOST/URI-path // Optional host
#Intent;
package=[string];
action=[string];
category=[string];
component=[string];
scheme=[string];
S.browser_fallback_url=[encoded_full_url]
end;
Taking advantage of the preceding functions, you can:
Create a link of App Linking and use the setOpenType(CustomUrl) method to set the open type to redirect users to a custom website for the Android platform. The involved APIs are as follows:
.setAndroidLinkInfo(new AppLinking.AndroidLinkInfo.Builder()
.setAndroidDeepLink(Android_LINK)
.setOpenType(CustomUrl)
.setFallbackUrl(BACK_LINK)
.build())
Use an Android intent to configure the preceding custom website. Here, I use Taobao as an example:
"intent://details?id=com.taobao.taobao#Intent;scheme=appmarket;package=com.huawei.appmarket;S.browser_fallback_url=https://play.google.com/store/apps/details?id=com.taobao.taobao;end"
The process is as follows:
1.Use the appmarket scheme to start the app whose package name is com.huawei.appmarket, that is, to open HUAWEI AppGallery.
2.Pass the package name com.taobao.taobao to HUAWEI AppGallery. Then, HUAWEI AppGallery will start this package.
3.If com.huawei.appmarket is not found, set S.browser_fallback_url to a fallback URL.
4.The fallback URL is a Google Play link. Simply set id in this URL to the name of the package to be opened. In this example, the ID is com.taobao.taobao.
Ensure that an App Linking project of the Android platform has been completed. For details, visit:
https://forums.developer.huawei.com/forumPortal/en/topic/0204442462434640048?fid=0101188387844930001
Open the original App Linking project and add the following information in bold:
String BACK_LINK = "intent://details?id=com.taobao.taobao#Intent;" +
"scheme=appmarket;package=com.huawei.appmarket;" +
"S.browser_fallback_url=https://play.google.com/store/apps/details?" +
"id=com.taobao.taobao;end";
AppLinking.Builder builder = new AppLinking.Builder()
.setUriPrefix(DOMAIN_URI_PREFIX)
.setDeepLink(Uri.parse(DEEP_LINK))
.setAndroidLinkInfo(new AppLinking.AndroidLinkInfo.Builder()
.setAndroidDeepLink(Android_DEEP_LINK)
.setOpenType(CustomUrl)
.setFallbackUrl(BACK_LINK)
.build());
Test:
Install the demo on a device, create a link of App Linking, and add it to the note.
Uninstall the app to simulate the scenario where the app is not installed.
For a Huawei phone, tap Open/Download. On AppGallery that is displayed, open the Taobao details page. The following figure shows the Taobao details page in HUAWEI Browser.
For a non-Huawei phone, tap Open/Download. On Google Play that is displayed, open the Taobao details page. The following figure shows the Taobao details page in Google Chrome.
The problem is now resolved. If you encounter a similar problem, simply follow my example step by step and change the package name to resolve the issue.
For more details, please go to:
https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-applinking-introduction?ha_source=hms1

iTuneConnect : App uploaded for test build but now showing anymore

Currently I am developing an app and I want to send the client a test build , I had successfully archived the app and uploaded on AppStore ... Under the Activity section it was showing "processing" for about an hr or two , now its not showing neither anything nor the app been uploaded. Any idea what went wrong ? Did anybody experienced this kind of problem ?
It is likely that something with your binary is wrong.
You would expect to get notified about that issue in the Activity tab but it seems that (currently) you can only find the invalid build in the App Store tab when selecting a new build.
Also you should have received an email (iTunes Connect account) describing the issue.
Yes ,Some times it take time .
In my case i have wait for 4 hour then it will reflect on itunes connect account.
or you can check build status in a activity .
Please check linked image for references
I got an email from apple saying "This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data" . I then added some string on NSPhotoLibraryUsageDescription and uploaded it , it worked like a charm .

Invalid binary with xcode 8, Asks to add description in Info.plist

I Was able to submit my app with Xcode 7 with no error and with not any specific description required in info.plist
But now with Xcode 8, iTunes rejected binary saying that invalid binary and gives error message like:
"This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data."
It seems apple has changed some privacy validation for submitting an app to app store.
I found the solution from the error only.
I added NSCameraUsageDescription in my info.plist with valid text(attachment) and it worked for me.
There are also some other cases when you will get an invalid binary error for other keys like NSCalendarsUsageDescription, NSBluetoothPeripheralUsageDescription. The Same solution will work for all such error with valid text for all.

How to redirect from Yahoo to my IOS app after authentication?

I am working on an app where I have to use Yahoo account to login.
I had gone through this link and followed the procedure as it was there.But I am unable to get back to my app after authentication.After googling I found an answer here.Here he said that "Add an URL Scheme in your info.plist file with the YOUR_APP_ID_OR_BUNDLE_ID" I did the same,but unable to redirect from yahoo to my app.If any one worked on this please help me.Thanks in advance.
This is what I had done in my URL Schemes
where JCzOzd44 is my app ID.
In yahoo account while creating the app.what should I give in "Application Domain"
I didn't work with the Yahoo! API yet, but in oauth it works like that:
Create an url scheme in your app. You can do that in the Info section of your project settings (URL types). Name the scheme whatever you want, for example your app id.
When you authenticate your app, you can pass a parameter named oauth_callback. Here you have to pass the name of the just created url scheme.
This should be it - when the login is ok on the Yahoo side, it will try to open the app that is registered for the url scheme it got as callback parameter.
UPDATE:
From the Yahoo! API documentation - this is the call you do when requesting the oauth token somewhere in your code (I filled in your url scheme as the callback, this is how it should look like):
https://api.login.yahoo.com/oauth/v2/
get_request_token?oauth_nonce=ce2130523f788f313f76314ed3965ea6
&oauth_timestamp=1202956957
&oauth_consumer_key=123456891011121314151617181920
&oauth_signature_method=plaintext
&oauth_signature=abcdef
&oauth_version=1.0
&xoauth_lang_pref="en-us"
&oauth_callback="JCzOzd44://"
Of course the request should be signed.
I have found the solution though with a little overheads.
Steps are: 1> Create a PHP script in you own server (say named, YRedirect.php).
2> Paste the following code in it-
CODE
<?php
$query = $_SERVER['QUERY_STRING'];
header("Location: com-mycompany-myapp://oauth-response?" . $query);
>
Where "com-mycompany-myapp" is your bundle identifier
3> Add an URL Scheme in your info.plist file with the YOUR_APP_ID_OR_BUNDLE_ID. That's it and you are DONE with the authentication problem.
In your code
[self.session sendUserToAuthorizationWithCallbackUrl:#"http://yourdomain.com/YRedirect.php"];
Then, register a custom URL scheme for your iPhone application from your Info.plist file, and then setup your server side script to redirect Safari back to your application via the URL scheme you just set up.
Thanks for this valuable information. Following your instructions I got the auth & call back working and the php page loads the app.

Error while trying to login using facebook Scrumptious

While trying to login using facebook Scrumptious, it is showing the following error, Where should i want to the facebook id?
2013-02-16 14:23:21.283 roulocalapp[2378:c07] Application tried to push a nil view
controller on target <UINavigationController: 0x945b180>.
2013-02-16 14:23:21.288 roulocalapp[2378:c07] *** Terminating app due to uncaught
exception 'com.facebook.sdk:InvalidOperationException', reason: 'FBSession: No AppID
provided; either pass an AppID to init, or add a string valued key with the appropriate
id named FacebookAppID to the bundle *.plist'
Follow these steps to fix your issue:
open your project in Xcode.
Find yourprojectname.plist file in your supported files.
Add an entry called 'FacebookAppID' and set its value as 'fb12786126112789' (use your app id preceded by 'fb')
Add a URL Types, make sure it is a dictionary, at Item 0, Add 'URL Schemes' and add a string in it which should be your app id - similar to this 'fb12786126112789' (make sure it should start with fb').
I had the same issue and found out that I had a space at the end of FacebookAppID since I copy pasted the name. My .plist key was, 'FacebookAppID ' - double check that your key does not contain any spaces.