googleads / swift-package-manager-google-mobile-ads

Apache License 2.0
136 stars 21 forks source link

admob requestReview problem #60

Closed fatihdurmaz closed 6 months ago

fatihdurmaz commented 7 months ago

import SwiftUI import AppTrackingTransparency import StoreKit

struct RootView: View { https://github.com/AppStorage("showingOnboarding") private var showingOnboarding = true https://github.com/State var adsManager = AdsManager() https://github.com/State private var selectionItem = 0 @Environment(.requestReview) private var requestReview

var body: some View { TabView(selection: $selectionItem){ MainView(selectionTabItem: $selectionItem) .tabItem { Label("Başlangıç", systemImage: "house") .environment(.symbolVariants, selectionItem == 0 ? .fill : .none) } .tag(0)

    ResultView(selectionTabItem: $selectionItem)
        .tabItem {
            Label("Hesaplamalar", systemImage:     "arrow.counterclockwise.circle")
                .environment(\.symbolVariants, selectionItem == 1 ? .fill : .none)
        }
        .tag(1)
}
.fullScreenCover(isPresented: $showingOnboarding, content: {
    OnboardingView.init()
        .edgesIgnoringSafeArea(.all)
        .onDisappear{
            showingOnboarding = false
            ATTrackingManager.requestTrackingAuthorization(completionHandler: { status in })
        }
})
.onAppear{
    adsManager.increaseBannerAdCounter()
}
.tint(.main)

} }

@Environment(.requestReview) private var requestReview when showing admob banner ad with SwiftUI If I define the ad is not loading and Invalid Request. Cannot determine request type. Is your ad unit id correct? I get an error. It gets fixed when I remove it.

malandr2 commented 6 months ago

Hey @fatihdurmaz, your question would be better suited for the AdMob developers forum. Please create a new thread there. Closing this out. Thanks!