Comments (5)
In this case, it will work after a pod install and a cache clean.
from react-native-permissions.
@imanshul You cleared the Xcode cache, just in case? (DerivedData)
from react-native-permissions.
yeah removing derived data solved the problem, but the package was installed earlier, and i just enable the permission and did pod install. so do i have to do it everytime I enable or disable any permission?
from react-native-permissions.
@imanshul Not if you follow the setup in the README
from react-native-permissions.
All of the steps are followed by podfile is:
# Resolve react_native_pods.rb with node to allow for hoisting
# ----- Uncomment below code, if removing the react-naitve-permissions ----
# require Pod::Executable.execute_command('node', ['-p',
# 'require.resolve(
# "react-native/scripts/react_native_pods.rb",
# {paths: [process.argv[1]]},
# )', __dir__]).strip
# ------ Start Used for react-native-permissions --------
def node_require(script)
# Resolve script with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
"require.resolve(
'#{script}',
{paths: [process.argv[1]]},
)", __dir__]).strip
end
node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')
# ------ END Used for react-native-permissions --------
platform :ios, min_ios_version_supported
prepare_react_native_project!
# ------ Start Used for react-native-permissions --------
# ⬇️ uncomment wanted permissions
setup_permissions([
'AppTrackingTransparency',
# 'Bluetooth',
# 'Calendars',
# 'CalendarsWriteOnly',
'Camera',
# 'Contacts',
# 'FaceID',
# 'LocationAccuracy',
# 'LocationAlways',
# 'LocationWhenInUse',
# 'MediaLibrary',
# 'Microphone',
# 'Motion',
'Notifications',
'PhotoLibrary',
# 'PhotoLibraryAddOnly',
# 'Reminders',
# 'Siri',
# 'SpeechRecognition',
# 'StoreKit',
])
# ------ END Used for react-native-permissions --------
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
# dependencies: {
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.disabled
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end
target 'App13Karat' do
pod 'WebEngage'
config = use_native_modules!
use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
use_react_native!(
:path => config[:reactNativePath],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
:flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'App13KaratTests' do
inherit! :complete
# Pods for testing
end
# ServiceExtension Target
target 'NotificationService' do
platform :ios, min_ios_version_supported
pod 'WebEngageBannerPush'
end
# ContentExtension Target
target 'NotificationViewController' do
platform :ios, min_ios_version_supported
pod 'WebEngageAppEx/ContentExtension'
end
post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
workAroundForSharedApplication(installer)
end
end
# Fix for MMKV after adding WebEngage, especially NotificationService and NotificationViewController as App Extension
def workAroundForSharedApplication(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
from react-native-permissions.
Related Issues (20)
- Motion & Fitness remains unavailable after being switched on in Privacy & Security HOT 3
- react-native-permissions: NativeModule.RNPermissions is null. [Android] HOT 4
- For Android 14, you need to query permission READ_MEDIA_VISUAL_USER_SELECTED HOT 3
- Android `check` shows that Notifications can be requested, but it is not requestable HOT 2
- Apple privacy manifest file HOT 8
- Permission granted not recognized HOT 3
- Not work Permission-Location HOT 1
- checkLocationAccuracy method throws an error if user denies location permissions HOT 2
- setup_permissions Documentation / clarification HOT 1
- Expo plugin not working on Expo SDK 50 HOT 2
- config plugin is malform HOT 1
- 'RNPermissionsModule' could not be found HOT 4
- Unregister for remote notifications method HOT 3
- IOS Podfile Problem HOT 3
- iOS microphone permission pop up not appearing on simulator HOT 6
- [Android]: Failed to build gradle in monorepo. Unable to resolve react-native location in node_modules HOT 3
- iOS Build failed HOT 2
- After user change setting permission to None. Check permission PERMISSIONS.IOS.PHOTO_LIBRARY / MEDIA_LIBRARY got UNAVAILABLE not DENIED HOT 2
- iOS: check location permission returns 'blocked' when permission is granted but location services are disabled HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-permissions.