Reputation: 51
I have a basic react-native app for ios that loads an webview and I installed react-native-fbsdk-next module to get the auto events in facebook app but there is no activity in facebook event manager and I have this error in xcode when I run app on my device (iPhone SE ios 15.1):
nw_resolver_start_query_timer_block_invoke [C3] Query fired: did not receive all answers in time for graph.facebook.com:443
I followed all the install instruction in the docs.
This is my package.json
...
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "~0.63.4",
"react-native-fbsdk-next": "^8.0.2",
"react-native-gesture-handler": "~1.10.2",
"react-native-iap": "^7.5.0",
"react-native-orientation": "^3.1.3",
"react-native-permissions": "^3.3.1",
"react-native-reanimated": "~2.2.0",
"react-native-safe-area-context": "3.2.0",
"react-native-screens": "~3.4.0",
"react-native-unimodules": "~0.14.5",
"react-native-web": "^0.17.1",
"react-native-webview": "11.6.2"
...
And the initialization code in my App.js file
...
export default function App() {
...
const requestTrackingPermission = async () => {
const res = await request(PERMISSIONS.IOS.APP_TRACKING_TRANSPARENCY);
return res === RESULTS.GRANTED || res === RESULTS.UNAVAILABLE;
};
(async function () {
if (!attGranted) {
const userAllowsTracking = await requestTrackingPermission();
if (userAllowsTracking) {
Settings.setAdvertiserTrackingEnabled(true).then(() => {
setAttGranted(true);
});
}
}
Settings.initializeSDK();
}
)();
...
Upvotes: 5
Views: 6455
Reputation: 10590
Try the following on your iPhone:
Settings
Privacy & Security
Tracking
Allow Apps to Request to Track
Facebook
appAllow
After this, I was able to remove this warning.
Upvotes: 0