CocoaPods support in 1.4.4

The release of Defold 1.4.4 (currently in beta) will include support for CocoaPods dependencies for iOS and macOS builds. CocoaPods will simplify extension development for iOS and macOS by leveraging the CocoaPods system for dependency management. This means that extension developers no longer have to manually add libraries, headers, frameworks and so on to any extensions.

What you do instead is to create a Podfile in your-extension/manifests/[ios|osx] where you specify your dependencies using the CocoaPods Podfile syntax. Example from extension-firebase:

pod 'FirebaseCore', '8.13.0'
pod 'FirebaseInstallations', '8.13.0'

When the extension is built this Podfile and the Podfiles from other extensions, will be merged into a single main Podfile which CocoaPods will resolve and use when building. We will migrate all of our extensions to use CocoaPods now during the beta and we encourage everyone to test.

Remember that you need to use the Defold 1.4.4 beta of the editor or bob.jar while testing and you need to set your build server url to https://build-stage.defold.com.

The list below will be updated with the status for each extension plus a temporary dependency URL you can use while testing during the 1.4.4 beta.

MIGRATED EXTENSIONS

IN PROGRESS

17 Likes

Additional note on minimum iOS and macOS versions
The current minimum versions for iOS and macOS in Defold are 9.0 and 10.7 respectively. If a CocoaPod dependency requires a higher minimum version you can explicitly set a version number in your Podfile and the highest minimum version among all Podfiles will be used when the extension and engine is built.

As an example, Firebase Remote Config version 8.13, requires a minimum iOS version of 10.0. In order to build this extension the Podfile for extension-firebase-remoteconfig contains the following:

platform :ios, '10.0'
pod 'FirebaseRemoteConfig', '8.13.0'
3 Likes

Update: Firebase and AdMob have been migrated. The changes have not been merged to master and remain in their respective dev-cocoapods branches until the stable release of Defold 1.4.4.

The Facebook SDK has not been migrated yet as the FBSDKCoreKit contains .swift files which the build servers can’t handle.

5 Likes