-
Notifications
You must be signed in to change notification settings - Fork 39
[MOB-11957] ios-crashes-when-clicking-track-push-open-with-ca #695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
32c7eb8
5d8c543
b6e4488
3e252ee
e0d026e
dfb4934
5a946b2
c009a1e
f9aa273
560a8c5
91062db
5b7870a
4cc665f
7664ace
18bd0af
26fa44b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,7 +92,7 @@ public void trackPurchase(double total, ReadableArray items, ReadableMap dataFie | |
} | ||
|
||
@Override | ||
public void trackPushOpenWithCampaignId(double campaignId, Double templateId, String messageId, boolean appAlreadyRunning, ReadableMap dataFields) { | ||
public void trackPushOpenWithCampaignId(double campaignId, double templateId, String messageId, boolean appAlreadyRunning, ReadableMap dataFields) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
moduleImpl.trackPushOpenWithCampaignId(campaignId, templateId, messageId, appAlreadyRunning, dataFields); | ||
} | ||
|
||
|
@@ -191,7 +191,6 @@ public void setAutoDisplayPaused(final boolean paused) { | |
moduleImpl.setAutoDisplayPaused(paused); | ||
} | ||
|
||
@Override | ||
public void wakeApp() { | ||
moduleImpl.wakeApp(); | ||
} | ||
|
@@ -206,7 +205,6 @@ public void endSession() { | |
moduleImpl.endSession(); | ||
} | ||
|
||
@Override | ||
public void updateVisibleRows(ReadableArray visibleRows) { | ||
moduleImpl.updateVisibleRows(visibleRows); | ||
} | ||
|
@@ -221,7 +219,6 @@ public void removeListeners(double count) { | |
moduleImpl.removeListeners(count); | ||
} | ||
|
||
@Override | ||
public void passAlongAuthToken(String authToken) { | ||
moduleImpl.passAlongAuthToken(authToken); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,7 +92,7 @@ public void trackPurchase(double total, ReadableArray items, ReadableMap dataFie | |
} | ||
|
||
@ReactMethod | ||
public void trackPushOpenWithCampaignId(double campaignId, Double templateId, String messageId, boolean appAlreadyRunning, ReadableMap dataFields) { | ||
public void trackPushOpenWithCampaignId(double campaignId, double templateId, String messageId, boolean appAlreadyRunning, ReadableMap dataFields) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
moduleImpl.trackPushOpenWithCampaignId(campaignId, templateId, messageId, appAlreadyRunning, dataFields); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -106,7 +106,7 @@ - (void)getUserId:(RCTPromiseResolveBlock)resolve | |||||
[_swiftAPI getUserId:resolve rejecter:reject]; | ||||||
} | ||||||
|
||||||
- (void)setInAppShowResponse:(NSNumber *)inAppShowResponse { | ||||||
- (void)setInAppShowResponse:(double)inAppShowResponse { | ||||||
evantk91 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
[_swiftAPI setInAppShowResponse:inAppShowResponse]; | ||||||
} | ||||||
|
||||||
|
@@ -137,8 +137,8 @@ - (void)showMessage:(NSString *)messageId | |||||
} | ||||||
|
||||||
- (void)removeMessage:(NSString *)messageId | ||||||
location:(NSNumber *)location | ||||||
source:(NSNumber *)source { | ||||||
location:(double)location | ||||||
source:(double)source { | ||||||
[_swiftAPI removeMessage:messageId location:location source:source]; | ||||||
} | ||||||
|
||||||
|
@@ -154,8 +154,8 @@ - (void)trackEvent:(NSString *)name dataFields:(NSDictionary *)dataFields { | |||||
[_swiftAPI trackEvent:name dataFields:dataFields]; | ||||||
} | ||||||
|
||||||
- (void)trackPushOpenWithCampaignId:(NSNumber *)campaignId | ||||||
templateId:(NSNumber *)templateId | ||||||
- (void)trackPushOpenWithCampaignId:(double)campaignId | ||||||
templateId:(double)templateId | ||||||
messageId:(NSString *)messageId | ||||||
appAlreadyRunning:(BOOL)appAlreadyRunning | ||||||
dataFields:(NSDictionary *)dataFields { | ||||||
|
@@ -166,19 +166,19 @@ - (void)trackPushOpenWithCampaignId:(NSNumber *)campaignId | |||||
dataFields:dataFields]; | ||||||
} | ||||||
|
||||||
- (void)trackInAppOpen:(NSString *)messageId location:(NSNumber *)location { | ||||||
- (void)trackInAppOpen:(NSString *)messageId location:(double)location { | ||||||
[_swiftAPI trackInAppOpen:messageId location:location]; | ||||||
} | ||||||
|
||||||
- (void)trackInAppClick:(NSString *)messageId | ||||||
location:(NSNumber *)location | ||||||
location:(double)location | ||||||
clickedUrl:(NSString *)clickedUrl { | ||||||
[_swiftAPI trackInAppClick:messageId location:location clickedUrl:clickedUrl]; | ||||||
} | ||||||
|
||||||
- (void)trackInAppClose:(NSString *)messageId | ||||||
location:(NSNumber *)location | ||||||
source:(NSNumber *)source | ||||||
location:(double)location | ||||||
source:(double)source | ||||||
clickedUrl:(NSString *)clickedUrl { | ||||||
[_swiftAPI trackInAppClose:messageId | ||||||
location:location | ||||||
|
@@ -187,16 +187,16 @@ - (void)trackInAppClose:(NSString *)messageId | |||||
} | ||||||
|
||||||
- (void)inAppConsume:(NSString *)messageId | ||||||
location:(NSNumber *)location | ||||||
source:(NSNumber *)source { | ||||||
location:(double)location | ||||||
source:(double)source { | ||||||
[_swiftAPI inAppConsume:messageId location:location source:source]; | ||||||
} | ||||||
|
||||||
- (void)updateCart:(NSArray *)items { | ||||||
[_swiftAPI updateCart:items]; | ||||||
} | ||||||
|
||||||
- (void)trackPurchase:(NSNumber *)total | ||||||
- (void)trackPurchase:(double)total | ||||||
items:(NSArray *)items | ||||||
dataFields:(NSDictionary *)dataFields { | ||||||
[_swiftAPI trackPurchase:total items:items dataFields:dataFields]; | ||||||
|
@@ -216,7 +216,7 @@ - (void)getAttributionInfo:(RCTPromiseResolveBlock)resolve | |||||
[_swiftAPI getAttributionInfo:resolve rejecter:reject]; | ||||||
} | ||||||
|
||||||
- (void)setAttributionInfo:(NSDictionary *)attributionInfo { | ||||||
- (void)setAttributionInfo:(NSDictionary *_Nullable)attributionInfo { | ||||||
[_swiftAPI setAttributionInfo:attributionInfo]; | ||||||
} | ||||||
|
||||||
|
@@ -243,12 +243,12 @@ - (void)handleAppLink:(NSString *)appLink | |||||
[_swiftAPI handleAppLink:appLink resolver:resolve rejecter:reject]; | ||||||
} | ||||||
|
||||||
- (void)updateSubscriptions:(NSArray *)emailListIds | ||||||
unsubscribedChannelIds:(NSArray *)unsubscribedChannelIds | ||||||
unsubscribedMessageTypeIds:(NSArray *)unsubscribedMessageTypeIds | ||||||
subscribedMessageTypeIds:(NSArray *)subscribedMessageTypeIds | ||||||
campaignId:(NSNumber *)campaignId | ||||||
templateId:(NSNumber *)templateId { | ||||||
- (void)updateSubscriptions:(NSArray *_Nullable)emailListIds | ||||||
unsubscribedChannelIds:(NSArray *_Nullable)unsubscribedChannelIds | ||||||
unsubscribedMessageTypeIds:(NSArray *_Nullable)unsubscribedMessageTypeIds | ||||||
subscribedMessageTypeIds:(NSArray *_Nullable)subscribedMessageTypeIds | ||||||
campaignId:(double)campaignId | ||||||
templateId:(double)templateId { | ||||||
[_swiftAPI updateSubscriptions:emailListIds | ||||||
unsubscribedChannelIds:unsubscribedChannelIds | ||||||
unsubscribedMessageTypeIds:unsubscribedMessageTypeIds | ||||||
|
@@ -269,7 +269,7 @@ - (void)updateVisibleRows:(NSArray *)visibleRows { | |||||
[_swiftAPI updateVisibleRows:visibleRows]; | ||||||
} | ||||||
|
||||||
- (void)passAlongAuthToken:(NSString *)authToken { | ||||||
- (void)passAlongAuthToken:(NSString *_Nullable)authToken { | ||||||
[_swiftAPI passAlongAuthToken:authToken]; | ||||||
} | ||||||
|
||||||
|
@@ -335,7 +335,7 @@ - (void)passAlongAuthToken:(NSString *)authToken { | |||||
[_swiftAPI getUserId:resolve rejecter:reject]; | ||||||
} | ||||||
|
||||||
RCT_EXPORT_METHOD(setInAppShowResponse : (NSNumber *)inAppShowResponse) { | ||||||
RCT_EXPORT_METHOD(setInAppShowResponse : (double)inAppShowResponse) { | ||||||
[_swiftAPI setInAppShowResponse:inAppShowResponse]; | ||||||
} | ||||||
|
||||||
|
@@ -363,8 +363,8 @@ - (void)passAlongAuthToken:(NSString *)authToken { | |||||
rejecter:reject]; | ||||||
} | ||||||
|
||||||
RCT_EXPORT_METHOD(removeMessage : (NSString *)messageId location : (NSNumber *) | ||||||
location source : (NSNumber *)source) { | ||||||
RCT_EXPORT_METHOD(removeMessage : (NSString *)messageId location : (double) | ||||||
location source : (double)source) { | ||||||
[_swiftAPI removeMessage:messageId location:location source:source]; | ||||||
} | ||||||
|
||||||
|
@@ -382,46 +382,45 @@ - (void)passAlongAuthToken:(NSString *)authToken { | |||||
} | ||||||
|
||||||
RCT_EXPORT_METHOD( | ||||||
trackPushOpenWithCampaignId : (NSNumber *) | ||||||
campaignId templateId : (NSNumber *)templateId messageId : (NSString *) | ||||||
messageId appAlreadyRunning : (BOOL) | ||||||
appAlreadyRunning dataFields : (NSDictionary *)dataFields) { | ||||||
trackPushOpenWithCampaignId : (double)campaignId templateId : (double) | ||||||
templateId messageId : (double)messageId appAlreadyRunning : (BOOL) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The messageId parameter is incorrectly declared as double but should be NSString* since it's a string identifier, not a numeric value.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
appAlreadyRunning dataFields : (NSDictionary *)dataFields) { | ||||||
[_swiftAPI trackPushOpenWithCampaignId:campaignId | ||||||
templateId:templateId | ||||||
messageId:messageId | ||||||
appAlreadyRunning:appAlreadyRunning | ||||||
dataFields:dataFields]; | ||||||
} | ||||||
|
||||||
RCT_EXPORT_METHOD(trackInAppOpen : (NSString *)messageId location : (NSNumber *) | ||||||
RCT_EXPORT_METHOD(trackInAppOpen : (NSString *)messageId location : (double) | ||||||
location) { | ||||||
[_swiftAPI trackInAppOpen:messageId location:location]; | ||||||
} | ||||||
|
||||||
RCT_EXPORT_METHOD(trackInAppClick : (NSString *)messageId location : ( | ||||||
NSNumber *)location clickedUrl : (NSString *)clickedUrl) { | ||||||
RCT_EXPORT_METHOD(trackInAppClick : (NSString *)messageId location : (double) | ||||||
location clickedUrl : (NSString *)clickedUrl) { | ||||||
[_swiftAPI trackInAppClick:messageId location:location clickedUrl:clickedUrl]; | ||||||
} | ||||||
|
||||||
RCT_EXPORT_METHOD(trackInAppClose : (NSString *)messageId location : ( | ||||||
NSNumber *)location source : (NSNumber *)source clickedUrl : (NSString *) | ||||||
clickedUrl) { | ||||||
RCT_EXPORT_METHOD(trackInAppClose : (NSString *)messageId location : (double) | ||||||
location source : (double)source clickedUrl : (NSString *) | ||||||
clickedUrl) { | ||||||
evantk91 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
[_swiftAPI trackInAppClose:messageId | ||||||
location:location | ||||||
source:source | ||||||
clickedUrl:clickedUrl]; | ||||||
} | ||||||
|
||||||
RCT_EXPORT_METHOD(inAppConsume : (NSString *)messageId location : (NSNumber *) | ||||||
location source : (NSNumber *)source) { | ||||||
RCT_EXPORT_METHOD(inAppConsume : (NSString *)messageId location : (double) | ||||||
location source : (double)source) { | ||||||
[_swiftAPI inAppConsume:messageId location:location source:source]; | ||||||
} | ||||||
|
||||||
RCT_EXPORT_METHOD(updateCart : (NSArray *)items) { | ||||||
[_swiftAPI updateCart:items]; | ||||||
} | ||||||
|
||||||
RCT_EXPORT_METHOD(trackPurchase : (NSNumber *)total items : (NSArray *) | ||||||
RCT_EXPORT_METHOD(trackPurchase : (double)total items : (NSArray *) | ||||||
items dataFields : (NSDictionary *)dataFields) { | ||||||
[_swiftAPI trackPurchase:total items:items dataFields:dataFields]; | ||||||
} | ||||||
|
@@ -430,6 +429,7 @@ - (void)passAlongAuthToken:(NSString *)authToken { | |||||
BOOL)mergeNestedObjects) { | ||||||
[_swiftAPI updateUser:dataFields mergeNestedObjects:mergeNestedObjects]; | ||||||
} | ||||||
|
||||||
RCT_EXPORT_METHOD(updateEmail : (NSString *)email authToken : (NSString *) | ||||||
authToken) { | ||||||
[_swiftAPI updateEmail:email authToken:authToken]; | ||||||
|
@@ -471,8 +471,8 @@ - (void)passAlongAuthToken:(NSString *)authToken { | |||||
NSArray *) | ||||||
unsubscribedChannelIds unsubscribedMessageTypeIds : (NSArray *) | ||||||
unsubscribedMessageTypeIds subscribedMessageTypeIds : (NSArray *) | ||||||
subscribedMessageTypeIds campaignId : (NSNumber *) | ||||||
campaignId templateId : (NSNumber *)templateId) { | ||||||
subscribedMessageTypeIds campaignId : (double) | ||||||
campaignId templateId : (double)templateId) { | ||||||
[_swiftAPI updateSubscriptions:emailListIds | ||||||
unsubscribedChannelIds:unsubscribedChannelIds | ||||||
unsubscribedMessageTypeIds:unsubscribedMessageTypeIds | ||||||
|
@@ -491,7 +491,7 @@ - (void)passAlongAuthToken:(NSString *)authToken { | |||||
[_swiftAPI updateVisibleRows:visibleRows]; | ||||||
} | ||||||
|
||||||
RCT_EXPORT_METHOD(passAlongAuthToken : (NSString *)authToken) { | ||||||
RCT_EXPORT_METHOD(passAlongAuthToken : (NSString *_Nullable)authToken) { | ||||||
[_swiftAPI passAlongAuthToken:authToken]; | ||||||
} | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]