Latest 0.2.6
Homepage https://github.com/improveai/automonetize
License MIT
Platforms ios 8.0
Dependencies RMStore, Improve
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

automonetize is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'automonetize'

if (!purchased) {
  [[Automonetize] instance] maybeShowSubscriptionOffer];
}

Author

orasis, [email protected]

License

automonetize is available under the MIT license. See the LICENSE file for more info.

Basic Usage

  1. Create a subscription, or several subscriptions to choose from.
  2. Initialize Automonetize library with Improve.ai key, default information and an array of subscription objects (for more details check out example project).
  3. Present Automonetize alert by calling:
    
    [[Automonetize instance] maybeShowSubscriptionOffer:^(BOOL shown, BOOL subscribed, AMSubscriptionOffer *currentOffer, NSError *purchaseError) {

}];


4. To check if user is subscribed and unlock any app features call:
```objc
[[Automonetize] instance] isSubscribed];
  1. If you want to unconditionally display the Automonetize subscription screen call:

[[Automonetize instance] showSubscriptionOffer:^(BOOL shown, BOOL subscribed, AMSubscriptionOffer currentOffer, NSError purchaseError) {

}];


This will present Automonetize screen even if the user is already subscribed.

6. In order to check and restore any valid subscriptions call:
```objc
[[Automonetize] instance] restoreSubscriptions];

Advanced Usage

If you want to use app’s subscription screen to keep the app design unified you can do that by using additional Automonetize methods. The process of such subscription is described here.

  1. Create a subscription, or several subscriptions to choose from.
  2. Initialize Automonetize library with Improve.ai key, default information and an array of subscription objects (for more details check out example project).
  3. Check if subscription screen should be displayed by calling:

[[Automonetize instance] shouldShowSubscriptionOffer];


This method will return a **AMSubscriptionOffer** object to be displayed, or 'nil' if the alert should not be displayed.

4. To track a displayed offer call:
```objc

[[Automonetize instance] didShowOffer:[Automonetize instance].currentOffer];

If the app is not displaying the current offer from Automonetize, pass the displayed offer as a parameter.

  1. To subscribe via Automonetize use:

[[Automonetize instance] subscribeToOffer:offer withSuccess:^(AMSubscriptionOffer *currentOffer) {

} failure:^(AMSubscriptionOffer offer, NSError error) {

}];


Where **offer** is the offer user wants to subscribe to.

Latest podspec

{
    "name": "automonetize",
    "version": "0.2.6",
    "summary": "Quick start for improve.ai revenue optimization",
    "description": "Automonetize makes it simple to add auto-rewning subscription pop-up offers to your iOS app.  The offers are automically optimized using improve.ai's machine learning API to boost your app's revenue.",
    "homepage": "https://github.com/improveai/automonetize",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "orasis": "[email protected]"
    },
    "source": {
        "git": "https://github.com/improveai/automonetize.git",
        "tag": "0.2.6"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "automonetize/Classes/**/*",
    "dependencies": {
        "RMStore": [
            "~> 0.7"
        ],
        "Improve": [
            "~> 2.0"
        ]
    }
}

Pin It on Pinterest

Share This