You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two hooks one to setup adjust and another to initialise prompt for ATT permission. My react-native-adjust version is ^4.37.1
/** * Custom hook to initialize Adjust SDK. */exportconstuseAdjust=()=>{useEffect(()=>{constsetupAdjust=()=>{try{consttoken=Platform.OS==='android'
? config.EXPO_SECRET_ADJUST_ANDROID_TOKEN
: config.EXPO_SECRET_ADJUST_IOS_TOKENconstisProduction=config.APP_VARIANT==='production'constadjustConfig=newAdjustConfig(token,isProduction
? AdjustConfig.EnvironmentProduction
: AdjustConfig.EnvironmentSandbox)constlogEnabled=yn(process.env.LOG_ADJUST,false)adjustConfig.setLogLevel(logEnabled
? AdjustConfig.LogLevelVerbose
: AdjustConfig.LogLevelSuppress)Adjust.create(adjustConfig)}catch(err){breadcrumb.error({category: 'Adjust',message: 'Error setting up adjust',data: {
err,},})captureException(err)}}setupAdjust()return()=>Adjust.componentWillUnmount()},[])}/** * Custom hook to prompt ATT permission on iOS post login */exportconstuseAdjustATTPermission=()=>{useEffect(()=>{if(isIos){try{// Request tracking authorization for iOS to allow IDFA usage for adjustAdjust.requestTrackingAuthorizationWithCompletionHandler(function(status){breadcrumb.log({category: 'Adjust',message: `Tracking authorization status is ${AdjustTrackingPermissionStatus[status]}`,})})}catch(err){breadcrumb.error({category: 'Adjust',message: 'Error requesting ATT iOS permission for adjust',})captureException(err)}}},[])}
useAdjust is being called in root component of my react native application.
constRoot=()=>{useAdjust()return(<NavigationContainer...><TradingApp/> // doesn't actually reside here but inside navigation and will be routed once logged in. showing here for hierarchy reference
</NavigationContainer/>)}constTradingApp=()=>{useAdjustATTPermission()return(
....)}
The IDFA data is not being captured. My question is during adjust config initialisation, should any background tracking or pre-app install tracking should be enabled ?
adjustConfig.setAllowIdfaReading(true) # should this be set to true explicitly ?
The text was updated successfully, but these errors were encountered:
I have two hooks one to setup adjust and another to initialise prompt for ATT permission. My
react-native-adjust
version is^4.37.1
useAdjust
is being called in root component of my react native application.The IDFA data is not being captured. My question is during adjust config initialisation, should any background tracking or pre-app install tracking should be enabled ?
The text was updated successfully, but these errors were encountered: