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

No Permission Handler Detected (IOS) #449

Closed
ozturkilgim opened this issue Apr 19, 2020 · 51 comments
Closed

No Permission Handler Detected (IOS) #449

ozturkilgim opened this issue Apr 19, 2020 · 51 comments

Comments

@ozturkilgim
Copy link

ozturkilgim commented Apr 19, 2020

Bug

After I have tried to install react-native-permissions package, I have faced with this error on IOS Simulator. I ignored it but it also prevented to test app on testflight.

Error

⚠ No permission handler detected.

• Check that you link at least one permission handler in your Podfile.
• Uninstall this app, delete your Xcode DerivedData folder and rebuild it.
• If you use use_frameworks!, follow the workaround guide in the project README.

-[RNPermissions constantsToExport]
RNPermissions.m:186
__32-[RCTModuleData gatherConstants]_block_invoke
RCTUnsafeExecuteOnMainQueueSync
-[RCTModuleData gatherConstants]
__49-[RCTCxxBridge _prepareModulesWithDispatchGroup:]_block_invoke
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_callback_4CF
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
UIApplicationMain
main
start
0x0

Environment info

System:
OS: macOS 10.15.2
CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
Memory: 58.15 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 10.16.3 - /usr/local/bin/node
Yarn: Not Found
npm: 6.13.7 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.8.4 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK: Not Found
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6392135
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
Languages:
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.0 => 0.62.0
npmGlobalPackages:
react-native: Not Found

My Pods:

platform :ios, '9.0'
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 Flipper
def 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
  end
end

target 'ast' do
  # Pods for ast
  permissions_path = '../node_modules/react-native-permissions/ios'
  pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways.podspec"
  pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse.podspec"
  pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary.podspec"
  pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications.podspec"
  pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary.podspec"

  
  pod 'Firebase/Messaging'
    pod 'react-native-google-places', :path => '../node_modules/react-native-google-places'
  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/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 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'

  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

  pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'

  pod 'lottie-ios', :path => '../node_modules/lottie-ios'

  pod 'react-native-google-places', :path => '../node_modules/react-native-google-places'

  pod 'RNI18n', :path => '../node_modules/react-native-i18n'

  pod 'RNIap', :path => '../node_modules/react-native-iap'

  pod 'react-native-fcm', :path => '../node_modules/react-native-fcm'

  target 'astTests' do
    inherit! :complete
    # Pods for testing
  end

  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)
  end
end

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

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

 ``` #

- [ ] 
 

 # Info.plist:

```bash
<?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>NSLocationAlwaysAndWhenInUseUsageDescription</key>
  <string>YOUR TEXT</string>
  <key>NSLocationAlwaysUsageDescription</key>
  <string>YOUR TEXT</string>
  <key>NSLocationWhenInUseUsageDescription</key>
  <key>NSPhotoLibraryUsageDescription</key>
  <string>YOUR TEXT</string>
  <key>CFBundleDevelopmentRegion</key>
  <string>en</string>
  <key>CFBundleDisplayName</key>
  <string>$(PRODUCT_NAME)</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>$(MARKETING_VERSION)</string>
  <key>CFBundleSignature</key>
  <string>????</string>
  <key>CFBundleVersion</key>
  <string>$(CURRENT_PROJECT_VERSION)</string>
  <key>LSRequiresIPhoneOS</key>
  <true/>
  <key>NSAppTransportSecurity</key>
  <dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSExceptionDomains</key>
    <dict>
      <key>https://firebasestorage.googleapis.com</key>
      <string></string>
      <key>localhost</key>
      <dict>
        <key>NSExceptionAllowsInsecureHTTPLoads</key>
        <true/>
      </dict>
    </dict>
  </dict>
  <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
  <string>YOUR TEXT</string>
  <key>NSLocationAlwaysUsageDescription</key>
  <string>YOUR TEXT</string>
  <key>NSLocationWhenInUseUsageDescription</key>
  <string></string>
  <key>NSPhotoLibraryUsageDescription</key>
  <string>YOUR TEXT</string>
  <key>UIAppFonts</key>
  <array>
    <string>AntDesign.ttf</string>
    <string>Entypo.ttf</string>
    <string>EvilIcons.ttf</string>
    <string>Feather.ttf</string>
    <string>FontAwesome.ttf</string>
    <string>FontAwesome5_Brands.ttf</string>
    <string>FontAwesome5_Regular.ttf</string>
    <string>FontAwesome5_Solid.ttf</string>
    <string>Fontisto.ttf</string>
    <string>Foundation.ttf</string>
    <string>Ionicons.ttf</string>
    <string>MaterialCommunityIcons.ttf</string>
    <string>MaterialIcons.ttf</string>
    <string>Octicons.ttf</string>
    <string>SimpleLineIcons.ttf</string>
    <string>Zocial.ttf</string>
  </array>
  <key>UIBackgroundModes</key>
  <array>
    <string>remote-notification</string>
  </array>
  <key>UILaunchStoryboardName</key>
  <string>LaunchScreen</string>
  <key>UIRequiredDeviceCapabilities</key>
  <array>
    <string>armv7</string>
  </array>
  <key>UISupportedInterfaceOrientations</key>
  <array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
  </array>
  <key>UIViewControllerBasedStatusBarAppearance</key>
  <false/>
</dict>
</plist>
@ozturkilgim ozturkilgim changed the title No Permission Handler Detected No Permission Handler Detected (IOS) Apr 19, 2020
@zoontek
Copy link
Owner

zoontek commented Apr 19, 2020

@ozturkilgim Could you, at least, request permissions in development? Try wiping your project caches with https://github.com/pmadruga/react-native-clean-project

@SamuelNitsche
Copy link

I just faced the same issue. Unfortunately wiping the project caches didn't resolve the issue.

@dubynam
Copy link

dubynam commented Apr 19, 2020

The same case

@zoontek
Copy link
Owner

zoontek commented Apr 19, 2020

Can someone create a repository with a minimal amount of code to reproduce the issue?

@zoontek
Copy link
Owner

zoontek commented Apr 19, 2020

I tried it on a fresh project with a similar setup (RN version + react-native-permissions version) without any issue. It's probably related to some additional config.

Could you please provide a screenshot of your installed Pods (precise if you use use_frameworks or not)? Like this one:

Screenshot 2020-04-19 at 20 55 21

@ozturkilgim
Copy link
Author

I have created a new project and havent install react-native-permissions. I couldn't solve it :/

@zoontek
Copy link
Owner

zoontek commented Apr 20, 2020

@ozturkilgim Could you at least awnser to my questions?

@Quynh-Nguyen
Copy link

@zoontek
Hi Zoontek.
It's seems we got the cached issue.
After I tried debug inside node_modules folder where it check variable
Screen Shot 2020-04-21 at 00 33 53
After that it's working fine again.

@zoontek
Copy link
Owner

zoontek commented Apr 20, 2020

@Quynh-Nguyen What did you do to solve it? (you only say after that)

@Quynh-Nguyen
Copy link

@Quynh-Nguyen What did you do to solve it? (you only say after that)

I throw RCTLogError for each step and after that I removed it.
Everything working well again.

@zoontek
Copy link
Owner

zoontek commented Apr 20, 2020

@Quynh-Nguyen So, definitively a Xcode caching issue. Glad you solved it!

@kimivn
Copy link

kimivn commented Apr 22, 2020

i had same issue , after that i change version to 2.0.9 and it works.

@gouravbhati
Copy link

go to
node_modules --> react-native-permission --> RNPermissions.m
in this file Search for "No permission handler detected"
and comment this line "RCTLogError(@"%@", message)"
Enjoying 😉

@mikehardy
Copy link

@gouravbhati

go to
node_modules --> react-native-permission --> RNPermissions.m
in this file Search for "No permission handler detected"
and comment this line "RCTLogError(@"%@", message)"
Enjoying 😉

So, your advice is to let people proceed with "using" this module, even though no actual permission handlers are installed, so they can't possibly use the module?

That check is vital. It lets people know they don't have it integrated correctly. If I understand correctly nothing will work if that check is triggered and developers need to know.

@organom
Copy link

organom commented Apr 25, 2020

In my particular case it was because I didn't added the right permissions in the podspec file.
After that, did pod install, then opened xcode, clean build folder and then build & run. Hope it helps someone :)

@MR03web
Copy link

MR03web commented Apr 26, 2020

At least one permission needs to be configured on iOS

@Developerusman
Copy link

Developerusman commented Apr 26, 2020

Hey there!

I have solved this problem

First thing you have to paste this code in podfile:

permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "../node_modules/react-native-permissions/ios/Camera.podspec"

and then install react-native-permissions

$ npm install --save react-native-permissions

--- or ---

$ yarn add react-native-permissions

after that, you have to paste this code in ios/appname/info.plist

NSCameraUsageDescription
Your message to user when the camera is accessed for the first time
NSMicrophoneUsageDescription
Your message to user when the microphone is accessed for the first time

and then go inside IOS folder

cd Ios

run command: pod install

after that, you have to reinstall the app and re-run the react-native server

react-native run-ios

Thanks :)

@seanbhart
Copy link

seanbhart commented Apr 27, 2020

UsmanRana77's solution works, and more detail is here: https://medium.com/@rossbulat/react-native-managing-app-permissions-for-ios-4204e2286598

If we check out the official documentation under the iOS section, each permission handler is documented individually for us to copy and paste into our own Podfile. Copy each permission you require into your Podfile, located at ios/Podfile. Here is an example of doing so:

target 'my-app' do

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

With the required permissions copied, now run pod install:

cd ios && pod install

@zoontek zoontek closed this as completed Apr 28, 2020
@zoontek
Copy link
Owner

zoontek commented Apr 28, 2020

I'm closing this since the "solutions" offered here are just the first lines of the documentation.

@whereiscode
Copy link

Every time it's the same library reporting an error, it's too difficult

@whereiscode
Copy link

@ozturkilgim Have a try , Clean up the project and build again

@heyman333
Copy link

re start node server and reinstall app solve problem

@khuznain
Copy link

khuznain commented Jun 2, 2020

RCTLogError(@"%@", message)

It least it helps me to get rid of the error pop ! and saved a lot of times

@jamesdmurphy51
Copy link

I performed everything mentioned above but am still getting same error :(

@taingmeng
Copy link

I'm using:

  • react-native: 0.59.10 without use_frameworks!
  • react-native-permissions: 2.1.5

I tried all the steps above, but I'm still facing this issue. Commenting out RCTLogError(@"%@", message) is working for me, but that's definitely not a proper solution.

@Shoukat488
Copy link

It seems that Xcode handles permissions on its own. Just simply add permissions in info.plist file in project/ios/project. Remove permissions from Podfile . It worked for me
Thank you

@Shoukat488
Copy link

After removing permission from pod run pod install

@hungvu193
Copy link

hungvu193 commented Oct 5, 2020

As @zoontek mentioned, this is xcode cache proplem .Make sure you run "pod install" after adding permission to podfile. After that, just open your ios project from xcode and press command shift K.

yarn start --reset-cache
npx react-native run-ios

@yashukla47
Copy link

At least one permission needs to be configured on iOS

How do configure it

@tycali17
Copy link

At least one permission needs to be configured on iOS

How do configure it

You can configure a permission by setting it in ios folder's info.plist and including its path in podfile after including ios permissions path. pod install after adding permission. I was able to fix no permission handler detected by doing this (with correct pod path), cleaning xcode project, deleting app from phone, and re-installing.

@daonamutc1
Copy link

Hey there!

I have solved this problem

First thing you have to paste this code in podfile:

permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "../node_modules/react-native-permissions/ios/Camera.podspec"

and then install react-native-permissions

$ npm install --save react-native-permissions

--- or ---

$ yarn add react-native-permissions

after that, you have to paste this code in ios/appname/info.plist

NSCameraUsageDescription
Your message to user when the camera is accessed for the first time
NSMicrophoneUsageDescription
Your message to user when the microphone is accessed for the first time

and then go inside IOS folder

cd Ios

run command: pod install

after that, you have to reinstall the app and re-run the react-native server

react-native run-ios

Thanks :)

