iOS SDK Support Carthage

This article is after iOS SDK Deploy Github XCFramework.

If you want to know CocoaPods, please check iOS SDK Support CocoaPods.

Now, we deployed XCFramework on github.

Let’s prepare Carthage support.



Carthage is intended to be the simplest way to add frameworks to your Cocoa application (from Carthage page)

This is popular to manage framework in swift and iOS app.

Let’s support Carthage import for our iOS SDK


This file is to identify version and target binary. Carthage use this file.


Now, ready to use it.

This file is same project as CocoaPods.

You can see this in iOS-Mobile-SDK.

json file is in Github repository.

Now it’s ready to import XCFramework using Carthage.

Use XCFramework via carthage

To use Carthage in Mac, you need to install carthage via brew

brew install carthage

Once we installed carthage, we need to prepare Carthage file in the target project.


Cartfile is the target file to prepare.

This file should be under project.


binary "" ~> 1.0.0

binary is target type, and set CarthageSpec.json file (need raw file URL, not github repository page)

If you access above URL, you can see json contents without HTML contents.

Resolve dependency and import

Let’s download using Carthage.

We need to run following command.

carthage update --platform iOS --use-xcframeworks

Download and save XCFramework(Carthage/Build/iOSMobileSDK.xcframework).

In Carthage case, we need to import framework by myself.

Open Project file, and add import.

Select TARGET and Build Phases and Link Binary with Libraries.

Select Add Files.

We can choose above Framework installed by Carthage.

Now, we can import Framework and can build app code same pods.

Import is completed.

We can use XCFramework from your app.

If you want to see app code, please check this article. iOS SDK Sample App import XCFramework. Application repository is iOSMobileSDKApp (branch feature/carthage)

Professional Programmer2