StartApp-SDK / StartAppSDK

Cocoapods repository for StartApp SDK
Other
7 stars 5 forks source link

StartAppSDK: SDK initialized successfully with Application ID'. Not called #5

Open mr-grey opened 1 year ago

mr-grey commented 1 year ago

after app starts : if I run init with some delay ex 1sec , is not initialised (no logs)

ihor-startio commented 1 year ago

Hi @mr-grey, I believe, the problem is that you do not set appID. Could you please provide sample project or code snippet?

mr-grey commented 1 year ago

Yes please ,

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
            self.initStartAppSDK(application)
        }
}

private func initStartAppSDK(_ app: UIApplication) {
        let startSdk = STAStartAppSDK.sharedInstance()
        startSdk?.appID = "here my app id" 
        startSdk?.returnAdEnabled = false
        #if DEBUG
        startSdk?.testAdsEnabled = true
        #endif
        startSdk?.handleExtras({ ext in
            if AppManager.shared.currentMobileLocaleRegion == "USA" || AppManager.shared.currentMobileLocaleRegion == "US" {
            ext?.setObject("1YNN", forKey:"IABUSPrivacy_String" as NSCopying)
            } else {
              ext?.setObject("1---", forKey:"IABUSPrivacy_String" as NSCopying)
            }
        })
}
mr-grey commented 1 year ago

Wish to ask about this: startSdk?.returnAdEnabled = false

here I put false to disable interstitial ads shown automatically

ihor-startio commented 1 year ago

HI @mr-grey I can not reproduce the issue you described with the snippet, you provided