Home > other >  Request Tracking Authorization for iOS Application Facebook App Events
Request Tracking Authorization for iOS Application Facebook App Events

Time:08-25

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:

Facebook enter image description here

  • SceneDelegate:

    enter image description here

    func sceneDidBecomeActive(_ scene: UIScene) {
             print("sceneDidBecomeActive")
    
             DispatchQueue.main.asyncAfter(deadline: .now()   1) {[weak self] in
                         self?.requestTracking()
             }     
       } 
    
  • enter image description here

    This will bring up the following tracking pop up at app launch:

    enter image description here

    1. In your viewcontroller:

    enter image description here

    • Related