I am trying to integrate app events for my iOS application. Below are the steps I have taken:
- Configured Facebook App and added iOS platform
- Linked ad account
- Set up dev environment and SDK
- Configured my project plist
- Connected app delegate
- Added manual logs
No log was getting recorded. After some research I found out that in iOS 14 isAutoLogAppEventsEnabled
, isAdvertiserTrackingEnabled
and isAdvertiserIDCollectionEnabled
have to be enabled.It is also done.
Any help is really appreciated on this.
CodePudding user response:
SceneDelegate
:
func sceneDidBecomeActive(_ scene: UIScene) {
print("sceneDidBecomeActive")
DispatchQueue.main.asyncAfter(deadline: .now() 1) {[weak self] in
self?.requestTracking()
}
}
This will bring up the following tracking pop up at app launch:
- In your viewcontroller: