cordova-plugin-repro 6.9.0 → 6.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugin.xml +1 -9
- package/repro-version.json +3 -3
- package/src/android/CordovaPlugin.java +18 -1
- package/src/android/repro-android-sdk.aar +0 -0
- package/src/android/repro-android-sdk.gradle +2 -2
- package/src/ios/CDVRepro.h +1 -1
- package/src/ios/CDVRepro.m +9 -0
- package/src/ios/Repro.xcframework/Info.plist +8 -8
- package/src/ios/Repro.xcframework/ios-arm64_armv7_armv7s/Repro.framework/Headers/Repro.h +13 -0
- package/src/ios/Repro.xcframework/ios-arm64_armv7_armv7s/Repro.framework/Info.plist +0 -0
- package/src/ios/Repro.xcframework/ios-arm64_armv7_armv7s/Repro.framework/Repro +0 -0
- package/src/ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Headers/Repro.h +13 -0
- package/src/ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Info.plist +0 -0
- package/src/ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Repro +0 -0
- package/www/Repro.js +4 -0
package/package.json
CHANGED
package/plugin.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='UTF-8'?>
|
|
2
2
|
|
|
3
|
-
<plugin xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-repro" version="6.
|
|
3
|
+
<plugin xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-repro" version="6.10.1" xmlns="http://apache.org/cordova/ns/plugins/1.0">
|
|
4
4
|
<name>Repro</name>
|
|
5
5
|
<description>Repro Cordova Plugin</description>
|
|
6
6
|
<license>Commercial</license>
|
|
@@ -68,11 +68,3 @@
|
|
|
68
68
|
|
|
69
69
|
</plugin>
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
package/repro-version.json
CHANGED
|
@@ -6,6 +6,7 @@ import android.graphics.Point;
|
|
|
6
6
|
import android.graphics.Rect;
|
|
7
7
|
import android.view.Display;
|
|
8
8
|
import android.view.WindowManager;
|
|
9
|
+
import android.net.Uri;
|
|
9
10
|
|
|
10
11
|
import java.lang.reflect.Field;
|
|
11
12
|
import java.lang.reflect.Method;
|
|
@@ -25,6 +26,7 @@ import org.apache.cordova.CordovaArgs;
|
|
|
25
26
|
|
|
26
27
|
import org.apache.cordova.CordovaWebView;
|
|
27
28
|
import org.apache.cordova.LOG;
|
|
29
|
+
import org.apache.cordova.PluginResult;
|
|
28
30
|
import org.json.JSONArray;
|
|
29
31
|
import org.json.JSONException;
|
|
30
32
|
import org.json.JSONObject;
|
|
@@ -40,7 +42,7 @@ import io.repro.android.newsfeed.NewsFeedCampaignType;
|
|
|
40
42
|
*/
|
|
41
43
|
public final class CordovaPlugin extends org.apache.cordova.CordovaPlugin {
|
|
42
44
|
|
|
43
|
-
private static final String REPRO_CORDOVA_BRIDGE_VERSION = "6.
|
|
45
|
+
private static final String REPRO_CORDOVA_BRIDGE_VERSION = "6.10.1";
|
|
44
46
|
|
|
45
47
|
private static SimpleDateFormat sDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.US);
|
|
46
48
|
|
|
@@ -155,6 +157,9 @@ public final class CordovaPlugin extends org.apache.cordova.CordovaPlugin {
|
|
|
155
157
|
else if ("updateNewsFeeds".equals(action)) {
|
|
156
158
|
return updateNewsFeeds(args, callbackContext);
|
|
157
159
|
}
|
|
160
|
+
else if ("setOpenUrlCallback".equals(action)) {
|
|
161
|
+
return setOpenUrlCallback(args, callbackContext);
|
|
162
|
+
}
|
|
158
163
|
|
|
159
164
|
return false;
|
|
160
165
|
}
|
|
@@ -854,6 +859,18 @@ public final class CordovaPlugin extends org.apache.cordova.CordovaPlugin {
|
|
|
854
859
|
return true;
|
|
855
860
|
}
|
|
856
861
|
|
|
862
|
+
private boolean setOpenUrlCallback(final CordovaArgs args, final CallbackContext callbackContext) {
|
|
863
|
+
Repro.setOpenUrlCallback(new Repro.OpenUrlCallback() {
|
|
864
|
+
@Override
|
|
865
|
+
public void onOpened(Uri uri) {
|
|
866
|
+
PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, uri.toString());
|
|
867
|
+
pluginResult.setKeepCallback(true);
|
|
868
|
+
callbackContext.sendPluginResult(pluginResult);
|
|
869
|
+
}
|
|
870
|
+
});
|
|
871
|
+
return true;
|
|
872
|
+
}
|
|
873
|
+
|
|
857
874
|
// helper
|
|
858
875
|
|
|
859
876
|
private static abstract class API<T> implements Runnable {
|
|
Binary file
|
package/src/ios/CDVRepro.h
CHANGED
package/src/ios/CDVRepro.m
CHANGED
|
@@ -611,6 +611,15 @@ static NSDictionary* convertNSStringJSONToNSDictionary(NSString* json) {
|
|
|
611
611
|
}];
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
+
- (void)setOpenUrlCallback:(CDVInvokedUrlCommand*)command
|
|
615
|
+
{
|
|
616
|
+
[Repro setOpenUrlCallback:^void(NSURL *url) {
|
|
617
|
+
CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:[url absoluteString]];
|
|
618
|
+
[pluginResult setKeepCallbackAsBool:YES];
|
|
619
|
+
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
|
|
620
|
+
}];
|
|
621
|
+
}
|
|
622
|
+
|
|
614
623
|
- (NSString *)convertCampaignTypeToString:(RPRCampaignType)campaignType
|
|
615
624
|
{
|
|
616
625
|
switch (campaignType) {
|
|
@@ -6,33 +6,33 @@
|
|
|
6
6
|
<array>
|
|
7
7
|
<dict>
|
|
8
8
|
<key>LibraryIdentifier</key>
|
|
9
|
-
<string>ios-
|
|
9
|
+
<string>ios-arm64_i386_x86_64-simulator</string>
|
|
10
10
|
<key>LibraryPath</key>
|
|
11
11
|
<string>Repro.framework</string>
|
|
12
12
|
<key>SupportedArchitectures</key>
|
|
13
13
|
<array>
|
|
14
14
|
<string>arm64</string>
|
|
15
|
-
<string>
|
|
16
|
-
<string>
|
|
15
|
+
<string>i386</string>
|
|
16
|
+
<string>x86_64</string>
|
|
17
17
|
</array>
|
|
18
18
|
<key>SupportedPlatform</key>
|
|
19
19
|
<string>ios</string>
|
|
20
|
+
<key>SupportedPlatformVariant</key>
|
|
21
|
+
<string>simulator</string>
|
|
20
22
|
</dict>
|
|
21
23
|
<dict>
|
|
22
24
|
<key>LibraryIdentifier</key>
|
|
23
|
-
<string>ios-
|
|
25
|
+
<string>ios-arm64_armv7_armv7s</string>
|
|
24
26
|
<key>LibraryPath</key>
|
|
25
27
|
<string>Repro.framework</string>
|
|
26
28
|
<key>SupportedArchitectures</key>
|
|
27
29
|
<array>
|
|
28
30
|
<string>arm64</string>
|
|
29
|
-
<string>
|
|
30
|
-
<string>
|
|
31
|
+
<string>armv7</string>
|
|
32
|
+
<string>armv7s</string>
|
|
31
33
|
</array>
|
|
32
34
|
<key>SupportedPlatform</key>
|
|
33
35
|
<string>ios</string>
|
|
34
|
-
<key>SupportedPlatformVariant</key>
|
|
35
|
-
<string>simulator</string>
|
|
36
36
|
</dict>
|
|
37
37
|
</array>
|
|
38
38
|
<key>CFBundlePackageType</key>
|
|
@@ -69,6 +69,9 @@ NS_SWIFT_NAME(setUserProfile(emailAddress:));
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
// Event tracking
|
|
72
|
+
+ (void)track:(nonnull NSString *)name
|
|
73
|
+
NS_SWIFT_NAME(track(event:));
|
|
74
|
+
|
|
72
75
|
+ (void)track:(nonnull NSString *)name properties:(nullable NSDictionary *)properties
|
|
73
76
|
NS_SWIFT_NAME(track(event:properties:));
|
|
74
77
|
|
|
@@ -136,6 +139,16 @@ NS_SWIFT_NAME(set(silverEggCookie:));
|
|
|
136
139
|
+ (void)setSilverEggProdKey:(nonnull NSString *)silverEggProdKey
|
|
137
140
|
NS_SWIFT_NAME(set(silverEggProdKey:));
|
|
138
141
|
|
|
142
|
+
|
|
143
|
+
// Event Callbacks
|
|
144
|
+
|
|
145
|
+
+ (void)addOpenUrlFilterRegEx:(nonnull NSString *)filterRegEx
|
|
146
|
+
NS_SWIFT_NAME(add(openUrlFilterRegEx:));
|
|
147
|
+
|
|
148
|
+
+ (void)setOpenUrlCallback:(void(^ _Nullable)(NSURL * _Nonnull url))callback
|
|
149
|
+
NS_SWIFT_NAME(setOpenUrlCallback(_:));
|
|
150
|
+
|
|
151
|
+
|
|
139
152
|
// Remote Configuration
|
|
140
153
|
@property (class, nonatomic, readonly, nonnull) RPRRemoteConfig *remoteConfig;
|
|
141
154
|
|
|
Binary file
|
|
Binary file
|
package/src/ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Headers/Repro.h
CHANGED
|
@@ -69,6 +69,9 @@ NS_SWIFT_NAME(setUserProfile(emailAddress:));
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
// Event tracking
|
|
72
|
+
+ (void)track:(nonnull NSString *)name
|
|
73
|
+
NS_SWIFT_NAME(track(event:));
|
|
74
|
+
|
|
72
75
|
+ (void)track:(nonnull NSString *)name properties:(nullable NSDictionary *)properties
|
|
73
76
|
NS_SWIFT_NAME(track(event:properties:));
|
|
74
77
|
|
|
@@ -136,6 +139,16 @@ NS_SWIFT_NAME(set(silverEggCookie:));
|
|
|
136
139
|
+ (void)setSilverEggProdKey:(nonnull NSString *)silverEggProdKey
|
|
137
140
|
NS_SWIFT_NAME(set(silverEggProdKey:));
|
|
138
141
|
|
|
142
|
+
|
|
143
|
+
// Event Callbacks
|
|
144
|
+
|
|
145
|
+
+ (void)addOpenUrlFilterRegEx:(nonnull NSString *)filterRegEx
|
|
146
|
+
NS_SWIFT_NAME(add(openUrlFilterRegEx:));
|
|
147
|
+
|
|
148
|
+
+ (void)setOpenUrlCallback:(void(^ _Nullable)(NSURL * _Nonnull url))callback
|
|
149
|
+
NS_SWIFT_NAME(setOpenUrlCallback(_:));
|
|
150
|
+
|
|
151
|
+
|
|
139
152
|
// Remote Configuration
|
|
140
153
|
@property (class, nonatomic, readonly, nonnull) RPRRemoteConfig *remoteConfig;
|
|
141
154
|
|
package/src/ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Info.plist
CHANGED
|
Binary file
|
|
Binary file
|
package/www/Repro.js
CHANGED
|
@@ -146,6 +146,10 @@ Repro.prototype.updateNewsFeeds = function (newsFeeds, successCallback, errorCal
|
|
|
146
146
|
exec(successCallback, errorCallback, "Repro", "updateNewsFeeds", [newsFeeds]);
|
|
147
147
|
};
|
|
148
148
|
|
|
149
|
+
Repro.prototype.setOpenUrlCallback = function(successCallback, errorCallback) {
|
|
150
|
+
exec(successCallback, errorCallback, "Repro", "setOpenUrlCallback", []);
|
|
151
|
+
};
|
|
152
|
+
|
|
149
153
|
Repro.prototype.CampaignType = Object.freeze(
|
|
150
154
|
{
|
|
151
155
|
InAppMessage: "in_app_message",
|