Manos Chorianopoulos

rollback session expiration

...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key> 7 <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key>
8 <dict> 8 <dict>
9 <key>orderHint</key> 9 <key>orderHint</key>
10 - <integer>1</integer> 10 + <integer>0</integer>
11 </dict> 11 </dict>
12 </dict> 12 </dict>
13 </dict> 13 </dict>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key> 7 <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key>
8 <dict> 8 <dict>
9 <key>orderHint</key> 9 <key>orderHint</key>
10 - <integer>0</integer> 10 + <integer>1</integer>
11 </dict> 11 </dict>
12 </dict> 12 </dict>
13 </dict> 13 </dict>
......
...@@ -676,32 +676,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -676,32 +676,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
676 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 676 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
677 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 677 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
678 678
679 - NSString* errorDomain = [error domain]; 679 +// NSString* errorDomain = [error domain];
680 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 680 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
681 - 681 +//
682 - if (failure) { 682 +// if (failure) {
683 - failure(errorToken); 683 +// failure(errorToken);
684 - } 684 +// }
685 685
686 -// [self refreshToken:^(NSDictionary *response) { 686 + [self refreshToken:^(NSDictionary *response) {
687 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 687 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
688 -// if (success) { 688 + if (success) {
689 -// success(contextResponse); 689 + success(contextResponse);
690 -// } 690 + }
691 -// NSLog(@"**************** WARPLY Response *****************" ); 691 + NSLog(@"**************** WARPLY Response *****************" );
692 -// NSLog(@"%@", contextResponse ); 692 + NSLog(@"%@", contextResponse );
693 -// } failureBlock:^(NSError *error) { 693 + } failureBlock:^(NSError *error) {
694 -// if (failure) { 694 + if (failure) {
695 -// failure(error); 695 + failure(error);
696 -// } 696 + }
697 -// }]; 697 + }];
698 -// } failureBlock:^(NSError *error) { 698 + } failureBlock:^(NSError *error) {
699 -// if (failure) { 699 + if (failure) {
700 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 700 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
701 -// failure(error); 701 + failure(error);
702 -// } 702 + }
703 -// NSLog(@"Error at token %@", error ); 703 + NSLog(@"Error at token %@", error );
704 -// }]; 704 + }];
705 } else { 705 } else {
706 NSLog(@"Error at get Campaigns Personalized %@", error ); 706 NSLog(@"Error at get Campaigns Personalized %@", error );
707 failure(error); 707 failure(error);
...@@ -1738,30 +1738,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1738,30 +1738,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1738 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 1738 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
1739 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 1739 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
1740 1740
1741 - NSString* errorDomain = [error domain]; 1741 +// NSString* errorDomain = [error domain];
1742 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 1742 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
1743 - 1743 +//
1744 - if (failure) { 1744 +// if (failure) {
1745 - failure(errorToken); 1745 +// failure(errorToken);
1746 - } 1746 +// }
1747 1747
1748 -// [self refreshToken:^(NSDictionary *response) { 1748 + [self refreshToken:^(NSDictionary *response) {
1749 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 1749 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
1750 -// if (success) { 1750 + if (success) {
1751 -// success(contextResponse); 1751 + success(contextResponse);
1752 -// } 1752 + }
1753 -// } failureBlock:^(NSError *error) { 1753 + } failureBlock:^(NSError *error) {
1754 -// if (failure) { 1754 + if (failure) {
1755 -// failure(error); 1755 + failure(error);
1756 -// } 1756 + }
1757 -// }]; 1757 + }];
1758 -// } failureBlock:^(NSError *error) { 1758 + } failureBlock:^(NSError *error) {
1759 -// if (failure) { 1759 + if (failure) {
1760 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 1760 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
1761 -// failure(error); 1761 + failure(error);
1762 -// } 1762 + }
1763 -// NSLog(@"Error at token %@", error ); 1763 + NSLog(@"Error at token %@", error );
1764 -// }]; 1764 + }];
1765 } else { 1765 } else {
1766 NSLog(@"Error at change password %@", error ); 1766 NSLog(@"Error at change password %@", error );
1767 failure(error); 1767 failure(error);
...@@ -1804,33 +1804,33 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1804,33 +1804,33 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1804 1804
1805 // NSError *errorToken = [NSError errorWithDomain:WARP_ERROR_DOMAIN code:401 userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@"Empty response", @"Warply")}]; 1805 // NSError *errorToken = [NSError errorWithDomain:WARP_ERROR_DOMAIN code:401 userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@"Empty response", @"Warply")}];
1806 1806
1807 - NSString* errorDomain = [error domain]; 1807 +// NSString* errorDomain = [error domain];
1808 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 1808 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
1809 -
1810 - if (failure) {
1811 - failure(errorToken);
1812 - }
1813 -
1814 -// [self refreshToken:^(NSDictionary *response) {
1815 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
1816 -// if (success) {
1817 -// success(contextResponse);
1818 -// }
1819 -// NSLog(@"**************** WARPLY Response *****************" );
1820 -// NSLog(@"%@", contextResponse );
1821 -// } failureBlock:^(NSError *error) {
1822 // 1809 //
1823 -// if (failure) { 1810 +// if (failure) {
1824 -// failure(error); 1811 +// failure(errorToken);
1825 -// } 1812 +// }
1826 -// }]; 1813 +
1827 -// } failureBlock:^(NSError *error) { 1814 + [self refreshToken:^(NSDictionary *response) {
1828 -// if (failure) { 1815 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
1829 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 1816 + if (success) {
1830 -// failure(error); 1817 + success(contextResponse);
1831 -// } 1818 + }
1832 -// NSLog(@"Error at token %@", error ); 1819 + NSLog(@"**************** WARPLY Response *****************" );
1833 -// }]; 1820 + NSLog(@"%@", contextResponse );
1821 + } failureBlock:^(NSError *error) {
1822 +
1823 + if (failure) {
1824 + failure(error);
1825 + }
1826 + }];
1827 + } failureBlock:^(NSError *error) {
1828 + if (failure) {
1829 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
1830 + failure(error);
1831 + }
1832 + NSLog(@"Error at token %@", error );
1833 + }];
1834 } else { 1834 } else {
1835 NSLog(@"Error at get profile %@", error ); 1835 NSLog(@"Error at get profile %@", error );
1836 failure(error); 1836 failure(error);
...@@ -1876,32 +1876,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1876,32 +1876,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1876 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 1876 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
1877 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 1877 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
1878 1878
1879 - NSString* errorDomain = [error domain]; 1879 +// NSString* errorDomain = [error domain];
1880 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 1880 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
1881 - 1881 +//
1882 - if (failure) { 1882 +// if (failure) {
1883 - failure(errorToken); 1883 +// failure(errorToken);
1884 - } 1884 +// }
1885 1885
1886 -// [self refreshToken:^(NSDictionary *response) { 1886 + [self refreshToken:^(NSDictionary *response) {
1887 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 1887 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
1888 -// if (success) { 1888 + if (success) {
1889 -// success(contextResponse); 1889 + success(contextResponse);
1890 -// } 1890 + }
1891 -// NSLog(@"**************** WARPLY Response *****************" ); 1891 + NSLog(@"**************** WARPLY Response *****************" );
1892 -// NSLog(@"%@", contextResponse ); 1892 + NSLog(@"%@", contextResponse );
1893 -// } failureBlock:^(NSError *error) { 1893 + } failureBlock:^(NSError *error) {
1894 -// if (failure) { 1894 + if (failure) {
1895 -// failure(error); 1895 + failure(error);
1896 -// } 1896 + }
1897 -// }]; 1897 + }];
1898 -// } failureBlock:^(NSError *error) { 1898 + } failureBlock:^(NSError *error) {
1899 -// if (failure) { 1899 + if (failure) {
1900 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 1900 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
1901 -// failure(error); 1901 + failure(error);
1902 -// } 1902 + }
1903 -// NSLog(@"Error at token %@", error ); 1903 + NSLog(@"Error at token %@", error );
1904 -// }]; 1904 + }];
1905 } else { 1905 } else {
1906 NSLog(@"Error at post Event %@", error ); 1906 NSLog(@"Error at post Event %@", error );
1907 failure(error); 1907 failure(error);
...@@ -1992,32 +1992,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1992,32 +1992,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1992 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 1992 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
1993 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 1993 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
1994 1994
1995 - NSString* errorDomain = [error domain]; 1995 +// NSString* errorDomain = [error domain];
1996 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 1996 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
1997 - 1997 +//
1998 - if (failure) { 1998 +// if (failure) {
1999 - failure(errorToken); 1999 +// failure(errorToken);
2000 - } 2000 +// }
2001 2001
2002 -// [self refreshToken:^(NSDictionary *response) { 2002 + [self refreshToken:^(NSDictionary *response) {
2003 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2003 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2004 -// if (success) { 2004 + if (success) {
2005 -// success(contextResponse); 2005 + success(contextResponse);
2006 -// } 2006 + }
2007 -// NSLog(@"**************** WARPLY Response *****************" ); 2007 + NSLog(@"**************** WARPLY Response *****************" );
2008 -// NSLog(@"%@", contextResponse ); 2008 + NSLog(@"%@", contextResponse );
2009 -// } failureBlock:^(NSError *error) { 2009 + } failureBlock:^(NSError *error) {
2010 -// if (failure) { 2010 + if (failure) {
2011 -// failure(error); 2011 + failure(error);
2012 -// } 2012 + }
2013 -// }]; 2013 + }];
2014 -// } failureBlock:^(NSError *error) { 2014 + } failureBlock:^(NSError *error) {
2015 -// if (failure) { 2015 + if (failure) {
2016 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2016 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2017 -// failure(error); 2017 + failure(error);
2018 -// } 2018 + }
2019 -// NSLog(@"Error at token %@", error ); 2019 + NSLog(@"Error at token %@", error );
2020 -// }]; 2020 + }];
2021 } else { 2021 } else {
2022 NSLog(@"Error at edit profile %@", error ); 2022 NSLog(@"Error at edit profile %@", error );
2023 failure(error); 2023 failure(error);
...@@ -2043,32 +2043,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2043,32 +2043,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2043 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 2043 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
2044 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 2044 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
2045 2045
2046 - NSString* errorDomain = [error domain]; 2046 +// NSString* errorDomain = [error domain];
2047 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 2047 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
2048 - 2048 +//
2049 - if (failure) { 2049 +// if (failure) {
2050 - failure(errorToken); 2050 +// failure(errorToken);
2051 - } 2051 +// }
2052 2052
2053 -// [self refreshToken:^(NSDictionary *response) { 2053 + [self refreshToken:^(NSDictionary *response) {
2054 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2054 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2055 -// if (success) { 2055 + if (success) {
2056 -// success(contextResponse); 2056 + success(contextResponse);
2057 -// } 2057 + }
2058 -// NSLog(@"**************** WARPLY Response *****************" ); 2058 + NSLog(@"**************** WARPLY Response *****************" );
2059 -// NSLog(@"%@", contextResponse ); 2059 + NSLog(@"%@", contextResponse );
2060 -// } failureBlock:^(NSError *error) { 2060 + } failureBlock:^(NSError *error) {
2061 -// if (failure) { 2061 + if (failure) {
2062 -// failure(error); 2062 + failure(error);
2063 -// } 2063 + }
2064 -// }]; 2064 + }];
2065 -// } failureBlock:^(NSError *error) { 2065 + } failureBlock:^(NSError *error) {
2066 -// if (failure) { 2066 + if (failure) {
2067 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2067 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2068 -// failure(error); 2068 + failure(error);
2069 -// } 2069 + }
2070 -// NSLog(@"Error at token %@", error ); 2070 + NSLog(@"Error at token %@", error );
2071 -// }]; 2071 + }];
2072 } else { 2072 } else {
2073 NSLog(@"Error at get pacing details %@", error ); 2073 NSLog(@"Error at get pacing details %@", error );
2074 failure(error); 2074 failure(error);
...@@ -2094,32 +2094,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2094,32 +2094,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2094 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 2094 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
2095 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 2095 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
2096 2096
2097 - NSString* errorDomain = [error domain]; 2097 +// NSString* errorDomain = [error domain];
2098 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 2098 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
2099 - 2099 +//
2100 - if (failure) { 2100 +// if (failure) {
2101 - failure(errorToken); 2101 +// failure(errorToken);
2102 - } 2102 +// }
2103 2103
2104 -// [self refreshToken:^(NSDictionary *response) { 2104 + [self refreshToken:^(NSDictionary *response) {
2105 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2105 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2106 -// if (success) { 2106 + if (success) {
2107 -// success(contextResponse); 2107 + success(contextResponse);
2108 -// } 2108 + }
2109 -// NSLog(@"**************** WARPLY Response *****************" ); 2109 + NSLog(@"**************** WARPLY Response *****************" );
2110 -// NSLog(@"%@", contextResponse ); 2110 + NSLog(@"%@", contextResponse );
2111 -// } failureBlock:^(NSError *error) { 2111 + } failureBlock:^(NSError *error) {
2112 -// if (failure) { 2112 + if (failure) {
2113 -// failure(error); 2113 + failure(error);
2114 -// } 2114 + }
2115 -// }]; 2115 + }];
2116 -// } failureBlock:^(NSError *error) { 2116 + } failureBlock:^(NSError *error) {
2117 -// if (failure) { 2117 + if (failure) {
2118 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2118 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2119 -// failure(error); 2119 + failure(error);
2120 -// } 2120 + }
2121 -// NSLog(@"Error at token %@", error ); 2121 + NSLog(@"Error at token %@", error );
2122 -// }]; 2122 + }];
2123 } else { 2123 } else {
2124 NSLog(@"Error at set pacing details %@", error ); 2124 NSLog(@"Error at set pacing details %@", error );
2125 failure(error); 2125 failure(error);
...@@ -2182,32 +2182,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2182,32 +2182,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2182 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 2182 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
2183 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 2183 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
2184 2184
2185 - NSString* errorDomain = [error domain]; 2185 +// NSString* errorDomain = [error domain];
2186 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 2186 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
2187 - 2187 +//
2188 - if (failure) { 2188 +// if (failure) {
2189 - failure(errorToken); 2189 +// failure(errorToken);
2190 - } 2190 +// }
2191 2191
2192 -// [self refreshToken:^(NSDictionary *response) { 2192 + [self refreshToken:^(NSDictionary *response) {
2193 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2193 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2194 -// if (success) { 2194 + if (success) {
2195 -// success(contextResponse); 2195 + success(contextResponse);
2196 -// } 2196 + }
2197 -// NSLog(@"**************** WARPLY Response *****************" ); 2197 + NSLog(@"**************** WARPLY Response *****************" );
2198 -// NSLog(@"%@", contextResponse ); 2198 + NSLog(@"%@", contextResponse );
2199 -// } failureBlock:^(NSError *error) { 2199 + } failureBlock:^(NSError *error) {
2200 -// if (failure) { 2200 + if (failure) {
2201 -// failure(error); 2201 + failure(error);
2202 -// } 2202 + }
2203 -// }]; 2203 + }];
2204 -// } failureBlock:^(NSError *error) { 2204 + } failureBlock:^(NSError *error) {
2205 -// if (failure) { 2205 + if (failure) {
2206 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2206 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2207 -// failure(error); 2207 + failure(error);
2208 -// } 2208 + }
2209 -// NSLog(@"Error at token %@", error ); 2209 + NSLog(@"Error at token %@", error );
2210 -// }]; 2210 + }];
2211 } else { 2211 } else {
2212 NSLog(@"Error at consumer Integration %@", error ); 2212 NSLog(@"Error at consumer Integration %@", error );
2213 failure(error); 2213 failure(error);
...@@ -2231,30 +2231,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2231,30 +2231,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2231 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 2231 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
2232 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 2232 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
2233 2233
2234 - NSString* errorDomain = [error domain]; 2234 +// NSString* errorDomain = [error domain];
2235 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 2235 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
2236 - 2236 +//
2237 - if (failure) { 2237 +// if (failure) {
2238 - failure(errorToken); 2238 +// failure(errorToken);
2239 - } 2239 +// }
2240 2240
2241 -// [self refreshToken:^(NSDictionary *response) { 2241 + [self refreshToken:^(NSDictionary *response) {
2242 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2242 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2243 -// if (success) { 2243 + if (success) {
2244 -// success(contextResponse); 2244 + success(contextResponse);
2245 -// } 2245 + }
2246 -// } failureBlock:^(NSError *error) { 2246 + } failureBlock:^(NSError *error) {
2247 -// if (failure) { 2247 + if (failure) {
2248 -// failure(error); 2248 + failure(error);
2249 -// } 2249 + }
2250 -// }]; 2250 + }];
2251 -// } failureBlock:^(NSError *error) { 2251 + } failureBlock:^(NSError *error) {
2252 -// if (failure) { 2252 + if (failure) {
2253 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2253 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2254 -// failure(error); 2254 + failure(error);
2255 -// } 2255 + }
2256 -// NSLog(@"Error at token %@", error ); 2256 + NSLog(@"Error at token %@", error );
2257 -// }]; 2257 + }];
2258 } else { 2258 } else {
2259 NSLog(@"Error at change profile image %@", error ); 2259 NSLog(@"Error at change profile image %@", error );
2260 failure(error); 2260 failure(error);
...@@ -2278,30 +2278,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2278,30 +2278,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2278 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 2278 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
2279 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 2279 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
2280 2280
2281 - NSString* errorDomain = [error domain]; 2281 +// NSString* errorDomain = [error domain];
2282 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 2282 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
2283 - 2283 +//
2284 - if (failure) { 2284 +// if (failure) {
2285 - failure(errorToken); 2285 +// failure(errorToken);
2286 - } 2286 +// }
2287 2287
2288 -// [self refreshToken:^(NSDictionary *response) { 2288 + [self refreshToken:^(NSDictionary *response) {
2289 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2289 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2290 -// if (success) { 2290 + if (success) {
2291 -// success(contextResponse); 2291 + success(contextResponse);
2292 -// } 2292 + }
2293 -// } failureBlock:^(NSError *error) { 2293 + } failureBlock:^(NSError *error) {
2294 -// if (failure) { 2294 + if (failure) {
2295 -// failure(error); 2295 + failure(error);
2296 -// } 2296 + }
2297 -// }]; 2297 + }];
2298 -// } failureBlock:^(NSError *error) { 2298 + } failureBlock:^(NSError *error) {
2299 -// if (failure) { 2299 + if (failure) {
2300 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2300 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2301 -// failure(error); 2301 + failure(error);
2302 -// } 2302 + }
2303 -// NSLog(@"Error at token %@", error ); 2303 + NSLog(@"Error at token %@", error );
2304 -// }]; 2304 + }];
2305 } else { 2305 } else {
2306 NSLog(@"Error at add card %@", error ); 2306 NSLog(@"Error at add card %@", error );
2307 failure(error); 2307 failure(error);
...@@ -2325,30 +2325,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2325,30 +2325,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2325 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 2325 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
2326 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 2326 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
2327 2327
2328 - NSString* errorDomain = [error domain]; 2328 +// NSString* errorDomain = [error domain];
2329 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 2329 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
2330 - 2330 +//
2331 - if (failure) { 2331 +// if (failure) {
2332 - failure(errorToken); 2332 +// failure(errorToken);
2333 - } 2333 +// }
2334 2334
2335 -// [self refreshToken:^(NSDictionary *response) { 2335 + [self refreshToken:^(NSDictionary *response) {
2336 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2336 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2337 -// if (success) { 2337 + if (success) {
2338 -// success(contextResponse); 2338 + success(contextResponse);
2339 -// } 2339 + }
2340 -// } failureBlock:^(NSError *error) { 2340 + } failureBlock:^(NSError *error) {
2341 -// if (failure) { 2341 + if (failure) {
2342 -// failure(error); 2342 + failure(error);
2343 -// } 2343 + }
2344 -// }]; 2344 + }];
2345 -// } failureBlock:^(NSError *error) { 2345 + } failureBlock:^(NSError *error) {
2346 -// if (failure) { 2346 + if (failure) {
2347 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2347 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2348 -// failure(error); 2348 + failure(error);
2349 -// } 2349 + }
2350 -// NSLog(@"Error at token %@", error ); 2350 + NSLog(@"Error at token %@", error );
2351 -// }]; 2351 + }];
2352 } else { 2352 } else {
2353 NSLog(@"Error at get cards %@", error ); 2353 NSLog(@"Error at get cards %@", error );
2354 failure(error); 2354 failure(error);
...@@ -2372,30 +2372,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2372,30 +2372,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2372 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 2372 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
2373 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 2373 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
2374 2374
2375 - NSString* errorDomain = [error domain]; 2375 +// NSString* errorDomain = [error domain];
2376 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 2376 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
2377 - 2377 +//
2378 - if (failure) { 2378 +// if (failure) {
2379 - failure(errorToken); 2379 +// failure(errorToken);
2380 - } 2380 +// }
2381 2381
2382 -// [self refreshToken:^(NSDictionary *response) { 2382 + [self refreshToken:^(NSDictionary *response) {
2383 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2383 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2384 -// if (success) { 2384 + if (success) {
2385 -// success(contextResponse); 2385 + success(contextResponse);
2386 -// } 2386 + }
2387 -// } failureBlock:^(NSError *error) { 2387 + } failureBlock:^(NSError *error) {
2388 -// if (failure) { 2388 + if (failure) {
2389 -// failure(error); 2389 + failure(error);
2390 -// } 2390 + }
2391 -// }]; 2391 + }];
2392 -// } failureBlock:^(NSError *error) { 2392 + } failureBlock:^(NSError *error) {
2393 -// if (failure) { 2393 + if (failure) {
2394 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2394 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2395 -// failure(error); 2395 + failure(error);
2396 -// } 2396 + }
2397 -// NSLog(@"Error at token %@", error ); 2397 + NSLog(@"Error at token %@", error );
2398 -// }]; 2398 + }];
2399 } else { 2399 } else {
2400 NSLog(@"Error at get delete card %@", error ); 2400 NSLog(@"Error at get delete card %@", error );
2401 failure(error); 2401 failure(error);
...@@ -2523,32 +2523,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2523,32 +2523,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2523 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 2523 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
2524 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 2524 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
2525 2525
2526 - NSString* errorDomain = [error domain]; 2526 +// NSString* errorDomain = [error domain];
2527 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 2527 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
2528 - 2528 +//
2529 - if (failure) { 2529 +// if (failure) {
2530 - failure(errorToken); 2530 +// failure(errorToken);
2531 - } 2531 +// }
2532 2532
2533 -// [self refreshToken:^(NSDictionary *response) { 2533 + [self refreshToken:^(NSDictionary *response) {
2534 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2534 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2535 -// if (success) { 2535 + if (success) {
2536 -// success(contextResponse); 2536 + success(contextResponse);
2537 -// } 2537 + }
2538 -// NSLog(@"**************** WARPLY Response *****************" ); 2538 + NSLog(@"**************** WARPLY Response *****************" );
2539 -// NSLog(@"%@", contextResponse ); 2539 + NSLog(@"%@", contextResponse );
2540 -// } failureBlock:^(NSError *error) { 2540 + } failureBlock:^(NSError *error) {
2541 -// if (failure) { 2541 + if (failure) {
2542 -// failure(error); 2542 + failure(error);
2543 -// } 2543 + }
2544 -// }]; 2544 + }];
2545 -// } failureBlock:^(NSError *error) { 2545 + } failureBlock:^(NSError *error) {
2546 -// if (failure) { 2546 + if (failure) {
2547 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2547 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2548 -// failure(error); 2548 + failure(error);
2549 -// } 2549 + }
2550 -// NSLog(@"Error at token %@", error ); 2550 + NSLog(@"Error at token %@", error );
2551 -// }]; 2551 + }];
2552 } else { 2552 } else {
2553 NSLog(@"Error at get coupons %@", error ); 2553 NSLog(@"Error at get coupons %@", error );
2554 failure(error); 2554 failure(error);
...@@ -2572,30 +2572,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2572,30 +2572,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2572 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 2572 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
2573 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 2573 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
2574 2574
2575 - NSString* errorDomain = [error domain]; 2575 +// NSString* errorDomain = [error domain];
2576 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 2576 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
2577 - 2577 +//
2578 - if (failure) { 2578 +// if (failure) {
2579 - failure(errorToken); 2579 +// failure(errorToken);
2580 - } 2580 +// }
2581 2581
2582 -// [self refreshToken:^(NSDictionary *response) { 2582 + [self refreshToken:^(NSDictionary *response) {
2583 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2583 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2584 -// if (success) { 2584 + if (success) {
2585 -// success(contextResponse); 2585 + success(contextResponse);
2586 -// } 2586 + }
2587 -// } failureBlock:^(NSError *error) { 2587 + } failureBlock:^(NSError *error) {
2588 -// if (failure) { 2588 + if (failure) {
2589 -// failure(error); 2589 + failure(error);
2590 -// } 2590 + }
2591 -// }]; 2591 + }];
2592 -// } failureBlock:^(NSError *error) { 2592 + } failureBlock:^(NSError *error) {
2593 -// if (failure) { 2593 + if (failure) {
2594 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2594 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2595 -// failure(error); 2595 + failure(error);
2596 -// } 2596 + }
2597 -// NSLog(@"Error at token %@", error ); 2597 + NSLog(@"Error at token %@", error );
2598 -// }]; 2598 + }];
2599 } else { 2599 } else {
2600 NSLog(@"Error at get transaction history %@", error ); 2600 NSLog(@"Error at get transaction history %@", error );
2601 failure(error); 2601 failure(error);
...@@ -2619,30 +2619,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2619,30 +2619,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2619 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 2619 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
2620 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 2620 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
2621 2621
2622 - NSString* errorDomain = [error domain]; 2622 +// NSString* errorDomain = [error domain];
2623 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 2623 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
2624 - 2624 +//
2625 - if (failure) { 2625 +// if (failure) {
2626 - failure(errorToken); 2626 +// failure(errorToken);
2627 - } 2627 +// }
2628 2628
2629 -// [self refreshToken:^(NSDictionary *response) { 2629 + [self refreshToken:^(NSDictionary *response) {
2630 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2630 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2631 -// if (success) { 2631 + if (success) {
2632 -// success(contextResponse); 2632 + success(contextResponse);
2633 -// } 2633 + }
2634 -// } failureBlock:^(NSError *error) { 2634 + } failureBlock:^(NSError *error) {
2635 -// if (failure) { 2635 + if (failure) {
2636 -// failure(error); 2636 + failure(error);
2637 -// } 2637 + }
2638 -// }]; 2638 + }];
2639 -// } failureBlock:^(NSError *error) { 2639 + } failureBlock:^(NSError *error) {
2640 -// if (failure) { 2640 + if (failure) {
2641 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2641 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2642 -// failure(error); 2642 + failure(error);
2643 -// } 2643 + }
2644 -// NSLog(@"Error at token %@", error ); 2644 + NSLog(@"Error at token %@", error );
2645 -// }]; 2645 + }];
2646 } else { 2646 } else {
2647 NSLog(@"Error at get points history %@", error ); 2647 NSLog(@"Error at get points history %@", error );
2648 failure(error); 2648 failure(error);
...@@ -2668,32 +2668,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2668,32 +2668,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2668 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 2668 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
2669 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 2669 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
2670 2670
2671 - NSString* errorDomain = [error domain]; 2671 +// NSString* errorDomain = [error domain];
2672 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 2672 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
2673 - 2673 +//
2674 - if (failure) { 2674 +// if (failure) {
2675 - failure(errorToken); 2675 +// failure(errorToken);
2676 - } 2676 +// }
2677 2677
2678 -// [self refreshToken:^(NSDictionary *response) { 2678 + [self refreshToken:^(NSDictionary *response) {
2679 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2679 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2680 -// if (success) { 2680 + if (success) {
2681 -// success(contextResponse); 2681 + success(contextResponse);
2682 -// } 2682 + }
2683 -// NSLog(@"**************** WARPLY Response *****************" ); 2683 + NSLog(@"**************** WARPLY Response *****************" );
2684 -// NSLog(@"%@", contextResponse ); 2684 + NSLog(@"%@", contextResponse );
2685 -// } failureBlock:^(NSError *error) { 2685 + } failureBlock:^(NSError *error) {
2686 -// if (failure) { 2686 + if (failure) {
2687 -// failure(error); 2687 + failure(error);
2688 -// } 2688 + }
2689 -// }]; 2689 + }];
2690 -// } failureBlock:^(NSError *error) { 2690 + } failureBlock:^(NSError *error) {
2691 -// if (failure) { 2691 + if (failure) {
2692 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2692 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2693 -// failure(error); 2693 + failure(error);
2694 -// } 2694 + }
2695 -// NSLog(@"Error at token %@", error ); 2695 + NSLog(@"Error at token %@", error );
2696 -// }]; 2696 + }];
2697 } else { 2697 } else {
2698 NSLog(@"Error at get Sharing History %@", error ); 2698 NSLog(@"Error at get Sharing History %@", error );
2699 failure(error); 2699 failure(error);
...@@ -2717,30 +2717,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2717,30 +2717,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2717 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 2717 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
2718 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 2718 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
2719 2719
2720 - NSString* errorDomain = [error domain]; 2720 +// NSString* errorDomain = [error domain];
2721 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 2721 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
2722 - 2722 +//
2723 - if (failure) { 2723 +// if (failure) {
2724 - failure(errorToken); 2724 +// failure(errorToken);
2725 - } 2725 +// }
2726 2726
2727 -// [self refreshToken:^(NSDictionary *response) { 2727 + [self refreshToken:^(NSDictionary *response) {
2728 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2728 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2729 -// if (success) { 2729 + if (success) {
2730 -// success(contextResponse); 2730 + success(contextResponse);
2731 -// } 2731 + }
2732 -// } failureBlock:^(NSError *error) { 2732 + } failureBlock:^(NSError *error) {
2733 -// if (failure) { 2733 + if (failure) {
2734 -// failure(error); 2734 + failure(error);
2735 -// } 2735 + }
2736 -// }]; 2736 + }];
2737 -// } failureBlock:^(NSError *error) { 2737 + } failureBlock:^(NSError *error) {
2738 -// if (failure) { 2738 + if (failure) {
2739 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2739 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2740 -// failure(error); 2740 + failure(error);
2741 -// } 2741 + }
2742 -// NSLog(@"Error at token %@", error ); 2742 + NSLog(@"Error at token %@", error );
2743 -// }]; 2743 + }];
2744 } else { 2744 } else {
2745 NSLog(@"Error at add address %@", error ); 2745 NSLog(@"Error at add address %@", error );
2746 failure(error); 2746 failure(error);
...@@ -2764,30 +2764,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2764,30 +2764,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2764 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 2764 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
2765 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 2765 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
2766 2766
2767 - NSString* errorDomain = [error domain]; 2767 +// NSString* errorDomain = [error domain];
2768 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 2768 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
2769 - 2769 +//
2770 - if (failure) { 2770 +// if (failure) {
2771 - failure(errorToken); 2771 +// failure(errorToken);
2772 - } 2772 +// }
2773 2773
2774 -// [self refreshToken:^(NSDictionary *response) { 2774 + [self refreshToken:^(NSDictionary *response) {
2775 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2775 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2776 -// if (success) { 2776 + if (success) {
2777 -// success(contextResponse); 2777 + success(contextResponse);
2778 -// } 2778 + }
2779 -// } failureBlock:^(NSError *error) { 2779 + } failureBlock:^(NSError *error) {
2780 -// if (failure) { 2780 + if (failure) {
2781 -// failure(error); 2781 + failure(error);
2782 -// } 2782 + }
2783 -// }]; 2783 + }];
2784 -// } failureBlock:^(NSError *error) { 2784 + } failureBlock:^(NSError *error) {
2785 -// if (failure) { 2785 + if (failure) {
2786 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2786 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2787 -// failure(error); 2787 + failure(error);
2788 -// } 2788 + }
2789 -// NSLog(@"Error at token %@", error ); 2789 + NSLog(@"Error at token %@", error );
2790 -// }]; 2790 + }];
2791 } else { 2791 } else {
2792 NSLog(@"Error at get address %@", error ); 2792 NSLog(@"Error at get address %@", error );
2793 failure(error); 2793 failure(error);
...@@ -2856,30 +2856,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2856,30 +2856,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2856 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 2856 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
2857 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 2857 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
2858 2858
2859 - NSString* errorDomain = [error domain]; 2859 +// NSString* errorDomain = [error domain];
2860 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 2860 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
2861 - 2861 +//
2862 - if (failure) { 2862 +// if (failure) {
2863 - failure(errorToken); 2863 +// failure(errorToken);
2864 - } 2864 +// }
2865 2865
2866 -// [self refreshToken:^(NSDictionary *response) { 2866 + [self refreshToken:^(NSDictionary *response) {
2867 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2867 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2868 -// if (success) { 2868 + if (success) {
2869 -// success(contextResponse); 2869 + success(contextResponse);
2870 -// } 2870 + }
2871 -// } failureBlock:^(NSError *error) { 2871 + } failureBlock:^(NSError *error) {
2872 -// if (failure) { 2872 + if (failure) {
2873 -// failure(error); 2873 + failure(error);
2874 -// } 2874 + }
2875 -// }]; 2875 + }];
2876 -// } failureBlock:^(NSError *error) { 2876 + } failureBlock:^(NSError *error) {
2877 -// if (failure) { 2877 + if (failure) {
2878 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2878 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2879 -// failure(error); 2879 + failure(error);
2880 -// } 2880 + }
2881 -// NSLog(@"Error at token %@", error ); 2881 + NSLog(@"Error at token %@", error );
2882 -// }]; 2882 + }];
2883 } else { 2883 } else {
2884 NSLog(@"Error at edit address %@", error ); 2884 NSLog(@"Error at edit address %@", error );
2885 failure(error); 2885 failure(error);
...@@ -2903,30 +2903,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2903,30 +2903,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2903 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 2903 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
2904 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 2904 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
2905 2905
2906 - NSString* errorDomain = [error domain]; 2906 +// NSString* errorDomain = [error domain];
2907 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 2907 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
2908 - 2908 +//
2909 - if (failure) { 2909 +// if (failure) {
2910 - failure(errorToken); 2910 +// failure(errorToken);
2911 - } 2911 +// }
2912 2912
2913 -// [self refreshToken:^(NSDictionary *response) { 2913 + [self refreshToken:^(NSDictionary *response) {
2914 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2914 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2915 -// if (success) { 2915 + if (success) {
2916 -// success(contextResponse); 2916 + success(contextResponse);
2917 -// } 2917 + }
2918 -// } failureBlock:^(NSError *error) { 2918 + } failureBlock:^(NSError *error) {
2919 -// if (failure) { 2919 + if (failure) {
2920 -// failure(error); 2920 + failure(error);
2921 -// } 2921 + }
2922 -// }]; 2922 + }];
2923 -// } failureBlock:^(NSError *error) { 2923 + } failureBlock:^(NSError *error) {
2924 -// if (failure) { 2924 + if (failure) {
2925 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2925 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2926 -// failure(error); 2926 + failure(error);
2927 -// } 2927 + }
2928 -// NSLog(@"Error at token %@", error ); 2928 + NSLog(@"Error at token %@", error );
2929 -// }]; 2929 + }];
2930 } else { 2930 } else {
2931 NSLog(@"Error at delete address %@", error ); 2931 NSLog(@"Error at delete address %@", error );
2932 failure(error); 2932 failure(error);
...@@ -2950,30 +2950,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2950,30 +2950,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2950 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 2950 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
2951 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 2951 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
2952 2952
2953 - NSString* errorDomain = [error domain]; 2953 +// NSString* errorDomain = [error domain];
2954 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 2954 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
2955 - 2955 +//
2956 - if (failure) { 2956 +// if (failure) {
2957 - failure(errorToken); 2957 +// failure(errorToken);
2958 - } 2958 +// }
2959 2959
2960 -// [self refreshToken:^(NSDictionary *response) { 2960 + [self refreshToken:^(NSDictionary *response) {
2961 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 2961 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
2962 -// if (success) { 2962 + if (success) {
2963 -// success(contextResponse); 2963 + success(contextResponse);
2964 -// } 2964 + }
2965 -// } failureBlock:^(NSError *error) { 2965 + } failureBlock:^(NSError *error) {
2966 -// if (failure) { 2966 + if (failure) {
2967 -// failure(error); 2967 + failure(error);
2968 -// } 2968 + }
2969 -// }]; 2969 + }];
2970 -// } failureBlock:^(NSError *error) { 2970 + } failureBlock:^(NSError *error) {
2971 -// if (failure) { 2971 + if (failure) {
2972 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 2972 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
2973 -// failure(error); 2973 + failure(error);
2974 -// } 2974 + }
2975 -// NSLog(@"Error at token %@", error ); 2975 + NSLog(@"Error at token %@", error );
2976 -// }]; 2976 + }];
2977 } else { 2977 } else {
2978 NSLog(@"Error at redeem coupons %@", error ); 2978 NSLog(@"Error at redeem coupons %@", error );
2979 failure(error); 2979 failure(error);
...@@ -3218,32 +3218,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -3218,32 +3218,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
3218 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 3218 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
3219 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 3219 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
3220 3220
3221 - NSString* errorDomain = [error domain]; 3221 +// NSString* errorDomain = [error domain];
3222 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 3222 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
3223 - 3223 +//
3224 - if (failure) { 3224 +// if (failure) {
3225 - failure(errorToken); 3225 +// failure(errorToken);
3226 - } 3226 +// }
3227 3227
3228 -// [self refreshToken:^(NSDictionary *response) { 3228 + [self refreshToken:^(NSDictionary *response) {
3229 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 3229 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
3230 -// if (success) { 3230 + if (success) {
3231 -// success(contextResponse); 3231 + success(contextResponse);
3232 -// } 3232 + }
3233 -// NSLog(@"**************** WARPLY Response *****************" ); 3233 + NSLog(@"**************** WARPLY Response *****************" );
3234 -// NSLog(@"%@", contextResponse ); 3234 + NSLog(@"%@", contextResponse );
3235 -// } failureBlock:^(NSError *error) { 3235 + } failureBlock:^(NSError *error) {
3236 -// if (failure) { 3236 + if (failure) {
3237 -// failure(error); 3237 + failure(error);
3238 -// } 3238 + }
3239 -// }]; 3239 + }];
3240 -// } failureBlock:^(NSError *error) { 3240 + } failureBlock:^(NSError *error) {
3241 -// if (failure) { 3241 + if (failure) {
3242 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 3242 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
3243 -// failure(error); 3243 + failure(error);
3244 -// } 3244 + }
3245 -// NSLog(@"Error at token %@", error ); 3245 + NSLog(@"Error at token %@", error );
3246 -// }]; 3246 + }];
3247 } else { 3247 } else {
3248 NSLog(@"Error at redeem coupon sets %@", error ); 3248 NSLog(@"Error at redeem coupon sets %@", error );
3249 failure(error); 3249 failure(error);
...@@ -3288,32 +3288,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -3288,32 +3288,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
3288 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 3288 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
3289 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 3289 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
3290 3290
3291 - NSString* errorDomain = [error domain]; 3291 +// NSString* errorDomain = [error domain];
3292 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 3292 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
3293 - 3293 +//
3294 - if (failure) { 3294 +// if (failure) {
3295 - failure(errorToken); 3295 +// failure(errorToken);
3296 - } 3296 +// }
3297 3297
3298 -// [self refreshToken:^(NSDictionary *response) { 3298 + [self refreshToken:^(NSDictionary *response) {
3299 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 3299 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
3300 -// if (success) { 3300 + if (success) {
3301 -// success(contextResponse); 3301 + success(contextResponse);
3302 -// } 3302 + }
3303 -// NSLog(@"**************** WARPLY Response *****************" ); 3303 + NSLog(@"**************** WARPLY Response *****************" );
3304 -// NSLog(@"%@", contextResponse ); 3304 + NSLog(@"%@", contextResponse );
3305 -// } failureBlock:^(NSError *error) { 3305 + } failureBlock:^(NSError *error) {
3306 -// if (failure) { 3306 + if (failure) {
3307 -// failure(error); 3307 + failure(error);
3308 -// } 3308 + }
3309 -// }]; 3309 + }];
3310 -// } failureBlock:^(NSError *error) { 3310 + } failureBlock:^(NSError *error) {
3311 -// if (failure) { 3311 + if (failure) {
3312 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 3312 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
3313 -// failure(error); 3313 + failure(error);
3314 -// } 3314 + }
3315 -// NSLog(@"Error at token %@", error ); 3315 + NSLog(@"Error at token %@", error );
3316 -// }]; 3316 + }];
3317 } else { 3317 } else {
3318 NSLog(@"Error at redeem coupon sets %@", error ); 3318 NSLog(@"Error at redeem coupon sets %@", error );
3319 failure(error); 3319 failure(error);
...@@ -3339,32 +3339,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -3339,32 +3339,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
3339 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 3339 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
3340 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 3340 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
3341 3341
3342 - NSString* errorDomain = [error domain]; 3342 +// NSString* errorDomain = [error domain];
3343 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 3343 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
3344 - 3344 +//
3345 - if (failure) { 3345 +// if (failure) {
3346 - failure(errorToken); 3346 +// failure(errorToken);
3347 - } 3347 +// }
3348 3348
3349 -// [self refreshToken:^(NSDictionary *response) { 3349 + [self refreshToken:^(NSDictionary *response) {
3350 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 3350 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
3351 -// if (success) { 3351 + if (success) {
3352 -// success(contextResponse); 3352 + success(contextResponse);
3353 -// } 3353 + }
3354 -// NSLog(@"**************** WARPLY Response *****************" ); 3354 + NSLog(@"**************** WARPLY Response *****************" );
3355 -// NSLog(@"%@", contextResponse ); 3355 + NSLog(@"%@", contextResponse );
3356 -// } failureBlock:^(NSError *error) { 3356 + } failureBlock:^(NSError *error) {
3357 -// if (failure) { 3357 + if (failure) {
3358 -// failure(error); 3358 + failure(error);
3359 -// } 3359 + }
3360 -// }]; 3360 + }];
3361 -// } failureBlock:^(NSError *error) { 3361 + } failureBlock:^(NSError *error) {
3362 -// if (failure) { 3362 + if (failure) {
3363 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 3363 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
3364 -// failure(error); 3364 + failure(error);
3365 -// } 3365 + }
3366 -// NSLog(@"Error at token %@", error ); 3366 + NSLog(@"Error at token %@", error );
3367 -// }]; 3367 + }];
3368 } else { 3368 } else {
3369 NSLog(@"Error at cosmote Coupon Sharing %@", error ); 3369 NSLog(@"Error at cosmote Coupon Sharing %@", error );
3370 failure(error); 3370 failure(error);
...@@ -3390,32 +3390,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -3390,32 +3390,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
3390 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 3390 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
3391 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 3391 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
3392 3392
3393 - NSString* errorDomain = [error domain]; 3393 +// NSString* errorDomain = [error domain];
3394 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 3394 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
3395 - 3395 +//
3396 - if (failure) { 3396 +// if (failure) {
3397 - failure(errorToken); 3397 +// failure(errorToken);
3398 - } 3398 +// }
3399 3399
3400 -// [self refreshToken:^(NSDictionary *response) { 3400 + [self refreshToken:^(NSDictionary *response) {
3401 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 3401 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
3402 -// if (success) { 3402 + if (success) {
3403 -// success(contextResponse); 3403 + success(contextResponse);
3404 -// } 3404 + }
3405 -// NSLog(@"**************** WARPLY Response *****************" ); 3405 + NSLog(@"**************** WARPLY Response *****************" );
3406 -// NSLog(@"%@", contextResponse ); 3406 + NSLog(@"%@", contextResponse );
3407 -// } failureBlock:^(NSError *error) { 3407 + } failureBlock:^(NSError *error) {
3408 -// if (failure) { 3408 + if (failure) {
3409 -// failure(error); 3409 + failure(error);
3410 -// } 3410 + }
3411 -// }]; 3411 + }];
3412 -// } failureBlock:^(NSError *error) { 3412 + } failureBlock:^(NSError *error) {
3413 -// if (failure) { 3413 + if (failure) {
3414 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 3414 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
3415 -// failure(error); 3415 + failure(error);
3416 -// } 3416 + }
3417 -// NSLog(@"Error at token %@", error ); 3417 + NSLog(@"Error at token %@", error );
3418 -// }]; 3418 + }];
3419 } else { 3419 } else {
3420 NSLog(@"Error at get cosmote sharing %@", error ); 3420 NSLog(@"Error at get cosmote sharing %@", error );
3421 failure(error); 3421 failure(error);
...@@ -3441,32 +3441,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -3441,32 +3441,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
3441 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 3441 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
3442 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 3442 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
3443 3443
3444 - NSString* errorDomain = [error domain]; 3444 +// NSString* errorDomain = [error domain];
3445 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 3445 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
3446 - 3446 +//
3447 - if (failure) { 3447 +// if (failure) {
3448 - failure(errorToken); 3448 +// failure(errorToken);
3449 - } 3449 +// }
3450 3450
3451 -// [self refreshToken:^(NSDictionary *response) { 3451 + [self refreshToken:^(NSDictionary *response) {
3452 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 3452 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
3453 -// if (success) { 3453 + if (success) {
3454 -// success(contextResponse); 3454 + success(contextResponse);
3455 -// } 3455 + }
3456 -// NSLog(@"**************** WARPLY Response *****************" ); 3456 + NSLog(@"**************** WARPLY Response *****************" );
3457 -// NSLog(@"%@", contextResponse ); 3457 + NSLog(@"%@", contextResponse );
3458 -// } failureBlock:^(NSError *error) { 3458 + } failureBlock:^(NSError *error) {
3459 -// if (failure) { 3459 + if (failure) {
3460 -// failure(error); 3460 + failure(error);
3461 -// } 3461 + }
3462 -// }]; 3462 + }];
3463 -// } failureBlock:^(NSError *error) { 3463 + } failureBlock:^(NSError *error) {
3464 -// if (failure) { 3464 + if (failure) {
3465 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 3465 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
3466 -// failure(error); 3466 + failure(error);
3467 -// } 3467 + }
3468 -// NSLog(@"Error at token %@", error ); 3468 + NSLog(@"Error at token %@", error );
3469 -// }]; 3469 + }];
3470 } else { 3470 } else {
3471 NSLog(@"Error at cosmote retrieve sharing %@", error ); 3471 NSLog(@"Error at cosmote retrieve sharing %@", error );
3472 failure(error); 3472 failure(error);
...@@ -3511,32 +3511,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -3511,32 +3511,32 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
3511 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 3511 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
3512 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 3512 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
3513 3513
3514 - NSString* errorDomain = [error domain]; 3514 +// NSString* errorDomain = [error domain];
3515 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 3515 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
3516 - 3516 +//
3517 - if (failure) { 3517 +// if (failure) {
3518 - failure(errorToken); 3518 +// failure(errorToken);
3519 - } 3519 +// }
3520 3520
3521 -// [self refreshToken:^(NSDictionary *response) { 3521 + [self refreshToken:^(NSDictionary *response) {
3522 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 3522 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
3523 -// if (success) { 3523 + if (success) {
3524 -// success(contextResponse); 3524 + success(contextResponse);
3525 -// } 3525 + }
3526 -// NSLog(@"**************** WARPLY Response *****************" ); 3526 + NSLog(@"**************** WARPLY Response *****************" );
3527 -// NSLog(@"%@", contextResponse ); 3527 + NSLog(@"%@", contextResponse );
3528 -// } failureBlock:^(NSError *error) { 3528 + } failureBlock:^(NSError *error) {
3529 -// if (failure) { 3529 + if (failure) {
3530 -// failure(error); 3530 + failure(error);
3531 -// } 3531 + }
3532 -// }]; 3532 + }];
3533 -// } failureBlock:^(NSError *error) { 3533 + } failureBlock:^(NSError *error) {
3534 -// if (failure) { 3534 + if (failure) {
3535 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 3535 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
3536 -// failure(error); 3536 + failure(error);
3537 -// } 3537 + }
3538 -// NSLog(@"Error at token %@", error ); 3538 + NSLog(@"Error at token %@", error );
3539 -// }]; 3539 + }];
3540 } else { 3540 } else {
3541 NSLog(@"Error at submit Order %@", error ); 3541 NSLog(@"Error at submit Order %@", error );
3542 failure(error); 3542 failure(error);
...@@ -3560,30 +3560,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -3560,30 +3560,30 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
3560 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; 3560 NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"];
3561 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { 3561 if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) {
3562 3562
3563 - NSString* errorDomain = [error domain]; 3563 +// NSString* errorDomain = [error domain];
3564 - NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict]; 3564 +// NSError *errorToken = [NSError errorWithDomain:errorDomain code:401 userInfo:dict];
3565 - 3565 +//
3566 - if (failure) { 3566 +// if (failure) {
3567 - failure(errorToken); 3567 +// failure(errorToken);
3568 - } 3568 +// }
3569 3569
3570 -// [self refreshToken:^(NSDictionary *response) { 3570 + [self refreshToken:^(NSDictionary *response) {
3571 -// [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { 3571 + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
3572 -// if (success) { 3572 + if (success) {
3573 -// success(contextResponse); 3573 + success(contextResponse);
3574 -// } 3574 + }
3575 -// } failureBlock:^(NSError *error) { 3575 + } failureBlock:^(NSError *error) {
3576 -// if (failure) { 3576 + if (failure) {
3577 -// failure(error); 3577 + failure(error);
3578 -// } 3578 + }
3579 -// }]; 3579 + }];
3580 -// } failureBlock:^(NSError *error) { 3580 + } failureBlock:^(NSError *error) {
3581 -// if (failure) { 3581 + if (failure) {
3582 -// // [_db executeUpdate:@"DROP TABLE requestVariables"]; 3582 + // [_db executeUpdate:@"DROP TABLE requestVariables"];
3583 -// failure(error); 3583 + failure(error);
3584 -// } 3584 + }
3585 -// NSLog(@"Error at token %@", error ); 3585 + NSLog(@"Error at token %@", error );
3586 -// }]; 3586 + }];
3587 } else { 3587 } else {
3588 NSLog(@"Error at get coupon sets %@", error ); 3588 NSLog(@"Error at get coupon sets %@", error );
3589 failure(error); 3589 failure(error);
......
...@@ -732,11 +732,11 @@ public class swiftApi { ...@@ -732,11 +732,11 @@ public class swiftApi {
732 SwiftEventBus.post("dynatrace", sender: dynatraceEvent) 732 SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
733 733
734 if let error = error as? NSError { 734 if let error = error as? NSError {
735 - if (error.code == 401) { 735 +// if (error.code == 401) {
736 - let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() 736 +// let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel()
737 - sessionEvent._sessionExpired = true 737 +// sessionEvent._sessionExpired = true
738 - SwiftEventBus.post("sdk_session_expired", sender: sessionEvent) 738 +// SwiftEventBus.post("sdk_session_expired", sender: sessionEvent)
739 - } 739 +// }
740 740
741 failureCallback(error.code) 741 failureCallback(error.code)
742 } else { 742 } else {
...@@ -1400,11 +1400,11 @@ public class swiftApi { ...@@ -1400,11 +1400,11 @@ public class swiftApi {
1400 SwiftEventBus.post("dynatrace", sender: dynatraceEvent) 1400 SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
1401 1401
1402 if let error = error as? NSError { 1402 if let error = error as? NSError {
1403 - if (error.code == 401) { 1403 +// if (error.code == 401) {
1404 - let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() 1404 +// let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel()
1405 - sessionEvent._sessionExpired = true 1405 +// sessionEvent._sessionExpired = true
1406 - SwiftEventBus.post("sdk_session_expired", sender: sessionEvent) 1406 +// SwiftEventBus.post("sdk_session_expired", sender: sessionEvent)
1407 - } 1407 +// }
1408 1408
1409 failureCallback(error.code) 1409 failureCallback(error.code)
1410 } else { 1410 } else {
...@@ -2442,11 +2442,11 @@ public class swiftApi { ...@@ -2442,11 +2442,11 @@ public class swiftApi {
2442 SwiftEventBus.post("dynatrace", sender: dynatraceEvent) 2442 SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
2443 2443
2444 if let error = error as? NSError { 2444 if let error = error as? NSError {
2445 - if (error.code == 401) { 2445 +// if (error.code == 401) {
2446 - let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() 2446 +// let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel()
2447 - sessionEvent._sessionExpired = true 2447 +// sessionEvent._sessionExpired = true
2448 - SwiftEventBus.post("sdk_session_expired", sender: sessionEvent) 2448 +// SwiftEventBus.post("sdk_session_expired", sender: sessionEvent)
2449 - } 2449 +// }
2450 2450
2451 failureCallback(error.code) 2451 failureCallback(error.code)
2452 } else { 2452 } else {
...@@ -4061,11 +4061,11 @@ public class swiftApi { ...@@ -4061,11 +4061,11 @@ public class swiftApi {
4061 print("====================") 4061 print("====================")
4062 4062
4063 if let error = error as? NSError { 4063 if let error = error as? NSError {
4064 - if (error.code == 401) { 4064 +// if (error.code == 401) {
4065 - let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() 4065 +// let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel()
4066 - sessionEvent._sessionExpired = true 4066 +// sessionEvent._sessionExpired = true
4067 - SwiftEventBus.post("sdk_session_expired", sender: sessionEvent) 4067 +// SwiftEventBus.post("sdk_session_expired", sender: sessionEvent)
4068 - } 4068 +// }
4069 4069
4070 failureCallback(error.code) 4070 failureCallback(error.code)
4071 } else { 4071 } else {
...@@ -4099,11 +4099,11 @@ public class swiftApi { ...@@ -4099,11 +4099,11 @@ public class swiftApi {
4099 print("====================") 4099 print("====================")
4100 4100
4101 if let error = error as? NSError { 4101 if let error = error as? NSError {
4102 - if (error.code == 401) { 4102 +// if (error.code == 401) {
4103 - let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() 4103 +// let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel()
4104 - sessionEvent._sessionExpired = true 4104 +// sessionEvent._sessionExpired = true
4105 - SwiftEventBus.post("sdk_session_expired", sender: sessionEvent) 4105 +// SwiftEventBus.post("sdk_session_expired", sender: sessionEvent)
4106 - } 4106 +// }
4107 4107
4108 failureCallback(error.code) 4108 failureCallback(error.code)
4109 } else { 4109 } else {
...@@ -4138,11 +4138,11 @@ public class swiftApi { ...@@ -4138,11 +4138,11 @@ public class swiftApi {
4138 print("====================") 4138 print("====================")
4139 4139
4140 if let error = error as? NSError { 4140 if let error = error as? NSError {
4141 - if (error.code == 401) { 4141 +// if (error.code == 401) {
4142 - let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() 4142 +// let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel()
4143 - sessionEvent._sessionExpired = true 4143 +// sessionEvent._sessionExpired = true
4144 - SwiftEventBus.post("sdk_session_expired", sender: sessionEvent) 4144 +// SwiftEventBus.post("sdk_session_expired", sender: sessionEvent)
4145 - } 4145 +// }
4146 4146
4147 failureCallback(error.code) 4147 failureCallback(error.code)
4148 } else { 4148 } else {
...@@ -4782,11 +4782,11 @@ public class swiftApi { ...@@ -4782,11 +4782,11 @@ public class swiftApi {
4782 print("getPacingDetails error: ") 4782 print("getPacingDetails error: ")
4783 4783
4784 if let error = error as? NSError { 4784 if let error = error as? NSError {
4785 - if (error.code == 401) { 4785 +// if (error.code == 401) {
4786 - let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() 4786 +// let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel()
4787 - sessionEvent._sessionExpired = true 4787 +// sessionEvent._sessionExpired = true
4788 - SwiftEventBus.post("sdk_session_expired", sender: sessionEvent) 4788 +// SwiftEventBus.post("sdk_session_expired", sender: sessionEvent)
4789 - } 4789 +// }
4790 4790
4791 failureCallback(error.code) 4791 failureCallback(error.code)
4792 } else { 4792 } else {
...@@ -4851,11 +4851,11 @@ public class swiftApi { ...@@ -4851,11 +4851,11 @@ public class swiftApi {
4851 print("setPacingDetails error: ") 4851 print("setPacingDetails error: ")
4852 4852
4853 if let error = error as? NSError { 4853 if let error = error as? NSError {
4854 - if (error.code == 401) { 4854 +// if (error.code == 401) {
4855 - let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() 4855 +// let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel()
4856 - sessionEvent._sessionExpired = true 4856 +// sessionEvent._sessionExpired = true
4857 - SwiftEventBus.post("sdk_session_expired", sender: sessionEvent) 4857 +// SwiftEventBus.post("sdk_session_expired", sender: sessionEvent)
4858 - } 4858 +// }
4859 4859
4860 failureCallback(error.code) 4860 failureCallback(error.code)
4861 } else { 4861 } else {
...@@ -4975,11 +4975,11 @@ public class swiftApi { ...@@ -4975,11 +4975,11 @@ public class swiftApi {
4975 SwiftEventBus.post("dynatrace", sender: dynatraceEvent) 4975 SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
4976 4976
4977 if let error = error as? NSError { 4977 if let error = error as? NSError {
4978 - if (error.code == 401) { 4978 +// if (error.code == 401) {
4979 - let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() 4979 +// let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel()
4980 - sessionEvent._sessionExpired = true 4980 +// sessionEvent._sessionExpired = true
4981 - SwiftEventBus.post("sdk_session_expired", sender: sessionEvent) 4981 +// SwiftEventBus.post("sdk_session_expired", sender: sessionEvent)
4982 - } 4982 +// }
4983 4983
4984 failureCallback(error.code) 4984 failureCallback(error.code)
4985 } else { 4985 } else {
...@@ -5044,11 +5044,11 @@ public class swiftApi { ...@@ -5044,11 +5044,11 @@ public class swiftApi {
5044 SwiftEventBus.post("dynatrace", sender: dynatraceEvent) 5044 SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
5045 5045
5046 if let error = error as? NSError { 5046 if let error = error as? NSError {
5047 - if (error.code == 401) { 5047 +// if (error.code == 401) {
5048 - let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() 5048 +// let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel()
5049 - sessionEvent._sessionExpired = true 5049 +// sessionEvent._sessionExpired = true
5050 - SwiftEventBus.post("sdk_session_expired", sender: sessionEvent) 5050 +// SwiftEventBus.post("sdk_session_expired", sender: sessionEvent)
5051 - } 5051 +// }
5052 5052
5053 failureCallback(error.code) 5053 failureCallback(error.code)
5054 } else { 5054 } else {
...@@ -5157,11 +5157,11 @@ public class swiftApi { ...@@ -5157,11 +5157,11 @@ public class swiftApi {
5157 SwiftEventBus.post("dynatrace", sender: dynatraceEvent) 5157 SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
5158 5158
5159 if let error = error as? NSError { 5159 if let error = error as? NSError {
5160 - if (error.code == 401) { 5160 +// if (error.code == 401) {
5161 - let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() 5161 +// let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel()
5162 - sessionEvent._sessionExpired = true 5162 +// sessionEvent._sessionExpired = true
5163 - SwiftEventBus.post("sdk_session_expired", sender: sessionEvent) 5163 +// SwiftEventBus.post("sdk_session_expired", sender: sessionEvent)
5164 - } 5164 +// }
5165 5165
5166 failureCallback(error.code) 5166 failureCallback(error.code)
5167 } else { 5167 } else {
...@@ -5229,11 +5229,11 @@ public class swiftApi { ...@@ -5229,11 +5229,11 @@ public class swiftApi {
5229 SwiftEventBus.post("dynatrace", sender: dynatraceEvent) 5229 SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
5230 5230
5231 if let error = error as? NSError { 5231 if let error = error as? NSError {
5232 - if (error.code == 401) { 5232 +// if (error.code == 401) {
5233 - let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() 5233 +// let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel()
5234 - sessionEvent._sessionExpired = true 5234 +// sessionEvent._sessionExpired = true
5235 - SwiftEventBus.post("sdk_session_expired", sender: sessionEvent) 5235 +// SwiftEventBus.post("sdk_session_expired", sender: sessionEvent)
5236 - } 5236 +// }
5237 5237
5238 failureCallback(error.code) 5238 failureCallback(error.code)
5239 } else { 5239 } else {
...@@ -5301,11 +5301,11 @@ public class swiftApi { ...@@ -5301,11 +5301,11 @@ public class swiftApi {
5301 SwiftEventBus.post("dynatrace", sender: dynatraceEvent) 5301 SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
5302 5302
5303 if let error = error as? NSError { 5303 if let error = error as? NSError {
5304 - if (error.code == 401) { 5304 +// if (error.code == 401) {
5305 - let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() 5305 +// let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel()
5306 - sessionEvent._sessionExpired = true 5306 +// sessionEvent._sessionExpired = true
5307 - SwiftEventBus.post("sdk_session_expired", sender: sessionEvent) 5307 +// SwiftEventBus.post("sdk_session_expired", sender: sessionEvent)
5308 - } 5308 +// }
5309 5309
5310 failureCallback(error.code) 5310 failureCallback(error.code)
5311 } else { 5311 } else {
...@@ -5558,11 +5558,11 @@ public class swiftApi { ...@@ -5558,11 +5558,11 @@ public class swiftApi {
5558 SwiftEventBus.post("dynatrace", sender: dynatraceEvent) 5558 SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
5559 5559
5560 if let error = error as? NSError { 5560 if let error = error as? NSError {
5561 - if (error.code == 401) { 5561 +// if (error.code == 401) {
5562 - let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() 5562 +// let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel()
5563 - sessionEvent._sessionExpired = true 5563 +// sessionEvent._sessionExpired = true
5564 - SwiftEventBus.post("sdk_session_expired", sender: sessionEvent) 5564 +// SwiftEventBus.post("sdk_session_expired", sender: sessionEvent)
5565 - } 5565 +// }
5566 5566
5567 failureCallback(error.code) 5567 failureCallback(error.code)
5568 } else { 5568 } else {
...@@ -6553,11 +6553,11 @@ public class swiftApi { ...@@ -6553,11 +6553,11 @@ public class swiftApi {
6553 SwiftEventBus.post("dynatrace", sender: dynatraceEvent) 6553 SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
6554 6554
6555 if let error = error as? NSError { 6555 if let error = error as? NSError {
6556 - if (error.code == 401) { 6556 +// if (error.code == 401) {
6557 - let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() 6557 +// let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel()
6558 - sessionEvent._sessionExpired = true 6558 +// sessionEvent._sessionExpired = true
6559 - SwiftEventBus.post("sdk_session_expired", sender: sessionEvent) 6559 +// SwiftEventBus.post("sdk_session_expired", sender: sessionEvent)
6560 - } 6560 +// }
6561 6561
6562 failureCallback(error.code) 6562 failureCallback(error.code)
6563 } else { 6563 } else {
......