poingstudios / godot-admob-ios

Godot's AdMob Plugin for iOS with support for Mediations.
https://poingstudios.github.io/godot-admob-plugin/
MIT License
89 stars 14 forks source link

[BUG] One Click Deployment with V3 doesn't work #92

Closed ZhangWei-bi closed 5 months ago

ZhangWei-bi commented 5 months ago

Godot version

4.2.1

Plugin version

v3.1.0

Phone information

iphone x

Issue description

Following https://poing-studios.github.io/godot-admob-plugin/#__tabbed_2_2 and https://www.youtube.com/watch?v=WpVGn7ZasKM

I am unable to use the new feature from Godot 4.2 to be able to run one click deploy for iOS. In the video, the ios export fails and it says that Godot does not support pod studios. I think this is why the one click deploy does not work.

In v2 of this library, you could drop the libs in a folder and add the dependencies in the .gdip, I think this would have worked with one click deploy

Steps to reproduce

Follow the instructions here for iOS https://poing-studios.github.io/godot-admob-plugin/#__tabbed_2_2

Then try to one click deploy on iOS

Additional context

No response

gumaciel commented 5 months ago

Sorry, but it is not possible to perform "one click deployment" with the plugin, as the plugin requires the user to run Cocoapods to download its dependencies, and this can only be done manually by the user.

gumaciel commented 5 months ago

In v2 it works because we make the files available for the user to download, however this was causing development problems and in v3 we chose to use Cocoapods to manage this

ZhangWei-bi commented 5 months ago

@gumaciel Ah that's to bad, it's a neat feature. I wanted to be able to use one click with v3 so instead of going the cocoapods route, I downloaded the latest google ios sdk here: https://developers.google.com/admob/ios/download

I dumped the libs in res://ios/ads/poing-godot-admob/libs then I added this to poing-godot-admob-ads.gdip:

linked=[ "poing-godot-admob/libs/nanopb.xcframework", "poing-godot-admob/libs/GoogleAppMeasurement.xcframework", "poing-godot-admob/libs/GoogleAppMeasurementIdentitySupport.xcframework", "poing-godot-admob/libs/GoogleMobileAds.xcframework", "poing-godot-admob/libs/GoogleUtilities.xcframework", "poing-godot-admob/libs/UserMessagingPlatform.xcframework", "poing-godot-admob/libs/FBLPromises.xcframework"]

I also removed the files=[] and added linker_flags=["-ObjC"]

The one click deploy works for me now and I can see ads. When you said it was causing development problems with v3 for you, what kind of issues did you see?

Thanks

gumaciel commented 5 months ago

That's not recommended because you can download a higher version that we used to compile the project and can cause problems of functionality.

We use Cocoapods because we can say what version we used to develop and what version the user needs to use to use our plugin.

ZhangWei-bi commented 5 months ago

@gumaciel Understandable. Ill just use this for my project for now since I enjoy the one click solution.

I was able to use the specific version you used from ads-pods.txt and seems to be working so far:

I used: https://github.com/CocoaPods/Specs/blob/3462884b03e0f2c8b5cd084d2ba3654056d7963f/Specs/5/9/a/Google-Mobile-Ads-SDK/10.13.0/Google-Mobile-Ads-SDK.podspec.json#L52

GoogleMobileAds.xcframework 10.13.0 GoogleAppMeasurementIdentitySupport.xcframework: 10.17.0 GoogleAppMeasurement.xcframework 10.17.0

I can't verify the versions you use for the other libs

gumaciel commented 5 months ago

That's cool, I didn't know there was a public link to download the SDK, but it's strange because doesn't download all the dependencies just the SDK.

If you can find all the versions used in 10.13.0 and add them to your project to export, then it won't have any issues with compatibility.