Firebase getInitialLink return null. React native - react-native

My dynamiclink was working well but now getInitialLink return null. How can i solve this issue ?
version is : "#react-native-firebase/dynamic-links": "7.3.2"
I use like this:
dynamicLinks()
.getInitialLink()
.then((dynamicLink) => {
console.log(dynamicLinks); --> null
});
as i said it was working well. Problem started one week ago. I added url to Allowlist url pattern as well.

Related

React Native Prettier is formatting wrong. How do we fix it

I am using prettier in React Native to format the code on save however it format wrong can someone tell me how to fix this. On long lines it doe the follow
if (JSON.stringify(eachVal.Children)
!== JSON.stringify([])) {
parent.push(eachVal.UUID);
return finding_uuid(eachVal.Children);
}
The code works correctly without issues but it looks bad as it does not look as if formatted correctly How do it fix it so that it looks more like the follow below
if (JSON.stringify(eachVal.Children) !== JSON.stringify([])) {
parent.push(eachVal.UUID);
return finding_uuid(eachVal.Children);
}

React-Native RNCamera onGoogleVisionBarcodesDetected cannot detect QR_CODE type

I have been implementing a barcode scanner app. Everything was working good until today. However, today the app started to detect the barcodes differently. I get the barcode type as 'TEXT' instead of 'QR_CODE'.
My code is like this
barcodeDetected = ({ barcodes }) => {
if (barcodes && barcodes[0].type === 'QR_CODE')) {
....
}
};
render() {
return (
<RNCamera
....
onGoogleVisionBarcodesDetected={this.barcodeDetected }
googleVisionBarcodeType={RNCamera.Constants.GoogleVisionBarcodeDetection.BarcodeType.ALL}>
</RNCamera>
)
}
react-native-camera version that I used is 3.13.1. I checked the source code and saw that after version 2.4.0, onGoogleVisionBarcodesDetected callback uses BarcodeType which includes
|"EMAIL"
|"PHONE"
|"CALENDAR_EVENT"
|"DRIVER_LICENSE"
|"GEO"
|"SMS"
|"CONTACT_INFO"
|"WIFI"
|"TEXT"
|"ISBN"
|"PRODUCT"
|"URL"
So how could it work correctly before? And I also checked some github repositories and saw that some use the higher version than 2.4.0 (also higher than 3.0.0) and their codes are still exactly the same as me.
This is what I get on detection
[{"bounds": {"origin": [Object], "size": [Object]}, "data": "BLAH/BLAH", "rawData": ".........", "type": "TEXT"}]
I was getting the type as 'QR_CODE' a couple of days ago. I made changes in these days and I can't understand what caused this.
What could be the reason for this? Thank you
Did you try to change the value of the prop googleVisionBarcodeType to RNCamera.Constants.GoogleVisionBarcodeDetection.BarcodeType.QR_CODE ?

Understanding React-Admin translation

I am working with react-admin and trying to traduce it to my native language with this short guide usage:
https://github.com/marmelab/react-admin/tree/master/packages/ra-language-french
I keep getting non-referenced keys on the supposed translated keys.
To get my traduction working, I tried to delete node-modules file, tested in other browsers, cleared cache etc. but I still had the non-referenced keys: ra.______
When I changed this line (as below), it solved my problem:
const messages = { 'fr': frenchMessages, };
TO
const messages = { 'en': frenchMessages, };
And that's the only thing that i needed to change for the polyglot to work (French traduction).
Can someone explain to me what's going on, i don't know why it works in that case ?
Example in picture which shows the case explained above:
Not working case
Working case
Thanks for your time.
The <Admin locale='fr' ... property is deprecated! New version:
import { resolveBrowserLocale } from 'react-admin'
...
const i18nProvider = polyglotI18nProvider(locale => messages[locale], resolveBrowserLocale()) // or 'fr'

DatePicker is working really weird in iOS react-native 0.60.6

Don't know when this happened because it used to work before, but it might be probably ever since I upgraded react-native to 0.60.6.
I tested 3 libraries thus far, and it's happening in all of them. Currently using react-native-woodpicker.
This is how it looks, it's all messed up:
Even though it shows no value where i'm standing at, there really is, you can literally feel the vibration when swiping up/down, but most of the times there is no value, you can swipe for like 10 seconds straight and all of a sudden the list of values will show up.
It's happening in all the DatePickers within my app, and only in iOS, Android works fine. So there seems to be an issue with DatePickerIOS.
Some code:
<DatePicker
onDateChange={this.handleDatePicker}
date={new Date(this.state.user.dateOfBirth)}
title={i18n.t('dateOfBirth')}
placeholder={this.handleDatePickerPlaceholder()}
placeholderStyle={scopedStyles.datePickerText}
iosPickerMode="date"
androidPickerMode="spinner"
minDate={minDate}
maxDate={new Date()}
/>
handleDatePicker = data => {
var {user} = this.state;
var thisUser = user;
var date = this.getObjectFromDate(data);
thisUser.dateOfBirth = data;
this.setState({
user: thisUser,
dateObject: date
});
};
getObjectFromDate(date) {
return {
day: date.getDate(),
month: (date.getMonth()) + 1,
year: date.getFullYear()
}
};
handleDatePickerPlaceholder() {
const {dateObject} = this.state;
if (Object.keys(dateObject).length) {
return `${dateObject.day}/${dateObject.month}/${dateObject.year}`
} else {
return `DD/MM/YYYY`;
}
}
Any help given is appreciated.
If anyone is under the same problem, it's due to iOS 13's dark mode, thanks to this guy on github, I was able to solve it.
The way to solve it is to add a new key/string value within info.plist file in your iOS app.
<key>UIUserInterfaceStyle</key>
<string>Light</string>
Hope this helps to others.

How to remove window._nuxt_ in nuxt project, it is too large for me

When I use nuxt to develop my project, I find some problems.
window.__NUXT__=(function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa, ..... code was too larger
can I remove it or use js file to replace it?
I have found a relatively perfect solution. I will share it with you here. You can also take a look at the website I developed using NUXT Sample Website
The key is the hook function vue-renderer:ssr:context, you can set the context.nuxt = null to remove any data in window._NUXT_.
But it is not work well, you have to add serverRender and routePath to window.nuxt
// nuxt.config.js
{
...,
hooks: {
'vue-renderer:ssr:context'(context) {
const routePath = JSON.stringify(context.nuxt.routePath);
context.nuxt = {serverRendered: true, routePath};
}
}
}
You can see the result at my site