install react-native-permission #152205
Unanswered
youssef-elmweb
asked this question in
npm
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, i have a problem with react-native-permission the popup ATT in ios not visible and not enable and my code is clean
import React, { useEffect } from 'react';
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View, Alert, Platform, AppState } from 'react-native';
import { request, PERMISSIONS, RESULTS, check, requestTrackingPermission } from 'react-native-permissions';
import { getTrackingStatus } from 'react-native-tracking-transparency';
import { setAdvertiserTrackingEnabled, AdMobInterstitial } from 'react-native-google-mobile-ads';
export default function App() {
console.log(PERMISSIONS.IOS.APP_TRACKING_TRANSPARENCY, RESULTS);
const handleAppStateChange = async (nextAppState) => {
//if (nextAppState === 'active') {
// Demande la permission ATT (App Tracking Transparency)
};
useEffect(() => {
const trackingStatus = getTrackingStatus();
if (trackingStatus === 'authorized' || trackingStatus === 'unavailable') {
console.log(trackingStatus);
}
}, []);
return (
Open up App.js to start working on your app!
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Beta Was this translation helpful? Give feedback.
All reactions