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

basic react native app not showing any text only white screen with app name on simulator

$
0
0

i am trying to run simple react native app. just text 'Hello World!', it's supposed to be my first app in react native. below is my simple app.js file

    /**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 */

import React from 'react';
import {
  SafeAreaView,
  StyleSheet,
  ScrollView,
  View,
  Text,
  StatusBar,
} from 'react-native';

import {
  Header,
  LearnMoreLinks,
  Colors,
  DebugInstructions,
  ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';

const App: () => React$Node = () => {
  return (
    <>
      <StatusBar barStyle="dark-content" />
      <SafeAreaView>
        <ScrollView
          contentInsetAdjustmentBehavior="automatic"
          style={styles.scrollView}>
          <Header />
          {global.HermesInternal == null ? null : (
            <View style={styles.engine}>
              <Text style={styles.footer}>Engine: Hermes</Text>
            </View>
          )}
          <View style={styles.body}>
            <View style={styles.sectionContainer}>
              <Text style={styles.sectionTitle}>Step One</Text>
              <Text style={styles.sectionDescription}>
                Edit <Text style={styles.highlight}>App.js</Text> to change this
                screen and then come back to see your edits.
              </Text>
            </View>
            <View style={styles.sectionContainer}>
              <Text style={styles.sectionTitle}>See Your Changes</Text>
              <Text style={styles.sectionDescription}>
                <ReloadInstructions />
              </Text>
            </View>
            <View style={styles.sectionContainer}>
              <Text style={styles.sectionTitle}>Debug</Text>
              <Text style={styles.sectionDescription}>
                <DebugInstructions />
              </Text>
            </View>
            <View style={styles.sectionContainer}>
              <Text style={styles.sectionTitle}>Learn More</Text>
              <Text style={styles.sectionDescription}>
                Read the docs to discover what to do next:
              </Text>
            </View>
            <LearnMoreLinks />
          </View>
        </ScrollView>
      </SafeAreaView>
    </>
  );
};

const styles = StyleSheet.create({
  scrollView: {
    backgroundColor: Colors.lighter,
  },
  engine: {
    position: 'absolute',
    right: 0,
  },
  body: {
    backgroundColor: Colors.white,
  },
  sectionContainer: {
    marginTop: 32,
    paddingHorizontal: 24,
  },
  sectionTitle: {
    fontSize: 24,
    fontWeight: '600',
    color: Colors.black,
  },
  sectionDescription: {
    marginTop: 8,
    fontSize: 18,
    fontWeight: '400',
    color: Colors.dark,
  },
  highlight: {
    fontWeight: '700',
  },
  footer: {
    color: Colors.dark,
    fontSize: 12,
    fontWeight: '600',
    padding: 4,
    paddingRight: 12,
    textAlign: 'right',
  },
});

export default App;

i started with react-native cli, https://facebook.github.io/react-native/docs/getting-started (React-Native CLI Quickstart) trying to run app on simulator with npx react-native run-ios but i can see only blank screen with app name on it..

enter image description here

..this happened with other basic apps i had created... what wrong or i am missing...


How to make Google sign in with Swift and use it in React Native

$
0
0

I am trying to create a google login for a react native app I intend to release to the app store. I am aware there are npm libraries for this, however I don't want to run into the issue of creators not updating their libraries. Also in the future I will probably make a custom native login UI for both ios and android. For that reason I followed this google guide to make a google sign-in button in Swift. I am proficient with React and know enough to work with React Native comfortably. However I am not familiar with Swift or branching code from Swift to React Native. Also since that google guide gives the example in swift I decided to convert the native files from Objective C to Swift (deleted AppDelegate.h, AppDelegate.m, main.m. Created AppDelegate.swift).

Problem: Can't get swift google sign in button to be visible in React Native

Steps:

  1. build google sign in button in swift
  2. export it to react native
  3. make a button to call sign in code from swift

I prefer to just make the button in swift then import it in react, but just making a button in react native to call swift functions is fine too. Also if I need to I can revert back to original Objective C code.

By following this guide I assume the solution would look something like this:

GoogleSignInManager.swift

import UIKit
import GoogleSignIn

@objc(GoogleSignInManager)
class GoogleSignInManager : NSObject {
  override func viewDidLoad() {
    super.viewDidLoad()

    GIDSignIn.sharedInstance()?.presentingViewController = self

    // Automatically sign in the user.
    GIDSignIn.sharedInstance()?.restorePreviousSignIn()
  }
}

GoogleSignInManger.m

#import "React/RCTViewManager.h"

@interface RCT_EXTERN_MODULE(GoogleSignInManager, RCTViewManager)
@end

MyApp-Bridging-Header.h

#import "React/RCTBridgeModule.h"
#import "React/RCTViewManager.h"

#import <React/RCTBridgeModule.h>
#import <React/RCTBridge.h>
#import <React/RCTEventDispatcher.h>
#import <React/RCTRootView.h>
#import <React/RCTUtils.h>
#import <React/RCTConvert.h>
#import <React/RCTBundleURLProvider.h>

AppDelegate.swift

import GoogleSignIn

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, GIDSignInDelegate {
  var window: UIWindow?
  var bridge: RCTBridge!

  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    let jsCodeLocation: URL

    jsCodeLocation = RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index", fallbackResource:nil)
    let rootView = RCTRootView(bundleURL: jsCodeLocation, moduleName: "BbookMobile", initialProperties: nil, launchOptions: launchOptions)
    let rootViewController = UIViewController()
    rootViewController.view = rootView

    self.window = UIWindow(frame: UIScreen.main.bounds)
    self.window?.rootViewController = rootViewController
    self.window?.makeKeyAndVisible()

    /* Google API stuff I got from the guide */
    Initialize sign-in
    GIDSignIn.sharedInstance().clientID = "123fakeClientID456.apps.googleusercontent.com"
    GIDSignIn.sharedInstance().delegate = self

    @available(iOS 9.0, *)
    func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any]) -> Bool {
      return GIDSignIn.sharedInstance().handle(url)
    }

    func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!,
              withError error: Error!) {
      if let error = error {
        if (error as NSError).code == GIDSignInErrorCode.hasNoAuthInKeychain.rawValue {
          print("The user has not signed in before or they have since signed out.")
        } else {
          print("\(error.localizedDescription)")
        }
        return
      }
      // Perform any operations on signed in user here.
      let userId = user.userID                  // For client-side use only!
      let idToken = user.authentication.idToken // Safe to send to the server
      let fullName = user.profile.name
      let givenName = user.profile.givenName
      let familyName = user.profile.familyName
      let email = user.profile.email

      print(fullName)
    }

    func sign(_ signIn: GIDSignIn!, didDisconnectWith user: GIDGoogleUser!,
              withError error: Error!) {
      // Perform any operations when the user disconnects from app here.
      print("User has disconnected")
    }
    /* End of google stuff */
    return true
  }
}

App.tsx

import React from 'react'
import { View, requireNativeComponent } from 'react-native'
import { ActionBtn } from './component-lib/Button'
import TextField from './component-lib/TextField'

const GoogleSignIn = requireNativeComponent("GoogleSignInManager")

const App = () => {
  return (
    <>
      <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
        <TextField label={"Username"} placeholder={"johndoe_"} contentType={"username"} />
        <TextField label={"Password"} contentType={"password"} secure={true} />
        <ActionBtn text={"hello"} />
        <GoogleSignIn />
      </View>
    </>
  )
}

I have been reading and looking for examples for about three hours to close the gap on this one and plan to write my own guide if I figure it out but hopefully someone can fill in the holes for me.

React Native Firebase ios onNotification doesn't trigger

$
0
0

My project is importing 'react-native-firebase' and I'm trying sending test messages through firebase console using a device token. The method firebase.notifications().onNotification((notification)=>{}) triggers on android devices, but doesn't trigger on ios devices. Notifications don't pop up both on foreground and background. I've tried 'console.log' in the method but doesn't present anything. please let me know what the problem is. I tried 'onMessage()' but it triggers on foreground only.

here's my code:

if (Platform.OS == 'android') {
            this.notificationListener = firebase.notifications().onNotification((notification: Notification) => {
                console.log("onNotification");
                console.log(notification);
                notification
                    .setSound("default")
                    .android.setChannelId('default')
                    .android.setBigText(notification.body, notification.title, '')
                //     .android.setSmallIcon('@mipmap/icon_noti');
                firebase.notifications().displayNotification(notification);
            });
        }
        else {
            this.notificationListener = firebase.notifications().onNotification((notification) => {
                notification.setNotificationId(notification.messageId)
                notification.setSound("default"); 
                notification.setTitle(notification.data.title)
                notification.ios.setBadge(notification.ios.badge ? notification.ios.badge + 1 : 0);
                firebase.notifications().displayNotification(notification);
            });



appDelegate.m: 

#import "AppDelegate.h"

#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

#import <GoogleMaps/GoogleMaps.h>
#import <Firebase.h>
#import <FirebaseMessaging.h>
#import "RNFirebaseNotifications.h"
#import "RNFirebaseMessaging.h"
#import "RNSplashScreen.h"

@import Firebase;
@import UserNotifications;

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [GMSServices provideAPIKey:@"aasdfsafdadgadgadfasf"];
  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                   moduleName:@"asdb"
                                            initialProperties:nil];

  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 
  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  UIViewController *rootViewController = [UIViewController new];
  rootViewController.view = rootView;
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];
  [FIRApp configure];
  [RNFirebaseNotifications configure];
  [RNSplashScreen show];
  [[UIApplication sharedApplication] registerForRemoteNotifications];
  [[UNUserNotificationCenter currentNotificationCenter] setDelegate:self];
  return YES;
} 

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo
                                                       fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{
  [[RNFirebaseNotifications instance] didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}

- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {
  [[RNFirebaseMessaging instance] didRegisterUserNotificationSettings:notificationSettings];
}

- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
  [[RNFirebaseNotifications instance] didReceiveLocalNotification:notification];
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}

