Implementing AdMob Banner Ads in SwiftUI iOS App: Step-by-Step Tutorial | Xcode | 2023+

  Рет қаралды 7,397

Coffee Programmer

Coffee Programmer

Күн бұрын

Пікірлер: 37
@nikkij.4326
@nikkij.4326 13 күн бұрын
Thank you so much! I've been struggling with this for weeks! Your code works. xoxo
@danielagapov8565
@danielagapov8565 10 ай бұрын
Updated code for March 2024 (XCode 15, Swift : In the ContentView body (replace {put your ID here} with your own, as he showed how to retrieve in the video): ``` AdBannerViewController(adUnitID: "{put your ID here}") // Replace with your ad unit ID .frame(height: 50) ``` Also, replace the struct he made with this one (with his, I was getting this error: " 'shared' is unavailable in application extensions for iOS: Use view controller based solutions where appropriate instead"): ``` // UIViewControllerRepresentable wrapper for AdMob banner view struct AdBannerViewController: UIViewControllerRepresentable { let adUnitID: String func makeUIViewController(context: Context) -> UIViewController { let bannerView = GADBannerView(adSize: GADAdSizeBanner) // Use a predefined ad size bannerView.adUnitID = adUnitID let viewController = UIViewController() viewController.view.addSubview(bannerView) bannerView.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ bannerView.centerXAnchor.constraint(equalTo: viewController.view.centerXAnchor), bannerView.bottomAnchor.constraint(equalTo: viewController.view.bottomAnchor) ]) bannerView.load(GADRequest()) return viewController } func updateUIViewController(_ uiViewController: UIViewController, context: Context) {} } ```
@KEEVVY
@KEEVVY 4 күн бұрын
wish some one did a good tutorial like this for xcode 16.2
@Billy-yx6se
@Billy-yx6se Жыл бұрын
You should make a tutorial on how to implement interstitial ads in swiftui
@gregas3068
@gregas3068 Жыл бұрын
Nice video, mister. Keep pushin... - this works, just make sure that U are using test units if not in production.
@arthurmawaya
@arthurmawaya Ай бұрын
This is amazing. Thank you
@devapk9555
@devapk9555 Жыл бұрын
true ad not displaying
@ralph7503
@ralph7503 Жыл бұрын
You saved me bro thanks a lot!!! you earn my follow!
@ドラ爆
@ドラ爆 3 ай бұрын
Thank you!! I love you❤
@nwlk9262
@nwlk9262 Ай бұрын
Hi
@StephJ-yn2sw
@StephJ-yn2sw 7 ай бұрын
Thank you, it was very useful :)
@angelailma950
@angelailma950 5 ай бұрын
Works! Thank you
@jurimacTech
@jurimacTech Ай бұрын
it says test on the ad in Xcode simulator, how can I get rid of it
@ibringit
@ibringit 2 ай бұрын
thank you very much brother
@chaordo
@chaordo Жыл бұрын
Great video, thank you for the information!
@CoffeeProgrammer
@CoffeeProgrammer Жыл бұрын
Glad it was helpful!
@mrwaseemmalik5766
@mrwaseemmalik5766 Жыл бұрын
ad is not displaying
@guddubhasme8088
@guddubhasme8088 2 ай бұрын
brother make video on admob and Facebook mediation in iOS
@blytte
@blytte Жыл бұрын
Valeu meu amigo! Thanks, my friend!
@ingoampt
@ingoampt Жыл бұрын
it shows real ads in my case, how make it test so I don't get suspended ?
@matthewgoodman967
@matthewgoodman967 Жыл бұрын
Thank you!
@ingoampt
@ingoampt Жыл бұрын
How make it and submit it for Apple Store and make it for real ads for Apple Store submission. ? Please make next video to continue this and clarify more if we have an app in Apple Store what should we do so is not test mode and how submit it to Apple Store ? Or just comment me and guide me please
@smanan11
@smanan11 Жыл бұрын
very helpful
@CoffeeProgrammer
@CoffeeProgrammer Жыл бұрын
Glad it helped
@leomurillo4621
@leomurillo4621 Жыл бұрын
Buen video thank u
@jurimacTech
@jurimacTech Жыл бұрын
My app got rejected because it says “test” on the AdMob banner
@CoffeeProgrammer
@CoffeeProgrammer Жыл бұрын
don't include screenshots showing test admob banner, you can comment ad load code in order to launch app without the banner ads
@jurimacTech
@jurimacTech Жыл бұрын
Do I need to show an add banner on the screenshots of the app, is that what you mean?@@CoffeeProgrammer
@jurimacTech
@jurimacTech Жыл бұрын
Oh so your saying that i shouldn’t show ads on the screenshots?@@CoffeeProgrammer
@CoffeeProgrammer
@CoffeeProgrammer Жыл бұрын
no please don't show banner ads in all screenshot for the app store@@jurimacTech
@jurimacTech
@jurimacTech Жыл бұрын
Oh I understand now, thanks so much for letting me know! 😀@@CoffeeProgrammer
@nayanamaxlk
@nayanamaxlk Жыл бұрын
@ElijaKessler
@ElijaKessler Жыл бұрын
Ehrenmann
@saraboy77
@saraboy77 Жыл бұрын
Its not woking
@EnglishTurkishExpert
@EnglishTurkishExpert Жыл бұрын
Wonderful tutorial. However one must be careful with editing the correct "info.plist". As of 11/2023 the projects created contains another "*.plist" file and if you add your admob details to that file, your app crashes no matter what you do.
@dwpalme2670
@dwpalme2670 4 ай бұрын
Cannot understand a fucking word
Add Banner Ad to App in Swift 5 (Xcode 11) - Google Admob
12:22
iOS Academy
Рет қаралды 26 М.
SwiftData Basics in 15 minutes
15:18
CodeWithChris
Рет қаралды 54 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Play: The Secret Weapon for iOS Devs & Designers
10:12
Sean Allen
Рет қаралды 39 М.
I Made an iOS App in MINUTES with This AI Tool!
13:20
Creator Magic
Рет қаралды 600 М.
Google Admob Banner ADS with SwiftUI
16:44
SwiftUI Codes
Рет қаралды 469
How to Get User Location on a Map - Swift
26:11
Sean Allen
Рет қаралды 66 М.
Copy This $6M App Monetization Strategy
13:58
App Masters
Рет қаралды 16 М.