In my case:
pod 'Permission-Camera', :path => "#{permissions_path}/Camera/Permission-Camera.podspec"
You can check in ../node_modules/react-native-permissions/ios and then change link

@hrdyjan1
Copy link

Hey there!

I have solved this problem

First thing you have to paste this code in podfile:

permissions_path = '../node_modules/react-native-permissions/ios' pod 'Permission-Camera', :path => "../node_modules/react-native-permissions/ios/Camera.podspec"

and then install react-native-permissions

$ npm install --save react-native-permissions

--- or ---

$ yarn add react-native-permissions

after that, you have to paste this code in ios/appname/info.plist

NSCameraUsageDescription Your message to user when the camera is accessed for the first time NSMicrophoneUsageDescription Your message to user when the microphone is accessed for the first time

and then go inside IOS folder

cd Ios

run command: pod install

after that, you have to reinstall the app and re-run the react-native server

react-native run-ios

Thanks :)

Package - react-native-permissions v3.4 didn't work for me ❌
Package - react-native-permissions v3.6 worked ✅

@zoontek
Copy link
Owner

zoontek commented Jul 18, 2022

@hrdyjan1 Nothing change on iOS between the two versions: 3.4.0...3.6.0 (proof that it's always user build cache issues / steps missed in the documentation 😄)

@chinmay4github1987

This comment was marked as duplicate.

@recepaltas
Copy link

I simple deleted ,
rm -rf /Users/mesutaltas/Library/Developer/Xcode/DerivedData
after then
react-native run-ios

It works.

And Add package.json
"scripts": { "start": "expo start --dev-client", "android": "expo run:android", "ios": "expo run:ios", "web": "expo start --web", "postinstall": "npx react-native setup-ios-permissions && pod-install" }, "reactNativePermissionsIOS": [ "AppTrackingTransparency" ],

@joaolvcas
Copy link

go to node_modules --> react-native-permission --> RNPermissions.m in this file Search for "No permission handler detected" and comment this line "RCTLogError(@"%@", message)" Enjoying 😉

Here you are not just hiding the error?

@YuriLima23
Copy link

I follow this steps include in this readme and the issue is gone :)

https://unpkg.com/browse/react-native-permissions@3.0.1/README.md

image

i include i my pod FIle this lines and working !

@jbrodriguez
Copy link

this wasn't working for me either, i

  • cleaned derived data (DevCleaner app)
  • rm -rf node_modules
  • rm -rf ios/Pods
  • yarn
  • npx react-native setup-ios-permissions
  • npx pod-install
  • xcode > clean build folder
  • xcode > run

it worked then, i think what i missed what setup-ios-permissions after yarn, but before pod-install

also, although changing postinstall script is a good suggestion, there may probably be some hook in metro that enables running it internally (not sure about this though)

@Muhammad-ameen356
Copy link

Muhammad-ameen356 commented May 22, 2023

No permission handler detected

This solution works for me

I was facing this issue and realized that regardless of all configurations I was missing to "setup" the permissions.

Based on that, if you have done everything mentioned in other answers and it still didn't work, make sure you run npx react-native setup-ios-permissions followed by pod install.

@abinhho
Copy link

abinhho commented Jun 3, 2023

Make sure you have two thing below

"devDependencies": {
    "pod-install": "0.1.38"
  },
  "scripts": {
    "postinstall": "react-native setup-ios-permissions && pod-install"
  }

Then just run yarn resolved my issue.

Docs: https://github.com/zoontek/react-native-permissions#ios

@farid-itpath
Copy link

try to first add reactNativePermissionsIOS configuration into package.json, only then install the react-native-permission.
then follow the steps of running npx react-native setup-ios-permissions and pod install.
I kept the flow this way and it worked in my case ...

@boyepanthera
Copy link

boyepanthera commented Sep 4, 2023

Still experienced this issue in 2023 spent a whole day finding the solution/cause in my own case there is a part in the doc that says you should add setup permission and don't forget to remove the last comma in the permissions array, if you do the build will not see the permission setup in its entirety and can lead to the same issue as above

