Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
Make IterableConstants.h public and update it, fix one lint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
vbabenkoru committed Apr 12, 2018
1 parent 436dc03 commit 74ba2d2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
17 changes: 16 additions & 1 deletion Artifacts/include/Iterable-iOS-SDK/IterableConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,21 @@ 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;
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;

Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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 *);
4 changes: 3 additions & 1 deletion Iterable-iOS-SDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -106,6 +106,7 @@
9284CA73206DCA6C00404B74 /* IterableAPIResponseTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IterableAPIResponseTests.m; sourceTree = "<group>"; };
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 = "<group>"; };
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 = "<group>"; };
E95162E4972E90805BB61534 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = file.yml; path = .travis.yml; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -138,6 +139,7 @@
09C0FC0A1A1D6D4700D5A86B /* Iterable-iOS-SDKTests */,
09C0FBFC1A1D6D4700D5A86B /* Products */,
6E5391F86A2C1A9760767AA2 /* Pods */,
E95162E4972E90805BB61534 /* .travis.yml */,
);
sourceTree = "<group>";
};
Expand Down
2 changes: 1 addition & 1 deletion Iterable-iOS-SDK/IterableAPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 74ba2d2

Please sign in to comment.