Swift SDK for STOMT
Our SDK provides you with the tools for an easy and transparent integration of STOMT in your apps.
This repository provides you with a target for all the Apple devices we are currently supporting.
Carthage is “A simple, decentralized dependency manager for Cocoa”
github "stomt/stomt-swift-sdk" ~> 0.1
carthage update
from the project root directory to fetch and build the SDKAt this point Carthage will have built the SDK and produced the .framework file to include in your project. Due to the App Store submission bug, you should follow the installation instructions available in the Carthage repository.
You can install Cocoapods with the command:
gem install cocoapods
To integrate the SDK using Cocoapods you have to create a Podfile
with the following content:
platform :ios, '10.0'
target '<Your Target Name>' do
pod 'StomtSDK', '~> 0.1'
end
Finally, run
pod install
If you prefer not to use dependency managers you can install the framework manually.
git init
, otherwise skip this step.git submodule add https://github.com/stomt/stomt-swift-sdk
. A folder containing the SDK will be added to your project root folder.StomtSDK.xcodeproj
inside and below your project icon in the Xcode navigator.General
, scroll down and press +
in Embedded Binaries
to add Stomt.framework
for the required platform.A Widget consists of an instance of SFSafariViewController that gets presented by one of your ViewControllers.
Widgets are the easiest way to incorporate stomt creation and feed retrieval functionalities in your app.
To use the widgets you must acquire an applicationID from the “APPS” section of your project page (stomt.com) and set it in the AppDelegate.swift file as follows:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
Stomt.setAppID(appID: "APPLICATIONID")
return true
}
The STOMT creation Widget can be invoked like this:
Stomt.creationWidget(fromViewController: self)
The feed retrieval Widget can be invoked like this:
Stomt.feedWidget(fromViewController: self)
Definitely! You can find it in the “Examples” folder in the repo.