# ⬇️ uncomment wanted permissions (don't forget to remove the last comma)
setup_permissions([
  # 'AppTrackingTransparency',
  # 'BluetoothPeripheral',
  # 'Calendars',
  # 'Camera',
  # 'Contacts',
  # 'FaceID',
  # 'LocationAccuracy',
  # 'LocationAlways',
  # 'LocationWhenInUse',
  # 'MediaLibrary',
  # 'Microphone',
  # 'Motion',
  # 'Notifications',
  # 'PhotoLibrary',
  # 'PhotoLibraryAddOnly',
  # 'Reminders',
  # 'SpeechRecognition',
  # 'StoreKit'
])

@zoontek
Copy link
Owner

zoontek commented Sep 5, 2023

@boyepanthera That's like, the third line in the documentation, if people don't read it we can't really do something here 🤷🏻‍♂️

@vatana7
Copy link

vatana7 commented Sep 29, 2023

I've found a solution to this problem. Here's my snippet of pod file that I've configured based on @recepaltas's answer. I've made a few adjustment, hopefully it work for you guys

-> Add this to your Podfile in ios

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

@zoontek
Copy link
Owner

zoontek commented Sep 29, 2023

@vatana7 You can also read the README 😄

@vatana7
Copy link

vatana7 commented Sep 30, 2023

@vatana7 You can also read the README 😄

Thanks for pointing it out

@Aure77
Copy link

Aure77 commented Oct 3, 2023

Still experienced this issue in 2023 spent a whole day finding the solution/cause in my own case there is a part in the doc that says you should add setup permission and don't forget to remove the last comma in the permissions array, if you do the build will not see the permission setup in its entirety and can lead to the same issue as above

# ⬇️ uncomment wanted permissions (don't forget to remove the last comma)
setup_permissions([
  # 'AppTrackingTransparency',
  # 'BluetoothPeripheral',
  # 'Calendars',
  # 'Camera',
  # 'Contacts',
  # 'FaceID',
  # 'LocationAccuracy',
  # 'LocationAlways',
  # 'LocationWhenInUse',
  # 'MediaLibrary',
  # 'Microphone',
  # 'Motion',
  # 'Notifications',
  # 'PhotoLibrary',
  # 'PhotoLibraryAddOnly',
  # 'Reminders',
  # 'SpeechRecognition',
  # 'StoreKit'
])

@zoontek : what happen if we "forget to remove the last comma" in setup_permissions ? I tried with trailing comma without issue (cocoapods: 1.12.1 & ruby 2.7).

@zoontek
Copy link
Owner

zoontek commented Oct 3, 2023

@Aure77 Apparently nothing. I'm not used to Ruby, though it will not support trailing comma in function args. Guess I was wrong, I removed the warning from the README.

@phamKhacQuang9x
Copy link

today, i have an issue about react-native-permissions with ios device. This issue: "
no permission handler detected.
check that you are correctly calling setup permissions in your profile
uninstall this app , reinstall your pops, delete your xcode deriveddata folder and rebuild it"
I setup native ios and android focus on https://github.com/zoontek/react-native-permissions#-manual-linking , my project "react-native": "0.72.3",
can you help me @zoontek

@adarsh-dayanand
Copy link

Instead of configuring each Pod file,

Install react-native-permissions by running a command

npm i react-native-permissions

or

yarn add react-native-permissions

This will install the react-native-permissions package. Then in ios/Podfile

use_react_native!(
)

##....

pod 'RNPermissions', :path => '../node_modules/react-native-permissions'

##....

This will add the required Pods to the iOS project.

Then run

cd ios
pod install

@abdurrehmanzafarr
Copy link

hey devs. i just got this issue in 2024 react-native 0.73.1 and ios 17.2.
Just follow the steps which are shown in the error. What helped the most is cleaning DerivedData folder. in case you dont know where it is. go to XCode -> settings-> Locations-> open DerivedData and delete the entire folder. it'll automatically recreate the folder and error is fixed.

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