Skip to content

iOS: Use CocoaPods or Switch Package Manager(SPM) to export project  #4758

Description

@gumaciel

Describe the project you are working on

I'm working on an AdMob Plugin for iOS (and also Android): https://github.com/Poing-Studios/godot-admob-ios

Describe the problem or limitation you are having in your project

To export the Plugin for iOS, I need to download an SDK that the Google team makes available: https://developers.google.com/admob/ios/download, the problem is that it is not possible to download the version I want (e.g. 8.13.0), I always need download the latest version available.

What happens now is that it is no longer possible to download the latest version, and this makes it impossible for me to generate a version of the plugin to make available to users.

There's another thing that bothers me doing this is that I'm not sure which version I'm downloading, whereas on Android I have it.

Q: "But could you generate a build and make the Cocoapod content that was generated in the build available to your users?"

A: But it can cause another problem: What if some path of the Cocoapod content is changed? I'll need to look for the path again and that can bring bugs and problems, and I would also consider this a jerry-rigged because it's not ideal for me.

Besides that some contents that are downloaded by Cocoapods are not exactly a .framework or .xcframework, they work from something else that I don't know how I could export them and put them to work for Godot, in short, that would be very complicated and could be easily avoided by using Cocoapods when exporting.


I think at the moment I will ask users to convert the project on their own and download the SDK through Cocoapods, but I think it would be ideal if Godot itself made this option available to make it easier for end users

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Export the project as Cocoapods (.xcworkspace)

For example, Unity offers this kind of solution based on their documentation:

https://developers.google.com/admob/unity/quick-start
Captura de Tela 2022-06-26 às 19 59 26

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Here could have some option like: "Install CocoaPods" (I also miss a button to add a folder "ios/plugins", like Android does)

Captura de Tela 2022-06-26 às 19 45 07

And here too: "Export the project as Cocoapods"
Captura de Tela 2022-06-26 às 19 46 54

And the .gdip could have some "pods" section like: ( ; tells the version)
Captura de Tela 2022-06-26 às 19 53 05

If this enhancement will not be used often, can it be worked around with a few lines of script?

I think so, but this feature can be used to other plugins, like FacebookSDK or Firebase

Is there a reason why this should be core and not an add-on in the asset library?

It will make plugin development and maintenance easier for everyone

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions