CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.
TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Apache 2 |
ReleasedLast Release | Jul 2017 |
Maintained by Appaloosa Store SDK, Christophe Valentin, Jeremy Bodokh, ‘Elise’.
Appaloosa SDK library is a simple library that helps you to:
Appaloosa SDK library uses ARC and is compatible with iOS 8+.
/!\ In order to complete the setup for the features "Auto-update" and "Blacklist", the device must make at least one successful login on the native store to register its ADID to the server. /!\ Your App ID must be explicit (as opposed to wildcard) /!\ Testing on the simulator won't work
Once the Appaloosa SDK is integrated to your project, you need to configure the agent with the storeId and the storeToken.
Register the Appaloosa Agent with your storeId and storeToken (you can find the storeId and storeToken on this page : http://www.appaloosa-store.com/settings).
In your AppDelegate:applicationDidBecomeActive()
add the register Appaloosa Agent.
[[OTAppaloosaAgent sharedAgent] registerWithStoreId:APPALOOSA_STORE_ID storeToken:APPALOOSA_STORE_TOKEN
andDelegate:self];
OTAppaloosaAgent.shared().register(
withStoreId: APPALOOSA_STORE_ID,
storeToken: APPALOOSA_STORE_TOKEN)
AppDelegate.m
file, launch the autoupdate when your application starts :#import "OTAppaloosa.h"
- (void)applicationDidBecomeActive:(UIApplication *)application
, add the following code line:[[OTAppaloosaAgent sharedAgent] checkUpdates];
AppDelegate.swift
file, launch the autoupdate when your application starts :import OTAppaloosa
AppDelegate:applicationDidBecomeActive()
, add the following code line:OTAppaloosaAgent.shared().checkUpdates()
AppDelegate.h
file#import "OTAppaloosa.h"
@interface AppDelegate : UIResponder <UIApplicationDelegate, OTAppaloosaAgentDelegate>
AppDelegate.m
file, launch the autoupdate when your application starts :- (void)applicationDidBecomeActive:(UIApplication *)application
, add the following code line:[[OTAppaloosaAgent sharedAgent] checkUpdates];
- (void)applicationUpdateRequestSuccessWithApplicationUpdateStatus:(OTAppaloosaUpdateStatus)appUpdateStatus
to inform the application needs to be updated. You need to analyze the 'appUpdateStatus' to know if an update is available and download the new version.
By default,[[OTAppaloosaAgent sharedAgent] downloadNewVersion];
- (void)applicationUpdateRequestFailureWithError:(NSError *)error
to be inform if something wrong occured during the update request.AppDelegate.swift
fileimport OTAppaloosa
class AppDelegate: UIResponder, UIApplicationDelegate, OTAppaloosaAgentDelegate
AppDelegate.swift
file, launch the autoupdate when your application starts :AppDelegate:applicationDidBecomeActive()
, add the following code line:OTAppaloosaAgent.shared().register(
withStoreId: APPALOOSA_STORE_ID,
storeToken: APPALOOSA_STORE_TOKEN, andDelegate: self)
OTAppaloosaAgent.shared().checkUpdates()
- func applicationUpdateRequestSuccess(withApplicationUpdateStatus appUpdateStatus: OTAppaloosaUpdateStatus)
to inform the application needs to be updated. You need to analyze the 'appUpdateStatus' to know if an update is available and download the new version.
By default,OTAppaloosaAgent.shared().downloadNewVersion()
This SDK provides a kill switch mecanism. From the web interface (http://www.appaloosa-store.com/), you are able to authorize or not a device to access the application. The mecanism works offline by reading the blacklisted status from the keychain.
In your appDelegate
add the following line to check authorizations when the application becomes active - (void)applicationDidBecomeActive:(UIApplication *)application
:
[[OTAppaloosaAgent sharedAgent] checkAuthorizations];
OTAppaloosaAgent.shared().checkAuthorizations()
By default :
If you prefer to develop your own behaviour, you should implement the OTAppaloosaAgentDelegate
:
- (void)applicationAuthorizationsAllowed;
- (void)applicationAuthorizationsNotAllowedWithStatus:(OTAppaloosaAutorizationsStatus)status andMessage:(NSString *)message
You can prevent your app from running on a jailbroken device.
In your appDelegate file, add the following line to check authorizations when the application becomes active - (void)applicationDidBecomeActive:(UIApplication *)application
:
[[OTAppaloosaAgent sharedAgent] blockJailbrokenDevice];
OTAppaloosaAgent.shared().blockJailbrokenDevice()
Appaloosa SDK for iOS use AppleDoc to generate its API's documentation.
Copyright (C) 2012 Appaloosa (https://www.appaloosa-store.com)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.