diff --git a/Artifacts/include/Iterable-iOS-SDK/IterableConstants.h b/Artifacts/include/Iterable-iOS-SDK/IterableConstants.h index 376b2d9..dbd825b 100644 --- a/Artifacts/include/Iterable-iOS-SDK/IterableConstants.h +++ b/Artifacts/include/Iterable-iOS-SDK/IterableConstants.h @@ -17,6 +17,7 @@ extern NSString *const ITBL_KEY_CURRENT_EMAIL; extern NSString *const ITBL_KEY_DATA_FIELDS; extern NSString *const ITBL_KEY_DEVICE; extern NSString *const ITBL_KEY_EMAIL; +extern NSString *const ITBL_KEY_EMAIL_LIST_IDS; extern NSString *const ITBL_KEY_EVENT_NAME; extern NSString *const ITBL_KEY_ITEMS; extern NSString *const ITBL_KEY_MERGE_NESTED; @@ -24,10 +25,13 @@ extern NSString *const ITBL_KEY_MESSAGE_ID; extern NSString *const ITBL_KEY_NEW_EMAIL; extern NSString *const ITBL_KEY_PLATFORM; extern NSString *const ITBL_KEY_RECIPIENT_EMAIL; +extern NSString *const ITBL_KEY_SDK_VERSION; extern NSString *const ITBL_KEY_SEND_AT; extern NSString *const ITBL_KEY_TOKEN; extern NSString *const ITBL_KEY_TEMPLATE_ID; extern NSString *const ITBL_KEY_TOTAL; +extern NSString *const ITBL_KEY_UNSUB_CHANNEL; +extern NSString *const ITBL_KEY_UNSUB_MESSAGE; extern NSString *const ITBL_KEY_USER; extern NSString *const ITBL_KEY_USER_ID; @@ -52,8 +56,9 @@ extern NSString *const ITBL_DEVICE_USER_INTERFACE; #define ENDPOINT_TRACK_INAPP_CLICK @"events/trackInAppClick" #define ENDPOINT_TRACK_INAPP_OPEN @"events/trackInAppOpen" #define ENDPOINT_TRACK_PUSH_OPEN @"events/trackPushOpen" -#define ENDPOINT_UPDATE_EMAIL @"users/updateEmail" #define ENDPOINT_UPDATE_USER @"users/update" +#define ENDPOINT_UPDATE_EMAIL @"users/updateEmail" +#define ENDPOINT_UPDATE_SUBSCRIPTIONS @"users/updateSubscriptions" //MISC #define ITBL_KEY_GET @"GET" @@ -65,11 +70,15 @@ extern NSString *const ITBL_DEVICE_USER_INTERFACE; #define ITBL_KEY_PHONE @"Phone" #define ITBL_KEY_UNSPECIFIED @"Unspecified" +#define ITBL_PLATFORM_IOS @"iOS" + #define ITBL_DEEPLINK_IDENTIFIER @"/a/[a-zA-Z0-9]+" //In-App Constants +#define ITERABLE_IN_APP_CLICK_URL @"urlClick" + #define ITERABLE_IN_APP_TITLE @"title" #define ITERABLE_IN_APP_BODY @"body" #define ITERABLE_IN_APP_IMAGE @"mainImage" @@ -90,5 +99,11 @@ extern NSString *const ITBL_DEVICE_USER_INTERFACE; #define ITERABLE_IN_APP_BUTTON_ACTION @"action" #define ITERABLE_IN_APP_CONTENT @"content" +//In-App HTML Constants +#define ITERABLE_IN_APP_BACKGROUND_ALPHA @"backgroundAlpha" +#define ITERABLE_IN_APP_HTML @"html" +#define ITERABLE_IN_APP_HREF @"href" +#define ITERABLE_IN_APP_DISPLAY_SETTINGS @"inAppDisplaySettings" + typedef void (^ITEActionBlock)(NSString *); diff --git a/Iterable-iOS-SDK.xcodeproj/project.pbxproj b/Iterable-iOS-SDK.xcodeproj/project.pbxproj index 3ec1a29..9bbcc41 100644 --- a/Iterable-iOS-SDK.xcodeproj/project.pbxproj +++ b/Iterable-iOS-SDK.xcodeproj/project.pbxproj @@ -40,7 +40,7 @@ 161D98BD20236BC700E91846 /* IterableDeeplinkManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 161D98BB20236BC700E91846 /* IterableDeeplinkManager.m */; }; 16513DDE1D89EECC00C205B3 /* IterableInAppManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 16513DD81D89EECC00C205B3 /* IterableInAppManager.h */; }; 16513DDF1D89EECC00C205B3 /* IterableInAppManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 16513DD91D89EECC00C205B3 /* IterableInAppManager.m */; }; - 1653A80E1D88B25200690298 /* IterableConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 1653A80B1D88B25200690298 /* IterableConstants.h */; }; + 1653A80E1D88B25200690298 /* IterableConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 1653A80B1D88B25200690298 /* IterableConstants.h */; settings = {ATTRIBUTES = (Public, ); }; }; 16E02BAD1E035EA400644C15 /* IterableConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 16E02BAC1E035EA400644C15 /* IterableConstants.m */; }; 6804B8601AC0F363000A126B /* CommerceItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6804B85F1AC0F363000A126B /* CommerceItem.m */; }; 6845F7331AC3831B0043629D /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6845F7321AC3831B0043629D /* SystemConfiguration.framework */; }; @@ -106,6 +106,7 @@ 9284CA73206DCA6C00404B74 /* IterableAPIResponseTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IterableAPIResponseTests.m; sourceTree = ""; }; C67AA6DFEC454FF39AD12F3F /* Pods-Iterable-iOS-SDK.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Iterable-iOS-SDK.release.xcconfig"; path = "Pods/Target Support Files/Pods-Iterable-iOS-SDK/Pods-Iterable-iOS-SDK.release.xcconfig"; sourceTree = ""; }; DA3D876BD230574973D99AD7 /* Pods-Iterable-iOS-SDK.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Iterable-iOS-SDK.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Iterable-iOS-SDK/Pods-Iterable-iOS-SDK.debug.xcconfig"; sourceTree = ""; }; + E95162E4972E90805BB61534 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = file.yml; path = .travis.yml; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -138,6 +139,7 @@ 09C0FC0A1A1D6D4700D5A86B /* Iterable-iOS-SDKTests */, 09C0FBFC1A1D6D4700D5A86B /* Products */, 6E5391F86A2C1A9760767AA2 /* Pods */, + E95162E4972E90805BB61534 /* .travis.yml */, ); sourceTree = ""; }; diff --git a/Iterable-iOS-SDK/IterableAPI.m b/Iterable-iOS-SDK/IterableAPI.m index b619f52..d11c70d 100644 --- a/Iterable-iOS-SDK/IterableAPI.m +++ b/Iterable-iOS-SDK/IterableAPI.m @@ -267,7 +267,7 @@ - (void)sendRequest:(NSURLRequest *)request onSuccess:(void (^)(NSDictionary *)) if (onFailure != nil) onFailure(reason, nil); } } else { - if (onFailure != nil) onFailure([NSString stringWithFormat:@"Received non-200 response: %d", responseCode], data); + if (onFailure != nil) onFailure([NSString stringWithFormat:@"Received non-200 response: %ld", (long) responseCode], data); } }]; [task resume];