-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS: Use CocoaPods to export project #4758
Comments
Here's an attempt I had back in the day when I was working on the Plugin: I was able to use Cocoapods to develop, but not able to export to the user I decided to open this proposal now because it is starting to get harder to maintain the project without this part of exporting the Cocoapods dependencies to the user |
I've started working on this issue, so far I've been able to get the One Click Deploy to both generate a Podfile, add some Pods (hardcoded for the P.O.C.), run the install command and have it compile and deploy succesfully onto my iPhone! Will continue to work on this throughout the week and into next week before creating a PR for Godot 4.4. |
You're amazing @MileyHollenberg ! Thank you so much! If there's something that I can do to help please let me know |
@gumaciel Do you have any experience getting Godot's source code to play nicely with XCode? For me the syntax highlighting 'sometimes' works and the jump to definition only works for classes but not for methods within the current file. I've followed the guide here and it's 'working' but not quite (I'd rather use Rider but that's simply not supported on macOS given its requirement for certain libraries). XCode is also often complaining about the code having errors in it when it clearly doesn't |
Its great that you are getting cocospod working in the Godot Editor export pipeline. The way we're able to get this working in our current test projects is as a post export step from outside of godot and then kicking off the build from xcode on the commandline. Getting it working in the editor should be cleaner. Separately, if you do get those xcode instructions worked out so you can debug, I think those instructions could be replaced with script which uses the same tool used by cocospods, Xcodeproj, to generate the project. That would allow us to just use xcode as an ide for the editor without high maintenance cost of a project (or manual steps). |
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
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)And here too: "Export the project as Cocoapods"
And the .gdip could have some "pods" section like: (
;
tells the version)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
The text was updated successfully, but these errors were encountered: