Commit 0ad9d84e authored by Vincent's avatar Vincent

Version 1.5.3

parents
# OS X
.DS_Store
# Xcode
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
*.xccheckout
profile
*.moved-aside
DerivedData
*.hmap
*.ipa
# Bundler
.bundle
Example/
Carthage
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Note: if you ignore the Pods directory, make sure to uncomment
# `pod install` in .travis.yml
#
# Pods/
# references:
# * http://www.objc.io/issue-6/travis-ci.html
# * https://github.com/supermarin/xcpretty#usage
osx_image: xcode7.3
language: objective-c
# cache: cocoapods
# podfile: Example/Podfile
# before_install:
# - gem install cocoapods # Since Travis is not always on latest version
# - pod install --project-directory=Example
script:
- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/APMBanner.xcworkspace -scheme APMBanner-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint
#
# Be sure to run `pod lib lint APMServices.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'APMServices'
s.version = '1.5.4'
s.summary = 'app\'s miles® boosts your app\'s usage'
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
app\'s miles® boosts your app\'s usage
Increase the traffic to your mobile app by reaching 100% of your visitors rather than the 2% who are converted and nudging them toward more profitable actions (visits, registration, sharing, purchases, feedback, etc.)
Often to make visiting your mobile app an automatic reflex with gifts & gift cards that can be used directly from a cell phone and retain all of the customers in touch with your brand: before, during and after the purchase process
Our technical team supports you in the installation of our SDK
Our marketing experts guides you in setting up your animation campaign
Your account manager creates your campaigns, analyzes them and then returns you the results
Website : http://www.appsmiles.eu/?lang=en
DESC
s.homepage = 'http://gitlab.appsmiles.eu:8181/appsmiles-public/APMServices-SDK-iOS'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Vincent Ducastel' => 'vincent@appsmiles.fr', 'Dev' => 'dev@appsmiles.fr' }
s.source = { :git => 'http://gitlab.appsmiles.eu:8181/appsmiles-public/APMServices-SDK-iOS.git', :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/apps_miles'
s.ios.deployment_target = '7.0'
s.frameworks = 'APMServices'
s.vendored_frameworks = 'APMServices/Frameworks/APMServices.framework'
end
Versions/Current/APMServices
\ No newline at end of file
Versions/Current/Headers
\ No newline at end of file
Versions/Current/Resources
\ No newline at end of file
//
// APMAction.h
// APMServices
//
// Created by Vincent Ducastel on 02/10/2014.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMAction : NSObject<NSCopying>
@property(nonatomic, strong) NSString *actionName;
@property(nonatomic, strong) NSString *classID;
@property(nonatomic, strong) NSArray *tagLabels;
@property(nonatomic, strong) NSArray *properties;
@property(nonatomic, strong) NSArray *deeplinkUrls;
-(id)initWithAction:(NSString*)actionName;
-(id)initWithAction:(NSString*)actionName withLabel:(NSString*)tagLabel forClassID:(NSString*)classID;
-(id)initWithAction:(NSString*)actionName withLabel:(NSString*)tagLabel withProperty:(NSString*)property forClassID:(NSString*)classID;
-(id)initWithAction:(NSString*)actionName withLabels:(NSArray*)tagLabels withProperties:(NSArray*)properties forClassID:(NSString*)classID;
-(void)setDeeplinkUrl:(NSString *)deeplinkUrl;
-(NSString*)tagIDForLabel:(NSString*)tagLabel;
-(NSString*)tagIDMax;
-(BOOL)isValid;
@end
//
// APMAd.h
// AppsMiles
//
// Created by Vincent Ducastel on 14/05/2014.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMAd : NSObject<NSCopying>
@property(assign, nonatomic) NSInteger adID;
@property(strong, nonatomic) NSString *label;
@property(strong, nonatomic) NSString *content;
//Media
@property (nonatomic, strong) NSString *media;
@property (nonatomic, strong) UIImage *imageMedia;
@property (nonatomic, assign) BOOL isImageMediaLoading;
@property (nonatomic, assign) NSInteger countImageMediaLoad;
//Large media
@property (nonatomic, strong) NSString *largeMedia;
@property (nonatomic, strong) UIImage *imageLargeMedia;
@property (nonatomic, assign) BOOL isImageLargeMediaLoading;
@property (nonatomic, assign) NSInteger countImageLargeMediaLoad;
-(id)initWithJSONObject:(NSDictionary*)jsonObject;
@end
//
// APMAnimationUtils.h
// APMServices
//
// Created by Vincent Ducastel on 02/07/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMAnimationUtils : NSObject
+(void)animateScaleInAndScaleOut:(UIView*)view parentView:(UIView*)parentView duration:(NSTimeInterval)duration scaleIn:(CGFloat)scaleIn onAnimationEnd:(void (^)())onAnimationEnd;
+(void)animateFade:(UIView*)view parentView:(UIView*)parentView duration:(NSTimeInterval)duration from:(CGFloat)from to:(CGFloat)to completion:(void (^)(BOOL finished))completion;
+(void)animateScaleInfinite:(UIView*)view duration:(NSTimeInterval)duration toScale:(CGFloat)toScale;
+(void)animationFromScaleAndFadeView:(UIView*)view withParentView:(UIView*)parentView duration:(float)duration scale:(float)scaleValue;
+(void)showLoader:(UIActivityIndicatorView*)loader completion:(void (^)())completion;
+(void)hideLoader:(UIActivityIndicatorView*)loader completion:(void (^)())completion;
+(void)showView:(UIView*)view completion:(void (^)())completion;
+(void)hideView:(UIView*)view completion:(void (^)())completion;
@end
//
// APMArrayUtils.h
// APMServices
//
// Created by Vincent Ducastel on 02/11/2016.
// Copyright © 2016 Moonmiles. All rights reserved.
//
@interface APMArrayUtils : NSObject
+(NSMutableArray*)arrayWithGifts:(NSMutableArray*)array;
+(NSMutableArray*)arrayWithGenerosities:(NSMutableArray*)array;
+(NSMutableArray*)arrayWithHowWorks:(NSMutableArray*)array;
@end
//
// APMBurn.h
// APMServices
//
// Created by Vincent Ducastel on 15/05/2014.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMBurn : NSObject<NSCoding, NSCopying>
@property (nonatomic, assign) NSInteger burnID;
@property (nonatomic, strong) NSDate *burnDate;
@property (nonatomic, strong) NSString *partnerLabel;
@property (nonatomic, strong) NSString *label;
@property (nonatomic, assign) NSInteger value;
@property (nonatomic, assign) NSInteger type;
@property (nonatomic, strong) NSString *code;
@property (nonatomic, strong) NSString *storeID; //storeID only used on app's miles app but commented
@property (nonatomic, strong) NSString *apmScheme; //apmScheme not use on iOS
@property (nonatomic, strong) NSString *urlScheme; //For a gift type URL (startActivity with (urlScheme + code) or only (code)
@property (nonatomic, strong) NSString *conditions;
@property (nonatomic, strong) NSString *media;
@property (nonatomic, strong) UIImage *imageMedia;
@property (nonatomic, assign) NSInteger countImageMediaLoad;
@property (nonatomic, assign) BOOL isImageMediaLoading;
@property (nonatomic, assign) NSInteger nature;
-(id)initWithJSONObject:(NSDictionary*)jsonObject;
-(void)use;
-(void)resetImageMediaLoading;
-(NSString*)burnDateString;
@end
//
// APMCategory.h
// AppsMiles
//
// Created by Vincent Ducastel on 14/05/2014.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMCategory : NSObject<NSCopying>
@property (assign, nonatomic) NSInteger categID;
@property (strong, nonatomic) NSString *categoryLabel;
-(id)initWithJSONObject:(NSDictionary*)jsonObject;
@end
//
// APMDebug.h
// APMServices
//
// Created by Vincent Ducastel on 21/04/2016.
// Copyright © 2016 Moonmiles. All rights reserved.
//
@interface APMDebug : NSObject
@property (nonatomic, assign, readonly) BOOL debugMode;
@property (nonatomic, assign) BOOL mobileDebugMode;
@property (nonatomic, assign) BOOL serverDebugMode;
+(APMDebug*)sharedInstance;
-(void)initDebug;
@end
//
// APMDevice.h
// APMServices
//
// Created by Vincent Ducastel on 11/01/2016.
// Copyright © 2016 Moonmiles. All rights reserved.
//
@interface APMDevice : NSObject<NSCoding, NSCopying>
@property(nonatomic, assign) NSInteger deviceStatus;
-(id)initWithJSONObject:(NSDictionary*)jsonObject;
@end
//
// APMEarn.h
// APMServices
//
// Created by Vincent Ducastel on 15/05/2014.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMEarn : NSObject<NSCoding, NSCopying>
@property (nonatomic, assign) NSInteger earnID;
@property (nonatomic, strong) NSDate *earnDate;
@property (nonatomic, strong) NSString *partnerLabel;
@property (nonatomic, strong) NSString *label;
@property (nonatomic, assign) NSInteger value;
-(id)initWithJSONObject:(NSDictionary*)jsonObject;
-(NSString*)earnDateString;
@end
//
// APMFrequency.h
// APMServices
//
// Created by Vincent Ducastel on 28/05/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMFrequency : NSObject<NSCopying>
@property(nonatomic, strong) NSString *label;
@property(nonatomic, strong) NSString *offset;
@property(nonatomic, assign) NSInteger position;
-(id)initWithJSONObject:(NSDictionary*)jsonObject;
@end
//
// APMFrequencyUtils.h
// APMServices
//
// Created by Vincent Ducastel on 17/03/2016.
// Copyright © 2016 Moonmiles. All rights reserved.
//
@class APMFrequency;
@interface APMFrequencyUtils : NSObject
+(APMFrequency*)getFromList:(NSMutableArray*)list fromPosition:(NSInteger)position;
@end
//
// APMGenerosity.h
// APMServices
//
// Created by Vincent Ducastel on 01/10/2014.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMGenerosity : NSObject <NSCoding, NSCopying>
@property (nonatomic, assign) NSInteger generosityID;
@property(nonatomic, strong) NSString *generosityMsg;
@property(nonatomic, assign) NSInteger generosityValue;
@property(nonatomic, assign) NSInteger generosityFrequence;
@property(nonatomic, strong) NSString *tagID;
@property(nonatomic, strong) NSString *tagLabel;
@property(nonatomic, strong) NSString *actionName;
@property(nonatomic, strong) NSString *classID;
@property(nonatomic, assign) NSInteger generosityCeiling;
@property(nonatomic, strong) NSDate* triggedAt;
@property(nonatomic, assign) double offset;
@property(nonatomic, assign) NSInteger generosityType;
@property(nonatomic, strong) NSString *deeplinkUrl;
-(id)initWithJSONObject:(NSDictionary*)jsonObject;
-(NSString*)getCeilingStr;
-(BOOL)isActived;
-(BOOL)isPlayable;
@end
//
// APMGift.h
// APMServices
//
// Created by Vincent Ducastel on 12/01/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMGift : NSObject<NSCoding, NSCopying>
@property (nonatomic, assign) NSInteger giftID;
@property (nonatomic, strong) NSString *partnerLabel;
@property (nonatomic, strong) NSString *label;
@property (nonatomic, strong) NSString *content;
@property (nonatomic, assign) NSInteger value;
@property (nonatomic, assign) NSInteger type;
@property (nonatomic, strong) NSString *code;
@property (nonatomic, strong) NSString *conditions;
@property (nonatomic, assign) BOOL isEnough;
@property (nonatomic, assign) NSInteger quantity;
@property (nonatomic, assign) NSInteger total;
@property (nonatomic, strong) NSString *confirmMessage;
@property (nonatomic, strong) NSString *media;
@property (nonatomic, strong) UIImage *imageMedia;
@property (nonatomic, assign) BOOL isImageMediaLoading;
@property (nonatomic, assign) NSInteger countImageMediaLoad;
@property (nonatomic, assign) NSInteger nature;
@property (nonatomic, assign) NSInteger accessibility;
-(id)initWithJSONObject:(NSDictionary*)jsonObject;
-(void)resetImageMediaLoading;
-(BOOL)isAccessible;
@end
//
// APMHowWorks.h
// APMServices
//
// Created by Vincent Ducastel on 08/01/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMHowWorks : NSObject<NSCoding, NSCopying>
@property(nonatomic, strong) NSString *label;
@property(nonatomic, strong) NSString *content;
@property(nonatomic, assign) NSInteger type;
@property(nonatomic, strong) NSMutableArray* actions; //For type actions
@property(nonatomic, strong) NSMutableArray* gifts; //For type gifts
@property(nonatomic, assign) NSInteger target; //0 : Not connected, 1 : Connected, 2 : Connected and not connected
-(id)initWithJSONObject:(NSDictionary*)jsonObject;
@end
//
// APMHowWorksUtils.h
// APMServices
//
// Created by Vincent Ducastel on 31/05/2017.
// Copyright © 2017 Moonmiles. All rights reserved.
//
@interface APMHowWorksUtils : NSObject
@property(nonatomic, strong) NSMutableArray *howWorks;
+(APMHowWorksUtils *)sharedInstance;
-(void)initInstance;
-(NSArray*)getHowWorks:(BOOL)userConnected;
-(BOOL)canShowHowWorksConnected:(BOOL)connected;
-(void)successHowWorks:(NSDictionary*)result;
-(void)resetAll;
@end
//
// APMImagesUtils.h
// APMServices
//
// Created by Vincent Ducastel on 10/08/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@class APMGift;
@class APMAd;
@class APMBurn;
@class APMPartner;
@interface APMImagesUtils : NSObject
+(void)buildMediaGift:(APMGift*)gift
imageView:(UIImageView*)imageView tagImageView:(NSInteger)tagImageView
loader:(UIActivityIndicatorView*)loader tagLoader:(NSInteger)tagLoader
logoEmpty:(UIView*)logoEmpty tagLogoEmpty:(NSInteger)tagLogoEmpty
tableView:(id)tableView indexPath:(NSIndexPath*)indexPath;
+(void)buildMediaBurn:(APMBurn*)burn
imageView:(UIImageView*)imageView tagImageView:(NSInteger)tagImageView
loader:(UIActivityIndicatorView*)loader tagLoader:(NSInteger)tagLoader
logoEmpty:(UIView*)logoEmpty tagLogoEmpty:(NSInteger)tagLogoEmpty
tableView:(id)tableView indexPath:(NSIndexPath*)indexPath;
+(void)buildMediaAd:(APMAd*)ad
imageView:(UIImageView*)imageView tagImageView:(NSInteger)tagImageView
loader:(UIActivityIndicatorView*)loader tagLoader:(NSInteger)tagLoader
logoEmpty:(UIView*)logoEmpty tagLogoEmpty:(NSInteger)tagLogoEmpty
tableView:(id)tableView indexPath:(NSIndexPath*)indexPath;
+(void)buildLargeMediaAd:(APMAd*)ad
imageView:(UIImageView*)imageView tagImageView:(NSInteger)tagImageView
loader:(UIActivityIndicatorView*)loader tagLoader:(NSInteger)tagLoader
logoEmpty:(UIView*)logoEmpty tagLogoEmpty:(NSInteger)tagLogoEmpty
tableView:(id)tableView indexPath:(NSIndexPath*)indexPath;
+(void)buildMediaPartner:(APMPartner*)partner
imageView:(UIImageView*)imageView tagImageView:(NSInteger)tagImageView
loader:(UIActivityIndicatorView*)loader tagLoader:(NSInteger)tagLoader
logoEmpty:(UIView*)logoEmpty tagLogoEmpty:(NSInteger)tagLogoEmpty
tableView:(id)tableView indexPath:(NSIndexPath*)indexPath;
+(UIImage*)generateBarcodeImageWithValue:(NSString*)value;
+(UIImage*)generateQRCodeImageWithValue:(NSString*)value;
@end
//
// APMLocalizedString.h
// APMServices
//
// Created by Vincent Ducastel on 01/10/2014.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@class APMProg;
@interface APMLocalizedString : NSString
@property (nonatomic, strong) NSMutableDictionary* traductions;
@property (nonatomic, strong) NSDictionary *localLocalizedStrings;
@property (nonatomic, strong) NSDictionary *boLocalizedStrings;
+ (APMLocalizedString *)sharedInstance;
- (void)initInstance;
-(NSString*)stringForKey:(NSString*)key;
-(void)updateTraductions:(NSDictionary*)result;
-(void)updateBoLocalizedStrings:(APMProg*)prog;
-(void)resetAll;
@end
//
// APMPage.h
// APMServices
//
// Created by Vincent Ducastel on 08/01/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMPage : NSObject<NSCopying>
@property(nonatomic, strong) NSString *label;
@property(nonatomic, strong) NSString *content;
-(id)initWithJSONObject:(NSDictionary*)jsonObject;
@end
//
// APMPartner.h
// AppsMiles
//
// Created by Vincent Ducastel on 14/05/2014.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMPartner : NSObject<NSCopying>
@property(strong, nonatomic) NSString *apmScheme;
@property(strong, nonatomic) NSString *partnerUrl;
@property(strong, nonatomic) NSString *content;
@property(assign, nonatomic) NSInteger maxGenerosity;
@property(assign, nonatomic) NSInteger partnerID;
@property(strong, nonatomic) NSString *partnerLabel;
@property(strong, nonatomic) NSString *storeID;
@property (nonatomic, strong) NSString *media;
@property (nonatomic, strong) UIImage *imageMedia;
@property (nonatomic, assign) BOOL isImageMediaLoading;
@property (nonatomic, assign) NSInteger countImageMediaLoad;
-(id)initWithJSONObject:(NSDictionary*)jsonObject;
@end
//
// APMProg.h
// APMServices
//
// Created by Vincent Ducastel on 01/10/2014.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMProg : NSObject<NSCoding, NSCopying>
@property (nonatomic, assign) BOOL isActive;
@property (nonatomic, strong) NSString *progInfoMsg;
@property (nonatomic, assign) NSInteger offDuration; //Red button to off tag, in hours
@property (nonatomic, strong) NSDate *offDurationEndDate;
@property (nonatomic, assign) NSInteger progTTL; //Time to live, in seconds
@property (nonatomic, strong) NSDate *progTTLEndDate;
@property (nonatomic, assign) NSInteger partnerLevel; //1:FULL, 2:LITE
@property (nonatomic, strong) NSString *defaultLanguage;
-(id)initWithJSONObject:(NSDictionary*)jsonObject;
-(BOOL) isOffDurationElapsed;
-(BOOL) isProgTTLElapsed;
@end
//
// APMServicesController.h
// APMServices
//
// Created by Vincent Ducastel on 24/07/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
#import <CoreLocation/CoreLocation.h>
@class APMEarn;
@class APMUser;
@class APMProg;
@class APMGenerosity;
@class APMGift;
@class APMDevice;
@class APMAction;
@class APMBurn;
@class APMVersions;
@protocol APMServicesListener <NSObject>
-(void)apmServicesOnLoading;
-(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;
@property(nonatomic, assign) BOOL sdkLifeCycleEnabled; //If true, life cycle is enabled, false life cycle is disabled
@property(nonatomic, assign) BOOL sdkIsLoading; //Block lifeCycle of badge if userClientConnect or userClientUpdate (APMServicesUser) is launched
@property(nonatomic, assign) BOOL geolocEnabled;
@property(nonatomic, strong) NSString *baseUrl;
@property(nonatomic, strong) NSString *apmVersionCode;
@property(nonatomic, strong) NSString *apmVersionName;
@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;
//Init
+(APMServices *)sharedInstance;
-(void)initAppWithPartnerID:(NSString*)partnerID withPartnerSecret:(NSString*)partnerSecret;
-(void)initAppWithPartnerID:(NSString*)partnerID withPartnerSecret:(NSString*)partnerSecret withAppId:(NSString*)appId;
//Cycle de vie
-(void)viewWillAppear:(BOOL)animated;
-(void)viewWillAppear:(BOOL)animated classID:(NSString*)classID;
-(void)viewDidAppear:(BOOL)animated;
-(void)viewWillDisappear:(BOOL)animated;
-(void)viewDidDisappear:(BOOL)animated;
//Services
-(void)registerAction:(APMAction*)action;
-(void)removeActionWithActionName:(NSString*)actionName;
-(NSDictionary*)getActionForClassId:(NSString*)classId;
-(void)selectClassID:(NSString*)classID;
-(void)triggerAction:(NSString*)actionName;
-(void)triggerAuto __attribute__((deprecated(("triggerAuto is DEPRECATED, use triggerAction"))));
-(void)triggerAuto:(NSString*)actionName __attribute__((deprecated(("triggerAuto is DEPRECATED, use triggerAction"))));
-(BOOL)handleOpenURL:(NSURL*)url;
//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;
-(BOOL)servicesIsDisabled;
//Other
-(void)resetAll;
@end
//
// APMServicesAd.h
// APMServices
//
// Created by Vincent Ducastel on 19/05/2016.
// Copyright © 2016 Moonmiles. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface APMServicesAd : NSObject
+(void)adList:(NSString*)type adListSuccess:(void (^)(NSMutableArray* ads))adListSuccess failure:(void (^)(NSError* error))failure;
@end
//
// APMServicesApplicationAppsmiles.h
// APMServices
//
// Created by Vincent Ducastel on 19/08/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMServicesApplicationAppsmiles : NSObject
+(BOOL)applicationAppsmilesCompatible;
+(void)downloadAppsmiles;
+(void)launchAppsmilesActionGetToken;
+(void)launchAppsmilesActionGift:(NSInteger)giftID;
+(void)launchAppsmilesActionGifts;
+(void)launchAppsmilesActionBurns;
@end
//
// APMServicesConfig.h
// APMServices
//
// Created by Vincent Ducastel on 01/10/2014.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
// Version of API
#define APM_API_VERSION @"2.0"
#define APM_SERVICES_VERSION_NAME @"1.5.3"
#define APM_SERVICES_VERSION_CODE @"158"
//URL
#define APM_URL_API_PROD @"https://api.appsmiles.eu/" //Url API prod
#define APM_URL_API_SANDBOX @"https://api-sandbox.appsmiles.eu/" //Url API sandbox
#define APM_URL_SITE_APPSMILES @"http://www.appsmiles.eu" //Url du site web
//Partner Level
#define APM_PARTNER_LEVEL_INITIAL 1
#define APM_PARTNER_LEVEL_STANDARD 2
#define APM_PARTNER_LEVEL_PREMIUM 3
//Gender
#define APM_K_USER_GENDER_MME 1
#define APM_K_USER_GENDER_M 2
//Type gift
#define APM_GIFT_TYPE_TEXT 1
#define APM_GIFT_TYPE_BARCODE 2
#define APM_GIFT_TYPE_OBJECT 3
#define APM_GIFT_TYPE_URL 4
#define APM_GIFT_TYPE_EMAIL 5
//Nature gift
#define APM_GIFT_NATURE_POINTS 1
#define APM_GIFT_NATURE_STATUS 2
//Page
#define APM_SHOW_PAGE_CNIL 1
#define APM_SHOW_PAGE_CGU 2
#define APM_SHOW_PAGE_MENTIONS 3
#define APM_SHOW_PAGE_HELPER 4
#define APM_SHOW_PAGE_TUTO 5
#define APM_SHOW_PAGE_INTERSTITIAL 6
#define APM_SHOW_PAGE_APP_ONBOARDING 7
#define APM_SHOW_PAGE_APP_MENTION 8
#define APM_SHOW_PAGE_APP_TUTORIAL 9
#define APM_SHOW_PAGE_APP_INTERSTITIAL 10
//Type howworks
#define APM_HOW_WORKS_TYPE_WEBVIEW 1
#define APM_HOW_WORKS_TYPE_ACTIONS 2
#define APM_HOW_WORKS_TYPE_GIFTS 3
//HowWorks target
#define APM_HOWWORKS_TARGET_ONLY_NOT_CONNECTED 0
#define APM_HOWWORKS_TARGET_ONLY_CONNECTED 1
#define APM_HOWWORKS_TARGET_BOTH 2
//Walkthrough target
#define APM_WALKTHROUGH_TARGET_ONLY_NOT_CONNECTED 0
#define APM_WALKTHROUGH_TARGET_ONLY_CONNECTED 1
#define APM_WALKTHROUGH_TARGET_BOTH 2
//Walkthrough status
#define APM_WALKTHROUGH_STATUS_OFFLINE 0
#define APM_WALKTHROUGH_STATUS_ONLINE 1
// Exceptions
#define APM_EXCEPTION_NO_ERROR 0
// Exceptions server
#define APM_EXCEPTION_ERROR_SERVER 1
#define APM_EXCEPTION_INVALID_TOKEN 2
#define APM_EXCEPTION_MODE_TEST 5
// Exceptions mobiles
#define APM_EXCEPTION_NO_NETWORK -100
#define APM_EXCEPTION_UNKNOWN_ERROR -101
#define APM_EXCEPTION_SERVICE_LOADING -102
#define APM_EXCEPTION_SERVICE_NOT_ACTIVE -103
#define APM_EXCEPTION_CONFIG -105
#define APM_EXCEPTION_ACCOUNT_NOT_CONNECTED -106
#define APM_EXCEPTION_HTTP_REQUEST_ERROR -107
#define APM_EXCEPTION_URL_HTTP_INVALID -108
//Format Date
#define APM_DEFAULT_DATE_FORMAT @"dd/MM/yyyy"
//Device status
#define APM_DEVICE_STATUS_NOT_SET -1
#define APM_DEVICE_STATUS_OK 0
#define APM_DEVICE_STATUS_ANONYMOUS 1
#define APM_DEVICE_STATUS_OPTIN_OFF 2
//Class id
#define APM_CLASS_ID_GLOBAL @"global"
//Class id
#define APM_AD_TYPE_CUMUL @"1"
#define APM_AD_TYPE_BONUS @"2"
//Generosity type
#define APM_GENEROSITY_TYPE_SYSTEMATIC 1
#define APM_GENEROSITY_TYPE_SUGGESTED 2
//
// APMServicesDataUtils.h
// APMServices
//
// Created by Vincent Ducastel on 08/11/2016.
// Copyright © 2016 Moonmiles. All rights reserved.
//
@interface APMServicesDataUtils : NSObject
#pragma mark - JSON
+(BOOL)jsonObject:(NSDictionary*)jsonObject boolForKey:(NSString*)key defaultValue:(BOOL)defaultValue;
+(NSInteger)jsonObject:(NSDictionary*)jsonObject integerForKey:(NSString*)key defaultValue:(NSInteger)defaultValue;
+(double)jsonObject:(NSDictionary*)jsonObject doubleForKey:(NSString*)key defaultValue:(double)defaultValue;
+(id)jsonObject:(NSDictionary*)jsonObject objectForKey:(NSString*)key defaultValue:(id)defaultValue;
+(id)jsonObject:(NSDictionary*)jsonObject arrayForKey:(NSString*)key defaultValue:(id)defaultValue class:(Class)class;
#pragma mark - NSUserDefaults
+(NSInteger)integerValueForKey:(NSString*)key defaultValue:(NSInteger)defaultValue;
+(void)setIntegerValue:(NSInteger)value forkey:(NSString*)key;
+(BOOL)boolValueForKey:(NSString*)key defaultValue:(BOOL)defaultValue;
+(void)setBoolValue:(BOOL)value forkey:(NSString*)key;
+(void)removeKey:(NSString*)key;
@end
//
// APMServicesGenerosity.h
// APMServices
//
// Created by Vincent Ducastel on 07/08/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@class APMGenerosity;
@interface APMServicesGenerosity : NSObject
+(void)generosityList:(NSString*)classId generosityListSuccess:(void (^)(NSMutableArray* generosities))generosityListSuccess failure:(void (^)(NSError* error))failure;
+(void)generositySave:(APMGenerosity*)generosity value:(NSInteger)value frequence:(NSInteger)frequence ceiling:(NSInteger)ceiling generositySaveSuccess:(void (^)(APMGenerosity* generosity))generositySaveSuccess failure:(void (^)(NSError* error))failure;
+(void)generosityRemove:(APMGenerosity*)generosity generosityRemoveSuccess:(void (^)(APMGenerosity* generosity))generosityRemoveSuccess failure:(void (^)(NSError* error))failure;
@end
//
// APMServicesGift.h
// APMServices
//
// Created by Vincent Ducastel on 06/08/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@class APMGift;
@class APMUser;
@class APMBurn;
@interface APMServicesGift : NSObject
+(void)giftCheckAvailability:(APMGift*)gift giftCheckAvailabilitySuccess:(void (^)(APMUser* user, APMBurn* burn))giftCheckAvailabilitySuccess failure:(void (^)(NSError* error))failure;
+(void)giftList:(NSString*)categoryId amount:(NSString*)amount giftListSuccess:(void (^)(NSMutableArray* gifts))giftListSuccess failure:(void (^)(NSError* error))failure;
+(void)giftCategoryListWithGiftCategoryListSuccess:(void (^)(NSMutableArray* giftCategories))giftCategoryListSuccess failure:(void (^)(NSError* error))failure;
+(void)giftView:(NSString*)giftID giftViewSuccess:(void (^)(APMGift* gift))giftViewSuccess failure:(void (^)(NSError* error))failure;
@end
//
// APMServicesHeaders.h
// APMServices
//
// Created by Vincent Ducastel on 01/10/2014.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
#import "APMServices.h"
#import "APMServicesConfig.h"
#import "APMServicesApplicationAppsmiles.h"
#import "APMServicesJavaScriptInterface.h"
#import "APMServicesAd.h"
#import "APMServicesPartner.h"
#import "APMServicesUser.h"
#import "APMServicesGenerosity.h"
#import "APMServicesGift.h"
#import "APMServicesImage.h"
#import "APMServicesPage.h"
#import "APMServicesStatistic.h"
#import "APMServicesLog.h"
#import "APMServicesUtils.h"
#import "APMLocalizedString.h"
#import "UIAlertView+APMBlocks.h"
#import "APMAnimationUtils.h"
#import "APMImagesUtils.h"
#import "APMServicesShareUtils.h"
#import "APMAction.h"
#import "APMUser.h"
#import "APMGenerosity.h"
#import "APMGift.h"
#import "APMProg.h"
#import "APMEarn.h"
#import "APMBurn.h"
#import "APMFrequency.h"
#import "APMFrequencyUtils.h"
#import "APMPage.h"
#import "APMAd.h"
#import "APMPartner.h"
#import "APMCategory.h"
#import "APMDevice.h"
#import "APMDebug.h"
#import "APMHowWorks.h"
#import "APMHowWorksUtils.h"
#import "APMArrayUtils.h"
#import "APMServicesTest.h"
#import "APMServicesPreferences.h"
#import "APMWalkthrough.h"
#import "APMWalkthroughsUtils.h"
#import "APMServicesDataUtils.h"
#import "APMUserStatus.h"
#import "APMUserStatusUtils.h"
#import "APMServicesStore.h"
#import "APMStore.h"
#import "APMViewUtils.h"
#import "APMServicesResources.h"
#import "APMWebServices.h"
#import "APMServicesConfigPrivate.h"
//
// APMServicesImage.h
// APMServices
//
// Created by Vincent Ducastel on 07/08/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMServicesImage : NSObject
+(void)getImage:(NSString*)url getImageSuccess:(void (^)(UIImage* image))getImageSuccess failure:(void (^)(NSError* error))failure;
@end
//
// APMServicesJSInterface.h
// APMServices
//
// Created by Vincent Ducastel on 13/08/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMServicesJavaScriptInterface : NSObject
+(BOOL)webView:(UIWebView *)webView handleUrlSchemeAppsmiles:(NSURLRequest *)request;
@end
//
// APMServicesLog.h
// APMServices
//
// Created by Vincent Ducastel on 27/07/2016.
// Copyright © 2016 Moonmiles. All rights reserved.
//
@interface APMServicesLog : NSObject
+(void)logSave:(NSDictionary*)params success:(void (^)())success failure:(void (^)(NSError* error))failure;
@end
//
// APMServicesPage.h
// APMServices
//
// Created by Vincent Ducastel on 07/08/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMServicesPage : NSObject
+(void)page:(NSInteger)page pageSuccess:(void (^)(NSMutableArray* pages))pageSuccess failure:(void (^)(NSError* error))failure;
@end
//
// APMServicesPartner.h
// APMServices
//
// Created by Vincent Ducastel on 19/05/2016.
// Copyright © 2016 Moonmiles. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface APMServicesPartner : NSObject
+(void)partnerList:(NSString*)categoryID partnerListSuccess:(void (^)(NSMutableArray* partners))partnerListSuccess failure:(void (^)(NSError* error))failure;
@end
//
// APMServicesPreferences.h
// APMServices
//
// Created by Vincent Ducastel on 03/11/2016.
// Copyright © 2016 Moonmiles. All rights reserved.
//
@interface APMServicesPreferences : NSObject
+(NSInteger) getPartnerLevel;
+(void) setPartnerLevel:(NSInteger)value;
+(BOOL) isHowWorksShowed;
+(void) setHowWorksShowed:(BOOL)value;
+(BOOL) isServerDebugMode;
+(void) setServerDebugMode:(BOOL)value;
+(NSInteger) getServicesDataVersion;
+(void) setServicesDataVersion:(NSInteger)value;
+(BOOL) isServicesOnError;
+(void) setServicesOnError:(BOOL)value;
+(void) resetAll;
@end
//
// APMServicesResources.h
// APM
//
// Created by Vincent Ducastel on 14/09/2017.
// Copyright © 2017 Moonmiles. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface APMServicesResources : NSObject
+(NSBundle*)bundle;
+(NSBundle*)bundleWithName:(NSString*)name;
@end
//
// APMServicesShareUtils.h
// APMServices
//
// Created by Vincent Ducastel on 20/08/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
#import <MessageUI/MessageUI.h>
@interface APMServicesShareUtils : NSObject
+ (void)shareEmail:(UIViewController*)controller from:(NSString*)from subject:(NSString*)subject message:(NSString*)message image:(UIImage*)image delegate:(id<MFMailComposeViewControllerDelegate>)delegate;
+ (void)shareSms:(UIViewController*)controller message:(NSString*)message image:(UIImage*)image delegate:(id<MFMessageComposeViewControllerDelegate>)delegate;
@end
//
// APMServicesStatistic.h
// APMServices
//
// Created by Vincent Ducastel on 13/06/2016.
// Copyright © 2016 Moonmiles. All rights reserved.
//
@interface APMServicesStatistic : NSObject
+(void)statisticGenerosityDisplay:(NSString*)generosityID tagID:(NSString*)tagID success:(void (^)())success failure:(void (^)(NSError* error))failure;
+(void)statisticGiftDisplay:(NSString*)giftID giftLabel:(NSString*)giftLabel success:(void (^)())success failure:(void (^)(NSError* error))failure;
@end
//
// APMServicesStore.h
// APMServices
//
// Created by Vincent Ducastel on 27/03/2017.
// Copyright © 2017 Moonmiles. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface APMServicesStore : NSObject
+(void)storeListSuccess:(void (^)(NSMutableArray* stores))storeListSuccess failure:(void (^)(NSError* error))failure;
@end
//
// APMServicesTest.h
// APMServices
//
// Created by Vincent Ducastel on 02/11/2016.
// Copyright © 2016 Moonmiles. All rights reserved.
//
@interface APMServicesTest : NSObject
+(NSMutableArray*)getHowWorksTest;
@end
//
// APMServicesUser.h
// APMServices
//
// Created by Vincent Ducastel on 06/08/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@class APMUser;
@interface APMServicesUser : NSObject
+(void)userConnect:(NSString*)email password:(NSString*)password segments:(NSDictionary*)segments userConnectSuccess:(void (^)(APMUser* user))userConnectSuccess failure:(void (^)(NSError* error))failure;
+(void)userClientConnect:(NSDictionary*)user userConnectSuccess:(void (^)(APMUser* user))userConnectSuccess failure:(void (^)(NSError* error))failure;
+(void)userClientConnect:(NSString*)firstname lastname:(NSString*)lastname email:(NSString*)email password:(NSString*)password facebookId:(NSString*)facebookId partnerClientId:(NSString*)partnerClientId oldClientId:(NSString*)oldClientId segments:(NSDictionary*)segments userConnectSuccess:(void (^)(APMUser* user))userConnectSuccess failure:(void (^)(NSError* error))failure;
+(void)userLogout:(void (^)())userLogoutSuccess failure:(void (^)(NSError* error))failure;
+(void)userCreate:(NSString*)firstname lastname:(NSString*)lastname email:(NSString*)email password:(NSString*)password facebookId:(NSString*)facebookId segments:(NSDictionary*)segments userCreateSuccess:(void (^)(APMUser* user))userCreateSuccess failure:(void (^)(NSError* error))failure;
+(void)userSave:(NSString*)firstname lastname:(NSString*)lastname mobile:(NSString*)mobile gender:(NSString*)gender birthday:(NSString*)birthday city:(NSString*)city facebookId:(NSString*)facebookId segments:(NSDictionary*)segments userSaveSuccess:(void (^)(APMUser* user))userSaveSuccess failure:(void (^)(NSError* error))failure;
+(void)userClientSave:(NSDictionary*)user userSaveSuccess:(void (^)(APMUser* user))userSaveSuccess failure:(void (^)(NSError* error))failure;
+(void)userClientSave:(NSString*)email firstname:(NSString*)firstname lastname:(NSString*)lastname mobile:(NSString*)mobile gender:(NSString*)gender birthday:(NSString*)birthday city:(NSString*)city facebookId:(NSString*)facebookId partnerClientId:(NSString*)partnerClientId segments:(NSDictionary*)segments userSaveSuccess:(void (^)(APMUser* user))userSaveSuccess failure:(void (^)(NSError* error))failure;
+(void)userSavePassword:(NSString*)oldPassword newPassword:(NSString*)newPassword confirmPassword:(NSString*)confirmPassword userSavePasswordSuccess:(void (^)(APMUser* user))userSavePasswordSuccess failure:(void (^)(NSError* error))failure;
+(void)userRefresh:(void (^)(APMUser* user))userRefreshSuccess failure:(void (^)(NSError* error))failure;
+(void)userResetPassword:(NSString*)email userResetPasswordSuccess:(void (^)(NSString* message))userResetPasswordSuccess failure:(void (^)(NSError* error))failure;
+(void)userHistory:(void (^)(APMUser* user, NSMutableArray* earns, NSMutableArray* burns))userHistorySuccess failure:(void (^)(NSError* error))failure;
+(void)userHistoryBurns:(void (^)(NSMutableArray* burns))userHistoryBurnsSuccess failure:(void (^)(NSError* error))failure;
+(void)userHistoryEarns:(void (^)(NSMutableArray* earns))userHistoryEarnsSuccess failure:(void (^)(NSError* error))failure;
+(void)userUnsubscribeWithComment:(NSString*)comment userUnsubscribeSuccess:(void (^)())userUnsubscribeSuccess failure:(void (^)(NSError* error))failure;
+(void)userContact:(NSString*)comment userContactSuccess:(void (^)(NSString* message))userContactSuccess failure:(void (^)(NSError* error))failure;
+(void)userEvaluate:(NSString*)note comment:(NSString*)comment userEvaluateSuccess:(void (^)(NSString* message))userEvaluateSuccess failure:(void (^)(NSError* error))failure;
+(void)userGetSettingsWithUserGetSettingsSuccess:(void (^)(BOOL notifPush, BOOL notifMail, BOOL notifSMS))userGetSettingsSuccess failure:(void (^)(NSError* error))failure;
+(void)userSaveSettings:(BOOL)push mail:(BOOL)mail sms:(BOOL)sms phone:(NSString*)phone userSaveSettingsSuccess:(void (^)())userSaveSettingsSuccess failure:(void (^)(NSError* error))failure;
+(void)userCheckTokenWithUserCheckTokenSuccess:(void (^)(APMUser* user))userCheckTokenSuccess failure:(void (^)(NSError* error))failure;
+(void)userFBConnect:(NSString*)email fbID:(NSString*)fbID partnerClientId:(NSString*)partnerClientId segments:(NSDictionary*)segments userFBConnectSuccess:(void (^)(APMUser* user))userFBConnectSuccess failure:(void (^)(NSError* error))failure;
+(void)userSavePushToken:(NSString*)pushToken userSavePushTokenSuccess:(void (^)())userSavePushTokenSuccess failure:(void (^)(NSError* error))failure;
@end
//
// APMServicesUtils.h
// APMServices
//
// Created by Vincent Ducastel on 24/07/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMServicesUtils : NSObject
+(void)debugLog:(NSString*)log;
+(void)debugLog:(NSString*)log force:(BOOL)force;
+(NSDate*)dateFromString:(NSString*)dateString dateFormat:(NSString*)dateFormat;
+(NSString*)stringFromDate:(NSDate*)date dateFormat:(NSString*)dateFormat;
+(void)store:(id)object def:(NSString*)def;
+(id)load:(NSString*)def;
+(void)remove:(NSString*)def;
+(NSDictionary*)paramsFromURL:(NSURL*)url;
+(BOOL)checkCoverage;
+(NSString*)schemeUrl;
+(BOOL)isSandbox;
+(void)showPopupLocationManager;
+(NSMutableArray*) createListActionsFromJsonActions:(NSDictionary*)actions;
+(NSString*)getAPMSchemeWithPartnerID:(NSString*)partnerID;
+(UIImage*)getPartnerIcon;
+(BOOL)emailValid:(NSString*)email;
+(NSMutableAttributedString*)getAttributedString:(NSString*)text withColor:(UIColor*)textColor andSize:(CGFloat)textSize andFont:(NSString*)textFont;
+(NSMutableAttributedString*)getAttributedStringFromSimpleHtml:(NSString*)text color:(NSString*)color size:(NSString*)size font:(NSString*)font;
+(NSString*)stringFromHtmlString:(NSString*)html;
+(NSInteger)getScreenWidth;
+(NSInteger)getScreenHeight;
+(NSInteger)getStatusBarWidth;
+(NSInteger)getStatusBarHeight;
+(float)radiansToDegrees:(float)radians;
+(float)degreesToRadians:(float)angle;
+(BOOL)isModal:(UIViewController*)controller;
+(BOOL)isWindowModal:(UIWindow*)window;
+(NSComparisonResult)systemVersionEqualTo:(NSString*)v;
+(NSComparisonResult)systemVersionGreaterThan:(NSString*)v;
+(NSComparisonResult)systemVersionGreaterThanOrEqualTo:(NSString*)v;
+(NSComparisonResult)systemVersionLessThan:(NSString*)v;
+(NSComparisonResult)systemVersionLessThanOrEqualTo:(NSString*)v;
+(NSComparisonResult)systemVersionXcodeLessThan:(NSString*)v;
+(NSMutableParagraphStyle*)createStyle:(CGFloat)lineHeightMultiple lineSpacing:(CGFloat)lineSpacing;
+(void)copy:(NSString*)copy;
+(NSString*)getLanguageCode;
+(UIView*)getCellFromCollectionView:(UIView*)tableView indexPath:(NSIndexPath*)indexPath;
+(UIColor*)uiColorFromHexaColor:(NSString*)hexaValue;
+(NSString *)hexStringFromColor:(UIColor *)color;
+(BOOL)isIos7;
+(BOOL)isIos9;
+(BOOL)isAtLeastIos10;
+(NSString*)stringUnicodeFromString:(NSString*)unicodeString;
+(NSString*)stringJsonFromDictionary:(NSDictionary*)jsonObject;
+(NSDictionary*)dictionaryFromStringJson:(NSString*)strValue;
+(NSInteger)heightContentWebView:(UIWebView*)webview;
+(NSString*)stringByStrippingHTML:(NSString*)string;
+(NSString*)nameOfApplication;
@end
//
// APMStore.h
// APMServices
//
// Created by Vincent Ducastel on 09/01/2017.
// Copyright © 2017 Moonmiles. All rights reserved.
//
#import <Foundation/Foundation.h>
#define APM_K_STORE_LIST @"stores"
#define APM_K_STORE_ID @"storeID"
#define APM_K_STORE_LABEL @"label"
#define APM_K_STORE_LAT @"gpsLat"
#define APM_K_STORE_LNG @"gpsLong"
#define APM_K_STORE_ADDRESS_1 @"address1"
#define APM_K_STORE_ADDRESS_2 @"address2"
#define APM_K_STORE_POSTAL_CODE @"cp"
#define APM_K_STORE_CITY @"city"
#define APM_K_STORE_PHONE @"phone"
#define APM_K_STORE_OPENING @"opening"
#define APM_K_STORE_DESCRIPTION @"description"
@interface APMStore : NSObject<NSCoding, NSCopying>
@property(nonatomic, assign) NSInteger identifiant;
@property(nonatomic, strong) NSString *label;
@property(nonatomic, strong) NSString *lat;
@property(nonatomic, strong) NSString *lng;
@property(nonatomic, strong) NSString *address1;
@property(nonatomic, strong) NSString *address2;
@property(nonatomic, strong) NSString *postalCode;
@property(nonatomic, strong) NSString *city;
@property(nonatomic, strong) NSString *phone;
@property(nonatomic, strong) NSString *opening;
@property(nonatomic, strong) NSString *desc;
-(instancetype)initWithJSONObject:(NSDictionary*)jsonObject;
@end
//
// APMUser.h
// APMServices
//
// Created by Vincent Ducastel on 01/10/2014.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@interface APMUser : NSObject<NSCoding, NSCopying>
@property(nonatomic, strong) NSString *userToken;
@property(nonatomic, assign) BOOL isAdmin;
@property(nonatomic, assign) NSInteger userBalance;
@property(nonatomic, assign) NSInteger userObsoleteBalance;
@property(nonatomic, assign) NSInteger totalEarn;
@property(nonatomic, assign) NSInteger status;
@property(nonatomic, strong) NSDate *birthDate;
@property(nonatomic, strong) NSString *email;
@property(nonatomic, strong) NSString *password;
@property(nonatomic, strong) NSString *firstName;
@property(nonatomic, assign) NSInteger gender;
@property(nonatomic, strong) NSString *lastName;
@property(nonatomic, strong) NSString *mobileNumber;
@property(nonatomic, strong) NSString *town;
@property(nonatomic, strong) NSString *facebookID;
@property(nonatomic, strong) NSString *partnerClientId;
@property(nonatomic, strong) NSMutableDictionary *segments;
@property(nonatomic, strong) NSString *loyaltyId;
@property(nonatomic, strong) id customParams;
-(void)initWithJSONObject:(NSDictionary*)jsonObject;
-(BOOL)isConnected;
-(NSString*)birthdateString;
-(void)setBirthdateString:(NSString*)birthdateString;
-(NSString*)balanceString;
-(NSString*)genderString;
-(void)setGenderString:(NSString*)genderString;
-(NSDictionary*) getUserDictionary;
- (BOOL)isSameSegments:(NSDictionary*)segments;
@end
//
// APMUserStatus.h
// APMServices
//
// Created by Vincent Ducastel on 09/01/2017.
// Copyright © 2017 Moonmiles. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface APMUserStatus : NSObject<NSCoding, NSCopying>
@property(nonatomic, assign) NSInteger identifiant;
@property(nonatomic, strong) NSString *label;
@property(nonatomic, strong) NSString *illus;
@property(nonatomic, strong) NSString *desc;
@property(nonatomic, strong) NSString *color;
@property(nonatomic, assign) NSInteger step;
-(instancetype)initWithJSONObject:(NSDictionary*)jsonObject;
@end
//
// APMUserStatusUtils.h
// APMServices
//
// Created by Vincent Ducastel on 09/01/2017.
// Copyright © 2017 Moonmiles. All rights reserved.
//
#import <Foundation/Foundation.h>
@class APMUserStatus;
@interface APMUserStatusUtils : NSObject
+(NSMutableArray*)arrayWithStatus:(NSMutableArray*)array;
+(APMUserStatus*)statusFromId:(NSInteger)identifiant withStatus:(NSMutableArray*)array;
+(APMUserStatus*)nextStatusFromCurrentStatus:(APMUserStatus*)currentStatus withStatus:(NSMutableArray*)array;
@end
//
// APMViewUtils.h
// APMServices
//
// Created by Vincent Ducastel on 26/05/2017.
// Copyright © 2017 Moonmiles. All rights reserved.
//
@interface APMViewUtils : NSObject
+(void)loadXIBView:(NSString*)nibName inView:(UIView*)inView withBundle:(NSBundle*)bundle;
+(void)setFont:(NSString*)fontName forLabel:(UILabel*)label;
+(void)setFont:(NSString*)fontName withSize:(CGFloat)size forLabel:(UILabel*)label;
@end
//
// APMWalkthrough.h
// APMServices
//
// Created by Vincent Ducastel on 08/01/2015.
// Copyright (c) 2015 Moonmiles. All rights reserved.
//
@class APMUser;
@interface APMWalkthrough : NSObject<NSCoding, NSCopying>
@property(nonatomic, assign) NSInteger identifiant;
@property(nonatomic, strong) NSString *label;
@property(nonatomic, strong) NSString *content;
@property(nonatomic, assign) NSInteger threshold;
@property(nonatomic, assign) NSInteger delay;
@property(nonatomic, assign) NSInteger target; //0 : Not connected, 1 : Connected, 2 : Connected and not connected
@property(nonatomic, assign) BOOL clearable;
@property(nonatomic, assign) NSInteger status; //0 : Offline, 1 : Online
@property(nonatomic, strong) NSDate *viewedAt;
@property(nonatomic, assign) NSInteger count;
-(instancetype)initWithJSONObject:(NSDictionary*)jsonObject;
-(BOOL)isViewed;
-(BOOL)isViewableForUser:(APMUser*)user;
-(BOOL)isOnline;
@end
//
// APMWalkthroughsUtils.h
// APMServices
//
// Created by Vincent Ducastel on 04/01/2017.
// Copyright © 2017 Moonmiles. All rights reserved.
//
#import <Foundation/Foundation.h>
@class APMWalkthrough;
@class APMUser;
@interface APMWalkthroughsUtils : NSObject
@property(nonatomic, strong) NSMutableArray *walkthroughs;
@property (nonatomic, strong) APMWalkthrough* nextWalkthrough;
+(APMWalkthroughsUtils *)sharedInstance;
-(void)initInstance;
-(NSMutableArray*)arrayWithWalkthroughs:(NSMutableArray*)array;
-(void)resetAllWalkthroughsClearable;
-(void)showNextWalkthrough;
-(void)saveWalkthroughs:(NSMutableArray*)walkthroughs;
-(void)successWalkthroughs:(NSDictionary*)result;
-(void)resetAll;
@end
//
// UIAlertView+NSCookbook.m
// SimpleAlertViewSampleApp
//
// Copyright (c) 2013 NSCookbook. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <objc/runtime.h>
@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) 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) 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;
+(void) showWithMessage:(NSString*) message cancelButtonTitle:(NSString *)cancelButtonTitle;
void import_UIAlertViewAPMBlocks ( );
@end
\ No newline at end of file
Copyright (c) 2017 Vincent <vincent@appsmiles.fr>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
# APMServices
[![Version](https://img.shields.io/cocoapods/v/APMServices.svg?style=flat)](http://cocoapods.org/pods/APMServices)
## Installation
APMServices is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod 'APMServices'
```
## Next
See the next step on our website [http://www.appsmiles.eu/docs/apmservices/ios/](http://www.appsmiles.eu/docs/apmservices/ios/)
## Author
Vincent, vincent@appsmiles.fr
Example/Pods/Pods.xcodeproj
\ No newline at end of file
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