Commit 933ed191 authored by Vincent's avatar Vincent

Version 1.6.0

parent d3edb408
......@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = 'APMServices'
s.version = '1.5.3'
s.version = '1.6.0'
s.summary = 'app\'s miles® boosts your app\'s usage'
# This description is used to generate tags and improve search results.
......
......@@ -6,7 +6,9 @@
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMAction : NSObject<NSCopying>
#import "APMModel.h"
@interface APMAction : APMModel<NSCopying>
@property(nonatomic, strong) NSString *actionName;
@property(nonatomic, strong) NSString *classID;
......
......@@ -6,7 +6,9 @@
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMAd : NSObject<NSCopying>
#import "APMModel.h"
@interface APMAd : APMModel<NSCopying>
@property(assign, nonatomic) NSInteger adID;
@property(strong, nonatomic) NSString *label;
......
//
// APMAlertControllerUtils.h
// APMServices
//
// Created by Vincent Ducastel on 21/12/2017.
// Copyright © 2017 Moonmiles. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface APMAlertControllerUtils : NSObject
+(void)showAlertViewInController:(UIViewController*)controller title:(NSString*)title message:(NSString*)message buttons:(NSArray*)buttons onClickButton:(void(^)(NSInteger buttonIndex))onClickButton;
+(void)showAlertViewInController:(UIViewController*)controller title:(NSString*)title message:(NSString*)message button:(NSString*)button;
@end
......@@ -11,5 +11,6 @@
+(NSMutableArray*)arrayWithGifts:(NSMutableArray*)array;
+(NSMutableArray*)arrayWithGenerosities:(NSMutableArray*)array;
+(NSMutableArray*)arrayWithHowWorks:(NSMutableArray*)array;
+(NSMutableArray*)arrayWithPages:(NSMutableArray*)array;
@end
......@@ -6,7 +6,9 @@
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMBurn : NSObject<NSCoding, NSCopying>
#import "APMModel.h"
@interface APMBurn : APMModel<NSCoding, NSCopying>
@property (nonatomic, assign) NSInteger burnID;
@property (nonatomic, strong) NSDate *burnDate;
......
......@@ -6,7 +6,9 @@
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMCategory : NSObject<NSCopying>
#import "APMModel.h"
@interface APMCategory : APMModel<NSCopying>
@property (assign, nonatomic) NSInteger categID;
@property (strong, nonatomic) NSString *categoryLabel;
......
......@@ -6,7 +6,9 @@
// Copyright © 2016 Moonmiles. All rights reserved.
//
@interface APMDevice : NSObject<NSCoding, NSCopying>
#import "APMModel.h"
@interface APMDevice : APMModel<NSCoding, NSCopying>
@property(nonatomic, assign) NSInteger deviceStatus;
......
......@@ -6,7 +6,9 @@
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMEarn : NSObject<NSCoding, NSCopying>
#import "APMModel.h"
@interface APMEarn : APMModel<NSCoding, NSCopying>
@property (nonatomic, assign) NSInteger earnID;
@property (nonatomic, strong) NSDate *earnDate;
......
......@@ -6,7 +6,9 @@
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMFrequency : NSObject<NSCopying>
#import "APMModel.h"
@interface APMFrequency : APMModel<NSCopying>
@property(nonatomic, strong) NSString *label;
@property(nonatomic, strong) NSString *offset;
......
......@@ -6,7 +6,9 @@
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMGenerosity : NSObject <NSCoding, NSCopying>
#import "APMModel.h"
@interface APMGenerosity : APMModel<NSCoding, NSCopying>
@property (nonatomic, assign) NSInteger generosityID;
@property(nonatomic, strong) NSString *generosityMsg;
......
......@@ -6,7 +6,9 @@
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMGift : NSObject<NSCoding, NSCopying>
#import "APMModel.h"
@interface APMGift : APMModel<NSCoding, NSCopying>
@property (nonatomic, assign) NSInteger giftID;
@property (nonatomic, strong) NSString *partnerLabel;
......
......@@ -6,7 +6,9 @@
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMHowWorks : NSObject<NSCoding, NSCopying>
#import "APMModel.h"
@interface APMHowWorks : APMModel<NSCoding, NSCopying>
@property(nonatomic, strong) NSString *label;
@property(nonatomic, strong) NSString *content;
......
//
// APMModel.h
// APMServices
//
// Created by Vincent Ducastel on 09/01/2017.
// Copyright © 2017 Moonmiles. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface APMModel : NSObject
-(NSMutableDictionary*)toDictionary;
@end
......@@ -6,7 +6,9 @@
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMPage : NSObject<NSCopying>
#import "APMModel.h"
@interface APMPage : APMModel<NSCopying>
@property(nonatomic, strong) NSString *label;
@property(nonatomic, strong) NSString *content;
......
......@@ -6,7 +6,9 @@
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMPartner : NSObject<NSCopying>
#import "APMModel.h"
@interface APMPartner : APMModel<NSCopying>
@property(strong, nonatomic) NSString *apmScheme;
@property(strong, nonatomic) NSString *partnerUrl;
......
......@@ -6,7 +6,9 @@
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMProg : NSObject<NSCoding, NSCopying>
#import "APMModel.h"
@interface APMProg : APMModel<NSCoding, NSCopying>
@property (nonatomic, assign) BOOL isActive;
@property (nonatomic, strong) NSString *progInfoMsg;
......@@ -21,5 +23,4 @@
-(BOOL) isOffDurationElapsed;
-(BOOL) isProgTTLElapsed;
@end
//
// APMReactUtils.h
// APMServices
//
// Created by Vincent Ducastel on 04/01/2018.
// Copyright © 2018 Moonmiles. All rights reserved.
//
@interface APMReactUtils : NSObject
+(NSMutableArray*)toArrayOfDictionary:(NSMutableArray*)fromArray;
@end
......@@ -24,36 +24,10 @@
-(void)apmServicesReady:(BOOL)newInfos;
-(void)apmServicesDisable;
-(void)apmServicesUserWinPoints:(APMEarn*)earn user:(APMUser*)user;
-(void)apmServicesShowError:(NSError*)error;
@end
@interface APMServices : NSObject<CLLocationManagerDelegate>
{
BOOL _applicationInBackground; //Use for catch event applicationWillResignActive and applicationDidBecomeActive : can laucnh initAPM
BOOL _applicationHandleOpenUrl; //Use for catch event applicationOpenUrl : if true, initAPM don't launched
NSString *_apmScheme;
NSInteger _partnerLevel; //Partner level, directly setted by APMProg
APMUser *_user;
APMProg *_prog;
APMGenerosity *_generosity;
APMGift *_gift;
APMDevice *_device;
NSMutableDictionary *_registeredActions;
NSString *_classID;
NSMutableArray *_frequencies;
NSMutableArray *_values;
NSMutableArray *_stackTask;
NSString *_tagIDFounded;
//Geoloc
CLLocationManager *_locationManager;
NSInteger _tryUpdateLocation;
}
@property (weak, nonatomic) id<APMServicesListener> servicesListener;
......@@ -67,11 +41,21 @@
@property(nonatomic, strong) NSString *appID;
@property(nonatomic, strong) NSString *partnerID;
@property(nonatomic, strong) NSString *partnerSecret;
@property(nonatomic, strong) NSMutableArray *status;
@property(nonatomic, strong) NSMutableArray *generosities;
@property(nonatomic, strong) APMVersions* versions;
@property(nonatomic, strong) NSMutableDictionary* theme;
//Models
@property(nonatomic, strong, readonly) APMDevice* device;
@property(nonatomic, strong, readonly) APMProg* prog;
@property(nonatomic, strong) APMUser* user;
@property(nonatomic, strong, readonly) APMGift* gift;
@property(nonatomic, strong, readonly) APMGenerosity* generosity;
@property(nonatomic, strong, readonly) NSMutableArray *generosities;
@property(nonatomic, strong, readonly) NSMutableArray *status;
@property(nonatomic, strong, readonly) NSMutableDictionary* theme;
@property(nonatomic, strong, readonly) NSString *classID;
@property(nonatomic, strong, readonly) NSMutableArray *frequencies;
@property(nonatomic, strong, readonly) NSMutableArray *values;
//Init
+(APMServices *)sharedInstance;
......@@ -97,15 +81,6 @@
//Getter and Setter
-(BOOL)isInitialLevel;
-(void)setUser:(APMUser*)user;
-(APMUser*)user;
-(APMProg*)prog;
-(APMGenerosity*)generosity;
-(APMGift*)gift;
-(APMDevice*)device;
-(NSMutableArray*)frequencies;
-(NSMutableArray*)values;
-(NSString*)classId;
-(BOOL)debugMode;
-(void)setDebugMode:(BOOL)debugMode;
-(BOOL)servicesIsOnError;
......
......@@ -8,8 +8,8 @@
// Version of API
#define APM_API_VERSION @"2.0"
#define APM_SERVICES_VERSION_NAME @"1.5.3"
#define APM_SERVICES_VERSION_CODE @"158"
#define APM_SERVICES_VERSION_NAME @"1.6.0"
#define APM_SERVICES_VERSION_CODE @"1600"
//URL
#define APM_URL_API_PROD @"https://api.appsmiles.eu/" //Url API prod
......@@ -97,7 +97,7 @@
//Class id
#define APM_CLASS_ID_GLOBAL @"global"
//Class id
//Ads
#define APM_AD_TYPE_CUMUL @"1"
#define APM_AD_TYPE_BONUS @"2"
......
......@@ -114,6 +114,7 @@
#define APM_K_GENEROSITY_ID @"generosityID"
#define APM_K_GENEROSITY_TAGID @"tagID"
#define APM_K_GENEROSITY_TAGLABEL @"tagLabel"
#define APM_K_GENEROSITY_ACTION_NAME @"actionName"
#define APM_K_GENEROSITY_FREQUENCIES @"frequencies"
#define APM_K_GENEROSITY_FREQUENCIES_LABEL @"label"
#define APM_K_GENEROSITY_FREQUENCIES_OFFSET @"offset"
......
......@@ -54,6 +54,9 @@
#import "APMStore.h"
#import "APMViewUtils.h"
#import "APMServicesResources.h"
#import "APMAlertControllerUtils.h"
#import "APMModel.h"
#import "APMReactUtils.h"
#import "APMWebServices.h"
#import "APMServicesConfigPrivate.h"
......@@ -49,6 +49,7 @@
+(NSString *)hexStringFromColor:(UIColor *)color;
+(BOOL)isIos7;
+(BOOL)isIos9;
+(BOOL)isAtLeastIos8;
+(BOOL)isAtLeastIos10;
+(NSString*)stringUnicodeFromString:(NSString*)unicodeString;
+(NSString*)stringJsonFromDictionary:(NSDictionary*)jsonObject;
......
......@@ -7,6 +7,7 @@
//
#import <Foundation/Foundation.h>
#import "APMModel.h"
#define APM_K_STORE_LIST @"stores"
#define APM_K_STORE_ID @"storeID"
......@@ -21,7 +22,7 @@
#define APM_K_STORE_OPENING @"opening"
#define APM_K_STORE_DESCRIPTION @"description"
@interface APMStore : NSObject<NSCoding, NSCopying>
@interface APMStore : APMModel<NSCoding, NSCopying>
@property(nonatomic, assign) NSInteger identifiant;
@property(nonatomic, strong) NSString *label;
......
......@@ -6,7 +6,9 @@
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMUser : NSObject<NSCoding, NSCopying>
#import "APMModel.h"
@interface APMUser : APMModel<NSCoding, NSCopying>
@property(nonatomic, strong) NSString *userToken;
@property(nonatomic, assign) BOOL isAdmin;
......@@ -35,7 +37,6 @@
-(NSString*)balanceString;
-(NSString*)genderString;
-(void)setGenderString:(NSString*)genderString;
-(NSDictionary*) getUserDictionary;
- (BOOL)isSameSegments:(NSDictionary*)segments;
@end
......@@ -7,8 +7,9 @@
//
#import <Foundation/Foundation.h>
#import "APMModel.h"
@interface APMUserStatus : NSObject<NSCoding, NSCopying>
@interface APMUserStatus : APMModel<NSCoding, NSCopying>
@property(nonatomic, assign) NSInteger identifiant;
@property(nonatomic, strong) NSString *label;
......
......@@ -6,9 +6,11 @@
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
#import "APMModel.h"
@class APMUser;
@interface APMWalkthrough : NSObject<NSCoding, NSCopying>
@interface APMWalkthrough : APMModel<NSCoding, NSCopying>
@property(nonatomic, assign) NSInteger identifiant;
@property(nonatomic, strong) NSString *label;
......
......@@ -26,11 +26,10 @@
@interface UIAlertView (APMBlocks)
- (void)showWithClickButton:(void(^)(NSInteger buttonIndex))onClickButton onDismiss:(void(^)(NSInteger buttonIndex))onDismiss;
+(void) showWithTitle:(NSString*) title message:(NSString*) message cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitles:(NSArray*) otherButtonTitles onClickButton:(void(^)( NSInteger buttonIndex))onClickButton onDismiss:(void(^)( NSInteger buttonIndex))onDismiss;
+(void) showWithTitle:(NSString*) title message:(NSString*) message cancelButtonTitle:(NSString *)cancelButtonTitle validationButtonTitle:(NSString*) validationButtonTitle onClickButton:(void(^)(NSInteger buttonIndex))onClickButton onDismiss:(void(^)(NSInteger buttonIndex))onDismiss;
- (void)showWithClickButton:(void(^)(NSInteger buttonIndex))onClickButton;
+(void) showWithTitle:(NSString*) title message:(NSString*) message cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitles:(NSArray*) otherButtonTitles onClickButton:(void(^)( NSInteger buttonIndex))onClickButton;
+(void) showWithTitle:(NSString*) title message:(NSString*) message cancelButtonTitle:(NSString *)cancelButtonTitle validationButtonTitle:(NSString*) validationButtonTitle onClickButton:(void(^)(NSInteger buttonIndex))onClickButton;
+(void) showWithTitle:(NSString*) title message:(NSString*) message cancelButtonTitle:(NSString *)cancelButtonTitle onClickButton:(void(^)(NSInteger buttonIndex))onClickButton;
+(void) showWithTitle:(NSString*) title message:(NSString*) message cancelButtonTitle:(NSString *)cancelButtonTitle onClickButton:(void(^)( NSInteger buttonIndex))onClickButton;
+(void) showWithMessage:(NSString*) message cancelButtonTitle:(NSString *)cancelButtonTitle validationButtonTitle:(NSString*) validationButtonTitle onClickButton:(void(^)( NSInteger buttonIndex))onClickButton;
+(void) showWithMessage:(NSString*) message cancelButtonTitle:(NSString *)cancelButtonTitle onClickButton:(void(^)( NSInteger buttonIndex))onClickButton;
+(void) showWithTitle:(NSString*) title message:(NSString*) message cancelButtonTitle:(NSString *)cancelButtonTitle;
......@@ -38,4 +37,4 @@
void import_UIAlertViewAPMBlocks ( );
@end
\ No newline at end of file
@end
......@@ -8,7 +8,7 @@ APMServices is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod 'APMServices'
pod 'APMServices', '~> 1.6.0'
```
## Next
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment