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

React Native version mismatch 0.59.1 > 0.61.2

$
0
0

After upgrading react-native from 0.59.10 to 0.61.2 the app does not load. It's stuck on the splash screen and giving me a version mismatch.

XCode logs showing:

JavaScript version: 0.59.1
Native version: 0.61.2-undefined

(I find the 'undefined' part above also quite strange)

I've tried the following:

  • Removing node modules;
  • Removing Pods and reinstalling;
  • watchman watch-del-all && react-native start --reset-cache;
  • Checked through my project for any 0.59.10 versions (nothing found);
  • Made sure all my terminal windows were closed;
  • Used react-native-clean-project;
  • Uninstalled app in Simulator;
  • Reinstalled the Xcode simulator.

package.json

{
  "name": "-",
  "ios_version": "1.2.21",
  "android_version": "1.2.21",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint .",
    "clean": "react-native-clean-project"
  },
  "dependencies": {
    "@react-native-community/async-storage": "^1.2.1",
    "@react-native-community/netinfo": "^3.2.1",
    "axios": "^0.18.0",
    "bugsnag-react-native": "^2.23.2",
    "d3-scale": "^3.0.0",
    "d3-shape": "^1.3.5",
    "i18n-js": "^3.3.0",
    "lodash.memoize": "^4.1.2",
    "lottie-ios": "^3.1.3",
    "lottie-react-native": "^3.2.1",
    "moment": "^2.24.0",
    "native-base": "^2.12.1",
    "prettier": "^1.17.1",
    "prop-types": "^15.7.2",
    "qs": "^6.7.0",
    "react": "16.9.0",
    "react-devtools-core": "github:msand/react-devtools-core#4c30959",
    "react-native": "0.61.2",
    "react-native-clean-project": "^3.2.4",
    "react-native-code-push": "^5.6.1",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-localize": "^1.1.4",
    "react-native-onesignal": "^3.4.2",
    "react-native-permissions": "^2.0.2",
    "react-native-rate": "^1.1.7",
    "react-native-restart": "0.0.12",
    "react-native-safari-view": "^2.1.0",
    "react-native-shimmer-placeholder": "^1.0.30",
    "react-native-splash-screen": "^3.2.0",
    "react-native-svg": "^9.3.5",
    "react-native-svg-charts": "^5.2.0",
    "react-native-touch-id": "^4.4.1",
    "react-navigation": "4.0.10",
    "react-redux": "^6.0.1",
    "redux": "^4.0.1",
    "redux-axios-middleware": "^4.0.0",
    "redux-thunk": "^2.3.0"
  },
  "devDependencies": {
    "@babel/core": "^7.6.2",
    "@babel/runtime": "^7.6.2",
    "@react-native-community/eslint-config": "^0.0.5",
    "babel-jest": "^24.9.0",
    "eslint": "^6.5.1",
    "jest": "^24.9.0",
    "metro-react-native-babel-preset": "^0.56.0",
    "react-test-renderer": "16.9.0",
    "eslint-config-rallycoding": "^3.2.0",
    "reactotron-react-native": "^3.6.4",
    "reactotron-redux": "^3.1.1"
  },
  "jest": {
    "preset": "react-native"
  },
  "rnpm": {
    "assets": [
      "./src/assets/fonts/"
    ]
  }
}

podfile

    platform :ios, '9.0'
    require_relative '../node_modules/@react-native-community/cli-platform- 
    ios/native_modules'
    project 'cryptohopperMobile',
      'Debug' => :debug,
      'Staging' => :release,
      'Release' => :release

    target '-' 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-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 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
      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 'BugsnagReactNative', path: '../node_modules/bugsnag-react-native'

      permissions_path = '../node_modules/react-native-permissions/ios'
      pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications.podspec"

      target 'OneSignalNotificationServiceExtension' do
        pod 'OneSignal', '>= 2.9.3', '< 3.0'
      end

      target '-Tests' do
        inherit! :search_paths
        # Pods for testing
      end

      use_native_modules!
    end

    target '--tvOS' do
      # Pods for tvOS
      target '-tvOSTests' do
        inherit! :search_paths
        # Pods for testing
      end
    end

