kloder-games / godot-admob

Module Admob for Godot engine
MIT License
362 stars 62 forks source link

Apple doesn't support UIWebView anymore #135

Open dulvui opened 4 years ago

dulvui commented 4 years ago

OS target (Android/iOS): iOS

Godot version: 3.2.1.stable

Issue description: When uploading to Apple Connect it gives error since Apple doesn't support UIWebView anymore, but WKWebView. Google Mobile Ads SDK version 7.41.0 uses UIWebView. The SDK uses WKWebView from version 7.55.0 https://developers.google.com/admob/ios/rel-notes.

I tried to update to latest SDK Version and the Upload works, but I don't have an iPhone to test. Can someone test and see if it works? Or is there another workaround?

gumaciel commented 4 years ago

Can you give me the framework that are you using and the .a compiled to test?

gumaciel commented 4 years ago

While we're working on an update, we recommend that you use the 7.41.0 version.

You can download here: https://github.com/kloder-games/godot-admob#ios

dulvui commented 4 years ago

I used version 7.58.0 of Google Mobile SDK and the .a from here https://github.com/GhostWalker562/godot-admob-iOS-precompiled

gumaciel commented 4 years ago

Oh i found this: ITMS-90809: Deprecated API Usage — Apple will stop accepting submissions of apps that use UIWebView APIs, so is high necessary update the SDK now

dulvui commented 4 years ago

Yes exactly this is the problem I had. I can't submit the App with that version of Google Mobile SDK

gumaciel commented 4 years ago

Are you facing this too? https://github.com/kloder-games/godot-admob/issues/124

dulvui commented 4 years ago

No, but I still didn't try to show a rewarded or interstitial ad. I'll try and let you know

gumaciel commented 4 years ago

Can you try this?

Set a key and value in your GAMENAME-Info.plist to use WKWebView instead of UIWebView.

Key: gad_preferred_webview Value: wkwebview

image

gumaciel commented 4 years ago

Are you building the app on simulator? On my Xcode it says "GoogleMobileAds is not available when building for iOS Simulator."

dulvui commented 4 years ago

Yes, I still need to get a real device.

gumaciel commented 4 years ago

Can you try this?

Set a key and value in your GAMENAME-Info.plist to use WKWebView instead of UIWebView.

Key: gad_preferred_webview Value: wkwebview

image

let me know if this solved

dulvui commented 4 years ago

I still get same error message when uploading to Apple Connect.

TMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability.

gumaciel commented 4 years ago

Will make the update today, check this issue today at night or tomorrow, thanks!

Tobi-La commented 4 years ago

Are there any known issues when using the recent admob version or is this just not tested yet?

gumaciel commented 4 years ago

I dont test yet, but probably not yet compatible

Tobi-La commented 4 years ago

It seems to work fine on my iPhone 6s. I tested Banners, Intestitials and Rewarded videos.

gumaciel commented 4 years ago

Please send the file .a to @dulvui test

dulvui commented 4 years ago

It seems to work fine on my iPhone 6s. I tested Banners, Intestitials and Rewarded videos.

But did you try to upload it to Apple Store? I get the error

TMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability.

when uploading. So it may work on your phone but Apple will no accept it

gumaciel commented 4 years ago

Hi @dulvui I still couldn't build it, because the Mac is not mine, as soon as I was able to use it, I'll build it and send it to you

Tobi-La commented 4 years ago

Please send the file .a to @dulvui test

I sent it to him, sorry for the delay.

dulvui commented 4 years ago

I got the e-mail thanks!

But what does this .a file contain? Can I use the latest Google Mobile SDK version with this one?

Tobi-La commented 4 years ago

So I have uploaded an .a file with the sources from godot 3.2.1 and the mobile ads sdk 7.58.0. I'm not sure if I'm allowed to post this here, so just answer with your email if anyone else wants to have the link.

dulvui commented 4 years ago

Perfect! I just tried and I get the build error message: Building for iOS Simulator, but the linked library 'AirBroomball.a' was built for iOS.

I'm still a noob in iOS development since, so I don't know how to fix this and I have no real device to test at the moment. Do you know how I can fix this?

Thank you!

On Mon, 4 May 2020 at 11:54, Tobi-La notifications@github.com wrote:

So I have uploaded an .a file with the sources from godot 3.2.1 and the mobile ads sdk 7.58.0. I'm not sure if I'm allowed to post this here, so just answer with your email if anyone else wants to have the link.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kloder-games/godot-admob/issues/135#issuecomment-623369218, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBDXFWC4KVZYZMZUOGWET3RP2GDZANCNFSM4MWSZUOQ .

Tobi-La commented 4 years ago

That's probably cause you're trying to run in on a simulator. The .a doesn't contain the needed architecture for that, it's running only on real devices. You can test the build process if you don't choose a specific device in xcode in the top list and instead select "Generic iOS Device"

dulvui commented 4 years ago

I did that and I tried also to upload it to Apple connect and no build or post upload error is shown. So it seems working!

