This repository hosts the Package.swift
Swift Package Manager file for the Moonsense iOS Features SDK. The Moonsense iOS Features SDK is available as two variants: a dynamically linked .xcframework
and a statically linked .xcframework
. This repository also hosts a sample application that demonstrate the use of the Moonsense iOS Features SDK.
The FeaturesSDK.xcframework
contains the dynamically linked variant of the Moonsense iOS Features SDK. When using the dynamically linked variant of the SDK, you must embed the framework within your target so the OS can load it at runtime. This approach works fine if you are building an application that directly consumes the SDK or are building your own framework that is being used internally. If you are building a framework that you are providing to another party and you don't wish for them to see that your framework depends on the Moonsense iOS Features SDK, see the FeaturesSDK-static.xcframework
section below.
The FeaturesSDK-static.xcframework
contains the statically linked variant of the Moonsense iOS Features SDK. When using the statically linked variant of the SDK, the linker will embed the necessary code from the SDK into your target. The FeaturesSDK-static.xcframework
should NOT be embedded into your target. If you are building a framework that you are providing to another party, they will only see your public API and not the Moonsense iOS Features SDK public API.
- Clone this repository.
- Configure your
.netrc
file with yourREPO_ACCESS_TOKEN
. - Open the
FeaturesSamples.xcworkspace
Xcode workspace in Xcode. - Create a public token on the Moonsense Console for your application.
- Add the public token to the
publicToken
variable inViewController.swift
in theFeaturesSampleApp
. - Run the
FeaturesSampleApp
on your iOS device.
The latest release of the SDK is 0.2.0
. Details about the current and past releases can be found here.
- Xcode 14.0+
- Swift projects must use Swift 5.0 or greater
- Deployment target of iOS 11.0 or greater
Downloading the Moonsense iOS Features SDK artifacts requires a REPO_ACCESS_TOKEN
for dl.moonsense.io
. This token is associated to your Moonsense Account and should have been provided to you. In case you do not have one contact support@moonsense.io. Add the following to your ~/.netrc
file:
machine dl.moonsense.io
login token
password <REPO_ACCESS_TOKEN>
protocol https
The Moonsense iOS Features SDK is available as a Swift Package. Simply use the link to the moonsense-ios-features-sdk
repo, https://github.com/moonsense/moonsense-ios-features-sdk, as the Package URL when adding the Swift Package to your project.
Cocoapods distribution is not currently available but will be supported in an upcoming release.
The FeaturesSDK.xcframework.zip
, FeaturesSDK-static.xcframework.zip
and FeaturesSDK.doccarchive.zip
artifacts can also be manually integrated into your project. You can download the latest versions from the following links:
Once downloaded, unzip the files and drop the expanded files into your project.
Note: The downloads require the authorization token as outlined above. For best results download the artifacts using curl
with the -n
option. For example:
curl -n -o FeaturesSDK.xcframework.zip https://dl.moonsense.io/basic/sdk/raw/names/FeaturesSDK.xcframework/versions/0.2.0/FeaturesSDK.xcframework-0.2.0.zip
The moonsense-ios-features-sdk
GitHub repository contains a sample application that demonstrates the integration and use of the Moonsense iOS Features SDK. To get started, open the FeaturesSamples.xcworkspace
Xcode Workspace.
FeaturesSampleApp
- This sample app demonstrates the use of the Moonsense iOS Features SDK within a simple application. The example in this case is quite simple and minimal and can serve as a good starting point for developers looking for a quick integration. Sessions created with this sample application will contain both on device generated features as well as network telemetry features. TheFeaturesSampleApp
Xcode project contains two targets,FeaturesSampleApp
andFeaturesSampleApp-Static
. TheFeaturesSampleApp
target consumes theFeaturesSDK.xcframework
dynamically linked variant. TheFeaturesSampleApp-Static
target consumes theFeaturesSDK-static.xcframework
target.
The Moonsense iOS Features SDK is distributed under the Moonsense Terms Of Service.
Feel free to raise an Issue around bugs, usage, concerns or feedback.