mirror of
https://github.com/purplecabbage/phonegap-plugins.git
synced 2026-01-13 16:38:08 -05:00
56 lines
1.4 KiB
Objective-C
56 lines
1.4 KiB
Objective-C
//
|
|
// AppBladePlugin.m
|
|
// HelloWorld
|
|
//
|
|
// Created by Michele Titolo on 5/14/12.
|
|
// Copyright (c) 2012 AppBlade. All rights reserved.
|
|
//
|
|
|
|
#import "AppBladePlugin.h"
|
|
#import "AppBlade.h"
|
|
|
|
enum {
|
|
ABProjectID = 0,
|
|
ABToken,
|
|
ABSecretKey,
|
|
ABTimestamp
|
|
};
|
|
|
|
@implementation AppBladePlugin
|
|
|
|
- (void)setupAppBlade:(NSMutableArray*)args withDict:(NSMutableDictionary*)options
|
|
{
|
|
NSArray* keys = [args objectAtIndex:0];
|
|
NSLog(@"Setup with stuff: %@", keys);
|
|
NSString* project = [keys objectAtIndex:ABProjectID];
|
|
NSString* token = [keys objectAtIndex:ABToken];
|
|
NSString* secret = [keys objectAtIndex:ABSecretKey];
|
|
NSString* timestamp = [keys objectAtIndex:ABTimestamp];
|
|
|
|
AppBlade *blade = [AppBlade sharedManager];
|
|
blade.appBladeProjectID = project;
|
|
blade.appBladeProjectToken = token;
|
|
blade.appBladeProjectSecret = secret;
|
|
blade.appBladeProjectIssuedTimestamp = timestamp;
|
|
}
|
|
|
|
- (void)catchAndReportCrashes:(NSMutableArray *)args withDict:(NSMutableDictionary *)options
|
|
{
|
|
NSLog(@"Catch and Report Crashes");
|
|
[[AppBlade sharedManager] catchAndReportCrashes];
|
|
}
|
|
|
|
- (void)checkAuthentication:(NSMutableArray *)args withDict:(NSMutableDictionary *)options
|
|
{
|
|
NSLog(@"Check approval");
|
|
[[AppBlade sharedManager] checkApproval];
|
|
}
|
|
|
|
- (void)allowFeedbackReporting:(NSMutableArray *)args withDict:(NSMutableDictionary *)options
|
|
{
|
|
NSLog(@"Allow Feedback");
|
|
[[AppBlade sharedManager] allowFeedbackReporting];
|
|
}
|
|
|
|
@end
|