Skip to content

Commit

Permalink
Merge pull request #109 from blueshift-labs/development_version_2.0.10
Browse files Browse the repository at this point in the history
inapp silent push fixees
  • Loading branch information
anwarshahas authored Apr 27, 2020
2 parents 807e82c + dca1def commit f2e0200
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions BlueShift-iOS-SDK/BlueShift.m
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,16 @@ - (NSString *) getDeviceToken {
}

- (void) createInAppNotification:(NSDictionary *)dictionary forApplicationState:(UIApplicationState)applicationState {
if (_config.enableInAppNotification == YES && [[UIApplication sharedApplication] applicationState] == UIApplicationStateActive) {
if (_config.enableInAppNotification == YES) {
if ([BlueshiftEventAnalyticsHelper isSilentPushNotification: dictionary] && _config.inAppBackgroundFetchEnabled == YES) {
[self fetchInAppNotificationFromAPI:^() {
if (self->_config.inAppManualTriggerEnabled == NO) {
if (self->_config.inAppManualTriggerEnabled == NO && [[UIApplication sharedApplication] applicationState] == UIApplicationStateActive) {
[_inAppNotificationMananger fetchInAppNotificationsFromDataStore: BlueShiftInAppTriggerNow];
}
} failure:^(NSError *error){
NSLog(@"%@", error);
}];
} else if(_config.inAppManualTriggerEnabled == NO){
} else if(_config.inAppManualTriggerEnabled == NO && [[UIApplication sharedApplication] applicationState] == UIApplicationStateActive){
[self startInAppMessageLoadFromaDBTimer];
}
}
Expand Down
2 changes: 1 addition & 1 deletion BlueShift-iOS-SDK/BlueShiftAppData.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ - (NSString *)bundleIdentifier {
- (NSDictionary *)toDictionary {
NSMutableDictionary *appMutableDictionary = [NSMutableDictionary dictionary];
if (self.appName) {
[appMutableDictionary setObject:self.appName forKey:@"app_name"];
[appMutableDictionary setObject:self.bundleIdentifier forKey:@"app_name"];
}

if (self.appVersion) {
Expand Down

0 comments on commit f2e0200

Please sign in to comment.