Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all 16556 articles
Browse latest View live

Save sensitive data in React Native

$
0
0

I am building a React Native application and I need to save some sensitive data like a token and a refresh token. The obvious solution is to save that information using AsyncStorage. The problem is the security level of the AsyncStorage.

AsyncStorage provides a way to locally store tokens and data. It can be, in some ways, compared to a LocalStorage option. In full production applications, it is recommended to not access AsyncStorage directly, but instead, to use an abstraction layer, as AsyncStorage is shared with other apps using the same browser, and thus an ill-conceieved removal of all items from storage could impair the functioning of neighboring apps.

https://auth0.com/blog/adding-authentication-to-react-native-using-jwt/

In a native app, I would go for Keychain in iOS and Shared Preferences in private mode in Android.

For what I read in the documentation provided by React Native:

On iOS, AsyncStorage is backed by native code that stores small values in a serialized dictionary and larger values in separate files. On Android, AsyncStorage will use either RocksDB or SQLite based on what is available.

https://facebook.github.io/react-native/docs/asyncstorage.html

They never talk about the security of that data.

It is the best solution create a module for Android (that uses Shared Preferences in private mode) and another for iOS (that uses Keychain) to save the sensible data? Or it is safe to use the AsyncStorage methods provided?


Is it possible to call AppDelegate UIApplication from the xcode notification service extension?

$
0
0

I am working on chat app using react-native in iOS. I want to do badge increment for every notification. When app is inactive, Is it possible to call AppDelegate UIApplication from the notification service extension?

How to change styling of TextInput placeholder in React Native?

$
0
0

Is there a way to set fontStyle: 'italic'only for the placeholder of the TextInput in React Native?

looking here at the documentation seems like you can only set a placeholder and placeholderTextColor.

How to create global android device back button handler using React Native?

$
0
0

In my scenario, I am trying to create global class for android back button handler and reuse it in multiple screen class files. How to do it? I tried below code but I dont know how to access common class from other classes.

My Code Below (Androidhandler.tsx)

export default class hardware extends Component {  constructor(props) {    super(props);    this.BackButton = this.BackButton.bind(this);  }  componentWillMount() {    BackHandler.addEventListener'BackPress',this.BackButton);  }  componentWillUnmount() {    BackHandler.removeEventListener('BackPress',this.BackButton);  }  BackButton() {    if(this.props.navigation){        this.props.navigation.goBack(null);        return true;      }    }}

Loading local image in react native 0.60.3 and Xcode 11

$
0
0

I use react native version 0.60.3. Before one year make an application with local images and it works well. I update Xcode to version 11 and old code and images work well also. I try to add new images for dark mode but the image doesn't show, there isn't an error, only blank space. In code use images from js file like :"url":require("../images/page1.png").

Images are added to copy bundle resources.

I try with command :npx react-native bundle --entry-file='index.ios.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios

and copy assets and main.jsbundle to Xcode and get the same results, before I don't have assets folder in XCode, images are been in copy bundle resources.Old images work (which are added before one year), new images don't work. Did I miss something? I don't have an error and don't know how to fix this issue.

My code:

<CustomImage         width={getImgWidth} height={getImgHeight}         lightpath={it.url}         darkpath={it.urldark}        darkmode={theme.darkmode} />

CustomImage.js

const CustomImage = (props) => {  return (<View style={{ width: props.width, height: props.height }}>  {props.darkmode ? (<Image      resizeMode="contain"      style={{ width: props.width, height: props.height }}      source={props.darkpath}    />     ) : (<Image      resizeMode="contain"      style={{ width: props.width, height: props.height }}      source={props.lightpath}    />  )}</View> ); };

TouchableOpacity not working on expo for react native

$
0
0

Am working on this login page where I had to use TouchableOpacity on a this text "Already have an account? Sign in instead!" to send me to the singin screen and for some reason it didn't work so naturally I thought I had an error in my code and after hours of debugging I had the idea to make a simple button with the same functionality and it works for am wondering is there something wrong with TouchableOpacity on expo or there is somekind of logic error i missed.

here is the code i used :

From my signup screen :

return (<View style={styles.container}><NavigationEvents onWillBlur={clearErrorMessage} /><AuthForm        headerText="Sign Up for Tracker"        errorMessage={state.errorMessage}        submitButtonText="Sign Up"        onSubmit={signup}      /><NavLink        routeName="Signin"        text="Already have an account? Sign in instead!"      /></View>  );

from the Navlink component :

return (<><TouchableOpacity onPress={() => navigation.navigate(routeName)}><Spacer><Text style={styles.link}>{text}</Text></Spacer></TouchableOpacity><Button        title="go to sing in"        onPress={() => {          navigation.navigate("Singin");        }}      /></>  );

How to move an element to the pressed position in react-native

$
0
0

I want to move and element right to place I click with onPress event.

Example if I click on the screen with position x: 200, y: 300, so my element should move there from position x: -100, y: -100, I tried it, but it is not moving to the exact position I press on the screen. my code:, although it moves, but moves not exactly to the place I want...

const styles = StyleSheet.create({    alertAutoCloseContainer: {        left: 0, top: 0,        margin: 10, marginHorizontal: 40, position: 'absolute',        padding: 10, maxWidth: 500, maxHeight: 400, zIndex: 1000,        backgroundColor: 'rgba(0, 50, 50, 0.8)', borderRadius: 5,    },    alertAutoCloseText: {        color: '#fff', fontFamily: 'IRANSansMobile'    }});const { Value } = Animated;const animatedValue = new Value(0);const MyAlert = memo(forwardRef(({ }, ref) => {    const [state, setState] = useReducer((s, v) => v, {        status: true, xAxis: 0, yAxis: 0, parentData: {            text: ""        }    });    useImperativeHandle(ref, () => {        return ({            startAnimation: ({ xAxis, yAxis, parentData }) => {                const { status } = state;                setState({                    ...state, xAxis, yAxis,                    parentData, status: !status                });                Animated.timing(animatedValue, {                    toValue: status === true ? 1 : 0, duration: 500                }).start();            },            stopAnimation: ({ }) => {                Animated.timing(animatedValue, {                    toValue: 0, duration: 500                }).start();            }        })    });    console.log(state.xAxis, state.yAxis);    return (<Animated.View style={{            ...styles.alertAutoCloseContainer, transform: [                {                    translateY: animatedValue.interpolate({                        inputRange: [0, 1],                        outputRange: [0, state.yAxis],                        extrapolate: 'clamp'                    })                },                {                    translateX: animatedValue.interpolate({                        inputRange: [0, 1],                        outputRange: [0, state.xAxis],                        extrapolate: 'clamp'                    })                },                {                    scale: animatedValue.interpolate({                        inputRange: [0, 1],                        outputRange: [0, 1]                    })                }            ]        }}><Text style={styles.alertAutoCloseText}>                {state.parentData.text}</Text></Animated.View>    );}), (p, n) => true);

How to check weather UIWebView is used in project or not and to replace it WKWebView on windows platorm

$
0
0

While uploading app, I got this from apple,

TMS-90809: Deprecated API Usage - Apple will stop accepting submissions of new apps that use UIWebView APIs starting from April 2020. See https://developer.apple.com/documentation/uikit/uiwebview for more information.

I tried searching for the "UIWebView" in the project search option in vs code but no luck, but there is 'react-native-web' is used in the application.Could this (react-native-web) be the reason for getting a warning?And if some other component is using webView how could I identify it?

Any help would be appreciated.Thank you.

PS: Solution for windows is having high priority as I am on windows and don't have a mac system accessible right now, or else answers for any OS are welcome.


shell script invocation error command /bin/sh failed with exit code 1 react native ios release build

$
0
0

I'm archive react-native ios build using xcode in release mode. While archiving I get this error shell script invocation error command /bin/sh failed with exit code 1. This working fine on archiving in debugging mode but getting error in release mode.

Any one help me to solve this issue?

How to calculate react-native screen coordinates

$
0
0

I want to move and element right to place I click with onPress event.

Example if I click on the screen with position x: 200, y: 300, so my element should move there from position x: -100, y: -100, I tried it, but it is not moving to the exact position I press on the screen. my code:, although it moves, but moves not exactly to the place I want...

const styles = StyleSheet.create({    alertAutoCloseContainer: {        left: 0, top: 0,        margin: 10, marginHorizontal: 40, position: 'absolute',        padding: 10, maxWidth: 500, maxHeight: 400, zIndex: 1000,        backgroundColor: 'rgba(0, 50, 50, 0.8)', borderRadius: 5,    },    alertAutoCloseText: {        color: '#fff', fontFamily: 'IRANSansMobile'    }});const { Value } = Animated;const animatedValue = new Value(0);const MyAlert = memo(forwardRef(({ }, ref) => {    const [state, setState] = useReducer((s, v) => v, {        status: true, xAxis: 0, yAxis: 0, parentData: {            text: ""        }    });    useImperativeHandle(ref, () => {        return ({            startAnimation: ({ xAxis, yAxis, parentData }) => {                const { status } = state;                setState({                    ...state, xAxis, yAxis,                    parentData, status: !status                });                Animated.timing(animatedValue, {                    toValue: status === true ? 1 : 0, duration: 500                }).start();            },            stopAnimation: ({ }) => {                Animated.timing(animatedValue, {                    toValue: 0, duration: 500                }).start();            }        })    });    console.log(state.xAxis, state.yAxis);    return (<Animated.View style={{            ...styles.alertAutoCloseContainer, transform: [                {                    translateY: animatedValue.interpolate({                        inputRange: [0, 1],                        outputRange: [0, state.yAxis],                        extrapolate: 'clamp'                    })                },                {                    translateX: animatedValue.interpolate({                        inputRange: [0, 1],                        outputRange: [0, state.xAxis],                        extrapolate: 'clamp'                    })                },                {                    scale: animatedValue.interpolate({                        inputRange: [0, 1],                        outputRange: [0, 1]                    })                }            ]        }}><Text style={styles.alertAutoCloseText}>                {state.parentData.text}</Text></Animated.View>    );}), (p, n) => true);

ComponentWillReceiveProps calling multiple time using react native

$
0
0

In my scenario, I am trying to change the switch value on real time. Here, whenever the switch index value on/off changing componentWillReceiveProps calling twice at a time. How to solve this issue?

My Code Below

componentWillReceiveProps(nextProps) {    switch (this.state.selectedIndex) {      case 0:        if (nextProps.checkState.reported.on) {          this.setState({ switchValue: true });        } else {          this.setState({ switchValue: false });        }        break;      default:        this.setState({ switchValue: nextProps.checkState.on });    }  }

Keyboard changes all components placement in react native

$
0
0

I created an AuthForm component that I use for a sign up and sign in screen after styling the screen I noticed every time I click on the keyboard to type some input everything changes its original placement and some components overlay others and it turns into a mess, how can I fix this?

Here is the code i used

import React, { useState } from "react";import {  StyleSheet,  ImageBackground,  View,  TouchableOpacity,} from "react-native";import { Text, Button, Input } from "react-native-elements";import Icon from "react-native-vector-icons/MaterialIcons";import Spacer from "./Spacer";const AuthForm = ({  headerText,  errorMessage,  onSubmit,  submitButtonText,  subText,}) => {  const [email, setEmail] = useState("");  const [password, setPassword] = useState("");  return (<View style={styles.container}><Spacer><Text style={styles.Text1}>{headerText}</Text><Text style={styles.Text2}>{subText}</Text></Spacer><View style={styles.Input}><Input          style={styles.Input}          placeholder="Your email"          value={email}          onChangeText={setEmail}          autoCapitalize="none"          autoCorrect={false}          leftIcon={<Icon name="email" size={20} color="#B3C1B3" />}        /><Input          secureTextEntry          placeholder="Your password"          value={password}          onChangeText={setPassword}          autoCapitalize="none"          autoCorrect={false}          leftIcon={<Icon name="lock" size={20} color="#B3C1B3" />}        /></View>      {errorMessage ? (<Text style={styles.errorMessage}>{errorMessage}</Text>      ) : null}<Spacer><TouchableOpacity          style={styles.buttonStyle}          onPress={() => onSubmit({ email, password })}><Text style={styles.ButtonText}>{submitButtonText}</Text></TouchableOpacity></Spacer></View>  );};const styles = StyleSheet.create({  container: {    flex: 1,    //justifyContent: "center",  },  errorMessage: {    fontSize: 16,    color: "red",    marginLeft: 15,    marginTop: 15,    top: "35%",  },  buttonStyle: {    color: "#e8c0c8",    width: "45%",    height: "25%",    backgroundColor: "#fdc2e6",    justifyContent: "center",    alignItems: "center",    borderRadius: 15,    top: "150%",    left: "30%",  },  ButtonText: {    color: "#FFFF",  },  Text1: {    top: "420%",    left: "15%",    fontSize: 24,    color: "#ffffff",  },  Text2: {    top: "420%",    left: "15%",    fontSize: 14,    color: "#d9d9d9",  },  Input: {    top: "40%",    width: "70%",    left: "15%",  },});export default AuthForm;

Android : react-naive-maps show only absolute one block area in detail

$
0
0

Android : react-naive-maps show only absolute one block area in detail.

Only one rectangular area is shown in detail.

I try code.but Does not get better

What's wrong with this?When I zoom in on the map, I can't see anything, does this mean it crashes?ios is working fine.

<meta-data android:name="com.google.android.geo.API_KEY" android:value="*********************"/><uses-library android:name="org.apache.http.legacy" android:required="false"/>

Flutter Device Preview equivalent in React Native App?

$
0
0

recently i've found this plugin can preview many device of Android or iOS device in one installed apps,

gif of the plugin is at https://github.com/aloisdeniel/flutter_device_preview

enter image description here

does react native has something like this?

I know there's some similar plugin like Expo and Appetize but i need something like this,

i mean i can preview of many device in my apps, not installing my app on many devices.

Is there a way to navigate to a default screen (Profile) if the path name does not match a route that I define explicitly?

$
0
0

I have tried writing the config object for my react native app according to the react-navigation configuring links docs.

I defined a series of path --> route mappings including Chat:'feed' and Explore:'news'

My goal is for the app to default to the Profile screen when resolving https://example.com/someusername and pass 'someusername' as the id param. Similar to how https://instagram.com/apple maps directly to the profile screen for @apple's account.

const linking = {  prefixes: ['https://example.com', 'example://'],  config: {    Home: {      path: '',      screens: {        Chat: 'feed',        Explore: 'news',        Profile: ':id',      },    },  },}

I will not allow users to make accounts @feed, @news, etc. to avoid conflict. I also display "user not found" message if 'someusername' does not exist yet

Is there a correct way to do this config object? Or if I need to write custom getStateFromPath / getPathFromState functions, does anyone have an example?


Using Alexa as Text-to-Voice service

$
0
0

I've build a React Native App which connects to different smart devices to control lights.I was wondering if there is way to connect my app with alexa echo and sending texts, which alexa speaks? Or even sending commands, which Alexa executes?

Is this possible? I don't find anythin similar on the internet.

Thanks

Problem while posting base64 along with a REST API request - React Native

$
0
0

I would like to post a picture that is encoded in base64 along with a REST API

const data = {        UserId:this.state.user.id,        PictureUri:avatar    };    const res = await fetch(        url,        {            method: "POST",            headers: {"Accept": "application/json","Content-Type": "application/json"            },            body: JSON.stringify(data)        }    )

The problem that I have encountered is that this POST (HTTPS) request doesn't work when I am using the cellular data of the iPhone whereas it works when I am on WiFi or a Mobile Hotspot. In such a case, the server (in DMZ) does not receive any request.

What can block this communication?

Analysing crash report from Test Flight - React Native App

$
0
0

I've published a React Native App and released it through TestFlight to some internal users of the company.While on debug and testing before the release we've never had reported crashes, some users started experiencing random crashes on the App (at restart, the App continued as normal).Now, since the app is developed in React Native, the crash log reported from TestFlight doesn't seem to be so useful, at least for me, at tracking down the possible bug.

This is the crash log:

Exception Type:  EXC_CRASH (SIGABRT)Exception Codes: 0x0000000000000000, 0x0000000000000000Exception Note:  EXC_CORPSE_NOTIFYTriggered by Thread:  10Last Exception Backtrace:0   CoreFoundation                  0x1a3d6aa48 __exceptionPreprocess + 220 (NSException.m:199)1   libobjc.A.dylib                 0x1a3a91fa4 objc_exception_throw + 56 (objc-exception.mm:565)2   *App Name*              0x100ab475c RCTFatal + 668 (RCTAssert.m:146)3   *App Name*              0x100b2528c -[RCTExceptionsManager reportFatalException:stack:exceptionId:] + 496 (RCTExceptionsManager.mm:65)4   CoreFoundation                  0x1a3d70c20 __invoking___ + 1445   CoreFoundation                  0x1a3c40d30 -[NSInvocation invoke] + 300 (NSForwarding.m:3306)6   CoreFoundation                  0x1a3c41908 -[NSInvocation invokeWithTarget:] + 76 (NSForwarding.m:3412)7   *App Name*              0x100ae67dc -[RCTModuleMethod invokeWithBridge:module:arguments:] + 460 (RCTModuleMethod.mm:569)8   *App Name*              0x100ae88c8 facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&) + 244 (RCTNativeModule.mm:108)9   *App Name*              0x100ae862c invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int) + 88 (RCTNativeModule.mm:73)10  libdispatch.dylib               0x1a3a36610 _dispatch_call_block_and_release + 24 (init.c:1408)11  libdispatch.dylib               0x1a3a37184 _dispatch_client_callout + 16 (object.m:495)12  libdispatch.dylib               0x1a39e3404 _dispatch_lane_serial_drain$VARIANT$mp + 608 (inline_internal.h:2484)13  libdispatch.dylib               0x1a39e3df8 _dispatch_lane_invoke$VARIANT$mp + 420 (queue.c:3863)14  libdispatch.dylib               0x1a39ed314 _dispatch_workloop_worker_thread + 588 (queue.c:6445)15  libsystem_pthread.dylib         0x1a3a86b88 _pthread_wqthread + 276 (pthread.c:2351)16  libsystem_pthread.dylib         0x1a3a89760 start_wqthread + 8Thread 0 name:Thread 0:0   libsystem_kernel.dylib          0x00000001a3b40634 mach_msg_trap + 81   libsystem_kernel.dylib          0x00000001a3b3faa0 mach_msg + 72 (mach_msg.c:103)2   CoreFoundation                  0x00000001a3ce8288 __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575)3   CoreFoundation                  0x00000001a3ce33a8 __CFRunLoopRun + 1444 (CFRunLoop.c:2931)4   CoreFoundation                  0x00000001a3ce2adc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)5   GraphicsServices                0x00000001adc83328 GSEventRunModal + 104 (GSEvent.c:2246)6   UIKitCore                       0x00000001a7df063c UIApplicationMain + 1936 (UIApplication.m:4773)7   *App Name*              0x0000000100a53078 main + 88 (main.m:14)8   libdyld.dylib                   0x00000001a3b6c360 start + 4Thread 1 name:Thread 1:0   libsystem_kernel.dylib          0x00000001a3b40634 mach_msg_trap + 81   libsystem_kernel.dylib          0x00000001a3b3faa0 mach_msg + 72 (mach_msg.c:103)2   CoreFoundation                  0x00000001a3ce8288 __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575)3   CoreFoundation                  0x00000001a3ce33a8 __CFRunLoopRun + 1444 (CFRunLoop.c:2931)4   CoreFoundation                  0x00000001a3ce2adc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)5   Foundation                      0x00000001a4022784 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 228 (NSRunLoop.m:374)6   Foundation                      0x00000001a4022664 -[NSRunLoop(NSRunLoop) runUntilDate:] + 88 (NSRunLoop.m:421)7   UIKitCore                       0x00000001a7e88e80 -[UIEventFetcher threadMain] + 152 (UIEventFetcher.m:637)8   Foundation                      0x00000001a415309c __NSThread__start__ + 848 (NSThread.m:724)9   libsystem_pthread.dylib         0x00000001a3a85d8c _pthread_start + 156 (pthread.c:896)10  libsystem_pthread.dylib         0x00000001a3a8976c thread_start + 8Thread 2 name:Thread 2:0   libsystem_kernel.dylib          0x00000001a3b61c94 __psynch_cvwait + 81   libsystem_pthread.dylib         0x00000001a3a7ecf8 _pthread_cond_wait$VARIANT$mp + 680 (pthread_cond.c:591)2   libc++.1.dylib                  0x00000001a3bb47a8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24 (__threading_support:287)3   JavaScriptCore                  0x00000001b2b0538c void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::uni... + 108 (condition_variable:204)4   JavaScriptCore                  0x00000001b2b03dfc bmalloc::Heap::tryAllocateLarge(std::__1::unique_lock<bmalloc::Mutex>&, unsigned long, unsigned l... + 236 (condition_variable:213)5   JavaScriptCore                  0x00000001b2afdb14 bmalloc::Allocator::tryAllocate(unsigned long) + 196 (Allocator.cpp:59)6   JavaScriptCore                  0x00000001b2a96d1c WTF::tryFastMalloc(unsigned long) + 48 (Cache.h:74)7   JavaScriptCore                  0x00000001b2ab5fc4 WTF::StringBuilder::allocateBufferUpConvert(unsigned char const*, unsigned int) + 84 (StringImpl.h:979)8   JavaScriptCore                  0x00000001b2ab7454 WTF::StringBuilder::appendQuotedJSONString(WTF::String const&) + 224 (StringBuilderJSON.cpp:128)9   JavaScriptCore                  0x00000001b34b9094 JSC::Stringifier::appendStringifiedValue(WTF::StringBuilder&, JSC::JSValue, JSC::Stringifier::Hol... + 3872 (JSONObject.cpp:368)10  JavaScriptCore                  0x00000001b34bb1ec JSC::Stringifier::Holder::appendNextProperty(JSC::Stringifier&, WTF::StringBuilder&) + 6744 (JSONObject.cpp:574)11  JavaScriptCore                  0x00000001b34b93e4 JSC::Stringifier::appendStringifiedValue(WTF::StringBuilder&, JSC::JSValue, JSC::Stringifier::Hol... + 4720 (JSONObject.cpp:421)12  JavaScriptCore                  0x00000001b34b7f98 JSC::Stringifier::stringify(JSC::JSValue) + 268 (JSONObject.cpp:282)13  JavaScriptCore                  0x00000001b34bd33c JSC::JSONProtoFuncStringify(JSC::ExecState*) + 144 (JSONObject.cpp:848)14  JavaScriptCore                  0x00000001b2cbd9cc llint_entry + 13506815  JavaScriptCore                  0x00000001b2cbb080 llint_entry + 12449616  JavaScriptCore                  0x00000001b2cbb128 llint_entry + 12466417  JavaScriptCore                  0x00000001b2cbb080 llint_entry + 12449618  JavaScriptCore                  0x00000001b2cbc56c llint_entry + 12985219  JavaScriptCore                  0x00000001b2cbb080 llint_entry + 12449620  JavaScriptCore                  0x00000001b2cbb128 llint_entry + 12466421  JavaScriptCore                  0x00000001b2cbb080 llint_entry + 12449622  JavaScriptCore                  0x00000001b2c9c7e8 vmEntryToJavaScript + 24823  JavaScriptCore                  0x00000001b31faea4 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const... + 408 (JITCodeInlines.h:38)24  JavaScriptCore                  0x00000001b346fa54 JSC::boundThisNoArgsFunctionCall(JSC::ExecState*) + 460 (JSBoundFunction.cpp:56)25  JavaScriptCore                  0x00000001b2c9c960 vmEntryToNative + 25626  JavaScriptCore                  0x00000001b31faef4 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const... + 488 (Interpreter.cpp:906)27  JavaScriptCore                  0x00000001b33e5b28 JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallDa... + 184 (CallData.cpp:59)28  JavaScriptCore                  0x00000001b2cf63cc JSObjectCallAsFunction + 376 (JSObjectRef.cpp:740)29  *App Name*              0x0000000100b6da0c facebook::jsc::JSCRuntime::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) + 172 (JSCRuntime.cpp:1206)30  *App Name*              0x0000000100b76070 facebook::jsi::Value facebook::jsi::Function::call<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<c... + 244 (jsi-inl.h:223)31  *App Name*              0x0000000100b75ed0 std::__1::__function::__func<facebook::react::JSIExecutor::callFunction(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, st... + 96 (JSIExecutor.cpp:215)32  *App Name*              0x0000000100aafc44 void std::__1::__invoke_void_return_wrapper<void>::__call<void (*&)(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::alloca... + 72 (type_traits:4425)33  *App Name*              0x0000000100b73e90 facebook::react::JSIExecutor::callFunction(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, st... + 356 (functional:1860)34  *App Name*              0x0000000100b6a0e0 std::__1::__function::__func<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_7, std::__1::allocator<facebook::react::NativeToJsBrid... + 60 (functional:1860)35  *App Name*              0x0000000100ad1658 facebook::react::tryAndReturnError(std::__1::function<void ()> const&) + 40 (functional:1860)36  *App Name*              0x0000000100adf1fc facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&) + 24 (RCTMessageThread.mm:59)37  CoreFoundation                  0x00000001a3ce8834 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20 (CFRunLoop.c:1774)38  CoreFoundation                  0x00000001a3ce7fd4 __CFRunLoopDoBlocks + 264 (CFRunLoop.c:1815)39  CoreFoundation                  0x00000001a3ce370c __CFRunLoopRun + 2312 (CFRunLoop.c:3124)40  CoreFoundation                  0x00000001a3ce2adc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)41  *App Name*              0x0000000100ac72c0 +[RCTCxxBridge runRunLoop] + 264 (RCTCxxBridge.mm:268)42  Foundation                      0x00000001a415309c __NSThread__start__ + 848 (NSThread.m:724)43  libsystem_pthread.dylib         0x00000001a3a85d8c _pthread_start + 156 (pthread.c:896)44  libsystem_pthread.dylib         0x00000001a3a8976c thread_start + 8Thread 3 name:Thread 3:0   libsystem_kernel.dylib          0x00000001a3b63b5c madvise + 81   JavaScriptCore                  0x00000001b2b08e84 bmalloc::BulkDecommit::process(std::__1::vector<std::__1::pair<char*, unsigned long>, std::__1::a... + 108 (VMAllocate.h:203)2   JavaScriptCore                  0x00000001b2b08804 bmalloc::Scavenger::scavenge() + 412 (BulkDecommit.h:51)3   JavaScriptCore                  0x00000001b2b08e08 bmalloc::Scavenger::threadRunLoop() + 372 (Scavenger.cpp:489)4   JavaScriptCore                  0x00000001b2b08a44 bmalloc::Scavenger::threadEntryPoint(bmalloc::Scavenger*) + 12 (Scavenger.cpp:384)5   JavaScriptCore                  0x00000001b2b09d50 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, st... + 40 (type_traits:4361)6   libsystem_pthread.dylib         0x00000001a3a85d8c _pthread_start + 156 (pthread.c:896)7   libsystem_pthread.dylib         0x00000001a3a8976c thread_start + 8Thread 4 name:Thread 4:0   libsystem_kernel.dylib          0x00000001a3b40634 mach_msg_trap + 81   libsystem_kernel.dylib          0x00000001a3b3faa0 mach_msg + 72 (mach_msg.c:103)2   CoreFoundation                  0x00000001a3ce8288 __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575)3   CoreFoundation                  0x00000001a3ce33a8 __CFRunLoopRun + 1444 (CFRunLoop.c:2931)4   CoreFoundation                  0x00000001a3ce2adc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)5   AVFAudio                        0x00000001b08c5c1c GenericRunLoopThread::Entry(void*) + 156 (GenericRunLoopThread.h:91)6   AVFAudio                        0x00000001b0916d60 CAPThread::Entry(CAPThread*) + 204 (CAPThread.cpp:286)7   libsystem_pthread.dylib         0x00000001a3a85d8c _pthread_start + 156 (pthread.c:896)8   libsystem_pthread.dylib         0x00000001a3a8976c thread_start + 8Thread 5 name:Thread 5:0   libsystem_kernel.dylib          0x00000001a3b40634 mach_msg_trap + 81   libsystem_kernel.dylib          0x00000001a3b3faa0 mach_msg + 72 (mach_msg.c:103)2   CoreFoundation                  0x00000001a3ce8288 __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575)3   CoreFoundation                  0x00000001a3ce33a8 __CFRunLoopRun + 1444 (CFRunLoop.c:2931)4   CoreFoundation                  0x00000001a3ce2adc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)5   CFNetwork                       0x00000001a6fac4e8 -[__CoreSchedulingSetRunnable runForever] + 192 (CoreSchedulingSet.mm:1372)6   Foundation                      0x00000001a415309c __NSThread__start__ + 848 (NSThread.m:724)7   libsystem_pthread.dylib         0x00000001a3a85d8c _pthread_start + 156 (pthread.c:896)8   libsystem_pthread.dylib         0x00000001a3a8976c thread_start + 8Thread 6:0   libsystem_pthread.dylib         0x00000001a3a89758 start_wqthread + 0Thread 7:0   libsystem_pthread.dylib         0x00000001a3a89758 start_wqthread + 0Thread 8 name:Thread 8:0   libsystem_kernel.dylib          0x00000001a3b61c94 __psynch_cvwait + 81   libsystem_pthread.dylib         0x00000001a3a7ecf8 _pthread_cond_wait$VARIANT$mp + 680 (pthread_cond.c:591)2   JavaScriptCore                  0x00000001b2ac9afc WTF::ThreadCondition::timedWait(WTF::Mutex&, WTF::WallTime) + 144 (ThreadingPOSIX.cpp:541)3   JavaScriptCore                  0x00000001b2aaf9a8 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::Scope... + 2040 (ParkingLot.cpp:596)4   JavaScriptCore                  0x00000001b2a88264 bool WTF::Condition::waitUntil<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 184 (ParkingLot.h:80)5   JavaScriptCore                  0x00000001b2a885ec WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>:... + 216 (Condition.h:115)6   JavaScriptCore                  0x00000001b2ac7734 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 256 (Function.h:79)7   JavaScriptCore                  0x00000001b2ac92a4 WTF::wtfThreadEntryPoint(void*) + 12 (ThreadingPOSIX.cpp:200)8   libsystem_pthread.dylib         0x00000001a3a85d8c _pthread_start + 156 (pthread.c:896)9   libsystem_pthread.dylib         0x00000001a3a8976c thread_start + 8Thread 9 name:Thread 9:0   libsystem_kernel.dylib          0x00000001a3b61c94 __psynch_cvwait + 81   libsystem_pthread.dylib         0x00000001a3a7ecf8 _pthread_cond_wait$VARIANT$mp + 680 (pthread_cond.c:591)2   JavaScriptCore                  0x00000001b2ac9afc WTF::ThreadCondition::timedWait(WTF::Mutex&, WTF::WallTime) + 144 (ThreadingPOSIX.cpp:541)3   JavaScriptCore                  0x00000001b2aaf9a8 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::Scope... + 2040 (ParkingLot.cpp:596)4   JavaScriptCore                  0x00000001b2a88264 bool WTF::Condition::waitUntil<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 184 (ParkingLot.h:80)5   JavaScriptCore                  0x00000001b2a885ec WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>:... + 216 (Condition.h:115)6   JavaScriptCore                  0x00000001b2ac7734 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 256 (Function.h:79)7   JavaScriptCore                  0x00000001b2ac92a4 WTF::wtfThreadEntryPoint(void*) + 12 (ThreadingPOSIX.cpp:200)8   libsystem_pthread.dylib         0x00000001a3a85d8c _pthread_start + 156 (pthread.c:896)9   libsystem_pthread.dylib         0x00000001a3a8976c thread_start + 8Thread 10 name:Thread 10 Crashed:0   libsystem_kernel.dylib          0x00000001a3b61ec4 __pthread_kill + 81   libsystem_pthread.dylib         0x00000001a3a7d1d8 pthread_kill$VARIANT$mp + 136 (pthread.c:1458)2   libsystem_c.dylib               0x00000001a39d1844 abort + 100 (abort.c:110)3   libc++abi.dylib                 0x00000001a3b2a7d4 abort_message + 128 (abort_message.cpp:76)4   libc++abi.dylib                 0x00000001a3b2a9c4 demangling_terminate_handler() + 296 (cxa_default_handlers.cpp:66)5   libobjc.A.dylib                 0x00000001a3a92258 _objc_terminate() + 124 (objc-exception.mm:701)6   libc++abi.dylib                 0x00000001a3b37304 std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59)7   libc++abi.dylib                 0x00000001a3b3729c std::terminate() + 44 (cxa_handlers.cpp:87)8   libdispatch.dylib               0x00000001a3a37198 _dispatch_client_callout + 36 (object.m:498)9   libdispatch.dylib               0x00000001a39e3404 _dispatch_lane_serial_drain$VARIANT$mp + 608 (inline_internal.h:2484)10  libdispatch.dylib               0x00000001a39e3df8 _dispatch_lane_invoke$VARIANT$mp + 420 (queue.c:3863)11  libdispatch.dylib               0x00000001a39ed314 _dispatch_workloop_worker_thread + 588 (queue.c:6445)12  libsystem_pthread.dylib         0x00000001a3a86b88 _pthread_wqthread + 276 (pthread.c:2351)13  libsystem_pthread.dylib         0x00000001a3a89760 start_wqthread + 8Thread 11 name:Thread 11:0   libobjc.A.dylib                 0x00000001a3aac170 objc_release + 64 (objc-object.h:696)1   libobjc.A.dylib                 0x00000001a3aad6d0 AutoreleasePoolPage::releaseUntil(objc_object**) + 180 (NSObject.mm:777)2   libobjc.A.dylib                 0x00000001a3aad5c8 objc_autoreleasePoolPop + 224 (NSObject.mm:1037)3   libdispatch.dylib               0x00000001a3a36610 _dispatch_call_block_and_release + 24 (init.c:1408)4   libdispatch.dylib               0x00000001a3a37184 _dispatch_client_callout + 16 (object.m:495)5   libdispatch.dylib               0x00000001a39e3404 _dispatch_lane_serial_drain$VARIANT$mp + 608 (inline_internal.h:2484)6   libdispatch.dylib               0x00000001a39e3e28 _dispatch_lane_invoke$VARIANT$mp + 468 (queue.c:3863)7   libdispatch.dylib               0x00000001a39ed314 _dispatch_workloop_worker_thread + 588 (queue.c:6445)8   libsystem_pthread.dylib         0x00000001a3a86b88 _pthread_wqthread + 276 (pthread.c:2351)9   libsystem_pthread.dylib         0x00000001a3a89760 start_wqthread + 8Thread 12:0   libsystem_pthread.dylib         0x00000001a3a89758 start_wqthread + 0Thread 13:0   libsystem_pthread.dylib         0x00000001a3a89758 start_wqthread + 0Thread 10 crashed with ARM Thread State (64-bit):    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000    x4: 0x00000001a3b3a5d8   x5: 0x000000016f9b2450   x6: 0x000000000000006e   x7: 0x000000000000005f    x8: 0x000000016f9b3000   x9: 0x94ad59bad9f57794  x10: 0x00000001a3a7d150  x11: 0x000000000000000b   x12: 0x00000001dbde2080  x13: 0x0000000000000001  x14: 0x0000000000000010  x15: 0x0000000000000001   x16: 0x0000000000000148  x17: 0x0000000000000000  x18: 0x0000000000000000  x19: 0x0000000000000006   x20: 0x000000000000ab1f  x21: 0x000000016f9b2450  x22: 0x000000016f9b30e0  x23: 0x0000000000000000   x24: 0x0000000000000000  x25: 0x00000002860ebb80  x26: 0x000000028103de00  x27: 0x0000000000000000   x28: 0x0000000000000000   fp: 0x000000016f9b23b0   lr: 0x00000001a3a7d1d8    sp: 0x000000016f9b2390   pc: 0x00000001a3b61ec4 cpsr: 0x40000000   esr: 0x56000080  Address size fault

GoNative.io Camera iOS

$
0
0

I generated an app via GoNative. I use her and I use the camera.

So, on Android, I just modify the AndroidManifest and add the permission.

On iOS, I try to modify the info.plist, but the camera still not working.

Can someone has a solution ? Thanks.

React native calculate network usage (Android & iOS)

$
0
0

I am currently developing a react native app integrating it with IPFS technology, I have an requirement to calculate network usage in my app, that is how much data is used while sending and receiving the information from IPFS.

I have searched for plugins, but was only able to get it for Android.

So, what I have thought is to get size of Bytes sent and received from my app and to calculate data usage based on it.. is this a correct approach to get the network usage stats of my app ?

If there is any another way available for both Android & iOS platforms (hopefully plugin as I am not an Native developer) then please suggest.

Thanks.

Viewing all 16556 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>