Skip to content

Commit

Permalink
Pushwoosh Titanium 6.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins CI committed Jul 31, 2023
1 parent 8e9b31f commit 435a3ec
Show file tree
Hide file tree
Showing 99 changed files with 1,929 additions and 120 deletions.
2 changes: 1 addition & 1 deletion Module-Geozones-Source/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ext {
pushwoosh = "6.6.9"
pushwoosh = "6.6.14"
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion Module-Geozones-Source/android/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 6.1.0
version: 6.1.1
apiversion: 4
architectures: arm64-v8a armeabi-v7a x86 x86_64
description: pushwoosh_geozones
Expand Down
Binary file modified Module-Geozones-Source/ios/Library/libPushwooshGeozones.a
Binary file not shown.
2 changes: 1 addition & 1 deletion Module-Geozones-Source/ios/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 6.1.0
version: 6.1.1
apiversion: 2
architectures: armv7 arm64 i386 x86_64
description: PushwooshGeozones
Expand Down
2 changes: 1 addition & 1 deletion Module-Source/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ext {
pushwoosh = "6.6.9"
pushwoosh = "6.6.14"
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion Module-Source/android/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 6.1.0
version: 6.1.1
apiversion: 4
architectures: arm64-v8a armeabi-v7a x86 x86_64
description: pushnotifications
Expand Down
20 changes: 20 additions & 0 deletions Module-Source/ios/Library/PWAppDelegate.h
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
46 changes: 46 additions & 0 deletions Module-Source/ios/Library/PWGDPRManager.h
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
176 changes: 176 additions & 0 deletions Module-Source/ios/Library/PWInAppManager.h
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
Loading

0 comments on commit 435a3ec

Please sign in to comment.