This project uses Native Swift Package Manager integration for managing dependencies (Google AdMob, Meta, and Liftoff/Vungle).
If you are just cloning the repository, the setup is almost entirely automatic:
-
Open the Project: Open
PoingGodotAdMob.xcodeprojin Xcode. -
Automatic Resolution: Xcode will detect the local
Package.swiftand start downloading the dependencies (Google SDKs) automatically.- You can monitor this in the top progress bar.
- If it doesn't start, go to
File->Packages->Resolve Package Versions.
-
Build:
- Choose the target you want (e.g.,
ads). - Select a destination (e.g.,
Any iOS Deviceor a Simulator). - Press
Cmd + Bto build. - The output binary (
.a) will be saved in thebin/folder of the project.
- Choose the target you want (e.g.,
If you see linker errors (symbols not found) or the PoingGodotAdMobDeps package appears with a red icon:
If the local package reference is broken:
- Drag the
Package.swiftfile from the finder into the Xcode project sidebar. - It should appear as a package icon (white box) at the root of the project.
The targets should already be linked. If they are not, select your target (e.g., ads) -> General -> Frameworks, Libraries, and Embedded Content and ensure PoingGodotAdMobDeps is present.
The project can still be built via terminal, which is the recommended way to generate the final .xcframework for distribution:
# Optional: Pre-resolve dependencies
./scripts/lib/resolve_spm_deps.sh
# Build everything (generates standard .xcframework in the bin/ folder)
./scripts/build.sh- No CocoaPods: Do NOT run
pod install. It is no longer supported. - Header Files: Native SPM handles the headers. You don't need to manually configure search paths; Xcode manages this via the
PoingGodotAdMobDepslibrary target. - Updating SDKs: To update a dependency version, simply edit the
Package.swiftfile and then runFile -> Packages -> Update to Latest Package Versions.