Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RNPermissions is null only on iPhone 8 simulator device #417

Closed
csilzen opened this issue Feb 25, 2020 · 3 comments
Closed

RNPermissions is null only on iPhone 8 simulator device #417

csilzen opened this issue Feb 25, 2020 · 3 comments

Comments

@csilzen
Copy link

csilzen commented Feb 25, 2020

image

Bug

Works fine on iPhone 11 and iPhone 11 Pro Max simulator devices (both iOS 13.3). However, when switching to iPhone 8 running iOS 13.3, keep seeing this error.

Info.plist includes

<key>NSCalendarsUsageDescription</key>
<string>Calendar Access Notice: selected event will be added to your device calendar</string>

Podfile includes

permissions_path = '../node_modules/react-native-permissions/ios'
 # (I have also tried with this uncommented)
 # pod 'RNPermissions', :path => "../node_modules/react-native-permissions/RNPermissions.podspec"
pod 'Permission-Calendars', :path => "#{permissions_path}/Calendars.podspec"

I have done xcode clean, rm -rf node_modules, pod cache clean, and reinstalled/relinked everything (npm i, pod install, react-native link). Not sure what to do anymore.

Environment info

React native info output:

System:
    OS: macOS Mojave 10.14.5
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 51.14 MB / 32.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
    Yarn: 1.12.3 - /usr/local/bin/yarn
    npm: 6.9.0 - ~/.nvm/versions/node/v10.16.3/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 26, 27, 28, 29
      Build Tools: 28.0.3, 29.0.2
      System Images: android-28 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 11.3/11C29 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.8.6 => 16.8.6 
    react-native: ^0.60.6 => 0.60.6

Library versions: react-native-cli: 2.0.1l, react-native: 0.60.6

Steps To Reproduce

  1. When app is running on iPhone 11 simulator, go to Hardware -> Device -> iOS 13.3 -> iPhone 8.
  2. Metro Bundler reloads as excpected. Dependency graph runs as expected. No errors shown on Metro Bundler.
  3. Errors shown on simulator (photo above).
  4. I have done xcode clean, rm -rf node_modules, pod cache clean, and reinstalled/relinked everything (npm i, pod install, react-native link). Not sure what to do anymore.

Describe what you expected to happen:

  1. See the app load without errors on device
@mikehardy
Copy link

Use react-native-clean-project?

@zoontek
Copy link
Owner

zoontek commented Feb 26, 2020

@csilzen Like @mikehardy said, try using react-native-clean-project (to delete Xcode stale data, like the DerivedData folder): npx react-native-clean-project --remove-iOS-build --remove-iOS-pods

it's also accessible if you go in the Xcode menu > Preferences > Locations > and you click on the little arrow to open the folder, delete its content.

Screenshot 2020-02-26 at 10 01 04

@csilzen
Copy link
Author

csilzen commented Feb 27, 2020

Thanks for you responses! For whatever reason, switching to a different version of node and then switching back helped. Next time I'll try running react-native-clean-project

@csilzen csilzen closed this as completed Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants