Latest 0.4.4
Homepage https://github.com/908Inc/stkiOS
License Apache License, Version 2.0
Platforms ios 7.0, requires ARC
Dependencies AFNetworking, DFImageManager, MBProgressHUD, SDWebImage
Frameworks CoreData

About

Version
Platform
License

Stickerpipe is a stickers SDK for iOS

ios

Installation

Get the API key on the Stickerpipe

Using CocoaPods (iOS 7 and later)

use_frameworks!
pod "StickerPipe", "~> 0.4.0"

or manualy (iOS 7 and later)

Add content of Framework folder to your project. You can also get sources from here for low-level customization and iOS 7 support

Usage

Import framework with:

swift:

@import Stickerpipe

objC:

#import <Stickerpipe/Stickerpipe.h>

Initializing

Set API key in your AppDelegate.m

[STKStickersManager initWithApiKey:@"API_KEY"];

You can get your own API Key on http://stickerpipe.com to have customized packs set.

Users

User id is required. After it specified, our SDK can provide user-specific packs customization. All changes to displayed packs settings are stored for thus unique keys.

After retrieving user id, set it to STKStickersManager with:

[STKStickersManager setUserKey:@"USER_ID"];

If you don’t have logic for storing such unique id’s, you can use UUID and store it to keychain, for saving between installations.

Presenting

Init STKStickerController and add stickersView as inputView for your UITextView/UITextField. Storing stickerController instance is up to you

@property (strong, nonatomic) STKStickerController *stickerController;

self.stickerController.textInputView = self.inputTextView;

Stickers

Use delegate method for recieving sticker messages from sticker view controller

- (void)  stickerController:(STKStickerController *)stickerController 
didSelectStickerWithMessage:(NSString *)message;

and display it with UIImageView:

- (void)stk_setStickerWithMessage: (NSString*)stickerMessage
                       completion: (STKCompletionBlock)completion;

or just retrieve an image for custom processing with imageManager property:

- (void)getImageForStickerMessage: (NSString*)stickerMessage 
                     withProgress: (STKDownloadingProgressBlock)progressBlock 
                    andCompletion: (STKCompletionBlock)completion;

Modals

Return your controller from delegate method for presenting modal controllers:

- (UIViewController*)stickerControllerViewControllerForPresentingModalView;

Push notifications

Register to push notifications in AppDelegate.

Add

[STKStickersManager sendDeviceToken:deviceToken failure:nil];

method call to delegate method:

- (void)application:(UIApplication )application didRegisterForRemoteNotificationsWithDeviceToken:(NSData )deviceToken  

Add

STKStickerController *stickerController = ...
[STKStickersManager getUserInfo:userInfo stickerController:stickerController];

method call to delegate method:

- (void) application:(UIApplication )application didReceiveRemoteNotification:(NSDictionary )userInfo

Suggests

To add suggestions about stickers you should add UICollectionView to appropriate place on you screen, for example above UITextView. Then attach your collection view to STKStickerController

self.stickerController.suggestCollectionView = self.yourCollectionView;

Enable your suggests with showSuggests property

self.stickerController.showSuggests = YES;

Statistics

To receive correct statistic about number of sent stickers and messages you should call pair of methods textMessageSendStatistic and stickerMessageSendStatistic.

Call textMessageSendStatistic after user send each text message

- (void)yourTextMessageDidSend {
    [self.stickerController textMessageSendStatistic];
}

Call stickerMessageSendStatistic after user send each sticker in delegate method to STKStickerController

- (void)stickerController:(STKStickerController *)stickerController didSelectStickerWithMessage:(NSString *)message {
    [self.stickerController stickerMessageSendStatistic];
}

–°ustomizations

You can change default placeholders color and shop content color:

Placeholder in stickers view

[self.stickerController setColorForStickersPlaceholder:[UIColor redColor]];

Placeholder in stickers view header

[self.stickerController setColorForStickersHeaderPlaceholderColor:[UIColor blueColor]];

Shop content color

[STKStickersManager setShopContentColor:[UIColor greenColor]];

Credits

Add custom Stickers to iMessage with Stickerpipe – http://stickerpipe.com/add-stickers-to-imessage

Contact

[email protected]

License

Stickerpipe is available under the Apache 2 license. See the LICENSE file for more information.

Latest podspec

{
    "name": "StickerPipe",
    "version": "0.4.4",
    "platforms": {
        "ios": "7.0"
    },
    "summary": "Easy stickers SDK for integration in messangers.",
    "homepage": "https://github.com/908Inc/stkiOS",
    "license": "Apache License, Version 2.0",
    "authors": "908 Inc.",
    "source": {
        "git": "https://github.com/908Inc/stkiOS.git",
        "tag": "0.4.4"
    },
    "frameworks": "CoreData",
    "requires_arc": true,
    "dependencies": {
        "AFNetworking": [
            "3.1.0"
        ],
        "DFImageManager": [
            "0.8.0"
        ],
        "MBProgressHUD": [
            "1.0.0"
        ],
        "SDWebImage": [
            "3.8.2"
        ]
    },
    "resources": "SDK/Resources/*",
    "source_files": "SDK/**/*.{h,m}",
    "module_name": "Stickerpipe"
}

Pin It on Pinterest

Share This