Skip to content

Commit

Permalink
fix: Bundle commerce event setting (#83)
Browse files Browse the repository at this point in the history
* Fixing VALID_ARCHS defaults for the project (needed for M1+ arch)

* Fixing tests, bundlecommmerceevent explicit setting

* Fixing the bundlecommerceevent config override
  • Loading branch information
v-mamaya authored Nov 2, 2023
1 parent 159723e commit 1fc5f40
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
4 changes: 0 additions & 4 deletions Sources/mParticle-Appboy/MPKitAppboy.m
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,6 @@ - (nonnull MPKitExecStatus *)logBaseEvent:(nonnull MPBaseEvent *)event {
- (MPKitExecStatus *)routeCommerceEvent:(MPCommerceEvent *)commerceEvent {
MPKitExecStatus *execStatus = [[MPKitExecStatus alloc] initWithSDKCode:@(MPKitInstanceAppboy) returnCode:MPKitReturnCodeSuccess forwardCount:0];

NSMutableDictionary *mutDict = [_configuration mutableCopy];
mutDict[bundleCommerceEventData] = @true;
_configuration = mutDict;

if (commerceEvent.action == MPCommerceEventActionPurchase) {
NSMutableDictionary *baseProductAttributes = [[NSMutableDictionary alloc] init];
NSDictionary *transactionAttributes = [self simplifiedDictionary:[commerceEvent.transactionAttributes beautifiedDictionaryRepresentation]];
Expand Down
8 changes: 1 addition & 7 deletions mParticle-Appboy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 52;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -727,7 +727,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.mparticle.mParticle-Appboy";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
"VALID_ARCHS[sdk=iphonesimulator*]" = x86_64;
};
name = Debug;
};
Expand All @@ -745,7 +744,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.mparticle.mParticle-Appboy";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
"VALID_ARCHS[sdk=iphonesimulator*]" = x86_64;
};
name = Release;
};
Expand Down Expand Up @@ -787,8 +785,6 @@
SDKROOT = appletvos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = 3;
VALID_ARCHS = arm64;
"VALID_ARCHS[sdk=appletvsimulator*]" = x86_64;
};
name = Debug;
};
Expand Down Expand Up @@ -830,8 +826,6 @@
SDKROOT = appletvos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = 3;
VALID_ARCHS = arm64;
"VALID_ARCHS[sdk=appletvsimulator*]" = x86_64;
};
name = Release;
};
Expand Down
2 changes: 2 additions & 0 deletions mParticle_AppboyTests/mParticle_AppboyTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ - (void)testUserIdMPID {

- (void)testlogCommerceEvent {
MPKitAppboy *kit = [[MPKitAppboy alloc] init];
kit.configuration = @{@"bundleCommerceEventData" : @0};

BRZConfiguration *configuration = [[BRZConfiguration alloc] init];
Braze *testClient = [[Braze alloc] initWithConfiguration:configuration];
Expand Down Expand Up @@ -399,6 +400,7 @@ - (void)testlogCommerceEventWithBundledProducts {

- (void)testlogPurchaseCommerceEvent {
MPKitAppboy *kit = [[MPKitAppboy alloc] init];
kit.configuration = @{@"bundleCommerceEventData" : @0};

BRZConfiguration *configuration = [[BRZConfiguration alloc] init];
Braze *testClient = [[Braze alloc] initWithConfiguration:configuration];
Expand Down

0 comments on commit 1fc5f40

Please sign in to comment.