Comments (5)
@abear247 did you need to modify out samples to get it to work right? If so, let me know which ones and I can get the change done.
from googleads-mobile-ios-examples.
@NVentimiglia This appears to be a direct problem with google ads itself. We estimate that we are not seeing ads ~50% of the time because of this bug. It's pretty easy to recreate using the openURL
but it's not the only way to trigger it.
If I just add this view
struct BrokenView: View {
@State private var showAnotherView = false
// comment this next line out and the ad will load, keep it in and it will not. This behaviour of being unable to find the presented view controller happens with other environment vars, and even in instances without it.
@Environment(\.openURL) var openURL
var body: some View {
NavigationView {
Button {
showAnotherView = true
} label: {
Text("tap on this")
}
}.sheet(isPresented: $showAnotherView, content: {
InterstitialContentView(navigationTitle: "broken")
})
}
}
and use it in the extension
extension MenuItem {
@ViewBuilder
private func viewForType() -> some View {
switch self {
case .banner:
BannerContentView(navigationTitle: self.rawValue)
case .interstitial:
BrokenView()
case .native:
NativeContentView(navigationTitle: self.rawValue)
case .rewarded:
RewardedContentView(navigationTitle: self.rawValue)
case .rewardedInterstitial:
RewardedInterstitialContentView(navigationTitle: self.rawValue)
}
}
}
The ad will never show on the simulator, on devices its a 50/50 chance.
from googleads-mobile-ios-examples.
I am still confused at to what the issue is. None of our samples include the line @Environment(\.openURL) var openURL
as far as I can see.
from googleads-mobile-ios-examples.
Yeah they don't, they only cover the most basic scenarios. The google ads framework starts to break once used beyond these simple contexts.
from googleads-mobile-ios-examples.
Hi @abear247, thanks for flagging. This issue appears to not be directly related to our samples but a general issue. For our iOS engineers to take a closer look at this can you create a thread in the AdMob Developers Forum for it to be triaged appropriately. You can link this GitHub issue when you create the thread.
Closing this issue out. Thanks!
from googleads-mobile-ios-examples.
Related Issues (20)
- H
- Test Mode Label overlaps test ad banner dimensions HOT 1
- Add privacy manifest HOT 3
- sound/audio not coming in Rewarded ads using swift HOT 1
- iOS - GADRewardedAd.load block main thread when slow network HOT 1
- RewardedAd - Main thread blocked by synchronous property query on not-yet-loaded property [MULTIPLE_REASON] for HTTP(S) asset Issue HOT 5
- AdMob Native Ad Validator Ad Attribution missing HOT 3
- admob iOS flutter : Request Error: No ad to show. HOT 1
- Requesting to add visionOS support in the SDK and examples HOT 1
- requestReview admob problem HOT 1
- Crash in GADJSONSafeDictionary HOT 1
- Undefined symbol: _GADUnifiedNativeIconAsset while migrating GoogleMobileAdsMediationFacebook with GoogleMobileAds iOS HOT 1
- Crash in GADSignals HOT 1
- Banner ad blank when app returns to foreground sometimes (iOS) HOT 9
- AppDelegate? For SwiftUI? Why? HOT 1
- Banner Ads touch down registers as clicks HOT 11
- App open ad rendering issue HOT 1
- GoogleIMALoader.adsLoader(_:failedWith:) code 1010 message HOT 4
- Build failed HOT 2
- Build fail on XCode 15.0.1 and below - Google-Mobile-Ads-SDK (11.6.0) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from googleads-mobile-ios-examples.