Closed imanshul closed 10 months ago
@imanshul You cleared the Xcode cache, just in case? (DerivedData)
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?
@imanshul Not if you follow the setup in the README
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
In this case, it will work after a pod install and a cache clean.
Bug summary
We have added the key NSUserTrackingUsageDescription in the info.plist and enabled in podfile as well, still when we make a call the request method always result in RESULTS.UNAVAILABLE
Library version
4.0.1
Environment info
Steps to reproduce
Add the latest version and add the keys in info.plist and run app to ask permission
Reproducible sample code