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

Badge ios 13.3 not reset

$
0
0

(sorry for my bad English)

When I receive a notification the ios badge increments. When I launch my application and I return to the home the badge has disappeared but if I receive a new notification it does not start from 0 but from the previous number...

In my client during the opening event of the notification I set the badge to 0.

async componentDidMount() {
    ...

    OneSignal.addEventListener('ids', this.onIds)
    OneSignal.addEventListener('received', this.onReceived)
    OneSignal.addEventListener('opened', this.onOpened)

    const chatBadgeNumber = await this.getNumberFromAsyncStorage(CHAT_BADGE_COUNT)

    this.setBadgeNumber(chatBadgeNumber)
    this.setState({
      chatBadgeNumber,
    })
  }

componentWillUnmount() {
    OneSignal.removeEventListener('ids', this.onIds)
    OneSignal.removeEventListener('received', this.onReceived)
    OneSignal.removeEventListener('opened', this.onOpened)
  }

setBadgeNumber = number => {
    try {
      if (Platform.OS === 'android') {
        BadgeAndroid.setBadge(number)
      } else if (Platform.OS === 'ios') {
        PushNotificationIOS.setApplicationIconBadgeNumber(number)
      }
    } catch (e) {
      // if iOS app is in background, app crash
    }
  }

onReceived = async notification => {
    const { chatBadgeNumber } = this.state
    ...
    const { increaseBadge } = notification.payload.additionalData

    if (increaseBadge === 'CHAT') {
      this.setChatBadgeNumber(chatBadgeNumber + 1)
    }
    ...
  }

onOpened = async notification => {
    const { increaseBadge } = notification.notification.groupedNotifications

      if (increaseBadge === 'CHAT') {
        this.setChatBadgeNumber(0)
         ...
      }
   ...
    }
  }

In my AppDelegate.m too :

- (void)applicationDidBecomeActive:(UIApplication *)application{
  [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
}

- (void)applicationDidEnterBackground:(UIApplication *)application
{
  [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
}

- (void)sceneDidBecomeActive:(UIScene *)scene{
  [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
}

"@react-native-community/push-notification-ios": "^1.1.0", "react-native-onesignal": "^3.5.0",

On IOS 12 reset OK, increment KO (one problem at a time...) On Android everything is OK (increment, reset)

I don't know where exactly the problem comes from but if you have an idea ...


React-Native change default location of iOS and Android folder

$
0
0

According to the react-native cli documentation we can specify custom configuration based on each platform for RN cli. I want to change the default location of each platform folders so I added my custom react-native.config.js to the root of the project which you can find here:

module.exports = {
  project: {
    ios: {
      project: './example/ios/example.xcworkspace',
    },
    android: {
      sourceDir: './example/android/',
    },
  },
};

If I run react-native config in the root folder, I can see the correct configuration:

{
...
  "project": {
    "ios": {
      "sourceDir": "path-to-project-directory/example/ios",
      "folder": "path-to-project-directory",
      "pbxprojPath": "path-to-project-directory/example/ios/example.xcworkspace/project.pbxproj",
      "podfile": "path-to-project-directory/example/ios/Podfile",
      "podspecPath": null,
      "projectPath": "path-to-project-directory/example/ios/example.xcworkspace",
      "projectName": "example.xcworkspace",
      "libraryFolder": "Libraries",
      "sharedLibraries": [],
      "plist": [],
      "scriptPhases": []
    },
    "android": {
      "sourceDir": "path-to-project-directory/example/android/",
      "isFlat": true,
      "folder": "path-to-project-directory",
      "stringsPath": "path-to-project-directory/example/android/app/src/main/res/values/strings.xml",
      "manifestPath": "path-to-project-directory/example/android/app/src/main/AndroidManifest.xml",
      "buildGradlePath": "path-to-project-directory/example/android/build.gradle",
      "settingsGradlePath": "path-to-project-directory/example/android/settings.gradle",
      "assetsPath": "path-to-project-directory/example/android/app/src/main/assets",
      "mainFilePath": "path-to-project-directory/example/android/app/src/main/java/com/example/MainApplication.java",
      "packageName": "com.example",
      "packageFolder": "com/example",
      "appName": "app"
    }
  }
}

The problem is whenever I run react-native run-ios I get this error:

error iOS project folder not found. Are you sure this is a React Native project?. Run CLI with --verbose flag for more details.

NOTE: I installed all the dependencies properly. Here is the result of the react-native --v command:

react-native-cli: 2.0.1
react-native: 0.62.0

How do you specify an apple-app-site-association file path to match query strings?

$
0
0

I'm trying to set up universal linking in a mobile app I am building. The path I'm trying to match on my website is www.mywebsite.com/route?query=xxx

The apple docs have an example apple-app-site-association file that looks like this.

{
    "applinks": {
        "apps": [],
        "details": [
            {
                "appID": "9JA89QQLNQ.com.apple.wwdc",
                "paths": [ "/wwdc/news/", "/videos/wwdc/2015/*"]
            },
            {
                "appID": "ABCD1234.com.apple.wwdc",
                "paths": [ "*" ]
            }
        ]
    }
}

But this example does not have an example of a path with a query string.

How can I match my route www.mywebsite.com/route?query=xxx in my apple-app-site-association file?

Thank you

How do I get Expo to prompt my app for "Always" Location Permission?

$
0
0

I'm developing an iOS app using Expo. My app needs Location permission in order for geofencing to work when the app is not in use. I've followed Expo's documentation for Location Permission and provided NSLocationWhenInUseUsageDescription, NSLocationAlwaysAndWhenInUseUsageDescription, and NSLocationAlwaysUsageDescription descriptions in my app.json. But when my app prompts the user for location permissions the options given are While Using App, Allow Once, or Don't Allow.

How can I get my app to prompt for Always Allow?

React Native not starting iOS simulator

$
0
0

It happened recently when i tried react-native run-ios. Everything works fine in the terminal. no errors. even build get succeedded and in the terminal it says Launching build.xxx.xxx and then nothing happens. Loading dependency graph also 100% done.

i tried unistalling and re installing npm. but it didnt work

Synchronously scroll two components at once

$
0
0

I have an app where a timetable is displayed.

When the right ScrollView containing the schedule is scrolled, I want the left ScrollView containing the times to scroll too.

<ScrollView
    ref={'leftScroll'} />

<ScrollView
    ref={'rightScroll'}
    scrollEventThrottle={1}
    onScroll={(e) => this.refs.leftScroll.scrollTo({y: e.nativeEvent.contentOffset.y)}
    onMomentumScroll={(e) => this.refs.leftScroll.scrollTo({y: e.nativeEvent.contentOffset.y)} />

We've managed to scroll it in this way, but it is slow and choppy. Is there a way to completely synchronize the scroll of these two ScrollViews?

The reason for this design is that the times need to be fixed to the left of the screen at all times, and the rooms need to be fixed at the top at all times, and these need to scroll in accordance to the scrolling in the schedule.

How do i know that the Instagram button has been selected?

$
0
0

How do i know when the application has been clicked? I'm using 'Share' from React Native. I want to know as soon as a user clicks an app icon (e.g. Instagram) and then launch my own function, not the share page in instagram. How can i capture that the user has just clicked the app icon?

Right now if i click the app icon, it moves to the app's (e.g. Instagram's) share page, and when i dismiss it, then it tells me what my sharedAction was (which is too late!). I don't want to have to enter the share page at all.

I need to know when i've selected the Instagram app icon, so i can launch my own function.

import { Share } from 'react-native' 

shareImage = async() => {

    const result = await Share.share(

      {
        message: 'Hello',
        url: "www.image...."
      },
    )
    .then(res => console.log(res))


    if (result.action === Share.sharedAction) {
      if (result.activityType) {
        // shared with activity type of result.activityType
      } else {
        // shared
      }
    } else if (result.action === Share.dismissedAction) {
      // dismissed
    }
}

See image here

AsyncStorage reference crashes react native app on iOS

$
0
0

I have been using ExpoKit to develop an application, which relies on usage of AsyncStorage, and everything worked nice until I wanted to deploy it to prod.

In my package.json I have: "react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz" And iOS Deployment Target is set to 10.0 for both Pods and my project. I can provide more debugging info, if necessary, not sure what is relevant in this case.

For different reasons I would like not to use ExpoKit's default way hosting the bundle in production app, but would still like to keep expo's development tooling and therefore I changed the code of AppDelegate.m to this:

#import "AppDelegate.h"
#import "ExpoKit.h"
#import "EXViewController.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

@interface AppDelegate ()

@property (nonatomic, strong) EXViewController *rootViewControllerExpo;

@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    #ifdef DEBUG
        // Expo
        [[ExpoKit sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
        _rootViewControllerExpo = [ExpoKit sharedInstance].rootViewController;

        _window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
        _window.backgroundColor = [UIColor whiteColor];
        _window.rootViewController = _rootViewControllerExpo;
        [_window makeKeyAndVisible];
    #else
        // React Native
        NSURL *jsCodeLocation;
        jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

        RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                            moduleName:@"RentalCollectorsApp"
                                                     initialProperties:nil
                                                         launchOptions:launchOptions];

        UIViewController *rootViewController = [UIViewController new];
        rootViewController.view = rootView;

        _window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
        _window.backgroundColor = [UIColor whiteColor];
        _window.rootViewController = rootViewController;
        [_window makeKeyAndVisible];

        //        UIView* launchScreenView = [[[NSBundle mainBundle] loadNibNamed:@"LaunchScreen" owner:self options:nil] objectAtIndex:0];
        //        launchScreenView.frame = self.window.bounds;
        //        rootView.loadingView = launchScreenView;
    #endif

    return YES;
}

And then my app, which was working totally fine with ExpoKit, started to crash upon opening when executing a release scheme with the following message. It works fine in debug mode when using Expo's rootViewController

[error][tid:com.facebook.react.JavaScript] undefined is not an object (evaluating 'l.multiMerge')
[fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: undefined is not an object (evaluating 'l.multiMerge')
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

After hours of debugging I have pinpointed the minimal case which causes the crash quite consistently. Importing AsyncStorage by itself does not crash the app, but referencing it in a variable immediately causes the crash:

import React, { Component } from 'react';
import { Text, View, AsyncStorage } from 'react-native';

export default class AppContainer extends Component {
  render() {
    const bar = AsyncStorage;
    // const bar = {
    //   storage: AsyncStorage,
    // };

    return (
      <View
        style={{
          flex: 1,
          justifyContent: 'center',
          alignItems: 'center',
          backgroundColor: 'yellow',
        }}
      >
        <Text>Hello!</Text>
      </View>
    );
  }
}

In my particular case crash is caused by using redux-persist, but it seems that the problem is wider, since when I remove initialisation of redux-persist it starts to crash somewhere in the middle of react-native-mapbox-gl. Just for reference, code of redux-persisthttps://github.com/rt2zz/redux-persist/blob/master/src/storage/index.native.js

Googling gave me some results, but no answers:

Undefined is not an object (evaluating 'RCTAsyncStorage.multiMerge' (React-native-asyncstorage)

https://github.com/facebook/react-native/issues/21948

Any help is appreciated.


Is the advice on google developer website enough to secure Android App?

Google maps click on Point of interest returns different placeId on Android and IOS

$
0
0

I am working on react native application using package "react-native-maps": "0.27.0". I am watching for click on Point of interest (poi) and trying to read a location returned object. But there is difference in placeId between IOS and Android.

Android response: ChIJAAAAAAAAAAARE6VfRqb20Wo

IOS response: ChIJR-k4Ym_gPkcRE6VfRqb20Wo

As you can see Android will replace big part of id with AAAAAAAAAAA rest of string is same.

Both platforms are set to use google maps (not apple maps).

Both IDs are valid, point to one POI and searchable but I am expecting placeId as unique and only one identifier for one location but it seems IOS and Android SDK has different sources. Is there any way how to use one identifier on all devices? Why is this happening?

How to set custom fonts in WebView(react-native-webview) in iOS?

$
0
0

I want to set custom fonts in Webview. I have implemented the below code:

@font-face {
    font-family: 'Poppins-Bold'; 
    src:url('file:///android_asset/fonts/Poppins-Bold.ttf') format('truetype')
}
body{
    font-family: Poppins-Bold
    margin: 0;
    padding: 0;
    color: red;
}

It works fine in android, but it does not working in iOS. Let me know if anybody has a solution for this.

Note: I don't want to use google's CSS font

react native ssl pinning

$
0
0

We are building a react native 0.61.4 app and we want to use the library react-native-ssl-pinning. There is a problem with ios certificate and fetch returns error "cancelled" when running on ios.

We have followed the steps from https://www.npmjs.com/package/react-native-ssl-pinning .I am not sure about the step two at Usage ios: (skip this if you are using certificate pinning) no extra step needed for public key pinning, AFNetworking will extract the public key from the certificate.

Any thoughts about what might have been wrong?

"RCTBundleURLProvider.h" file not found - AppDelegate.m

$
0
0

I am trying to run my React Native app in XCode and I keep getting this error. I cannot figure out how to resolve the issue. Any suggestions?

Screen Shot of Error in XCode:

screenshot

React Native init specific version

$
0
0

I upgraded my latest project to React Native 0.19 and instantly the video no longer works. How can I create a new project with a specific version? I want to init a new project at version 0.18.1. I did some google searches but couldn't find anything about this.

$ react-native init newproject --verbose

I'm guessing I need to add the word @18.1 in there somewhere but can't get that to work.

React Native: Undefined symbols for architecture x86_64: "_YGNodeIsDirty"

$
0
0

I have the following issue when trying to compile my app for iOS on my CI (Bitrise). All the commands work perfectly fine locally.

React Native 0.61.5

    cd /Users/vagrant/git/ios/Pods    export LANG=en_US.US-ASCII    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target x86_64-apple-ios9.0-simulator -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fobjc-arc -fobjc-weak -fmodules -gmodules -fmodules-cache-path=/Users/vagrant/git/ios/build/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/vagrant/git/ios/build/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -fmodule-name=RCTText -Wno-trigraphs -fpascal-strings -Os -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DPOD_CONFIGURATION_RELEASE=1 -DCOCOAPODS=1 -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.0.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/RCTText-generated-files.hmap -I/Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/RCTText-own-target-headers.hmap -I/Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/RCTText-all-non-framework-target-headers.hmap -ivfsoverlay /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/all-product-headers.yaml -iquote /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/RCTText-project-headers.hmap -I/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-RCTText-framework/include -I/Users/vagrant/git/ios/Pods/Headers/Public -I/Users/vagrant/git/ios/Pods/Headers/Public/DoubleConversion -I/Users/vagrant/git/ios/Pods/Headers/Public/React-Core -I/Users/vagrant/git/ios/Pods/Headers/Public/React-RCTText -I/Users/vagrant/git/ios/Pods/Headers/Public/React-cxxreact -I/Users/vagrant/git/ios/Pods/Headers/Public/React-jsi -I/Users/vagrant/git/ios/Pods/Headers/Public/React-jsiexecutor -I/Users/vagrant/git/ios/Pods/Headers/Public/React-jsinspector -I/Users/vagrant/git/ios/Pods/Headers/Public/Yoga -I/Users/vagrant/git/ios/Pods/Headers/Public/glog -I/Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/DerivedSources-normal/x86_64 -I/Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/DerivedSources/x86_64 -I/Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/DerivedSources -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-RCTText-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/DoubleConversion-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/Folly-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-Core.common-CoreModulesHeaders -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-cxxreact-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-jsi-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-jsiexecutor-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-jsinspector-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/Yoga-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/glog-framework -include /Users/vagrant/git/ios/Pods/Target\ Support\ Files/React-RCTText-framework/React-RCTText-framework-prefix.pch -MMD -MT dependencies -MF /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/Objects-normal/x86_64/RCTBaseTextInputShadowView.d --serialize-diagnostics /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/Objects-normal/x86_64/RCTBaseTextInputShadowView.dia -c /Users/vagrant/git/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputShadowView.m -o /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/Objects-normal/x86_64/RCTBaseTextInputShadowView.oCompileC /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/Objects-normal/x86_64/RCTBackedTextInputDelegateAdapter.o /Users/vagrant/git/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-RCTText-framework' from project 'Pods')    cd /Users/vagrant/git/ios/Pods    export LANG=en_US.US-ASCII    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target x86_64-apple-ios9.0-simulator -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fobjc-arc -fobjc-weak -fmodules -gmodules -fmodules-cache-path=/Users/vagrant/git/ios/build/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/vagrant/git/ios/build/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -fmodule-name=RCTText -Wno-trigraphs -fpascal-strings -Os -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DPOD_CONFIGURATION_RELEASE=1 -DCOCOAPODS=1 -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.0.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/RCTText-generated-files.hmap -I/Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/RCTText-own-target-headers.hmap -I/Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/RCTText-all-non-framework-target-headers.hmap -ivfsoverlay /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/all-product-headers.yaml -iquote /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/RCTText-project-headers.hmap -I/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-RCTText-framework/include -I/Users/vagrant/git/ios/Pods/Headers/Public -I/Users/vagrant/git/ios/Pods/Headers/Public/DoubleConversion -I/Users/vagrant/git/ios/Pods/Headers/Public/React-Core -I/Users/vagrant/git/ios/Pods/Headers/Public/React-RCTText -I/Users/vagrant/git/ios/Pods/Headers/Public/React-cxxreact -I/Users/vagrant/git/ios/Pods/Headers/Public/React-jsi -I/Users/vagrant/git/ios/Pods/Headers/Public/React-jsiexecutor -I/Users/vagrant/git/ios/Pods/Headers/Public/React-jsinspector -I/Users/vagrant/git/ios/Pods/Headers/Public/Yoga -I/Users/vagrant/git/ios/Pods/Headers/Public/glog -I/Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/DerivedSources-normal/x86_64 -I/Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/DerivedSources/x86_64 -I/Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/DerivedSources -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-RCTText-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/DoubleConversion-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/Folly-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-Core.common-CoreModulesHeaders -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-cxxreact-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-jsi-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-jsiexecutor-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-jsinspector-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/Yoga-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/glog-framework -include /Users/vagrant/git/ios/Pods/Target\ Support\ Files/React-RCTText-framework/React-RCTText-framework-prefix.pch -MMD -MT dependencies -MF /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/Objects-normal/x86_64/RCTBackedTextInputDelegateAdapter.d --serialize-diagnostics /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/Objects-normal/x86_64/RCTBackedTextInputDelegateAdapter.dia -c /Users/vagrant/git/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.m -o /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/Objects-normal/x86_64/RCTBackedTextInputDelegateAdapter.oCompileC /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/Objects-normal/x86_64/NSTextStorage+FontScaling.o /Users/vagrant/git/node_modules/react-native/Libraries/Text/Text/NSTextStorage+FontScaling.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-RCTText-framework' from project 'Pods')    cd /Users/vagrant/git/ios/Pods    export LANG=en_US.US-ASCII    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target x86_64-apple-ios9.0-simulator -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fobjc-arc -fobjc-weak -fmodules -gmodules -fmodules-cache-path=/Users/vagrant/git/ios/build/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/vagrant/git/ios/build/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -fmodule-name=RCTText -Wno-trigraphs -fpascal-strings -Os -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DPOD_CONFIGURATION_RELEASE=1 -DCOCOAPODS=1 -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.0.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/RCTText-generated-files.hmap -I/Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/RCTText-own-target-headers.hmap -I/Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/RCTText-all-non-framework-target-headers.hmap -ivfsoverlay /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/all-product-headers.yaml -iquote /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/RCTText-project-headers.hmap -I/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-RCTText-framework/include -I/Users/vagrant/git/ios/Pods/Headers/Public -I/Users/vagrant/git/ios/Pods/Headers/Public/DoubleConversion -I/Users/vagrant/git/ios/Pods/Headers/Public/React-Core -I/Users/vagrant/git/ios/Pods/Headers/Public/React-RCTText -I/Users/vagrant/git/ios/Pods/Headers/Public/React-cxxreact -I/Users/vagrant/git/ios/Pods/Headers/Public/React-jsi -I/Users/vagrant/git/ios/Pods/Headers/Public/React-jsiexecutor -I/Users/vagrant/git/ios/Pods/Headers/Public/React-jsinspector -I/Users/vagrant/git/ios/Pods/Headers/Public/Yoga -I/Users/vagrant/git/ios/Pods/Headers/Public/glog -I/Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/DerivedSources-normal/x86_64 -I/Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/DerivedSources/x86_64 -I/Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/DerivedSources -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-RCTText-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/DoubleConversion-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/Folly-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-Core.common-CoreModulesHeaders -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-cxxreact-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-jsi-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-jsiexecutor-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-jsinspector-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/Yoga-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/glog-framework -include /Users/vagrant/git/ios/Pods/Target\ Support\ Files/React-RCTText-framework/React-RCTText-framework-prefix.pch -MMD -MT dependencies -MF /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/Objects-normal/x86_64/NSTextStorage+FontScaling.d --serialize-diagnostics /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/Objects-normal/x86_64/NSTextStorage+FontScaling.dia -c /Users/vagrant/git/node_modules/react-native/Libraries/Text/Text/NSTextStorage+FontScaling.m -o /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/Objects-normal/x86_64/NSTextStorage+FontScaling.oLd /Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-RCTText-framework/RCTText.framework/RCTText normal x86_64 (in target 'React-RCTText-framework' from project 'Pods')    cd /Users/vagrant/git/ios/Pods    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-ios9.0-simulator -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.0.sdk -L/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-RCTText-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-RCTText-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/DoubleConversion-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/Folly-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-Core.common-CoreModulesHeaders -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-cxxreact-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-jsi-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-jsiexecutor-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-jsinspector-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/Yoga-framework -F/Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/glog-framework -filelist /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/Objects-normal/x86_64/RCTText.LinkFileList -install_name @rpath/RCTText.framework/RCTText -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/Objects-normal/x86_64/RCTText_lto.o -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -framework Foundation -framework React -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/vagrant/git/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React-RCTText-framework.build/Objects-normal/x86_64/RCTText_dependency_info.dat -o /Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-RCTText-framework/RCTText.framework/RCTTextUndefined symbols for architecture x86_64:"_YGNodeIsDirty", referenced from:      -[RCTBaseTextInputShadowView uiManagerWillPerformMounting] in RCTBaseTextInputShadowView.o      -[RCTTextShadowView uiManagerWillPerformMounting] in RCTTextShadowView.o"_YGNodeMarkDirty", referenced from:      -[RCTBaseTextInputShadowView dirtyLayout] in RCTBaseTextInputShadowView.o      -[RCTTextShadowView dirtyLayout] in RCTTextShadowView.o"_YGNodeSetDirtiedFunc", referenced from:      -[RCTBaseTextShadowView insertReactSubview:atIndex:] in RCTBaseTextShadowView.o      -[RCTBaseTextShadowView removeReactSubview:] in RCTBaseTextShadowView.o"_YGNodeGetContext", referenced from:      _RCTBaseTextInputShadowViewMeasure in RCTBaseTextInputShadowView.o      _RCTTextInputShadowViewBaseline in RCTBaseTextInputShadowView.o      _RCTInlineViewYogaNodeDirtied in RCTBaseTextShadowView.o      _RCTTextShadowViewMeasure in RCTTextShadowView.o      _RCTTextShadowViewBaseline in RCTTextShadowView.o"_YGNodeSetMeasureFunc", referenced from:      -[RCTBaseTextInputShadowView initWithBridge:] in RCTBaseTextInputShadowView.o      -[RCTTextShadowView initWithBridge:] in RCTTextShadowView.o"_YGNodeSetBaselineFunc", referenced from:      -[RCTBaseTextInputShadowView initWithBridge:] in RCTBaseTextInputShadowView.o      -[RCTTextShadowView initWithBridge:] in RCTTextShadowView.old: symbol(s) not found for architecture x86_64clang: error: linker command failed with exit code 1 (use -v to see invocation)** BUILD FAILED **The following build commands failed:    Ld /Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/React-RCTText-framework/RCTText.framework/RCTText normal x86_64(1 failure)

My Podfile:

target 'client-trial-app' do  use_frameworks!  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"  pod 'React', :path => '../node_modules/react-native/'  pod 'React-Core', :path => '../node_modules/react-native/'  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'  pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'end

Does anyone have an idea what might be an issue? I've tried compiling it on different XCode versions but always ends up in the same way (on CI only).


Empty Info.plist paths in build settings with frameworks installed with CocoaPods

$
0
0

I have a problem with CocoaPods, every time I try to run the command pod install the pods are correctly installed but the Info.plist file path in the build settings of each linked framework is always empty and this causes errors when I try to install and run my app.

This my Podfile, I am using react-native:

platform :ios, '9.0'use_frameworks!require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'def add_flipper_pods!  version = '~> 0.33.1'  pod 'FlipperKit', version, :configuration => 'Debug'  pod 'FlipperKit/FlipperKitLayoutPlugin', version, :configuration => 'Debug'  pod 'FlipperKit/SKIOSNetworkPlugin', version, :configuration => 'Debug'  pod 'FlipperKit/FlipperKitUserDefaultsPlugin', version, :configuration => 'Debug'  pod 'FlipperKit/FlipperKitReactPlugin', version, :configuration => 'Debug'end# Post Install processing for Flipperdef flipper_post_install(installer)  installer.pods_project.targets.each do |target|    if target.name == 'YogaKit'      target.build_configurations.each do |config|        config.build_settings['SWIFT_VERSION'] = '4.1'      end    end  endendtarget 'myproject' do  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"  pod 'React', :path => '../node_modules/react-native/'  pod 'React-Core', :path => '../node_modules/react-native/'  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'  pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'  pod 'FBSDKCoreKit', '5.7'  pod 'FBSDKLoginKit', '5.7'  pod 'FBSDKShareKit', '5.7'  use_modular_headers!  use_native_modules!  # Enables Flipper.  #  # Note that if you have use_frameworks! enabled, Flipper will not work and  # you should disable these next few lines.  # add_flipper_pods!  # post_install do |installer|  #  flipper_post_install(installer)  # endend

I have already tried to clean the cocoapods cache, reinstall the pods, delete Xcode derived folder but nothing seems to fix this.

The Info.plist files are in the Pods/Target Support Files/*myframework*/*myframework*-Info.plist.

Is there a way to create a custom post-install rule to reassign them correctly?It seems like the pod update corrupts them.

Thank you

Force React Native Web View to Ignore cached version of webview

$
0
0

Context

Currently working a HTML & JS heavy project that is a react native project. All HTML & JS are referenced locally (nothing over http).

Problem

Whenever I make changes to HTML or JS I don't see the changes (after refreshing the native code or simply running it again) so I'm forced to completely uninstall the app.

Question

Is there a way to ignore the cached version of these files (am assuming a caching mechanism exists)

I haven't found any valid resource regarding this topic, so any feedback would be greatly appreciated, thanks.

React Native AsyncStorage storing values other than strings

$
0
0

Is there any way to store values other than strings with AsyncStorage? I want to store simple boolean values for example.

AsyncStorage.setItem('key', 'ok');

Is no problem, but:

AsyncStorage.setItem('key', false);

Does not work..

React Native Swipeable (Swipe to delete) not closing

$
0
0

I'm using Swipeable from React-Native-Gesture-Handler to incorporate swipe to delete on my page. When I press delete, the contact gets deleted however the swipeable remains open.

I want it to close after it gets pressed but I can't seem to figure out how to do it.

This is my code:

const RightActions = (progress, dragX) => { 
return (
<TouchableOpacity onPress={()=>{DeleteContact(i)}}>
  <View style={[ContactsStyles.rightAction]}>
    <Text style={ContactsStyles.actionText}>Delete</Text>
  </View>
</TouchableOpacity>
) 
}

Here is where I have Swipeable:

<Swipeable renderRightActions={RightActions} >

     <View style={ContactsStyles.UserContainer}>

         <Text numberOfLines={1} style={[Fonts.Name]}> {obj.firstname} {obj.lastname} </Text>


         {/* Message/Call Container */}
          <View style={ContactsStyles.ImageCont}>
                    {/* Message */}
                    <TouchableOpacity onPress={()  => Communications.text(obj.phone, 'Hey ' + obj.firstname + ', im in need of a Ryde. Are you able to pick me up? This is my current location: ' + location)} >
                      <View style={ContactsStyles.ImageBox}>
                        <Image style={ContactsStyles.Image} source={require('../../assets/icons/message.png')} />
                      </View>
                    </TouchableOpacity>

                    {/* Call */}
                    <TouchableOpacity onPress = {() => Communications.phonecall( obj.phone , true)}>
                      <View style={ContactsStyles.ImageBox}>
                        <Image style={ContactsStyles.Image} source={require('../../assets/icons/phone.png')} />
                      </View>
                    </TouchableOpacity>
                  </View>
                  {/* End of Message/Call Container */}
      </View>
</Swipeable>

Swipeable button doesnt disappear after on press

Cannot exit app with ionic2 on iOS? Is there a way to exit app?

$
0
0

I've build an Ionic2 app and using

this.platform.exitApp()

in app.component.ts to exit app.

On Android it's work well, but got this error on iOS

undefined is not an object (evaluating 'e.navigator.app.exitApp')
Viewing all 16907 articles
Browse latest View live


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