@end

Play sound in iOS device in react-native

$
0
0

In my app I have a feature that plays a sound when a message is received it will notify the user by playing a sound file, the app works using react-native-sound fine in Android but in iOS I keep getting this error:

enter image description here

Code I am using for initializing the sound:

import Sound from "react-native-sound"

// Load the sound file 'whoosh.mp3' from the app bundle
// See notes below about preloading sounds within initialization code below.
var message_received = new Sound(require("../../res/audio/Page_Turn.mp3"), Sound.MAIN_BUNDLE, (error) => {
    if (error) {
      console.log('failed to load the sound', error);
      return;
    }
    // loaded successfully
    console.log('duration in seconds: ' + message_received.getDuration() + 'number of channels: ' + message_received.getNumberOfChannels());
});

The method that I call after initializing sound file:

message_received.play()

Does anyone know how to solve this?

React Native Picker Placeholder

$
0
0

I have a custom iOS Picker Modal component and I want to add placeholder on it, is there anyway to do that? And my pickers are generated by map function, here is my picker code

class PickerWrapper extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            type_absen: '',
            modal: false
        }
    }

    render() {
        let picker;

        let iosPickerModal = (
            <Modal isVisible={this.state.modal} hideModalContentWhileAnimating={true} backdropColor={color.white} backdropOpacity={0.9} animationIn="zoomInDown" animationOut="zoomOutUp" animationInTiming={200} animationOutTiming={200} onBackButtonPress={() => this.setState({ modal: false })} onBackdropPress={() => this.setState({ modal: false })} ><View style={{ backgroundColor: color.white, width: 0.9 * windowWidth(), height: 0.3 * windowHeight(), justifyContent: 'center' }}><Picker
                        selectedValue={this.state.type_absen}
                        onValueChange={(itemValue, itemIndex) => {
                            this.setState({ type_absen: itemValue });
                            this.setState({ modal: false });
                            setTimeout(() => this.props.onSelect(itemValue), 1200);
                        }}>
                        {this.props.items.map((item, key) => <Picker.Item label={item.description} value={item.id} key={item.id} />)}</Picker></View></Modal>);

        if (Platform.OS === 'ios') {
            var idx = this.props.items.findIndex(item => item.id === this.state.type_absen);
            return (<View style={this.props.style}>
                    {iosPickerModal}<TouchableOpacity onPress={() => this.setState({ modal: true })}><View style={{ flexDirection: 'row', height: this.props.height ? this.props.height : normalize(40), width: this.props.width ? this.props.width : 0.68 * windowWidth(), borderWidth: 1, borderColor: color.blue, alignItems: 'center', borderRadius: 5 }}><Text style={{ fontSize: fontSize.regular, marginRight: 30 }}> {idx !== -1 ? this.props.items[idx].description : this.state.type_absen}</Text><IconWrapper name='md-arrow-dropdown' type='ionicon' color={color.light_grey} size={20} onPress={() => this.setState({ modal: true })} style={{ position: 'absolute', right: 10 }} /></View></TouchableOpacity></View >);
        }
}

React Native - Loading percentage on Splash Screen Android & IOS

$
0
0

Is it possible to show progress percentage on splash screen for Android & IOS?

If yes? Then showing progress at splash screen is good practice or not.

"config.h" file not found in iOS project of React native

$
0
0

In X-Code project of react native, getting error

config.h file not found.

Here is version detail :

react-native-cli: 2.0.1
react-native: 0.51.0

How to solve it?

Use manually linked libraries with React Native 0.61

$
0
0

