Sample iOS app to show how to integrate stomt iOS-SDK in your apps.
To see how stomt is integrated in the app review the following files:
CocoaPod (/Podfile)
Include the Stomt-iOS-SDK and install it using pod install
.
target 'stomt-ios-sdk-sample' do
pod 'Stomt-iOS-SDK', '~> 0.0.x'
end
Initilization (/stomt-ios-sdk-sample/AppDelegate.m)
Initilize the SDK once per application with your AppID.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Setup Stomt with your AppID
// -> get yours at: https://www.stomt.com/dev/my-apps
//
[Stomt setAppID:@"9oKmFftlRL946JtDDUTmpmW4H"];
}
Create Stomt (/stomt-ios-sdk-sample/ViewController.m)
Open a stomt creation panel when pressing the connected button.
- (IBAction)openStomtCreateModal:(UIButton *)sender {
// Open a creation modal for your applications page
// -> the targetID is your pages identifier you can copy it from the pages url
// https://www.stomt.com/stomt-ios-sdk -> stomt-ios-sdk
//
[Stomt presentStomtCreationPanelWithTargetID:@"stomt-ios-sdk"
defaultText:@" "
likeOrWish:kSTObjectWish
completionBlock:^(NSError *error, STObject *stomt) {
if(stomt) {
NSLog(@"Stomt created");
}
}];
}
- On the web www.stomt.com
- stomt for iOS
- stomt for Android