I'll try to organize an iPhone to try it on a real device.

Thank you!

On Mon, 4 May 2020 at 12:55, Tobi-La notifications@github.com wrote:

That's probably cause you're trying to run in on a simulator. The .a doesn't contain the needed architecture for that, it's running only on real devices. You can test the build process if you don't choose a specific device in xcode in the top list and instead select "Generic iOS Device"

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kloder-games/godot-admob/issues/135#issuecomment-623395668, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBDXFXAOLKOTT3MVJAOTHTRP2NI5ANCNFSM4MWSZUOQ .

gumaciel commented 4 years ago

I did that and I tried also to upload it to Apple connect and no build or post upload error is shown. So it seems working! I'll try to organize an iPhone to try it on a real device. Thank you! On Mon, 4 May 2020 at 12:55, Tobi-La @.***> wrote: That's probably cause you're trying to run in on a simulator. The .a doesn't contain the needed architecture for that, it's running only on real devices. You can test the build process if you don't choose a specific device in xcode in the top list and instead select "Generic iOS Device" — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#135 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBDXFXAOLKOTT3MVJAOTHTRP2NI5ANCNFSM4MWSZUOQ .

Hey @dulvui , i only can build and upload the game if i test first on iPhone or iPad device, please try do to that, after that please come back to say if its works or not, thanks!

gumaciel commented 4 years ago

@Tobi-La thanks for helping him

dulvui commented 4 years ago

It will take me some days to get an iPhone to test it, because of the quarantine. I'll let you know when its tested.

gumaciel commented 4 years ago

Hi @dulvui , just compiled and tested here on Godot 3.1.2, i will update the readme and send the files on the branch 3.1.X.

I updated an app that i have on App Store and successfully published

gumaciel commented 4 years ago

Here is the branch updated, i just compiled with the version 7.58.0 and works fine

dulvui commented 4 years ago

Awesome! Sorry for the delay. I tried to get an iPhone but I just got a 5s and that seems to old to work. I'll let you know when I'm finally able to test on real device

dulvui commented 4 years ago

I was able to test on an iPhone 7 now and it works some times, but most of the times it crashes with error in output: (lldb) and Thread 1: EXC_BAD_ACCESS (code=1, address=0x40)

I'm using 3.2.1 stable and that's probably the problem. Is there a way to get this work on Godot 3.2.1? I tried with 3.1.x with your build but it doesn't work, since I use some addons that require 3.2

dulvui commented 4 years ago

I used now the module from your branch and it seems to work there :) But it's still possible to make it work on Godot 3.2.1? It's hard to check if everything works and to change the code to work with 3.1.2.

I can help if needed, just might need some time to learn about writing modules

gumaciel commented 4 years ago

I was able to test on an iPhone 7 now and it works some times, but most of the times it crashes with error in output: (lldb) and Thread 1: EXC_BAD_ACCESS (code=1, address=0x40)

I'm using 3.2.1 stable and that's probably the problem. Is there a way to get this work on Godot 3.2.1? I tried with 3.1.x with your build but it doesn't work, since I use some addons that require 3.2

When do you receive this error? When do you close the app or when you are playing and simply the game crashes or freezes?

gumaciel commented 4 years ago

I used now the module from your branch and it seems to work there :) But it's still possible to make it work on Godot 3.2.1? It's hard to check if everything works and to change the code to work with 3.1.2.

I can help if needed, just might need some time to learn about writing modules

I'm studying this now (how write modules for AdMob), i'm currently writing a new repository, will work for Android and iOS, i'm finishing the Android version right now, after that i will do for iOS

dulvui commented 4 years ago

I was able to test on an iPhone 7 now and it works some times, but most of the times it crashes with error in output: (lldb) and Thread 1: EXC_BAD_ACCESS (code=1, address=0x40) I'm using 3.2.1 stable and that's probably the problem. Is there a way to get this work on Godot 3.2.1? I tried with 3.1.x with your build but it doesn't work, since I use some addons that require 3.2

When do you receive this error? When do you close the app or when you are playing and simply the game crashes or freezes?

In Godot 3.2.1 I get the error during the game, it seems when I initialize the Admob Node. After a few seconds of gameplay it crashes

But in Godot 3.1.2 it seems to happen on closing the app

I used now the module from your branch and it seems to work there :) But it's still possible to make it work on Godot 3.2.1? It's hard to check if everything works and to change the code to work with 3.1.2. I can help if needed, just might need some time to learn about writing modules

I'm studying this now (how write modules for AdMob), i'm currently writing a new repository, will work for Android and iOS, i'm finishing the Android version right now, after that i will do for iOS

That's awesome!

dala00 commented 4 years ago

I found here because I'm just rejected on uploading...

Updated build to support google ads sdk 7.60.0.

This branch of PR is almost completed? If so I want to try.

gumaciel commented 4 years ago

Thanks @dala00 , i merged, please try it out

dala00 commented 4 years ago

I tried banner, reward video and uploading to App Store Connect and succeeded. Thanks!