I'm upgrading from RN 0.59.4 to 0.61.4. It seems that linking dependencies via Pods is the supported method in 0.61.4. However, most of my iOS dependencies are linked manually. When building the app, I'm getting errors like React/RCTDefines.h file not found and similar errors from the libraries. What's the recommended way to approach this?


Camera for iOS is not working in webview. How to make it work? [closed]

$
0
0

I am using lastest version of webview and want to access iOS camera from within webview. Everything works great on Safari (e.g. page: https://davidwalsh.name/demo/camera.php), however, nothing happens inside webview. I granted needed permissions like camera or audio, however, it still does not work.

<WebView source={{ uri: 'https://davidwalsh.name/demo/camera.php' }}/>

Any ideas?

Intermittent error when running react-native ios simulator ("couldn't boot your defined simulator due to an already booted simulator")

$
0
0

Running react native project on Sierra using xCode v9.1.

Full error:
CoreData: annotation: Failed to load optimized model at path '/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Frameworks/InstrumentsPackaging.framework/Versions/A/Resources/XRPackageModel.momd/XRPackageModel 9.0.omo' We couldn't boot your defined simulator due to an already booted simulator. We are limited to one simulator launched at a time. Launching iPad Air (iOS 11.1)...

I have tried:

  • watchman watch-del-all, rm -rf node_modules && npm install, npm start -- --reset-cache
  • cleaning the project
  • restarting my computer

Some success was had with: xcrun simctl list and xcrun simctl shutdown <booted simulator id> in that the "simulator is already booted error disappeared" but the simulator still did not display.

This happens intermittently and sometimes resolves itself with (seemingly) no action on my end. This makes me think it may be a bug in xCode or react-native? I'm at a loss at this point as to what to do to solve this issue.

Xcode - Failed to create provisioning profile - without device

$
0
0

I run Mojave OS on VirtualBox (Windows) to develop React Native App. When I try build app in Xcode v10.3 to submit to Testflight, AppStore, etc.

Steps:

  • 1) Devices:

enter image description here

  • 2) Build

enter image description here

I've next error:

enter image description here

the problem? I haven't a iOS device to register. Any idea how to fix it?

React Native External Stylesheet

$
0
0

Is there a way in React Native that I can put all of my styles in a single file so it can easily be maintained (from my perspective) like in HTML we have a .css file.

And also I have a module where there are different styles based on a current user.

React Native - How to make KeyboardAvoidingView inside a ScrollView work for all devices?

$
0
0

enter image description here

I am building a chat UI in react native and am having an issue with using KeyboardAvoidingView inside of a ScrollView. When selecting the TextInput the height between the input field and keyboard seems to vary based on the device I am using. How do I standardize this so that it works equally for all devices?

import React from 'react'
import { StyleSheet, View, Text, TextInput, ScrollView, KeyboardAvoidingView, Platform } from 'react-native'
import Message from './message'


export default class Messages extends React.Component {
  static navigationOptions = ({ navigation }) => ({
    headerTitle: 'Messages',
    headerStyle: {
      backgroundColor: 'rgb(0,0,0)',
    },
    headerTitleStyle: {
      fontSize: 20,
      color: 'rgb(255,255,255)'
    },
    headerTintColor: 'rgb(0,122,255)',
  })

  state = {
    messages: [
      {
        message: 'yeah its not working',
        userId: 1,
        userName: 'Client'
      },
      {
        message: 'what isnt working...',
        userId: 2,
        userName: 'Sean'
      },
      {
        message: 'it, all of it',
        userId: 1,
        userName: 'Client'
      },
      {
        message: 'were on it',
        userId: 3,
        userName: 'Matt'
      },
      {
        message: 'fjdklsajfklsdjafkdjslkafjkdsjal;fdks;lajfdklsjldjskfja;sfjasdfjasdjlkfaj',
        userId: 3,
        userName: 'Matt'
      },
      {
        message: 'great!',
        userId: 1,
        userName: 'Client'
      },
      {
        message: 'blah',
        userId: 1,
        userName: 'Client'
      },
      {
        message: 'derp',
        userId: 2,
        userName: 'Sean'
      },
      {
        message: 'merh!',
        userId: 2,
        userName: 'Sean'
      },
       {
        message: 'help pls',
        userId: 2,
        userName: 'Sean'
      },
    ]
  }

  renderMessages = (messages) => {
    return messages.map((data, i) => <Message data={data} key={i}/>)
  } 

