Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions apps/AEPSampleApp/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@ PODS:
- AEPAssurance (3.0.0):
- AEPCore (>= 3.1.0)
- AEPServices (>= 3.1.0)
- AEPCore (3.3.0):
- AEPCore (3.3.1):
- AEPRulesEngine (= 1.0.1)
- AEPServices (= 3.3.0)
- AEPServices (= 3.3.1)
- AEPEdge (1.1.2):
- AEPCore (>= 3.1.1)
- AEPEdgeIdentity
- AEPEdgeIdentity (1.0.0):
- AEPCore (>= 3.1.1)
- AEPIdentity (3.3.0):
- AEPCore (= 3.3.0)
- AEPLifecycle (3.3.0):
- AEPCore (= 3.3.0)
- AEPIdentity (3.3.1):
- AEPCore (= 3.3.1)
- AEPLifecycle (3.3.1):
- AEPCore (= 3.3.1)
- AEPMessaging (1.0.0):
- AEPCore
- AEPEdge (>= 1.1.0)
- AEPEdgeIdentity (>= 1.0.0)
- AEPServices
- AEPRulesEngine (1.0.1)
- AEPServices (3.3.0)
- AEPSignal (3.3.0):
- AEPCore (= 3.3.0)
- AEPServices (3.3.1)
- AEPSignal (3.3.1):
- AEPCore (= 3.3.1)
- AEPUserProfile (3.0.1):
- AEPCore
- boost-for-react-native (1.63.0)
Expand Down Expand Up @@ -320,7 +320,7 @@ PODS:
- React
- RNGestureHandler (1.10.3):
- React-Core
- RNReanimated (2.2.2):
- RNReanimated (2.2.4):
- DoubleConversion
- FBLazyVector
- FBReactNativeSpec
Expand Down Expand Up @@ -349,7 +349,7 @@ PODS:
- React-RCTVibration
- ReactCommon/turbomodule/core
- Yoga
- RNScreens (3.8.0):
- RNScreens (3.9.0):
- React-Core
- React-RCTImage
- Yoga (1.14.0)
Expand Down Expand Up @@ -494,15 +494,15 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
AEPAssurance: 18068627111e366a851dc2166239f22b665101bd
AEPCore: 0bd46c0a859d36099bb71294874837c31235ffe6
AEPCore: fc1398728b6b2a4dcc8dc96455f69ec144e087c0
AEPEdge: 4208614f134d86131df95fd3420da20530fac275
AEPEdgeIdentity: 40d312b4434b710a46c1738ab2a221dda4cfd67e
AEPIdentity: ad3bc0d18db4a8a1408299e56883c1db1e874551
AEPLifecycle: a040570f7981f3d1892b9e39f3cd7b5de5280594
AEPIdentity: 40aedf425fc7cc63dde579135b8c1c65497a42d2
AEPLifecycle: dc131d6744a55d71bc9009d65f3b3428645cbd23
AEPMessaging: 661cc08435254f3c9cc0899785c20a7952952e95
AEPRulesEngine: 5075ed294026a12e37bd26fe260f74604d205354
AEPServices: ccf8d0fdfe7a7e45303aa6b3c33af0687dd49cf1
AEPSignal: 7eb425e33e08d2bcdb039121157f2504e82e8dad
AEPServices: c49e7b6ef17ec9f874b015f68ac7d2436235282f
AEPSignal: 2d0dd4775c95797bf118300b74a1d9efcdbf8650
AEPUserProfile: 2ddb5ba8e2c22dd8f942992306b050f4be2c2403
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de
Expand Down Expand Up @@ -541,8 +541,8 @@ SPEC CHECKSUMS:
ReactCommon: 149906e01aa51142707a10665185db879898e966
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
RNReanimated: 241c586663f44f19a53883c63375fdd041253960
RNScreens: 6e1ea5787989f92b0671049b808aef64fa1ef98c
RNReanimated: 024eff8202342abf4b24e11575a16afc441dabfe
RNScreens: 4d79118be80f79fa1f4aa131909a1d6e86280af3
Yoga: 575c581c63e0d35c9a83f4b46d01d63abc1100ac

PODFILE CHECKSUM: 2a644d6b375e7638e06413c828ae75a91d8f8598
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

import java.util.Map;

