GithubHelp home page GithubHelp logo

jv9 / tapromotee Goto Github PK

View Code? Open in Web Editor NEW

This project forked from janc/tapromotee

0.0 2.0 0.0 1.82 MB

Objective-C library to cross promote iOS apps

License: MIT License

Ruby 2.45% Objective-C 88.99% C 1.04% Shell 7.52%

tapromotee's Introduction

TAPromotee

Version

TAPromotee is a pod that allows you to show a cross promotion to a iOS app just by supplying its App Store id. It automatically fetches the info about the app using the iTunes API:

  • App name
  • App icon
  • App price
  • Screenshot
  • Test

When the user taps the install button, the SKStoreProductViewController is presented.

Requirements

  • iOS 7.0+
  • iPhone
  • Portrait orientation
  • The iTunes API references the images via http so you have to disable ATS in your app. In your plist
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>

Install

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

pod 'TAPromotee'

Usage

To run the example project run pod try TAPromotee or clone the repo.

Here's an example of how you should use TAPromotee.

#import "TAPromotee.h"
[TAPromotee showFromViewController:self 
                             appId:822702909 
                           caption:@"Sun clock in your pocket" 
                        completion:^(TAPromoteeUserAction userAction) {
    switch (userAction) {
        case TAPromoteeUserActionDidClose:
            // The user just closed the add
            NSLog(@"User did click close");
            break;
        case TAPromoteeUserActionDidInstall:
            // The user did click on the Install button so here you can for example disable the ad for the future
            NSLog(@"User did click install");
            break;
    }
}];
    

If you don't want to use the App Store screenshot as background, you can supply a custom background image

[TAPromotee showFromViewController:self
                             appId:937151343
                           caption:@"Your Battlefield soldier's companion"
                   backgroundImage:[UIImage imageNamed:@"sample-app-background"]
                        completion:^(TAPromoteeUserAction userAction) {
    switch (userAction) {
        case TAPromoteeUserActionDidClose:
            // The user just closed the add
            NSLog(@"User did click close");
            break;
        case TAPromoteeUserActionDidInstall:
            // The user did click on the Install button so here you can for example disable the ad for the future
            NSLog(@"User did click install");
            break;
    }
}];

Screens

Here is how it looks like

Author

Jan Chaloupecky @TexTwil

License

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

Changelog

See the release section

tapromotee's People

Contributors

janc avatar

Watchers

James Cloos avatar Kevin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.