Add SPM support for Apple Embedded plugins (.gdip)#116939
Open
gumaciel wants to merge 1 commit intogodotengine:masterfrom
Open
Add SPM support for Apple Embedded plugins (.gdip)#116939gumaciel wants to merge 1 commit intogodotengine:masterfrom
gumaciel wants to merge 1 commit intogodotengine:masterfrom
Conversation
This was referenced Mar 1, 2026
Contributor
Author
stuartcarnie
approved these changes
Apr 26, 2026
Contributor
stuartcarnie
left a comment
There was a problem hiding this comment.
Looks great – just one nit.
Contributor
|
@gumaciel you will need to rebase on the master branch and squash your commits too |
50fbcd1 to
f877b97
Compare
Contributor
Author
|
@stuartcarnie I've done the rebase + squash commits, please check again if possible Just a question: Previously, I've done a merge commit with the |
bruvzg
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Add
spm_packageskey to the[dependencies]section of.gdipfiles, allowing plugins to declare Swift Package Manager dependencies with exact version pinning. The export pipeline generates the corresponding PBX entries in the Xcode project.Satisfies godotengine/godot-proposals#4758. Thanks to @MileyHollenberg for initial integration with Cocoapods and telling us about SPM!
Docs PR: godotengine/godot-docs#11805
This PR prevents external plugins from having to rely on hacky workarounds (like post-export scripts) to add Swift Package Manager (SPM) dependencies.
SPM is an excellent addition that will massively simplify the distribution and usage of iOS plugins because:
This implementation was designed with developer experience in mind. The new
.gdipformat places the SPM packages directly inside the existing[dependencies]section:This approach is highly beneficial because:
Array[Dictionary]format exposesurl,version, andproductsexplicitly.platformsorchecksums) can be easily added in the future without breaking the parser.exactVersion. This guarantees reproducible builds and prevents bugs caused by dependencies silently updating to different versions..gdipfile will simply ignore thespm_packageskey safely.Data Flow Diagram:
flowchart TD A["📄 .gdip file<br/><b>[dependencies]</b><br/>spm_packages=[...]"] -->|ConfigFile::load| B["load_plugin_config()<br/><i>plugin_config_apple_embedded.cpp</i>"] B -->|"Vector<SPMPackage>"| C["_export_apple_embedded_plugins()<br/><i>editor_export_platform_apple_embedded.cpp</i>"] C -->|Deduplicate by URL| D["PBX Generation"] D --> E["spm_packages<br/><i>packageReferences list</i>"] D --> F["spm_package_refs<br/><i>XCRemoteSwiftPackageReference</i>"] D --> G["spm_package_products<br/><i>XCSwiftPackageProductDependency</i>"] D --> H["modules_buildfile<br/><i>PBXBuildFile</i>"] D --> I["modules_buildphase<br/><i>Frameworks build phase</i>"] E --> J["_fix_config_file()<br/>Template Substitution"] F --> J G --> J H --> J I --> J J -->|"$spm_packages<br/>$spm_package_refs<br/>$spm_package_products"| K["📦 project.pbxproj<br/><i>Xcode resolves SPM at build time</i>"]Binaries: poing-godot-admob-ios.zip
Follow plugin tutorial if needed (just don't follow the Cocoapods step, this should be automatically now with SPM): https://www.youtube.com/watch?v=TB7WhP8mieo
Or:
res://ios/plugins