Manos Chorianopoulos

method deletion fixes

...@@ -26,7 +26,7 @@ Pod::Spec.new do |spec| ...@@ -26,7 +26,7 @@ Pod::Spec.new do |spec|
26 # spec.vendored_frameworks = "SwiftWarplyFramework.framework" 26 # spec.vendored_frameworks = "SwiftWarplyFramework.framework"
27 spec.exclude_files = "Classes/Exclude" 27 spec.exclude_files = "Classes/Exclude"
28 28
29 - spec.dependency 'RSBarcodes_Swift', '~> 5.1.1' 29 + # spec.dependency 'RSBarcodes_Swift', '~> 5.1.1'
30 spec.dependency 'SwiftEventBus' 30 spec.dependency 'SwiftEventBus'
31 31
32 # spec.resource_bundles = { 'ResourcesBundle' => ['SwiftWarplyFramework/**/*.{png,jpeg,jpg,storyboard,xib,xcassets,json,ttf,imageset,strings}'] } 32 # spec.resource_bundles = { 'ResourcesBundle' => ['SwiftWarplyFramework/**/*.{png,jpeg,jpg,storyboard,xib,xcassets,json,ttf,imageset,strings}'] }
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
41 - (void) application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken; 41 - (void) application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
42 - (void) application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error; 42 - (void) application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error;
43 - (void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo; 43 - (void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo;
44 -- (NSMutableArray *)getInbox;
45 - (NSMutableArray *)getProducts:(NSString *) filter; 44 - (NSMutableArray *)getProducts:(NSString *) filter;
46 - (NSMutableArray*)sendContact:(NSString*)name email:(NSString*)email msisdn:(NSString*)msisdn message:(NSString*)message; 45 - (NSMutableArray*)sendContact:(NSString*)name email:(NSString*)email msisdn:(NSString*)msisdn message:(NSString*)message;
47 - (NSMutableArray *)getContentWithCategory:(NSString *)category tags:(NSArray *)tags; 46 - (NSMutableArray *)getContentWithCategory:(NSString *)category tags:(NSArray *)tags;
...@@ -56,17 +55,13 @@ ...@@ -56,17 +55,13 @@
56 - (NSDictionary *)registerAutoLogin:(NSString *)id password:(NSString *)password name:(NSString*)name email:(NSString*)email segmentation:(NSNumber*)segmentation newsletter:(NSNumber*)newsletter loginType:(NSString*)loginType; 55 - (NSDictionary *)registerAutoLogin:(NSString *)id password:(NSString *)password name:(NSString*)name email:(NSString*)email segmentation:(NSNumber*)segmentation newsletter:(NSNumber*)newsletter loginType:(NSString*)loginType;
57 - (NSDictionary *)refreshToken; 56 - (NSDictionary *)refreshToken;
58 - (NSDictionary *)changePassword:(NSString *)oldPassword newPassword:(NSString *)newPassword; 57 - (NSDictionary *)changePassword:(NSString *)oldPassword newPassword:(NSString *)newPassword;
59 -- (NSDictionary *)getProfile;
60 -- (NSDictionary *)editProfile:(NSString*)firstname andLastname:(NSString*)lastname andEmail:(NSString *)email andSalutation:(NSString *)salutation andMsisdn:(NSString *)msisdn andNickname:(NSString *)nickname andGender:(NSString *)gender andBirthday:(NSString *)birthday andNameDay:(NSString *)nameday andTaxID:(NSString *)taxid andProfileMetadata:(NSDictionary *)profileMetadata optin:(NSNumber *)optin newsLetter:(NSNumber *)newsletter andSMS:(NSNumber *)sms andSegmentation:(NSNumber *)segmentation andSMSSegmentation:(NSNumber *)smsSegmentation;
61 - (NSDictionary *)changeProfileImage:(NSString*)image andUserId:(NSString*)userId; 58 - (NSDictionary *)changeProfileImage:(NSString*)image andUserId:(NSString*)userId;
62 - (NSDictionary*) addCard:(NSString*)number andCardIssuer:(NSString*)cardIssuer andCardHolder:(NSString*)cardHolder andExpirationMonth:(NSString*)expirationMonth andExpirationYear:(NSString*)expirationYear; 59 - (NSDictionary*) addCard:(NSString*)number andCardIssuer:(NSString*)cardIssuer andCardHolder:(NSString*)cardHolder andExpirationMonth:(NSString*)expirationMonth andExpirationYear:(NSString*)expirationYear;
63 - (NSDictionary*) getCards; 60 - (NSDictionary*) getCards;
64 - (NSDictionary*) deleteCard:(NSString*)token; 61 - (NSDictionary*) deleteCard:(NSString*)token;
65 - (NSDictionary*) verifyTicket:(NSString*)guid ticket:(NSString*)ticket; 62 - (NSDictionary*) verifyTicket:(NSString*)guid ticket:(NSString*)ticket;
66 -- (NSDictionary*) getCoupons;
67 - (NSDictionary*) getTransactionHistory; 63 - (NSDictionary*) getTransactionHistory;
68 - (NSDictionary*) getPointsHistory; 64 - (NSDictionary*) getPointsHistory;
69 -- (NSDictionary*) getSharingHistory;
70 - (NSDictionary*)addAddress:(NSString*)friendlyName andAddressName:(NSString*)addressName andAddressNumber:(NSString*)addressNumber andPostalCode:(NSString*)postalCode andFloorNumber:(NSNumber*)floorNumber andDoorbell:(NSString*)doorbel andRegion:(NSString*)region andLatitude:(NSString*)latitude andLongitude:(NSString*)longitude andNotes:(NSString*)notes; 65 - (NSDictionary*)addAddress:(NSString*)friendlyName andAddressName:(NSString*)addressName andAddressNumber:(NSString*)addressNumber andPostalCode:(NSString*)postalCode andFloorNumber:(NSNumber*)floorNumber andDoorbell:(NSString*)doorbel andRegion:(NSString*)region andLatitude:(NSString*)latitude andLongitude:(NSString*)longitude andNotes:(NSString*)notes;
71 - (NSDictionary*)getAddress; 66 - (NSDictionary*)getAddress;
72 - (NSDictionary*)editAddress:(NSString*)friendlyName andAddressName:(NSString*)addressName andAddressNumber:(NSString*)addressNumber andPostalCode:(NSString*)postalCode andFloorNumber:(NSNumber*)floorNumber andDoorbell:(NSString*)doorbel andRegion:(NSString*)region andLatitude:(NSString*)latitude andLongitude:(NSString*)longitude andNotes:(NSString*)notes andUuid:(NSString*)uuid; 67 - (NSDictionary*)editAddress:(NSString*)friendlyName andAddressName:(NSString*)addressName andAddressNumber:(NSString*)addressNumber andPostalCode:(NSString*)postalCode andFloorNumber:(NSNumber*)floorNumber andDoorbell:(NSString*)doorbel andRegion:(NSString*)region andLatitude:(NSString*)latitude andLongitude:(NSString*)longitude andNotes:(NSString*)notes andUuid:(NSString*)uuid;
...@@ -77,7 +72,6 @@ ...@@ -77,7 +72,6 @@
77 - (NSDictionary*)requestOtpWithMsisdn:(NSString*)msisdn andScope:(NSString*)scope; 72 - (NSDictionary*)requestOtpWithMsisdn:(NSString*)msisdn andScope:(NSString*)scope;
78 - (NSDictionary*)retrieveMultilingualMerchantsWithCategories:(NSArray*)categories andDefaultShown:(NSNumber*)defaultShown andCenter:(NSNumber*)center andTags:(NSArray*)tags andUuid:(NSString*)uuid andDistance:(NSNumber*)distance; 73 - (NSDictionary*)retrieveMultilingualMerchantsWithCategories:(NSArray*)categories andDefaultShown:(NSNumber*)defaultShown andCenter:(NSNumber*)center andTags:(NSArray*)tags andUuid:(NSString*)uuid andDistance:(NSNumber*)distance;
79 - (NSDictionary*)getCouponSetsWithActive:(NSNumber*)active andVisible:(NSNumber*)visible andUuids:(NSArray*)uuids; 74 - (NSDictionary*)getCouponSetsWithActive:(NSNumber*)active andVisible:(NSNumber*)visible andUuids:(NSArray*)uuids;
80 -- (NSDictionary*)redeemCouponWithCoupon:(NSString*)coupon :(NSString*)communication_uuid;
81 - (NSDictionary*)validateCouponWithCoupon:(NSString*)coupon; 75 - (NSDictionary*)validateCouponWithCoupon:(NSString*)coupon;
82 - (NSDictionary*)loginCosmoteWithGuid:(NSString*)guid andAppUuid:(NSString*)appUuid andTicket:(NSString*)ticket; 76 - (NSDictionary*)loginCosmoteWithGuid:(NSString*)guid andAppUuid:(NSString*)appUuid andTicket:(NSString*)ticket;
83 - (void)getCouponsUniversalAsync:(NSString*)language :(NSString*)couponsetType :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; 77 - (void)getCouponsUniversalAsync:(NSString*)language :(NSString*)couponsetType :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
......
...@@ -365,33 +365,6 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify"; ...@@ -365,33 +365,6 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
365 [[Warply sharedService].pushManager resetBadge]; 365 [[Warply sharedService].pushManager resetBadge];
366 } 366 }
367 367
368 -- (NSMutableArray *)getInbox {
369 - __block NSArray *in = [NSMutableArray alloc];
370 - __block BOOL isRunLoopNested = NO;
371 - __block BOOL isOperationCompleted = NO;
372 - [[Warply sharedService] getInbox2WithSuccessBlock :^(NSArray *inbox) {
373 - in = inbox;
374 - isOperationCompleted = YES;
375 - if (isRunLoopNested) {
376 - CFRunLoopStop(CFRunLoopGetCurrent()); // CFRunLoopRun() returns
377 - }
378 - } failureBlock:^(NSError *error) {
379 - NSLog(@"%@", error);
380 - in = nil;
381 - isOperationCompleted = YES;
382 - if (isRunLoopNested) {
383 - CFRunLoopStop(CFRunLoopGetCurrent()); // CFRunLoopRun() returns
384 - }
385 - }];
386 - if ( ! isOperationCompleted) {
387 - isRunLoopNested = YES;
388 - NSLog(@"Waiting...");
389 - CFRunLoopRun(); // Magic!
390 - isRunLoopNested = NO;
391 - }
392 - return in;
393 -}
394 -
395 - (NSMutableArray *)getProducts:(NSString *) filter { 368 - (NSMutableArray *)getProducts:(NSString *) filter {
396 __block NSMutableArray *prods = [NSMutableArray alloc]; 369 __block NSMutableArray *prods = [NSMutableArray alloc];
397 __block BOOL isRunLoopNested = NO; 370 __block BOOL isRunLoopNested = NO;
...@@ -799,60 +772,6 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify"; ...@@ -799,60 +772,6 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
799 return resp; 772 return resp;
800 } 773 }
801 774
802 -- (NSDictionary *)getProfile {
803 - __block NSDictionary *resp = [NSDictionary alloc];
804 - __block BOOL isRunLoopNested = NO;
805 - __block BOOL isOperationCompleted = NO;
806 - [[Warply sharedService] getProfileWithSuccessBlock:^(NSDictionary *response) {
807 - resp = response;
808 - isOperationCompleted = YES;
809 - if (isRunLoopNested) {
810 - CFRunLoopStop(CFRunLoopGetCurrent()); // CFRunLoopRun() returns
811 - }
812 - } failureBlock:^(NSError *error) {
813 - NSLog(@"%@", error);
814 - resp = nil;
815 - isOperationCompleted = YES;
816 - if (isRunLoopNested) {
817 - CFRunLoopStop(CFRunLoopGetCurrent()); // CFRunLoopRun() returns
818 - }
819 - }];
820 - if ( ! isOperationCompleted) {
821 - isRunLoopNested = YES;
822 - NSLog(@"Waiting...");
823 - CFRunLoopRun(); // Magic!
824 - isRunLoopNested = NO;
825 - }
826 - return resp;
827 -}
828 -
829 -- (NSDictionary *)editProfile:(NSString*)firstname andLastname:(NSString*)lastname andEmail:(NSString *)email andSalutation:(NSString *)salutation andMsisdn:(NSString *)msisdn andNickname:(NSString *)nickname andGender:(NSString *)gender andBirthday:(NSString *)birthday andNameDay:(NSString *)nameday andTaxID:(NSString *)taxid andProfileMetadata:(NSDictionary *)profileMetadata optin:(NSNumber *)optin newsLetter:(NSNumber *)newsletter andSMS:(NSNumber *)sms andSegmentation:(NSNumber *)segmentation andSMSSegmentation:(NSNumber *)smsSegmentation{
830 - __block NSDictionary *resp = [NSDictionary alloc];
831 - __block BOOL isRunLoopNested = NO;
832 - __block BOOL isOperationCompleted = NO;
833 - [[Warply sharedService] editProfileWithSuccessBlock:firstname andLastName:lastname andEmail:email andSalutation:salutation andMsisdn:msisdn andNickname:nickname andGender:gender andBirthday:birthday andNameDay:nameday andTaxID:taxid andProfileMetadata:profileMetadata optin:optin newsLetter:newsletter andSMS:sms andSegmentation:segmentation andSMSSegmentation:smsSegmentation :^(NSDictionary *response) {
834 - resp = response;
835 - isOperationCompleted = YES;
836 - if (isRunLoopNested) {
837 - CFRunLoopStop(CFRunLoopGetCurrent()); // CFRunLoopRun() returns
838 - }
839 - } failureBlock:^(NSError *error) {
840 - NSLog(@"%@", error);
841 - resp = nil;
842 - isOperationCompleted = YES;
843 - if (isRunLoopNested) {
844 - CFRunLoopStop(CFRunLoopGetCurrent()); // CFRunLoopRun() returns
845 - }
846 - }];
847 - if ( ! isOperationCompleted) {
848 - isRunLoopNested = YES;
849 - NSLog(@"Waiting...");
850 - CFRunLoopRun(); // Magic!
851 - isRunLoopNested = NO;
852 - }
853 - return resp;
854 -}
855 -
856 - (NSDictionary *)changeProfileImage:(NSString*)image andUserId:(NSString*)userId { 775 - (NSDictionary *)changeProfileImage:(NSString*)image andUserId:(NSString*)userId {
857 __block NSDictionary *resp = [NSDictionary alloc]; 776 __block NSDictionary *resp = [NSDictionary alloc];
858 __block BOOL isRunLoopNested = NO; 777 __block BOOL isRunLoopNested = NO;
...@@ -988,33 +907,6 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify"; ...@@ -988,33 +907,6 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
988 return resp; 907 return resp;
989 } 908 }
990 909
991 -- (NSDictionary*) getCoupons {
992 - __block NSDictionary *resp = [NSDictionary alloc];
993 - __block BOOL isRunLoopNested = NO;
994 - __block BOOL isOperationCompleted = NO;
995 - [[Warply sharedService] getCouponsWithSuccessBlock:^(NSDictionary *response) {
996 - resp = response;
997 - isOperationCompleted = YES;
998 - if (isRunLoopNested) {
999 - CFRunLoopStop(CFRunLoopGetCurrent()); // CFRunLoopRun() returns
1000 - }
1001 - } failureBlock:^(NSError *error) {
1002 - NSLog(@"%@", error);
1003 - resp = nil;
1004 - isOperationCompleted = YES;
1005 - if (isRunLoopNested) {
1006 - CFRunLoopStop(CFRunLoopGetCurrent()); // CFRunLoopRun() returns
1007 - }
1008 - }];
1009 - if ( ! isOperationCompleted) {
1010 - isRunLoopNested = YES;
1011 - NSLog(@"Waiting...");
1012 - CFRunLoopRun(); // Magic!
1013 - isRunLoopNested = NO;
1014 - }
1015 - return resp;
1016 -}
1017 -
1018 - (NSDictionary*) getTransactionHistory { 910 - (NSDictionary*) getTransactionHistory {
1019 __block NSDictionary *resp = [NSDictionary alloc]; 911 __block NSDictionary *resp = [NSDictionary alloc];
1020 __block BOOL isRunLoopNested = NO; 912 __block BOOL isRunLoopNested = NO;
...@@ -1069,35 +961,6 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify"; ...@@ -1069,35 +961,6 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
1069 return resp; 961 return resp;
1070 } 962 }
1071 963
1072 -- (NSDictionary*) getSharingHistory
1073 -{
1074 - __block NSDictionary *resp = [NSDictionary alloc];
1075 - __block BOOL isRunLoopNested = NO;
1076 - __block BOOL isOperationCompleted = NO;
1077 - [[Warply sharedService] getSharingHistoryWithSuccessBlock:^(NSDictionary *response) {
1078 - resp = response;
1079 - isOperationCompleted = YES;
1080 - if (isRunLoopNested) {
1081 - CFRunLoopStop(CFRunLoopGetCurrent()); // CFRunLoopRun() returns
1082 - }
1083 - } failureBlock:^(NSError *error) {
1084 - NSLog(@"%@", error);
1085 - resp = nil;
1086 - isOperationCompleted = YES;
1087 - if (isRunLoopNested) {
1088 - CFRunLoopStop(CFRunLoopGetCurrent()); // CFRunLoopRun() returns
1089 - }
1090 - }];
1091 - if ( ! isOperationCompleted) {
1092 - isRunLoopNested = YES;
1093 - NSLog(@"Waiting...");
1094 - CFRunLoopRun(); // Magic!
1095 - isRunLoopNested = NO;
1096 - }
1097 - return resp;
1098 -}
1099 -
1100 -
1101 - (NSDictionary*)addAddress:(NSString*)friendlyName andAddressName:(NSString*)addressName andAddressNumber:(NSString*)addressNumber andPostalCode:(NSString*)postalCode andFloorNumber:(NSNumber*)floorNumber andDoorbell:(NSString*)doorbel andRegion:(NSString*)region andLatitude:(NSString*)latitude andLongitude:(NSString*)longitude andNotes:(NSString*)notes { 964 - (NSDictionary*)addAddress:(NSString*)friendlyName andAddressName:(NSString*)addressName andAddressNumber:(NSString*)addressNumber andPostalCode:(NSString*)postalCode andFloorNumber:(NSNumber*)floorNumber andDoorbell:(NSString*)doorbel andRegion:(NSString*)region andLatitude:(NSString*)latitude andLongitude:(NSString*)longitude andNotes:(NSString*)notes {
1102 __block NSDictionary *resp = [NSDictionary alloc]; 965 __block NSDictionary *resp = [NSDictionary alloc];
1103 __block BOOL isRunLoopNested = NO; 966 __block BOOL isRunLoopNested = NO;
...@@ -1368,33 +1231,6 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify"; ...@@ -1368,33 +1231,6 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
1368 return resp; 1231 return resp;
1369 } 1232 }
1370 1233
1371 -- (NSDictionary*)redeemCouponWithCoupon:(NSString*)coupon :(NSString*)communication_uuid {
1372 - __block NSDictionary *resp = [NSDictionary alloc];
1373 - __block BOOL isRunLoopNested = NO;
1374 - __block BOOL isOperationCompleted = NO;
1375 - [[Warply sharedService] redeemCouponSetsWithSuccessBlock:coupon :communication_uuid :^(NSDictionary *response) {
1376 - resp = response;
1377 - isOperationCompleted = YES;
1378 - if (isRunLoopNested) {
1379 - CFRunLoopStop(CFRunLoopGetCurrent()); // CFRunLoopRun() returns
1380 - }
1381 - } failureBlock:^(NSError *error) {
1382 - NSLog(@"%@", error);
1383 - resp = nil;
1384 - isOperationCompleted = YES;
1385 - if (isRunLoopNested) {
1386 - CFRunLoopStop(CFRunLoopGetCurrent()); // CFRunLoopRun() returns
1387 - }
1388 - }];
1389 - if ( ! isOperationCompleted) {
1390 - isRunLoopNested = YES;
1391 - NSLog(@"Waiting...");
1392 - CFRunLoopRun(); // Magic!
1393 - isRunLoopNested = NO;
1394 - }
1395 - return resp;
1396 -}
1397 -
1398 - (NSDictionary*)validateCouponWithCoupon:(NSString*)coupon { 1234 - (NSDictionary*)validateCouponWithCoupon:(NSString*)coupon {
1399 __block NSDictionary *resp = [NSDictionary alloc]; 1235 __block NSDictionary *resp = [NSDictionary alloc];
1400 __block BOOL isRunLoopNested = NO; 1236 __block BOOL isRunLoopNested = NO;
......
...@@ -2602,6 +2602,11 @@ public class swiftApi { ...@@ -2602,6 +2602,11 @@ public class swiftApi {
2602 2602
2603 // GlobalVariables.loyaltyBadge = loyaltyBadge 2603 // GlobalVariables.loyaltyBadge = loyaltyBadge
2604 } 2604 }
2605 +
2606 +
2607 + public func getCouponList() -> Array<CouponItemModel> {
2608 + return GlobalVariables.couponList
2609 + }
2605 2610
2606 2611
2607 public func setOldCouponList(_ coupons: Array<CouponItemModel>) { 2612 public func setOldCouponList(_ coupons: Array<CouponItemModel>) {
...@@ -3996,7 +4001,7 @@ public class swiftApi { ...@@ -3996,7 +4001,7 @@ public class swiftApi {
3996 } 4001 }
3997 } 4002 }
3998 4003
3999 - public func openSupermarketMap(_ controller: UIViewController) -> Void { 4004 + public func openSupermarketsMap(_ controller: UIViewController) -> Void {
4000 let status = swiftApi().getNetworkStatus() 4005 let status = swiftApi().getNetworkStatus()
4001 if (status == -1 || status == 0) { 4006 if (status == -1 || status == 0) {
4002 swiftApi().showDialog(controller, "Δεν υπάρχει σύνδεση","Αυτή τη στιγμή βρίσκεσαι εκτός σύνδεσης. Παρακαλούμε βεβαιώσου ότι είσαι συνδεδεμένος στο διαδίκτυο και προσπάθησε ξανά.") 4007 swiftApi().showDialog(controller, "Δεν υπάρχει σύνδεση","Αυτή τη στιγμή βρίσκεσαι εκτός σύνδεσης. Παρακαλούμε βεβαιώσου ότι είσαι συνδεδεμένος στο διαδίκτυο και προσπάθησε ξανά.")
......