react-native log-ios

    NOTE:  Most system logs have moved to a new logging system.  See log(1) for more information.
    Oct  9 09:59:50 MBP-van-Kevin com.apple.CoreSimulator.SimDevice.A503B1AD-A2E6-4B6A-8BB0-8B836CDBB65A[27392] (com.apple.intents.intents-helper) <Warning>: Unknown key for Boolean: EnableTransactions
    Oct  9 09:59:50 MBP-van-Kevin com.apple.CoreSimulator.SimDevice.A503B1AD-A2E6-4B6A-8BB0-8B836CDBB65A[27392] (com.apple.intents.intents-helper) <Warning>: Unknown key for Boolean: EnablePressuredExit
    Oct  9 09:59:50 MBP-van-Kevin com.apple.CoreSimulator.SimDevice.A503B1AD-A2E6-4B6A-8BB0-8B836CDBB65A[27392] (com.apple.uifoundation-bundle-helper) <Warning>: Unknown key for Boolean: EnableTransactions
    Oct  9 09:59:50 MBP-van-Kevin com.apple.CoreSimulator.SimDevice.A503B1AD-A2E6-4B6A-8BB0-8B836CDBB65A[27392] (com.apple.uifoundation-bundle-helper) <Warning>: Unknown key for Boolean: EnablePressuredExit
    Oct  9 09:59:50 MBP-van-Kevin com.apple.CoreSimulator.SimDevice.A503B1AD-A2E6-4B6A-8BB0-8B836CDBB65A[27392] (com.apple.mobileslideshow.PhotosFileProvider[28289]) <Error>: assertion failed: 18G87: launchd_sim + 63769 [8D9B6CF1-070B-38FD-B74A-774E187D3032]: 0x16
    Oct  9 10:00:50 MBP-van-Kevin druid[28917] <Error>: assertion failed: 18G87 16G73: libxpc.dylib + 80528 [5846A329-63C0-3B4F-BC91-F30AF4CA6E30]: 0x7d
    Oct  9 10:00:50 MBP-van-Kevin Unknown[28917] <Error>:
    Oct  9 10:00:52 MBP-van-Kevin launchd_sim[27392] <Notice>: BUG in libdispatch client: mach_recv, monitored resource vanished before the source cancel handler was invoked { 0x7fb270a0bfa0[source], ident: 257795 / 0x3ef03, handler: 0x10b03c2d6 }
    Oct  9 10:01:07 MBP-van-Kevin cryptohopper_mobile[29274] <Error>: assertion failed: 18G87 16G73: libxpc.dylib + 80528 [5846A329-63C0-3B4F-BC91-F30AF4CA6E30]: 0x7d
    Oct  9 10:01:07 MBP-van-Kevin Unknown[29274] <Error>:

XCode logs

    2019-10-09 10:03:36.746016+0200 cryptohopper_mobile[31428:128970] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
    2019-10-09 10:03:36.900263+0200 cryptohopper_mobile[31428:128970] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/kevinetore/Library/Developer/CoreSimulator/Devices/3356B7C4-EFA4-4639-B6EA-631D56E67BB5/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
    2019-10-09 10:03:36.900578+0200 cryptohopper_mobile[31428:128970] [MC] Reading from private effective user settings.
    2019-10-09 10:03:36.917791+0200 cryptohopper_mobile[31428:129053] App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
    2019-10-09 10:03:36.917908+0200 cryptohopper_mobile[31428:129053] Cannot start load of Task <2C82020D-9EB0-4B61-B918-E0495956134D>.<1> since it does not conform to ATS policy
    2019-10-09 10:03:36.918088+0200 cryptohopper_mobile[31428:129051] Task <2C82020D-9EB0-4B61-B918-E0495956134D>.<1> finished with error - code: -1022
    2019-10-09 10:03:36.960 [info][tid:main][RCTRootView.m:293] Running application cryptohopper_mobile ({
        initialProps =     {
        };
        rootTag = 1;
    })
    2019-10-09 10:03:36.967546+0200 cryptohopper_mobile[31428:128970] ERROR: Error! iOS Simulator does not support push! Please test on a real iOS device. Error: Error Domain=NSCocoaErrorDomain Code=3010 "remote notifications are not supported in the simulator" UserInfo={NSLocalizedDescription=remote notifications are not supported in the simulator}
    2019-10-09 10:03:37.099 [error][tid:com.facebook.react.JavaScript] React Native version mismatch.

    JavaScript version: 0.59.1
    Native version: 0.61.2-undefined

    Make sure that you have rebuilt the native code. If the problem persists try clearing the Watchman and packager caches with `watchman watch-del-all && react-native start --reset-cache`.
    2019-10-09 10:03:37.148 [error][tid:com.facebook.react.JavaScript] undefined is not an object (evaluating 's.Manager')
    2019-10-09 10:03:37.150 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: undefined is not an object (evaluating 's.Manager')
    2019-10-09 10:03:37.152 [error][tid:com.facebook.react.JavaScript] Module AppRegistry is not a registered callable module (calling runApplication)
    2019-10-09 10:03:37.201 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Module AppRegistry is not a registered callable module (calling runApplication)

react-native run-ios

warn Your project is using deprecated "rnpm" config that will stop working from next release. Please use a "react-native.config.js" file to configure the React Native CLI. Migration guide: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
warn The following packages use deprecated "rnpm" config that will stop working from next release:
  - react-native-code-push: https://microsoft.github.io/code-push
Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide.
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
  - bugsnag-react-native (to unlink run: "react-native unlink bugsnag-react-native")
This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink <dependency>" and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers.
Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
info Found Xcode workspace "cryptohopperMobile.xcworkspace"
info Building (using "xcodebuild -workspace cryptohopperMobile.xcworkspace -configuration Debug -scheme cryptohopperMobile -destination id=A503B1AD-A2E6-4B6A-8BB0-8B836CDBB65A -derivedDataPath build/cryptohopperMobile")
............................................................
info Installing "build/cryptohopperMobile/Build/Products/Debug-iphonesimulator/cryptohopper_mobile.app"
info Launching "com.cryptohopper"
success Successfully launched the app on the simulator

react-native info

Binaries:
    Node: 12.11.1 - /usr/local/bin/node
    npm: 6.11.3 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5522156
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0
    react-native: 0.61.2 => 0.61.2
  npmGlobalPackages:
    react-native-cli: 2.0.1

Any help is welcome if you need any more information please ask.

Update

It seems to be an Xcode Simulator debug mode issue. When I set the app with stage set to release and launch it on an actual device/simulator, it builds correctly.


Realm react-native Cannot find module 'fs-extra'

$
0
0

I'm getting this error while running on iOS Simulator. I tried many solutions but none works.

Error: Cannot find module 'fs-extra'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/local/lib/node_modules/realm/scripts/download-realm.js:21:12)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
Command /bin/sh failed with exit code 1


** BUILD FAILED **


The following build commands failed:
    PhaseScriptExecution Download\ Core /MyProject/ios/build/MyProject/Build/Intermediates.noindex/RealmJS.build/Debug-iphonesimulator/RealmJS.build/Script-F63FF2C51C12462600B3B8E0.sh

Even I tried to run Realm on empty new project but still the issue remains same.

It will be great if anyone encountered this issue.

More information

Realm JavaScript 3.3.0

react-native-cli: 2.0.1

react-native: 0.61.2

React native face detection not working for me (iOS)

$
0
0

I am trying to build a face detection module in objective-c using react native. I am using onFacesdetected from react native. But it is not working for me. Below is the code :

<RNCamera
        ref={ref => {
          this.camera = ref;
        }}
        style = {styles.preview}
        type={RNCamera.Constants.Type.front}
        flashMode={RNCamera.Constants.FlashMode.off}
        faceDetectionMode={RNCamera.Constants.FaceDetection.Mode.fast}
        onFacesDetected={(d)=>{console.log('onFacesDetected',d);}}
        permissionDialogTitle={'Permission to use camera'}
        permissionDialogMessage={'We need your permission to use your camera phone'}
        onGoogleVisionBarcodesDetected={({ barcodes }) => {
          console.log(barcodes)
        }}
    />

When the camera opens for the first time it prints 'onFacesDetected', { type: 'face', faces: [], target: 27 } after that upon bringing the face in front of camera it does nothing.

Any help would be appreciated.

Can I use react-native app's AppDelegate in ios module?

$
0
0

I am writing iOS SDK wrapper for react native. And the SDK guide gave me the code :

-(void)didClickOpenOfferwallBtn 
{
    [AdPopcornOfferwall openOfferWallWithViewController:self delegate:self userDataDictionaryForFilter:nil];
    [AdPopcornOfferwall shared].delegate = self;
}

So I think if I can get my react-native App's AppDelegate, (like Androids's getReactApplicationContext or getCurrentActivity functions) I can run the code inside of react-native ios module.

Are there some methods to get my current app's AppDelegate in React Native module?

How to know, when did my app focused or unfocused- react native?

$
0
0

I am developing a react-native app.

In one of the screens, there is a button, clicking on which, an email is sent to the user and the default email app is opened.

Now, the email contains a link, clicking on which, the user comes back to my app.

How can I know that the user has come back to my app from the email app?

React life-cycle methods like:

componentDidMount and componentDidUpdate

are not working.

How can call a ViewController class on native ıos when react-native app view load?

$
0
0

I want create an react-native app. In this app, ı want to use my swift code. When react-native app view loaded an ios device ı want to call my swift code like native ıos app.

Thanks

react-native ios Podfile issue with "use_native_modules!"

$
0
0

In my react-native project (react-native@0.60) in the ios/ dir I run pod install and get this error:

[!] Invalid `Podfile` file: no implicit conversion of nil into String.

 #  from /Users/coryrobinson/projects/hhs2/ios/Podfile:37
 #  -------------------------------------------
 #  
 >    use_native_modules!
 #  end
 #  -------------------------------------------

I haven't added or changed anything in this Podfile - it's all react-native generated. (I'm not experienced in iOS dev so this might be a simple fix, I just don't know what to look for :-|) Thanks for any help!

Here is my Podfile

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'hhs2' do
  # Pods for hhs2
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/React'
  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
  pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
  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-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
  pod 'RNFS', :path => '../node_modules/react-native-fs'

  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 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  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'

  target 'hhs2Tests' do
    inherit! :search_paths
    # Pods for testing
  end

  use_native_modules!
end

target 'hhs2-tvOS' do
  # Pods for hhs2-tvOS

  target 'hhs2-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

React Native app crashes on launch in iOS simulator with assertion failed: 18G95 16G73

$
0
0

When running my React Native app (0.61.2) through the terminal or XCode, it will crash on launch after bundle has fully loaded. The only clue is from react-native log-ios to get a glimpse of why it's crashing.

<Error>: assertion failed: 18G95 16G73: libxpc.dylib + 80528 [5846A329-63C0-3B4F-BC91-F30AF4CA6E30]: 0x7d
Unknown[5116] <Error>:

The most XCode gives me before the crash of the app on launch is:

2019-10-29 17:33:41.028898+0800 my_app[6277:117010] [AppCenterCrashes] WARNING: -[MSCrashes configureCrashReporterWithUncaughtExceptionHandlerEnabled:]/656 Detecting crashes is NOT enabled due to running the app with a debugger attached.
2019-10-29 17:33:41.035744+0800 my_app[6277:117010] [AppCenter] WARNING: -[MSAuthTokenContext authTokenHistory]/210 Failed to retrieve history state or none was found.
2019-10-29 17:33:41.035901+0800 my_app[6277:117010] [AppCenter] WARNING: -[MSAuthTokenContext setAuthTokenHistory:]/225 Failed to save new history state.

In the terminal, it is simply being started with react-native run-ios. This is an ejected app.

This works in the Android emulator, but it crashes on iOS. To be clear, creating a build for deployment works as well with this exact codebase (we utilize App Center for building and deployment). Only difference is the node version is 8 on App Center whereas locally it's 12.

What I've tried so far is:

  1. Removing node_modules and pods folder completely

  2. Clearing haste cache with rm -rf /tmp/haste-map-react-native-package-*

  3. Reset metro bundler cache rm -rf /tmp/metro-bundler-cache-*

System setup is as follows:

System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
    Memory: 40.67 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.6.0 - /usr/local/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5692245
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.2 => 0.61.2 
  npmGlobalPackages:
    react-native-cli: 2.0.1

To note, another React Native project albeit at version 0.60 has no issues running in the same simulator in XCode.

Expected output

The app should run without crashing in the iOS simulator when running the command react-native run-ios. At the very least the crash should have an identifiable stacktrace but right now I can't even obtain that.

Are there any other steps I can try to further identify where the issue originates from?

If there is a way to to enable Debug JS Remotely before even starting the app to maybe capture a glimpse of the issue in the debugger would also be a great help but this does not seem to be possible.


React Native two drawers on one screen

$
0
0

I have an app that needs to be able to use two drawer navigators, one on the left and on on the right side of the header.

I am at the point where I can get both drawers to open with the slide gesture, however I need to be able to open it programmatically. I have found the navigation.openDrawer() function only works with one of the drawers and not the other because it is only able to use one of the navigation props (whichever comes first) from my drawer navigators.

Below are my rendering functions:

const LeftStack = createStackNavigator(
  {
    LeftDrawerStack
  },
  {
    navigationOptions: ({navigation}) => ({
      headerLeft: (<TouchableOpacity onPress={() => navigation.openDrawer()}><Icon style={{marginLeft: 10}} name='menu'/></TouchableOpacity>
      )
    })
  }
);

const RightStack = createStackNavigator(
  {
    RightDrawerStack
  },
  {
    navigationOptions: ({navigation}) => ({
      headerRight: (<TouchableOpacity onPress={() => navigation.openDrawer()}><Icon style={{marginRight: 10}} name='ios-bulb'/></TouchableOpacity>
      )
    })
  }
);

export const RouteStack = createStackNavigator(
  {
    screen: LoginScreen,
    navigationOptions: ({navigation}) => ({
      header: null
    }),
    LeftStack,
    RightStack
  }
);

and here are my drawer routes:

export const LeftDrawerStack = createDrawerNavigator(
  {
    Dashboard: {
      screen: DashboardScreen
    },
    History: {
      screen: HistoryScreen
    },
    Privacy: {
      screen: PrivacyPolicyScreen
    },
    TermsAndConditions: {
      screen: TermsAndConditionsScreen
    }
  }, {
    initialRouteName: 'Dashboard',
    contentComponent: LeftDrawerScreen
  }
);

export const RightDrawerStack = createDrawerNavigator(
  {
    LeftDrawerStack,
    Settings: {
      screen: SettingsScreen
    }
  }, {
    drawerPosition: 'right',
    contentComponent: RightDrawerScreen
  }
);

Here is a picture of what I have the navigation looking like so far, however both of the hamburger menus are opening up the same menu on the right instead of one menu on their respective sides.

layout picture

I may be missing some parts but I will be sure to post more info if I forgot any!

How to create full width image splash screen for react native ios app in xcode

$
0
0

My application require a splash screen with a round logo in the middle , the background has some design overlays, So I need the splash screen as a full screen image. I have reffered several post but could not find out how to create the splash screen to fit different screen resolution.

I have created 3 images as Default.png (414 x 736) Default@2x.png (1080 x 1920) and Default@3x.png (2048 x 2732) And I have used LaunchScreen.xib for implementing my splash screen with an outer UIView and an inner UIImageView with an intention for holding the Default.png image as full screen. In emulator, some of the devices shows blank spaces horizontally and in tab vertically.

I think I need to add more images for different resolutions. Can somebody help me to get rid of this issue of adding full screen splash image

What does "spreading one original pixel into multiple ones" mean in React Native?

$
0
0

I'm reading this article on the PixelRatio class in React Native. It says "iOS tries to be as faithful as possible to the user value by spreading one original pixel into multiple ones to trick the eye".

What does this mean? Does it mean that if you set something to be 1.9 in size, it will "spread" the element to be 2 pixels? If so, would it round 1.4px down to 1px?

Dismiss a React Native RCTRootView back to a Native ViewController

$
0
0

I'm creating an app to integrate react-native with an existing Swift app.

I've looked into similar issues:

While following different tutorials:

And the official docs

The problem is: all of them are outdated (but the docs). Most of them use the legacy Navigation rather than Stack Navigator. One of the tutorials (the one with an asterisk) shows how to dismiss the React Native app back to the Native app using the rootTag of the app, but again, this was done with the legacy Navigation.

If I try to do the same, I'm not able to see the props from my app.

I have a single Storyboard with a Button inside that when clicked calls this UIViewController:

ButtonController

import Foundation
import UIKit
import React

class ButtonController: UIViewController  {
    @IBOutlet weak var button: UIButton!

    @IBAction func buttonClicked(_ sender: Any) {
        let data:[String : String] = ["onNavigationStateChange": "{handleNavigationChange}",
                                      "uriPrefix":"/app"];
        let rootView = MixerReactModule.sharedInstance.viewForModule("ReactNativeApp", initialProperties: data)

        let viewController = UIViewController()
        viewController.view = rootView
        self.present(viewController, animated: true, completion: nil)
    }
}

And when I start the app I can see this:

2019-10-23 10:29:30.021 [info][tid:com.facebook.react.JavaScript] Running "ReactNativeApp" with {"rootTag":1,"initialProps":{"uriPrefix":"/app","onNavigationStateChange":"{handleNavigationChange}"}}

But when I try to access the this.props property on React Native code I get undefined.

index.js

import HomeScreen from './components/HomeScreen'
import {AppRegistry} from 'react-native';
import {createAppContainer} from 'react-navigation';
import {createStackNavigator} from 'react-navigation-stack';

const MainNavigator = createStackNavigator({
  Home: {screen: HomeScreen}
}, {
  initialRouteName: 'Home'
})

const NavigationApp = createAppContainer(MainNavigator);

AppRegistry.registerComponent('ReactNativeApp', () => NavigationApp)

console.log("NANANA1", this)
console.log("NANANA2", this.routeName)
console.log("NANANA3", MainNavigator)
console.log("NANANA4", MainNavigator.props)
console.log("NANANA5", NavigationApp)
console.log("NANANA6", NavigationApp.props)

export default NavigationApp

HomeScreen.js

import React from 'react';
import {Text, View, Button, NativeModules} from 'react-native';

var RNBridge = NativeModules.RNBridge;

export default class HomeScreen extends React.Component {
    static navigationOptions = {
      headerTitle: () => (
        <Text>'Welcome'</Text>
      ),
      headerLeft: () => (
        <Button title="Dismiss" onPress={() => {
          console.log("WOLOLO: ", RNBridge)
          console.log("ROGAN: ", this._reactInternalFiber.tag)
          RNBridge.dismissPresentedViewController(this._reactInternalFiber.tag)
          // RNBridge.dismissPresentedViewController(1)
        }}/>
      )
    };
    render() {
      console.log('KIKIKI', this._reactInternalFiber.tag)
      console.log("MMMMMMM: ", this.props)
      return (
        <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
          <Text>Home Screen</Text>
        </View>
      );
    }
}

These are the 2 files that I use in RN to generate my View. I've tried many things to get the rootTag value, and the only one that seems to provide this value is (tag and rootTag on XCode are the same (1))

this._reactInternalFiber.tag

But I don't know how to send these values to my headerLeft method to use the same tag so that when I press the Dismiss button it calls the Swift code for dismissPresentedViewController.

How can I dismiss my VC effectively? Or at least get the rootTag being passed from Swift to my headerLeft() method?

I'm using these versions of react-native:

react-native-cli: 2.0.1
react-native: 0.61.2

Failed to run react-native run-ios in new project?

$
0
0

I'm tired to run a new react native app, I'm using CLI to init the project

but after running "react-native init new app" I got this message

Error: Failed to install CocoaPods dependencies for the iOS project, which is required by this template. Please try again manually: "cd ./firstApp/ios && pod install".

and I'm doing that, but I can't solve it cuz when I run pod install I Got this Error

[!] Unable to find a specification for boost-for-react-native depended upon by Folly You have either: * out-of-date source repos which you can update with pod repo update or with pod install --repo-update. * mistyped the name or version. * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, pod repo update does not happen on pod install by default.

and following all these commands "pod install --repo-update OR pod repo update" and still the error

[!] CocoaPods was not able to update the master repo. If this is an unexpected issue and persists you can inspect it running pod repo update --verbose

So how can I solve it?

After upgrading to React Native 0.60.5 iOS release build gives "No bundle URL present" error

$
0
0

I've just updated my project from React Native 0.59.9 to 0.60.5 with react-native upgrade and the update helper mentioned in the official blog post. Although my project is already a little "complex" because it's using some libraries etc. it seemed the update was successful.

But unfortunately my app won't work with the Test - Release scheme anymore. On the debug scheme it works without any problems. The release also reaches the "Build succeeded" status, but as soon the app launches it's stuck because of the "No bundle URL present" error (see also my attached Xcode screenshot).

I've tried everything I could find on the internet so far. Re-installing the NPM dependencies and Pods; removing the build folder, changing the NSAppTransportSecurity in the Info.plist, but it won't resolve the issue.. The deployed app via TestFlight breaks as well on startup.

React Native info

System:
    OS: macOS 10.14.6
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 430.30 MB / 8.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 10.11.0 - ~/.nvm/versions/node/v10.11.0/bin/node
    Yarn: 1.10.1 - /usr/local/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v10.11.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
    Android SDK:
      API Levels: 23, 26, 28, 29
      Build Tools: 28.0.3, 29.0.0
      System Images: android-29 | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5522156
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0
    react-native: 0.60.5 => 0.60.5
  npmGlobalPackages:
    react-native-cli: 2.0.1

Steps To Reproduce

  1. Update react-native from 0.59.9 to 0.60.5
  2. Remove node_modules, ios/Pods, ios/build and Podfile.lock
  3. Re-install node_modules and run pod install
  4. Open Project.xcworkspace
  5. Select the scheme "Project - Test" go to "Edit scheme > Run > Build Configuration" and change the scheme to "Test - Release"
  6. Build the project (on device or simulator, doesn't matter)
  7. "Build succeeded" and app starts
  8. App is stuck on splash screen and Xcode shows the error as in the attached screenshot

Files / Code

Currently these are my Info.plist, Podfile and package.json:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleDisplayName</key>
    <string>Jobner</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>$(PRODUCT_NAME)</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>2</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
        <key>NSExceptionDomains</key>
        <dict>
            <key>localhost</key>
            <dict>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
            </dict>
        </dict>
    </dict>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>armv7</string>
    </array>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
    </array>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
    <key>UIStatusBarHidden</key>
    <true/>
    <key>ITSAppUsesNonExemptEncryption</key>
    <false/>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>Your location is required for searching jobs near you</string>
    <key>NSLocationAlwaysUsageDescription</key>
    <string>Your location is required for searching jobs near you</string>
  <key>LSApplicationQueriesSchemes</key>
  <array>
    <string>whatsapp</string>
  </array>
</dict>
</plist>
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

project 'Project',
  'Prod - Debug' => :debug,
  'Acc - Debug' => :debug,
  'Test - Debug' => :debug,
  'Prod - Release' => :release,
  'Acc - Release' => :release,
  'Test - Release' => :release

target 'Project' do
  # Pods for Project
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/React'
  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
  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-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'

  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 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  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'

  target 'ProjectTests' do
    inherit! :search_paths
    # Pods for testing
  end

  use_native_modules!
end
{
  "name": "project",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "react-native start",
    "lint": "eslint --ext .jsx --ext .js src/",
    "ios": "react-native run-ios --scheme \"Project - Test\" --configuration \"Test - Debug\"",
    "android": "ENVFILE=.env.dev react-native run-android --variant=devDebug --appIdSuffix=dev",
    "postinstall": "npx jetify"
  },
  "dependencies": {
    "@aws-amplify/auth": "1.2.31",
    "@aws-amplify/core": "1.1.0",
    "@babel/polyfill": "7.4.4",
    "@react-native-community/async-storage": "1.6.1",
    "accounting": "0.4.1",
    "amazon-cognito-identity-js": "3.0.15",
    "cross-fetch": "3.0.4",
    "dayjs": "1.8.15",
    "iban": "0.0.12",
    "prop-types": "15.7.2",
    "qs": "6.7.0",
    "react": "16.9.0",
    "react-geocode": "0.1.2",
    "react-native": "0.60.5",
    "react-native-android-keyboard-adjust": "^1.2.0",
    "react-native-bootsplash": "1.0.1",
    "react-native-config": "luggit/react-native-config#master",
    "react-native-datepicker": "1.7.2",
    "react-native-device-info": "2.3.2",
    "react-native-gesture-handler": "1.3.0",
    "react-native-keyboard-aware-scroll-view": "0.9.1",
    "react-native-keyboard-spacer": "^0.4.1",
    "react-native-linear-gradient": "2.5.6",
    "react-native-pdf": "5.1.4",
    "react-native-svg": "9.8.4",
    "react-navigation": "3.11.0",
    "react-redux": "7.1.1",
    "redux": "4.0.4",
    "redux-devtools-extension": "2.13.8",
    "redux-thunk": "2.3.0",
    "reselect": "^4.0.0",
    "rn-fetch-blob": "0.10.16",
    "styled-components": "4.3.2"
  },
  "devDependencies": {
    "@babel/core": "7.5.5",
    "@babel/plugin-proposal-export-default-from": "7.5.2",
    "@babel/plugin-proposal-export-namespace-from": "7.5.2",
    "@babel/plugin-syntax-dynamic-import": "7.2.0",
    "@babel/runtime": "7.5.5",
    "babel-eslint": "10.0.2",
    "babel-plugin-module-resolver": "3.2.0",
    "babel-plugin-styled-components": "1.10.6",
    "eslint": "^5.16.0",
    "eslint-config-react-app": "^4.0.1",
    "eslint-import-resolver-babel-module": "5.1.0",
    "eslint-plugin-flowtype": "3.13.0",
    "eslint-plugin-import": "2.18.2",
    "eslint-plugin-jsx-a11y": "^6.2.1",
    "eslint-plugin-react": "7.14.3",
    "eslint-plugin-react-hooks": "1.6.1",
    "eslint-plugin-react-native": "3.7.0",
    "jetifier": "^1.6.4",
    "metro-react-native-babel-preset": "0.56.0"
  },
  "xcodeSchemes": {
    "Debug": [
      "Test - Debug",
      "Acc - Debug",
      "Prod - Debug"
    ],
    "Release": [
      "Test - Release",
      "Acc - Release",
      "Prod - Release"
    ],
    "projectDirectory": "ios",
    "settings": {}
  },
  "rnpm": {
    "assets": [
      "./src/app/static/fonts/"
    ]
  }
}

The AppDelegate.m should link to the correct bundle file right? This code is in there:


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

(I posted this question/bug in the React Native issue tracker on Github as well.)

enter image description here

Edited:

I've found a solution in this Stack Overflow post. Following these steps you can create a main.jsbundle and assets folder and add it to your project.

  1. Run the following command: react-native bundle --dev false --platform ios --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ./ios
  2. Add main.jsbundle and assets directory to Xcode by dragging them in your project.

Although this feels like a temporary solution.. I've got two main.jsbundle files right now. Can I delete the one in my project folder? And the assets folder includes some node modules do I have this command every time I add new modules and manually drag the assets in my project root?

Also when I build it via CI/CD (Bitrise) there is no main.jsbundle created in the root since it is ignored by default in .gitignore. So my TestFlight builds are still failing. How to handle this?

What exactly is happening here?

enter image description here

Is there a way to call my native module interface in my app delegate?

$
0
0

I am new to ios development and I'm trying to use the Spotify SDK in my native module for my react native project. Im following the tutorial here https://developer.spotify.com/documentation/ios/quick-start/objective-c/#configure-info-plist but I'm implementing it in my native module which does not have an App delagte. I need to call my interface's function from my main projects App delegate but it does not work.

I have tried creating a shared instance to access the interfaces but each time I get the instance they are in different memory locations and the second is always null.

In my AppDelegate.m I am getting a shared instance of my controller interface in order to return the results to the instance.

- (BOOL)application:(UIApplication *)app
            openURL:(NSURL *)url
            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  return [[RNSpotifyController sharedInstance]application:app
                                                       openURL:url
                                                       options:options];

In my RNSpotifyController.m I have

- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{

    NSLog(@"%@ %@", url, options);



//    return [self.sessionManager application:RCTSharedApplication() 
    return [self.sessionManager application:application openURL:url options:options];
}

and

+ (RNSpotifyController *)sharedInstance
{
  static RNSpotifyController *_sharedInstance;
  static dispatch_once_t onceToken;
  dispatch_once(&onceToken, ^{
    _sharedInstance = [[self alloc] init];
  });
  return _sharedInstance;
}

I expect whenever I get a shared Instance it would be the same as all other instances but it is not. I just need to be able to call my interface's method from my app delegate. The shared instance is different from the initial interface that is initialized. Let me know if any more code would be helpful


How can i regenerate ios and android folder?

$
0
0

How can I regenerate ios and android folder in React Native project?

react-native-cli: 2.0.1 react-native: 0.61.2

❯ react-native eject error Unrecognized command "eject". info Run "react-native --help" to see a list of all available commands.

❯ react-native upgrade --legacy true error: unknown option `--legacy'

How can I regenerate ios folder in React Native project?

$
0
0

So a while ago I deleted the /ios directory in my react native app (let's call it X). I've been developing and testing using the android emulator but now I'd like to make sure it works on ios with xcode simulator etc.

So my current idea is to create a new react native bare project (let's call it Y) with ios folder, then follow these steps to rename Y so that it has the name of X and then moving the /ios directory from Y into X and trying to run-ios.

I'll update here how that goes, but I wondered if there is a better way and has nobody been in this situation before?

I've googled lots of things 'regenerate ios folder''deleted ios folder''add ios folder to existing..' and nothing helpful. Maybe my googlefu isn't good enough but if anyone has any suggestions, much appreciated.

Step 2 will be making sure it compiles because of dependencies and stuff but for now my goal is to just get the /ios folder back in the project and for React Native to be aware of it's existence (it has all the necessary config).

Thanks

REACT_NATIVE - Handle DeepLink from automatic side-service redirection web URL's

$
0
0

I have this use case :

-> a Website OR random native application on my phone, doing a process on it, and at the end of the flow, this application is redirecting to :

https://my-domain/com/key=value&otherKey=value.com

The problem is, the universal link is well handled (deep links works well) if I click on it (through bloc-note or whatever) and it's opening my mobile app. But for this use case, since it's not a user's click but an automatic redirection (from the side-service application), it's opening safari and not my app...

How can I handle that?

Branch.io looks not enough, since it's not a static url. Foreach redirected URL you indeed have a different key/value in the url

About 100 error in Xcode, Undefined symbols for architecture x86_64 :upgraded react-native from 0.59.1 to 0.60.5

$
0
0

I've been trying to upgrade my project and use cocoapods for ios, Whenever i build from xcode it gives me 100 error related to swift, - My project does not depends on swift - Upgraded all packages

Please find screenshot for error

PackageList Screenshot!

Xcode Error Screenshot!

Xcode Error Screenshot1!

Xcode Error Screenshot2!

I've followed below link for package upgradation react-native-community link!

Same error was found flutter! - didn't try this

# platform :ios, '9.0'

require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'


target 'test' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for test
  # Your 'node_modules' directory is probably in the root of your project,
  # but if not, adjust the `:path` accordingly
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/React'
  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
  pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTPushNotification', :path => '../node_modules/react-native/Libraries/PushNotificationIOS'
  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-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'

  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 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  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 'react-native-print', :path => '../node_modules/react-native-print'
  pod 'react-native-webview', :path => '../node_modules/react-native-webview'
  pod 'RNImageCropPicker', :path => '../node_modules/react-native-image-crop-picker'
  pod 'react-native-sqlite-storage', :path => '../node_modules/react-native-sqlite-storage'
  pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'
  pod 'react-native-netinfo', :path => '../node_modules/@react-native-community/netinfo'
  pod 'react-native-contacts', :path => '../node_modules/react-native-contacts'
  pod 'RNFS', :path => '../node_modules/react-native-fs'
  pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
  pod 'react-native-html-to-pdf', :path => '../node_modules/react-native-html-to-pdf'
  pod 'react-native-image-resizer', :path => '../node_modules/react-native-image-resizer'
  pod 'RNShare', :path => '../node_modules/react-native-share'
  pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
  pod 'RNSVG', :path => '../node_modules/react-native-svg'
  pod 'ReactNativePermissions', :path => '../node_modules/react-native-permissions'
  pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'
  pod 'lottie-ios', :path => '../node_modules/lottie-ios'

  pod 'Firebase/Core', '~> 6.3.0'

  #pod 'OneSignal', '>= 2.9.3', '< 3.0'


  # Required by RNFirebase
  pod 'Firebase/Core', '~> 6.3.0'

  #target 'OneSignalNotificationServiceExtension' do
  #  pod 'OneSignal', '>= 2.6.2', '< 3.0'
  #end

  post_install do |installer|
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'No'
      end
    end
  end

  use_native_modules!
end

target 'test-tvOSTests' do
  inherit! :search_paths
  # Pods for testing
end

target 'testTests' do
  inherit! :search_paths
  # Pods for testing
end

target 'test-tvOS' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

end```


Expecting it should have been worked easily

Having issue with react native code while running in iPhone X

$
0
0

I have been working in react native for 1 month. I have developed the react native code with Carousel framework and it is working fine in Android and iOS too. But in iOS carousel is working in all other devices except iPhoneX(items in carousel not pointing).

I am not sure whether it is functionality issue or some permission issue. Can u guys help me?

I thought that maybe I have wrongly pointed carousel item index but it is working for other devices. I have updated carousel item index in "componentDidMount"

Thanks in advance.

Viewing all 16569 articles
Browse latest View live


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