  render() {
    return (
      <ScrollView 
        style={styles.container}
        ref={ref => this.scrollView = ref}
        onContentSizeChange={(contentWidth, contentHeight)=> {this.scrollView.scrollToEnd({animated: true})}}
      >
        <KeyboardAvoidingView
          behavior={Platform.OS == 'ios' ? "position" : null}
        >
          <View>
              {this.renderMessages(this.state.messages)}
              <View style={styles.textBox}>
                <TextInput 
                  style={styles.textInput}
                  placeholder='Reply...'
                  placeholderTextColor={'rgb(216,216,216)'}
                  returnKeyType='done'
                  autoCapitalize='none'
                  selectionColor='#3490dc'
                  multiline={true}
                  blurOnSubmit={true}
                />
              </View>  
          </View>
        </KeyboardAvoidingView>
      </ScrollView>
      )
  }
}



const styles = StyleSheet.create({
    container: {
        //flex: 1,
        backgroundColor: 'rgb(0,0,0)'
    },
    textInput: {
        color: 'rgb(255,255,255)',
        fontSize: 18,
    },
    textBox: {
      borderColor: '#242F39',
      borderWidth: 2,
      borderRadius: 2, 
      padding: 10,
      paddingLeft: 16,
      marginTop: 10,
      backgroundColor: '#0A151F'
    }
})

React-Native WebView iFrame audio persists even after component is unmounted

$
0
0

I'm embedding a live-stream in an iFrame that is inside of a react-native WebView. I'm positive that the WebView stops being rendered when the component unmounts, and I have it set up as follows:

{ showingStream ? (
          <View
            style={{
              backgroundColor: colors.black,
              height: viewHeight,
            }}
          >
            // WebView inside of here
          </View>
      ) : null }

The issue is that, when showingStream is set to false, and the component stops being rendered, which is definitely happening, the audio continues to play. I can see the audio stream in the iOS music dropdown.

Is there any way to end the audio when the WebView stops rendering?

I've even considering trying to play a short audio byte that overrides the iOS audio and then ends.

Any help would be much appreciated.

How to develop with local podspec project

$
0
0

ios noob here. I have a react-native app and I wrote a native module (private).

now I want to use it. in my app's podfile I've defined the module to be taken from node_modules, but in the module's podspec file I need to define source so I've wrote : s.source = {:path => "./ios"}.

Apparently this is not supported in cocoapods for a long time. this fails with Unsupported download strategy '{:path=>"./ios"}'.

Any help for how can I make this work will be appreciated. Thanks


What is the meaning of 'No bundle URL present' in react-native?

$
0
0

When I run a react-native project, I get a error no bundle URL present , but I don't know what mistakes I do, I was very confused.

enter image description here

how can i reduce expo build ios size, it is around 188 MB,

$
0
0

I have successfully run the expo build: ios command but the resultant IPA file is close to 188MB which is really strange as the app has only a few pages with listViews etc. What may be the reason for such a huge size? The same build size for Android is only about 22MB.

React Native can not build and run by Xcode10

$
0
0

New react native project can react-native run-ios to run on device but can not run by xcode 10.

It gets the error when I build the project.

ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/DoubleConversion'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/Folly'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-Core'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-DevSupport'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTActionSheet'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTAnimation'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTBlob'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTImage'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTLinking'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTNetwork'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTSettings'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTText'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTVibration'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTWebSocket'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-cxxreact'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-fishhook'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-jsi'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-jsiexecutor'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-jsinspector'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/glog'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/yoga'
ld: library not found for -lDoubleConversion

I need to add some native modules in ios but now I get the problem with building the project in xcode10.

As I know, the ios project uses cocoapods then I try deleting the podfile.lock and run pod install again but it did not work.

I also tried delete node_modules folder and run yarn install again but still get problem.

I expect to build it and can run from xcode. Now it only can run by command react-native run-ios

Install a PFX/SSL certificate downloaded from the server on Android/iOS device in a React Native app?

$
0
0

I am building a React Native application that downloads an SSL certificate file or a PFX from the server or a remote file storage. After getting this file, I want to install this certificate onto the device so that only my app can access it. I want to use this certificate to facilitate secure API calls to another server that talks HTTPS. I am assuming that I should use the Keychain on iOS and Keystore on Android for storing the certificate but I am not sure if it enables me to store a PFX. And after storing it, how do I use it for the API calls that I make subsequently?

How do you hide the warnings in React Native iOS simulator?

$
0
0

I just upgraded my React Native and now the iOS simulator has a bunch of warnings. Besides fixing them, how do I hide these warnings so that I can see what's underneath?

Viewing all 16566 articles
Browse latest View live


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