Universal Linking with Firebase and Ionic - ios

Additional Findings (After Initial Post)
I used this site https://limitless-sierra-4673.herokuapp.com/ to validate the link. Got an error about application/pkcs7-mime. Not sure how to change this with Firebase Dynamic Links
Im trying to set up universal linking with Firebase's dynamic links.
1. Firebase Setup
I've set up the app with Firebase and I have the link: https://e2x6f.app.goo.gl.
When I open the link I get a 400 Error but If I go to https://e2x6f.app.goo.gl/apple-app-site-association I get this:
{"applinks":
{
"apps": [],
"details": [{
"appID": "8CK4RLPU2T.com.turnmusicapp.15499",
"paths": ["/*"]
}]
}
}
So I think its ok. I've checked to make sure all the information is correct.
One problem is, when I use app's link to check search validation it also returns a 400 error - not sure if this is ok or not.
2. Xcode Setup
Anyways, I enabled Associative Domains on my app:
Then under "Info" -> URL Types I added:
3. Ionic Setup
Here is my Ionic info:
global packages:
#ionic/cli-utils : 1.4.0
Ionic CLI : 3.4.0
System:
Node : v8.1.2
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : 1.9.1
ios-sim : not installed
npm : 5.0.4
So I installed the Deeplinks package and have that all setup. I know it's working because I can use links like turn://home in the Safari browser and it will take me to my app. I'm not sure if I need to do anything else here. I've updated the widget field in my config.xml file to this:
<widget id="com.turnmusicapp.15499" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
Does the id field need to include my app prefix?
Result
So I'm running my app with ionic cordova run ios --livereload, I type the message into Safari and It takes me to a 400 error page. I've tried sending the link as an iMessage and that does the same thing.
Thanks for the help!

You have a few misconceptions — let's clear them up in order:
The https://limitless-sierra-4673.herokuapp.com/ validator is outdated — application/pkcs7-mime hasn't been required for years. Check Apple's official docs and you'll see application/json has been the requirement since iOS 9. Dynamic Links certainly won't have any configuration issues on the server side so you really don't even need to check this part, but a more updated validator is available here if you want it (yes, https://e2x6f.app.goo.gl validates perfectly).
The URL https://e2x6f.app.goo.gl is not a Dynamic Link; it's simply your link base domain. Real links will look like https://e2x6f.app.goo.gl/A97Q (short version) or https://e2x6f.app.goo.gl/?link=https://example.com/path/to/app/content&ibi=com.turnmusicapp.15499&ius=turnmusicapp&ad=1&isi=1121012049&ifl=https://example.com&apn=com.turnmusicapp.15499&al=https://example.com&at=affiliate_token&ct=campaign_text (full length). While a 400 error for the base domain is lame UX, it's expected. You need to actually create some links.
The Apple tool is the "App Search API Validation Tool", not the "Universal Links Validation Tool" (which doesn't exist from Apple). The results from this tool have no connection to whether Universal Links work — it's checking something completely different.
There is no official Dynamic Links package for Ionic, and the Deeplinks package is not designed to support it. You're off the edge of the map trying to get these working together. You might look at this new community plugin.
Alternatively, take a look at Branch.io (full disclosure: I'm on the Branch team). We do everything Dynamic Links does plus far more, and there is an actively-developed Ionic module that will handle all of this for you.

Related

How to fix if App rejected for using UIWebView in code?

I have been trying to upload an iOS app to Appstore but its only appearing on "Activity" tab for 3-5 minutes and then disappears.
Then I got an email from Apple saying that my app is rejected because it is using UIWebView in one of the view controller. I deleted that particular screen and reuploaded the app and had the same error email.
Then I checked my third-party sdks like FacebookLoginSDK and GoogleSignInSDK and updated those and then checked that if the app has no UIWebView which it did not. Then i reuploaded the app but this time again I had the same error email. I have searched the whole storyboard source code and the whole app code to look that if there is any sign for UIWebView but there is nothing, but still I am getting this email.
I also tried deleting 'Derived Data' folder several times and cleaning the build folder also but nothing helps.
On the other hand I have uploaded a different app today which had UIWebView and it got approved but I also got the same email for not using UIWebView.
Does anybody had this kind of experience or can anybody tell me whats going on ?
I got the same issue before.
If you have uploaded the build and showing it in activity tab for few minutes then its not mean that issue is only about UIWebview but there can be some other issue as well.
I have uploaded my app n got the mail related to UIWebview, so I coverted the UIWebview to WKWebView and again I uploaded but that time same thing happend.
I failed to tackle the problem.
Then I mailed to Apple Developer Support and they replied like
Any of the third party library internally using some privacy data you should ask permission for the same.
Then I checked Info.plist, I have given each permission in list still how it comes that we don't understand.
Finally then after whole search the one third party library internally using motion related data without permission so this happened.
Then I have added that in plist and then again uploaded and its approved.
So please you can check your info.plist and also check whether your third party library using any privacy sensitive data without permission or not.
May it help you at some point.
Make sure you update all your plugins to the latest version!
Check this: https://ionicframework.com/blog/understanding-itms-90809-uiwebview-api-deprecation where you can find the plugins that have known issues concerning the old WebView usage.
But be aware that uninstalling and re-installing some plugins will NOT will not install the latest available version of the plugin!
So to be sure that you are re-installing the latest version of a plugin, go to the github repository of the cordova plugin and search for the plugin.xml file and open it. Then, copy the version string found in the root xml element.
Finally, install the plugin like that: ionic cordova plugin add plugin_name#copied_version
<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-firebase" version="2.0.5"
xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<name>Google Firebase Plugin</name>
...
...
...
</plugin>
Are you using the AdMob plugin?
It is not enough to check for the absence of "UIWebView" strings!
You have to make sure that all third party plugins are up to date.
One of the trickiest situations I had went to is when I had tried to update an app (using AdMob) on the AppStore after Apple started rejecting apps using the UIWebView.
The generated iOS source code has no UIWebView references, but still rejected!
After a long headache, I realized that the Google AdMob SDK version I'm using is out of date, knowing that I had updated the AdMob plugin from the CLI, but it seems that the SDK is not updated when updating from the npm.
Finally, I had downloaded the latest AdMob SDK from this link https://developers.google.com/admob/ios/download and replaced it in the source code of the AdMob SDK plugin. Then I had followed the instructions found in this link https://developers.google.com/admob/ios/quick-start to update the code in the xCode.

ios Firebase Dynamic Link not opening installed app

I've looked at other previous questions about this topic, and I haven't found the solution for my problem.
I've followed this Getting started with Firebase Dynamic Links on iOS, however if I click on the universal link for testing, https://appName.page.link, I get the following message:
Invalid Dynamic Link
Requested URL (https://appName.page.link/) must be a parsable and complete DynamicLink.
If you are the developer of this app, ensure that your Dynamic Links domain is correctly configured and that the path component of this URL is valid
The previous message makes me think that the created page created by Firebase is created yet, however when I visit the page:
https://appName.page.link/apple-app-site-association, I get the following data:
{"applinks":{"apps":[],"details":[{"appID":"TeamID.com.example.appName","paths":["NOT /_/*","/*"]}]}}
This means that the page has been successfully created.
I have verified that the TeamID has been set properly set in the Firebase settings, and also that the TeamID is the same from XCode and from the Apple developer account.
The URLSchemes, set in Xcode is com.example.appName and inside the Signing & Capabilities in the Associated Domains has the domain: applinks:appName.page.link
Is there anything that I'm missing to configure?
I ran into this issue as well following the video. If you continue in the video he mentions that there is a bug for iOS where you might need to completely uninstall the app, restart your device, and then reinstall the app.
for reference:
https://youtu.be/KLBjAg6HvG0?t=532
Did you created dynamic link here? Firebase > Dynamic Links > New Dynamic Link. Your link should looks like https://AppName.page.link/shareLink
I think this behavior is expected, clicking on the URL prefix (https://appName.page.link) without any path will not take the user to the app since the configurations (deep linking, campaign tracking, platform behavior, etc) is not set up yet.
But once you create a new link along with the prefix (e.g. https://appName.page.link/createdLink), it should work properly.
The bit that tripped me up was that I added "Associated Domains" to the "Release" tab instead of the "All" tab. So when I was running on my app, I'd also get the Invalid Dynamic Link error.

iOS 10.3 In-App Ratings (or Reviews) with PhoneGap Build - How?

How to use the new feature in-app ratings/reviews for iOS 10.3 in Phonegap Build?
I tried several plugins, but get a build error for each of them, saying:
Error - The following 3rd-party plugin is causing the build to fail
and may need to be updated to a newer version:
cordova-plugin-ios-in-app-ratings-and-reviews
Does someone know a working plugin for in-app reviews?
When troubleshooting 3rd party plugins, I typically:
From PhoneGap Build, click the "Log" button then review the output that pops up in a new window. There's a lot of output text usually, so search (CTRL + F) for "error" until you find something that seems relevant. Usually, you'll see the specific Objective C/Swift error that has occurred
Look up the plugin page (cordova-plugin-ios-in-app-ratings-and-reviews) on npmjs.com.
Share the error message with the plugin author on GitHub Issues.

Ionic iOS App Error - Custom Scheme URIs are not allowed for 'WEB' client type

I am using this plugin.
https://github.com/EddyVerbruggen/cordova-plugin-googleplus
The implementation works fine for android. But google sign in on iOS opens safari webview and throws 400 invalid_request.
I am using the ios client id and reverse client id generated on google developer console.
Anyways to debug or know what the issue is?
The usual cause of this error is having an incorrect REVERSE_CLIENT_ID. Double check that you have the REVERSE_CLIENT_ID from the plist file downloaded when you set up the iOS application registration on the Google developer console. Note that if you got it wrong, changing this is difficult, as it gets copied into various locations and won't update automatically if you just try to change it in config.xml. When I mistakenly used my Android client ID to set up the plugin, I found that as well as config.xml I also needed to change the top level package.json file, and the <appname>-Info.plist in the platforms/ios directory in order to get the correct ID used.

The app references non-public selectors in Payload/Cordova350.app/Cordova350

I have written and exported a Cordova 3.5.0 PhoneGap Application using the Telerik Platform. The app is using jQuery Mobile and an InAppPurchasing plugin.
The only other plugins used are Cordova Splashscreen and Cordova Statusbar.
I can run the app no problem when i install it via iTunes on to my iPad. However, when I submit the app via Application Loader, I get the following errors:
I was tempted to go in and edit/look for the lines that reference these 'non-public selectors' myself but the Cordova350 file is a unix executable file that when opened looks like bytes of hex codes.
I cant seem to find anything from googling around about anyone experiencing a similar issue. Is this just a setting somewhere I have forgotten to untick? Any help would be appreciated

Resources