I m using native storage in ionic 3 but when I close the app it clear data automatically but works fine in android
import { NativeStorage } from '#ionic-native/native-storage';
constructor(private storage: NativeStorage, private http: HttpProvider) {
this.storage.setItem('List', List);
I got the same issue I changed to #ionic/storage and I fix it.
Related
Is there already a solution to clear cookies in an expo based React Native app?
// this works only with android
const RCTNetworking = require('react-native/Libraries/Network/RCTNetworking');
return RCTNetworking.clearCookies((cleared: any) => {
console.log(cleared);
});
This package does not work with expo apps: https://github.com/react-native-cookies/cookies.
Are there any other solutions?
I'm using Expo's iOS simulator with my React Native app. Before, it would live update / "fast refresh" when code changes were made, but it's no longer doing that. So this is not about using the Expo Go app on my phone, but rather the Simulator on my Macbook.
I've checked the shake (ctrl + cmd + Z) menu, and Fast Refresh is still enabled. Running npx expo run:ios does correctly reflect the latest code, but that takes a while to run.
Any help to debug this?
A few days ago the same thing happened to me and it depended on how I exported the main component to App.tsx.
This one doesn't work properly:
export default () => {
return <View/>
}
This one works:
const App = () => {
return <View/>
}
export default App
Let me know if this helps
I have a React Native app with a custom native plugin.
The app works fine when I test it with Xcode on my device.
I uploaded the exact same app to the App Store and it got broken.
On my iPhone it doesn't actually start and on my iPad it is buggy:
I have to tap buttons twice
Code order is wrong (may threading / rendering)
Events from the plugin sometimes get fired and sometimes not. Totally random. (could also be rendering issue)
Unfortunately, I can't debug the TestFlight App.
Does someone have a starting point why this could happen?
I found the problem. It was in my Plugin and how I expose it. My index.ts file looked like this:
import { NativeModules } from 'react-native';
const { MyPlugin } = NativeModules;
export default MyPlugin;
Better with no default export:
import { NativeModules } from 'react-native';
export const { MyPlugin } = NativeModules;
I don't know why a default export doesn't work in release mode. I tried all release flags to be the same as default, but it was the same result.
So, just changing the way of export was fixing it.
here in this code none of the state inside if condition is working on ios but its working on android phones. I am using expo go app for working ios/android.
ProfileService.getDashboardInfo(res,0).then(res=>{
if(res?.success){
setloading(false)
setdashboardInfo(res?.data)
setCount(res?.data?.pendingJobs)
}
})
any kind of suggestions will be appreciated.
I am working on an cordova Barcode Scanner app for mobile Devices. I am using the Framework QuaggaJS for Barcodescanning and the cordova-plugin-ioswebrtc to implement the webrtc functions to cordova. Its working fine on Android Devices and on local Web Browsers on PC, but if i want to use it on iOS I always getting the error "Failed to load ressource: file is directory".
I am initializing Quagga with the following settings:
{decoder:{readers:["code_93_reader"]},
numberOfWorkers: 4,
inputStream:
{
name: "Live",
type: "Livestream",
target: document.querySelector('#scanner'),
constraints:
{
width:{min:640},
height:{min:480},
facingMode: "environment"
}
}
}
The error Message does not describe where the error comes from so I am not sure if its a problem of quaggaJS or of the iOS WebRTC plugin of cordova. Does anyone has build a cordova app with QuaggaJS and can help me where these problem comes from?
If I am Running the getUserMedia Function in the console, i get to different Objects back. In normal iOS Browser the result is of type MediaStream and in the cordova app the result is of type Blob. In safari my app is working without problems, and the Blob Object has all attributes of MediaStream and more so that should not be a problem or?