public class RCTAEPArrayUtil {
class RCTAEPArrayUtil {

public static Object[] toObjectArray(ReadableArray readableArray) {
static Object[] toObjectArray(ReadableArray readableArray) {
if (readableArray == null) {
return null;
}
Expand Down Expand Up @@ -55,7 +55,7 @@ public static Object[] toObjectArray(ReadableArray readableArray) {
return array;
}

public static WritableArray toWritableArray(Object[] array) {
static WritableArray toWritableArray(Object[] array) {
if (array == null) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,32 @@
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.WritableNativeMap;

public final class RCTAEPCoreDataBridge {
final class RCTAEPCoreDataBridge {

// @{link LoggingMode}
public final static String AEP_LOG_LEVEL_ERROR = "AEP_LOG_LEVEL_ERROR";
public final static String AEP_LOG_LEVEL_WARNING = "AEP_LOG_LEVEL_WARNING";
public final static String AEP_LOG_LEVEL_DEBUG = "AEP_LOG_LEVEL_DEBUG";
public final static String AEP_LOG_LEVEL_VERBOSE = "AEP_LOG_LEVEL_VERBOSE";
private final static String AEP_LOG_LEVEL_ERROR = "AEP_LOG_LEVEL_ERROR";
private final static String AEP_LOG_LEVEL_WARNING = "AEP_LOG_LEVEL_WARNING";
private final static String AEP_LOG_LEVEL_DEBUG = "AEP_LOG_LEVEL_DEBUG";
private final static String AEP_LOG_LEVEL_VERBOSE = "AEP_LOG_LEVEL_VERBOSE";

// @{link @VisitorID.AuthenticationState}
public final static String AEP_PRIVACY_STATUS_OPT_IN = "AEP_PRIVACY_STATUS_OPT_IN";
public final static String AEP_PRIVACY_STATUS_OPT_OUT = "AEP_PRIVACY_STATUS_OPT_OUT";
public final static String AEP_PRIVACY_STATUS_UNKNOWN = "AEP_PRIVACY_STATUS_UNKNOWN";
private final static String AEP_PRIVACY_STATUS_OPT_IN = "AEP_PRIVACY_STATUS_OPT_IN";
private final static String AEP_PRIVACY_STATUS_OPT_OUT = "AEP_PRIVACY_STATUS_OPT_OUT";
private final static String AEP_PRIVACY_STATUS_UNKNOWN = "AEP_PRIVACY_STATUS_UNKNOWN";

// Event Object Keys
public final static String EVENT_NAME_KEY = "eventName";
public final static String EVENT_TYPE_KEY = "eventType";
public final static String EVENT_SOURCE_KEY = "eventSource";
public final static String EVENT_DATA_KEY = "eventData";
private final static String EVENT_NAME_KEY = "eventName";
private final static String EVENT_TYPE_KEY = "eventType";
private final static String EVENT_SOURCE_KEY = "eventSource";
private final static String EVENT_DATA_KEY = "eventData";

/**
* Converts a {@link ReadableMap} into an {@link Event}
*
* @param map
* @return An {@link Event}
*/
public static Event eventFromReadableMap(final ReadableMap map) {
static Event eventFromReadableMap(final ReadableMap map) {
if (map == null) {
return null;
}
Expand All @@ -53,7 +53,7 @@ public static Event eventFromReadableMap(final ReadableMap map) {
return event;
}

public static ReadableMap readableMapFromEvent(final Event event) {
static ReadableMap readableMapFromEvent(final Event event) {
if (event == null) {
return null;
}
Expand All @@ -72,7 +72,7 @@ public static ReadableMap readableMapFromEvent(final Event event) {
* @param logModeString
* @return The @{link LoggingMode} associated with logModeString
*/
public static LoggingMode loggingModeFromString(final String logModeString) {
static LoggingMode loggingModeFromString(final String logModeString) {
if (logModeString == null) {
return LoggingMode.DEBUG;
}
Expand All @@ -90,7 +90,7 @@ public static LoggingMode loggingModeFromString(final String logModeString) {
return LoggingMode.DEBUG;
}

public static String stringFromLoggingMode(final LoggingMode logMode) {
static String stringFromLoggingMode(final LoggingMode logMode) {
if (logMode == null) {
return AEP_LOG_LEVEL_DEBUG;
}
Expand All @@ -109,7 +109,7 @@ public static String stringFromLoggingMode(final LoggingMode logMode) {
return AEP_LOG_LEVEL_DEBUG;
}

public static MobilePrivacyStatus privacyStatusFromString(final String privacyStatusString) {
static MobilePrivacyStatus privacyStatusFromString(final String privacyStatusString) {
if (privacyStatusString == null) {
return MobilePrivacyStatus.UNKNOWN;
}
Expand All @@ -123,7 +123,7 @@ public static MobilePrivacyStatus privacyStatusFromString(final String privacySt
return MobilePrivacyStatus.UNKNOWN;
}

public static String stringFromPrivacyStatus(final MobilePrivacyStatus privacyStatus) {
static String stringFromPrivacyStatus(final MobilePrivacyStatus privacyStatus) {
if (privacyStatus == null) {
return AEP_PRIVACY_STATUS_UNKNOWN;
}
Expand All @@ -139,7 +139,7 @@ public static String stringFromPrivacyStatus(final MobilePrivacyStatus privacySt

// Helper methods

public static String getNullableString(final ReadableMap data, final String key) {
static String getNullableString(final ReadableMap data, final String key) {
return data.hasKey(key) ? data.getString(key) : null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
package com.adobe.marketing.mobile.reactnative;

import com.adobe.marketing.mobile.AdobeCallback;
import com.adobe.marketing.mobile.AdobeCallbackWithError;
import com.adobe.marketing.mobile.AdobeError;
import com.adobe.marketing.mobile.Event;
import com.adobe.marketing.mobile.ExtensionError;
import com.adobe.marketing.mobile.ExtensionErrorCallback;
Expand Down Expand Up @@ -90,7 +92,12 @@ public void setPrivacyStatus(final String privacyStatus) {

@ReactMethod
public void getPrivacyStatus(final Promise promise) {
MobileCore.getPrivacyStatus(new AdobeCallback<MobilePrivacyStatus>() {
MobileCore.getPrivacyStatus(new AdobeCallbackWithError<MobilePrivacyStatus>() {
@Override
public void fail(AdobeError adobeError) {
handleError(promise, adobeError, "getPrivacyStatus");
}

@Override
public void call(MobilePrivacyStatus mobilePrivacyStatus) {
promise.resolve(RCTAEPCoreDataBridge.stringFromPrivacyStatus(mobilePrivacyStatus));
Expand All @@ -100,7 +107,12 @@ public void call(MobilePrivacyStatus mobilePrivacyStatus) {

@ReactMethod
public void getSdkIdentities(final Promise promise) {
MobileCore.getSdkIdentities(new AdobeCallback<String>() {
MobileCore.getSdkIdentities(new AdobeCallbackWithError<String>() {
@Override
public void fail(AdobeError adobeError) {
handleError(promise, adobeError, "getSdkIdentities");
}

@Override
public void call(String value) {
promise.resolve(value);
Expand Down Expand Up @@ -228,4 +240,12 @@ private void handleError(Promise promise, ExtensionError error) {
promise.reject(String.valueOf(error.getErrorCode()), error.getErrorName(), new RuntimeException(error.getErrorName()));
}

private void handleError(final Promise promise, final AdobeError error, final String errorLocation) {
if (error == null || promise == null) {
return;
}

promise.reject(getName(), String.format("%s returned an unexpected error: %s", errorLocation, error.getErrorName()), new Error(error.getErrorName()));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.bridge.WritableNativeMap;

public final class RCTAEPIdentityDataBridge {
final class RCTAEPIdentityDataBridge {

// Visitor ID Auth State
private static final String AEP_VISITOR_AUTH_STATE_AUTHENTICATED = "AEP_VISITOR_AUTH_STATE_AUTHENTICATED";
Expand All @@ -35,7 +35,7 @@ public final class RCTAEPIdentityDataBridge {
* @param authStateString
* @return The @{link VisitorID.AuthenticationState} authentication state
*/
public static VisitorID.AuthenticationState authenticationStateFromString(final String authStateString) {
static VisitorID.AuthenticationState authenticationStateFromString(final String authStateString) {
if (authStateString == null) {
return VisitorID.AuthenticationState.UNKNOWN;
}
Expand All @@ -49,7 +49,7 @@ public static VisitorID.AuthenticationState authenticationStateFromString(final
return VisitorID.AuthenticationState.UNKNOWN;
}

public static String stringFromAuthState(final VisitorID.AuthenticationState authenticationState) {
static String stringFromAuthState(final VisitorID.AuthenticationState authenticationState) {
if (authenticationState == null) {
return AEP_VISITOR_AUTH_STATE_UNKNOWN;
}
Expand All @@ -63,7 +63,7 @@ public static String stringFromAuthState(final VisitorID.AuthenticationState aut
return AEP_VISITOR_AUTH_STATE_UNKNOWN;
}

public static VisitorID visitorIdentifierFromReadableMap(final ReadableMap map) {
static VisitorID visitorIdentifierFromReadableMap(final ReadableMap map) {
if (map == null) {
return null;
}
Expand All @@ -79,7 +79,7 @@ public static VisitorID visitorIdentifierFromReadableMap(final ReadableMap map)
* @param visitorID The visitorID object
* @return A {@link WritableMap} that represents the visitorID
*/
public static WritableMap mapFromVisitorIdentifier(final VisitorID visitorID) {
static WritableMap mapFromVisitorIdentifier(final VisitorID visitorID) {
if (visitorID == null) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
*/
package com.adobe.marketing.mobile.reactnative;

import android.util.Log;

import com.adobe.marketing.mobile.AdobeCallback;
import com.adobe.marketing.mobile.AdobeCallbackWithError;
import com.adobe.marketing.mobile.AdobeError;
import com.adobe.marketing.mobile.Identity;
import com.adobe.marketing.mobile.InvalidInitException;
import com.adobe.marketing.mobile.VisitorID;
import com.facebook.react.bridge.Promise;
import com.facebook.react.bridge.ReactApplicationContext;
Expand Down Expand Up @@ -69,7 +67,12 @@ public void syncIdentifier(final String identifierType,

@ReactMethod
public void appendVisitorInfoForURL(final String baseURL, final Promise promise) {
Identity.appendVisitorInfoForURL(baseURL, new AdobeCallback<String>() {
Identity.appendVisitorInfoForURL(baseURL, new AdobeCallbackWithError<String>() {
@Override
public void fail(AdobeError adobeError) {
handleError(promise, adobeError, "appendVisitorInfoForURL");
}

@Override
public void call(String s) {
promise.resolve(s);
Expand All @@ -79,7 +82,12 @@ public void call(String s) {

@ReactMethod
public void getUrlVariables(final Promise promise) {
Identity.getUrlVariables(new AdobeCallback<String>() {
Identity.getUrlVariables(new AdobeCallbackWithError<String>() {
@Override
public void fail(AdobeError adobeError) {
handleError(promise, adobeError, "getUrlVariables");
}

@Override
public void call(String s) {
promise.resolve(s);
Expand All @@ -89,7 +97,12 @@ public void call(String s) {

@ReactMethod
public void getIdentifiers(final Promise promise) {
Identity.getIdentifiers(new AdobeCallback<List<VisitorID>>() {
Identity.getIdentifiers(new AdobeCallbackWithError<List<VisitorID>>() {
@Override
public void fail(AdobeError adobeError) {
handleError(promise, adobeError, "getIdentifiers");
}

@Override
public void call(List<VisitorID> visitorIDS) {
WritableArray arr = new WritableNativeArray();
Expand All @@ -103,12 +116,24 @@ public void call(List<VisitorID> visitorIDS) {

@ReactMethod
public void getExperienceCloudId(final Promise promise) {
Identity.getExperienceCloudId(new AdobeCallback<String>() {
Identity.getExperienceCloudId(new AdobeCallbackWithError<String>() {
@Override
public void fail(AdobeError adobeError) {
handleError(promise, adobeError, "getExperienceCloudId");
}
@Override
public void call(String s) {
promise.resolve(s);
}
});
}

private void handleError(final Promise promise, final AdobeError error, final String errorLocation) {
if (error == null || promise == null) {
return;
}

promise.reject(getName(), String.format("%s returned an unexpected error: %s", errorLocation, error.getErrorName()), new Error(error.getErrorName()));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
package com.adobe.marketing.mobile.reactnative;


import android.util.Log;

import com.adobe.marketing.mobile.InvalidInitException;
import com.adobe.marketing.mobile.Lifecycle;
import com.facebook.react.bridge.Promise;
import com.facebook.react.bridge.ReactApplicationContext;
Expand Down
Loading