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
17 changes: 2 additions & 15 deletions apps/AEPSampleApp/extensions/OptimizeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const ViewTypes = {
content: 1,
};

const TARGET_OFFER_TYPE_TEXT = 'text/plain';
const TARGET_OFFER_TYPE_JSON = 'application/json';
const TARGET_OFFER_TYPE_HTML = 'text/html';

Expand Down Expand Up @@ -113,26 +112,14 @@ export default ({navigation}: any) => {
setImageProposition(propositions.get(decisionScopeImage.getName()));
setHtmlProposition(propositions.get(decisionScopeHtml.getName()));
setJsonProposition(propositions.get(decisionScopeJson.getName()));
setTargetProposition(
propositions.get(decisionScopeTargetMbox.getName()),
);
setTargetProposition(propositions.get(decisionScopeTargetMbox.getName()));
}
},
});

const renderTargetOffer = () => {
if (targetProposition?.items) {
if (targetProposition.items[0].format === TARGET_OFFER_TYPE_TEXT) {
return (
<Text
style={{margin: 10, fontSize: 18}}
onPress={() => {
targetProposition?.items[0].tapped(targetProposition);
}}>
{targetProposition.items[0].content}
</Text>
);
} else if (targetProposition.items[0].format === TARGET_OFFER_TYPE_JSON) {
if (targetProposition.items[0].format === TARGET_OFFER_TYPE_JSON) {
return (
<Text
style={{margin: 10, fontSize: 18}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ public class RCTAEPPlacesDataBridge {


// @{link PlacesAuthorizationStatus}
public final static String AEP_PLACES_AUTH_STATUS_DENIED = "AEP_PLACES_AUTH_STATUS_DENIED";
public final static String AEP_PLACES_AUTH_STATUS_ALWAYS = "AEP_PLACES_AUTH_STATUS_ALWAYS";
public final static String AEP_PLACES_AUTH_STATUS_UNKNOWN = "AEP_PLACES_AUTH_STATUS_UNKNOWN";
public final static String AEP_PLACES_AUTH_STATUS_RESTRICTED = "AEP_PLACES_AUTH_STATUS_RESTRICTED";
public final static String AEP_PLACES_AUTH_STATUS_WHEN_IN_USE = "AEP_PLACES_AUTH_STATUS_WHEN_IN_USE";
public final static String AEP_PLACES_AUTH_STATUS_DENIED = "PLACES_AUTH_STATUS_DENIED";
public final static String AEP_PLACES_AUTH_STATUS_ALWAYS = "PLACES_AUTH_STATUS_ALWAYS";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a similar change on iOS side.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, I should have verified. Ty.

public final static String AEP_PLACES_AUTH_STATUS_UNKNOWN = "PLACES_AUTH_STATUS_UNKNOWN";
public final static String AEP_PLACES_AUTH_STATUS_RESTRICTED = "PLACES_AUTH_STATUS_RESTRICTED";
public final static String AEP_PLACES_AUTH_STATUS_WHEN_IN_USE = "PLACES_AUTH_STATUS_WHEN_IN_USE";

// Location
private final static String AEP_PLACES_LOCATION_LATITUDE = "latitude";
Expand Down
10 changes: 5 additions & 5 deletions packages/places/ios/src/RCTAEPPlacesDataBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@

// @{link PlacesAuthorizationStatus}
static NSString *const AEP_PLACES_AUTH_STATUS_DENIED =
@"AEP_PLACES_AUTH_STATUS_DENIED";
@"PLACES_AUTH_STATUS_DENIED";
static NSString *const AEP_PLACES_AUTH_STATUS_ALWAYS =
@"AEP_PLACES_AUTH_STATUS_ALWAYS";
@"PLACES_AUTH_STATUS_ALWAYS";
static NSString *const AEP_PLACES_AUTH_STATUS_UNKNOWN =
@"AEP_PLACES_AUTH_STATUS_UNKNOWN";
@"PLACES_AUTH_STATUS_UNKNOWN";
static NSString *const AEP_PLACES_AUTH_STATUS_RESTRICTED =
@"AEP_PLACES_AUTH_STATUS_RESTRICTED";
@"PLACES_AUTH_STATUS_RESTRICTED";
static NSString *const AEP_PLACES_AUTH_STATUS_WHEN_IN_USE =
@"AEP_PLACES_AUTH_STATUS_WHEN_IN_USE";
@"PLACES_AUTH_STATUS_WHEN_IN_USE";

// Location
static NSString *const LOCATION_LATITUDE = @"latitude";
Expand Down