-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jenkins CI
committed
Jul 31, 2023
1 parent
8e9b31f
commit 435a3ec
Showing
99 changed files
with
1,929 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
ext { | ||
pushwoosh = "6.6.9" | ||
pushwoosh = "6.6.14" | ||
} | ||
|
||
dependencies { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
ext { | ||
pushwoosh = "6.6.9" | ||
pushwoosh = "6.6.14" | ||
} | ||
|
||
dependencies { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// PWAppDelegate.h | ||
// Pushwoosh SDK | ||
// (c) Pushwoosh 2018 | ||
// | ||
|
||
#if TARGET_OS_IPHONE | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
/* | ||
Base AppDelegate class for easier integration. | ||
*/ | ||
@interface PWAppDelegate : UIResponder <UIApplicationDelegate> | ||
|
||
@property (nonatomic, strong) UIWindow *window; | ||
|
||
@end | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// | ||
// PWGDPRManager.h | ||
// Pushwoosh SDK | ||
// (c) Pushwoosh 2018 | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
/* | ||
`PWGDPRManager` class offers access to the singleton-instance of the manager responsible for channels management required by GDPR. | ||
*/ | ||
|
||
FOUNDATION_EXPORT NSString * const PWGDPRStatusDidChangeNotification; | ||
|
||
@interface PWGDPRManager : NSObject | ||
|
||
/** | ||
Indicates availability of the GDPR compliance solution. | ||
*/ | ||
@property (nonatomic, readonly, getter=isAvailable) BOOL available; | ||
|
||
@property (nonatomic, readonly, getter=isCommunicationEnabled) BOOL communicationEnabled; | ||
|
||
@property (nonatomic, readonly, getter=isDeviceDataRemoved) BOOL deviceDataRemoved; | ||
|
||
+ (instancetype)sharedManager; | ||
|
||
/** | ||
Enable/disable all communication with Pushwoosh. Enabled by default. | ||
*/ | ||
- (void)setCommunicationEnabled:(BOOL)enabled completion:(void (^)(NSError *error))completion; | ||
|
||
/** | ||
Removes all device data from Pushwoosh and stops all interactions and communication permanently. | ||
*/ | ||
- (void)removeAllDeviceDataWithCompletion:(void (^)(NSError *error))completion; | ||
|
||
#if TARGET_OS_IOS || TARGET_OS_OSX | ||
|
||
- (void)showGDPRConsentUI; | ||
|
||
- (void)showGDPRDeletionUI; | ||
|
||
#endif | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
// | ||
// PWInAppManager.h | ||
// Pushwoosh SDK | ||
// (c) Pushwoosh 2017 | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
#if TARGET_OS_IOS | ||
|
||
#import <WebKit/WebKit.h> | ||
/** | ||
`PWJavaScriptInterface` protocol is a representation of Javascript object that can be added at runtime into In-App Message HTML page | ||
to provide native calls and callbacks to Objective-C/Swift. | ||
Example: | ||
Objective-C: | ||
@code | ||
@implementation JavaScriptInterface | ||
- (void)nativeCall:(NSString*)str :(PWJavaScriptCallback*)callback { | ||
[callback executeWithParam:str]; | ||
} | ||
@end | ||
... | ||
[[PWInAppManager sharedManager] addJavascriptInterface:[JavaScriptInterface new] withName:@"ObjC"]; | ||
@endcode | ||
JavaScript: | ||
@code | ||
ObjC.nativeCall("exampleString", function(str) { | ||
console.log(str); | ||
}); | ||
@endcode | ||
*/ | ||
@protocol PWJavaScriptInterface | ||
|
||
@optional | ||
|
||
/** | ||
Tells the delegate that In-App Message load stated | ||
*/ | ||
- (void)onWebViewStartLoad:(WKWebView *)webView; | ||
|
||
/** | ||
Tells the delegate that In-App Message load finished | ||
*/ | ||
- (void)onWebViewFinishLoad:(WKWebView *)webView; | ||
|
||
/** | ||
Tells the delegate that In-App Message is closing | ||
*/ | ||
- (void)onWebViewStartClose:(WKWebView *)webView; | ||
|
||
@end | ||
|
||
/** | ||
`PWJavaScriptCallback` is a representation of Javascript function | ||
*/ | ||
@interface PWJavaScriptCallback : NSObject | ||
|
||
/** | ||
Invokes callback with no arguments | ||
*/ | ||
- (NSString*) execute; | ||
|
||
/** | ||
Invokes callback with one argument | ||
*/ | ||
- (NSString*) executeWithParam: (NSString*) param; | ||
|
||
/** | ||
Invokes callback with multiple arguments | ||
*/ | ||
- (NSString*) executeWithParams: (NSArray*) params; | ||
|
||
@end | ||
|
||
#endif | ||
|
||
|
||
/* | ||
`PWInAppManager` class offers access to the singleton-instance of the inapp messages manager responsible for sending events and managing inapp message notifications. | ||
*/ | ||
@interface PWInAppManager : NSObject | ||
|
||
+ (instancetype)sharedManager; | ||
|
||
+ (void)updateInAppManagerInstance; | ||
|
||
#if TARGET_OS_IOS || TARGET_OS_OSX | ||
/** | ||
Resets capping of the Pushwoosh out-of-the-box In-App solutions. | ||
*/ | ||
- (void)resetBusinessCasesFrequencyCapping; | ||
|
||
#endif | ||
/** | ||
Set User indentifier. This could be Facebook ID, username or email, or any other user ID. | ||
This allows data and events to be matched across multiple user devices. | ||
*/ | ||
- (void)setUserId:(NSString *)userId; | ||
|
||
/** | ||
Set User indentifier. This could be Facebook ID, username or email, or any other user ID. | ||
This allows data and events to be matched across multiple user devices. | ||
If setUser succeeds competion is called with nil argument. If setUser fails completion is called with error. | ||
*/ | ||
- (void)setUserId:(NSString *)userId completion:(void(^)(NSError * error))completion; | ||
|
||
/** | ||
Set User indentifier. This could be Facebook ID, username or email, or any other user ID. | ||
This allows data and events to be matched across multiple user devices. | ||
@param userId user identifier | ||
@param emails user's emails array | ||
*/ | ||
- (void)setUser:(NSString *)userId emails:(NSArray *)emails completion:(void(^)(NSError * error))completion; | ||
|
||
/** | ||
Register emails list associated to the current user. | ||
@param emails user's emails array | ||
*/ | ||
- (void)setEmails:(NSArray *)emails completion:(void(^)(NSError * error))completion; | ||
|
||
/** | ||
Move all events from oldUserId to newUserId if doMerge is true. If doMerge is false all events for oldUserId are removed. | ||
@param oldUserId source user | ||
@param newUserId destination user | ||
@param doMerge if false all events for oldUserId are removed, if true all events for oldUserId are moved to newUserId | ||
@param completion callback | ||
*/ | ||
- (void)mergeUserId:(NSString *)oldUserId to:(NSString *)newUserId doMerge:(BOOL)doMerge completion:(void (^)(NSError *error))completion; | ||
|
||
/** | ||
Post events for In-App Messages. This can trigger In-App message display as specified in Pushwoosh Control Panel. | ||
Example: | ||
@code | ||
[[PWInAppManager sharedManager] setUserId:@"96da2f590cd7246bbde0051047b0d6f7"]; | ||
[[PWInAppManager sharedManager] postEvent:@"buttonPressed" withAttributes:@{ @"buttonNumber" : @"4", @"buttonLabel" : @"Banner" } completion:nil]; | ||
@endcode | ||
@param event name of the event | ||
@param attributes NSDictionary of event attributes | ||
@param completion function to call after posting event | ||
*/ | ||
- (void)postEvent:(NSString *)event withAttributes:(NSDictionary *)attributes completion:(void (^)(NSError *error))completion; | ||
|
||
/** | ||
See `postEvent:withAttributes:completion:` | ||
*/ | ||
- (void)postEvent:(NSString *)event withAttributes:(NSDictionary *)attributes; | ||
|
||
#if TARGET_OS_IOS | ||
|
||
/** | ||
Adds javascript interface for In-App Messages. Interface will be accessible from javascript as object with specified `name` and functions defined in `interface` class. | ||
*/ | ||
- (void)addJavascriptInterface:(NSObject<PWJavaScriptInterface>*)interface withName:(NSString*)name; | ||
|
||
/** | ||
Updates In-App messages storage on a device | ||
*/ | ||
|
||
- (void)reloadInAppsWithCompletion: (void (^)(NSError *error))completion; | ||
|
||
#endif | ||
|
||
@end |
Oops, something went wrong.