cordova firebase analytics plugin not working - cordova-plugins

I am using firebase analytics cordova plugin(here is the link. https://github.com/chemerisuk/cordova-plugin-firebase-analytics) but having some issues with using it.
Here are some code snippets that I used.
cordova.plugins.firebase.analytics.logEvent("Share Post", {page: "Email", link: gArticle.link}).then((res) => alert(JSON.stringify(res)))
.catch((error) => alert(JSON.stringify(error)));
I have google-services.json and GoogleService-Info.json files on the root folder of my cordova app.
When I run the app, I always get "OK" as a response(no error) but I can't see any logged events on my firebase console.
Is there any idea for fixing this issue?
Thanks in advance.

Related

Firebase Dynamic Link on iOS TestFlight breaks query, react-native, Expo

My dynamic link from Firebase to TestFlight app recently stopped working.
Link:
{firebase_domain.page.link}/?link={my_site}/?type=password-reset&token={jwt}&ibi={apple_bunle_id}&isi={apple_ID}
Open in Firefox focus. All other options - from embed to separate site to click, or gmail, or safari lead to AppStore by apple_ID of app - and it’s empty, because it’s TestFlight.
The problem is that I receive a malformed link from firebase as:
{apple_bunle_id}://google/link?deep_link_id={my_site}%2F%3Ftype%3Dpassword-reset&lt=DDL_LONG&lid=temp_link_id&utm_medium=dynamic_link&utm_source=firebase
So instead of parsed token I receive nothing.
It was working recently, and works on Android.
Link works on Expo GO if you replace {firebase_domain.page.link} with local expo url. (Universal link probably)
{firebase_domain.page.link}/apple-app-site-association set up properly
{my_site} and {firebase_domain.page.link} added to as associatedDomains without formatting
My iOS config from app.json
"ios": {
"bundleIdentifier": {apple_bunle_id},
"supportsTablet": false,
"googleServicesFile": "./GoogleService-Info.plist",
"buildNumber": "47.9",
"associatedDomains": ["applinks:{my_site}", "applinks:{firebase_domain.page.link}", "applinks:{my_site2}"]
}
My Linking prefixes config:
prefixes: ['{universal_link_name}', Linking.makeUrl({firebase_domain.page.link}), Linking.makeUrl({apple_bunle_id})],

Firebase Crashlytics not showing Logs after SDK upgrade in iOS App

My app is using Crashlytics which is moved from Fabrics to Firebase Crashlytics. My problem is that I recently upgraded firebase Crashlytics and after this upgrade there is no "Logs" displaying with crash report. I cross checked all settings and code but couldn't find any possible reason.
It was working properly before upgrade. Now all crashes are being reported properly as all the information such as "Stack Trace", "Keys" are as before but "Logs" section is empty.
My question may be an "iOS Duplicate" of this question. Anybody please tell me if there is any part of code I'm missing to get this "Logs" data.
Here is the code I setup in my AppDelegate for configuration :
FirebaseApp.configure()
FirebaseConfiguration.shared.setLoggerLevel(.min)
Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(true)
Just to confirm, are you capturing log messages with Crashlytics.crashlytics().log()? See https://firebase.google.com/docs/crashlytics/customize-crash-reports?platform=ios#add-logs

Firebase dynamic link: deeplink always empty

I am developing an app in ionic 3 for android and ios platform. For deeplinking, I am using cordova firebase dynamic link plugin.
This is working fine for android platform. But in the ios platform, though it is not throwing any error, it is not working.
My current ionic code.
this.platform.ready()
.then(() => {
return this.firebaseDynamicLinks.onDynamicLink();
}).then((dynamicLink:any) => {
console.log(dynamicLink); // always gives {matchType: "weak", deepLink:""} in ios
}).catch((error: any) => {
console.log(error);
});
The android part working fine. But in ios, the deeplink is always coming as empty.
my manually created dynamic url
https://xxxx.app.goo.gl/?link=<encoded url to mysite>&apn=<android bundle id>&ibi=<ios bundle id>
The provided link is returning HTTP 200 status when opening in the browser.
Testing steps (in ios):
In my iphone (ios9) I have placed this dynamic link in notepad
Then by clicking on the dynamic link the app opens.
In the console, I get
{matchType: "weak", deepLink:""}

Open Settings App from another App in iOS - React Native

I'm going through the docs in React Native and can only find navigating to external links from the app I am in.
I want to be able to navigate to the Settings app (more specifically to the privacy > location services page) but, can not seem to find the necessary information on it. There is the native iOS way of doing it which I am trying to replicate through React Native.
Is this possible?
I have tried the following to detect if there is a Settings URL. The console logs that the Settings url works however, it does not navigate to that page.
Update: thanks to #zvona I am now navigating to the settings page but not sure how to get to a specific deep link.
Linking.canOpenURL('app-settings:').then(supported => {
console.log(`Settings url works`)
Linking.openURL('app-settings:'
}).catch(error => {
console.log(`An error has occured: ${error}`)
})
You can access settings of the application with:
Linking.openURL('app-settings:');
But I don't know (yet) how to open a specific deep-link.
2021 update use:
Linking.openSettings();
otherwise your app will be rejected due use of non-public URL scheme
I successfully opened the settings by the code below, hope it's helpful :)
Linking.canOpenURL('app-settings:').then(supported => {
if (!supported) {
console.log('Can\'t handle settings url');
} else {
return Linking.openURL('app-settings:');
}
}).catch(err => console.error('An error occurred', err));
Reference: https://facebook.github.io/react-native//docs/linking.html
Since React Native version 0.59 this should be possible using openSettings();. This is described in the React Native Linking documentation. Although it did not work for me. When I tried quickly I saw a _reactNative.Linking.openSettings is not a function error message.
Linking.openSettings();
You can deep-link referencing the settings's index like so:
Linking.openURL('app-settings:{index}')
For example Linking.openURL('app-settings:{3}') would open the Bluetooth settings.
Linking.openURL('app-settings:1');
Adding an answer that worked for me and is easy to apply.
openSettings function in #react-native-community/react-native-permissions works for both iOS and Android.
Calling openSettings function will direct the user to the settings page of your app.
import { openSettings } from 'react-native-permissions';
openSettings();
You can import Linking from 'react-native' and then use Linking.openSettings() to trigger the call. This link explains it very concisely:
https://til.hashrocket.com/posts/eyegh79kqs-how-to-open-the-settings-app-in-reactnative-060
For example: to navigate under Settings/Bluetooth you have to use Linking.openURL('App-Prefs:Bluetooth');
For iOS 14 and ReactNative 16.13
You can use the most easiest way to open the app setting from react-native.
just,
import { Linking } from 'react-native';
and user below line anywhere you want open the app setting.
Linking.openSettings();
Old question, but this didn't work for me on Android and I found something that did. Hope this helps anyone looking for the same. :)
https://github.com/lunarmayor/react-native-open-settings
I don't have the ability to test it for iOS though.
Opens the platform specific settings for the given application.
You can handle your case using Linking from react-native. In my case, I accessed the touch id settings on IOS using:-
Linking.openURL('App-Prefs:PASSCODE');

FaceBook SDK - The app references non-public selectors in payload "setDescription"

Im using the last FaceBook SDK + DEFacebookComposeView
I already cheked the user.id commun issue and changed into [user objectForKey:#"id"];
this one is about "setDescription" the issue is I belive the "description"
Wich file should I change ? from FaceBook SDK ?
When I execute the app from terminal to have a more precise error report.
using this way :
Finding Private API Call _terminateWithStatus
when I execute I get nothing
To be extrem, I deleted ALL but the facebook SDK, ALL other frameworks, all other scripts
My Xcode project just have
1 file.m
1 file.h
The last FaceBook SDK
So I'm sure this not coming from my script or other Frameworks variable/function conflict, but :
the warning remain...
Thank you so much for your help !
D.

Resources