Skip to content

Commit

Permalink
Release of version 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzysztof Kurzawa committed Jun 17, 2024
1 parent 7788b72 commit 6e7e3ea
Show file tree
Hide file tree
Showing 20 changed files with 457 additions and 174 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# Changelog
All notable changes to this project will be documented in this file.

## [1.1.0] - 2024-06-17

### Fixed
- [iOS] Some potential issues with retrieving system push consent by the SDK.

### Added
- `Synerise.settings.tracker.eventsTriggeringFlush` option in settings to let you set the list of event actions which will trigger instant sending of all events in the queue. The default array contains only push event's actions.

### Changed
- All events connected with push campaigns will flush the queue and send events immediately.
- Improvements to push notifications registration.
- Stability improvements.


## [1.0.2] - 2024-05-06

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Synerise Flutter SDK (synerise-flutter-sdk) (1.0.2)
# Synerise Flutter SDK (synerise-flutter-sdk) (1.1.0)

[![Platform](https://img.shields.io/badge/platform-iOS-orange.svg)](https://github.com/synerise/ios-sdk)
[![Platform](https://img.shields.io/badge/platform-Android-orange.svg)](https://github.com/synerise/android-sdk)
Expand Down
9 changes: 0 additions & 9 deletions android/.gitignore

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.app.Application;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.util.Log;

import androidx.annotation.NonNull;

Expand Down Expand Up @@ -36,10 +37,12 @@ public class SyneriseConnector implements FlutterPlugin, MethodCallHandler, Acti
public Context context;
public static Application app;
private Activity activity;
private static int engineHashCode;
private static volatile boolean isCalled = false;

@Override
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
engineHashCode = flutterPluginBinding.hashCode();
channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "synerise_flutter_sdk");
channel.setMethodCallHandler(this);
context = flutterPluginBinding.getApplicationContext();
Expand All @@ -59,7 +62,9 @@ public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBindin

@Override
public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
channel.setMethodCallHandler(null);
if (engineHashCode == binding.hashCode()) {
channel.setMethodCallHandler(null);
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import io.flutter.plugin.common.MethodChannel;

public class SyneriseInitializer implements SyneriseModule {
private static String sdkPluginVersion = "1.0.2";
private static String sdkPluginVersion = "1.1.0";
private static SyneriseInitializer instance;
protected static volatile boolean isInitialized = false;
public SyneriseInitializer() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
package com.synerise.synerise_flutter_sdk.modules;

import android.util.Log;

import com.synerise.sdk.core.Synerise;
import com.synerise.sdk.core.settings.Settings;
import com.synerise.synerise_flutter_sdk.SyneriseModule;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import io.flutter.plugin.common.MethodCall;
Expand All @@ -18,6 +23,7 @@ public class SyneriseSettings implements SyneriseModule {
public static final String F_SETTINGS_TRACKER_MIN_BATCH_SIZE = "TRACKER_MIN_BATCH_SIZE";
public static final String F_SETTINGS_TRACKER_MAX_BATCH_SIZE = "TRACKER_MAX_BATCH_SIZE";
public static final String F_SETTINGS_TRACKER_AUTO_FLUSH_TIMEOUT = "TRACKER_AUTO_FLUSH_TIMEOUT";
public static final String F_SETTINGS_TRACKER_EVENTS_TRIGGERING_FLUSH = "TRACKER_EVENTS_TRIGGERING_FLUSH";
public static final String F_SETTINGS_NOTIFICATIONS_ENABLED = "NOTIFICATIONS_ENABLED";
public static final String F_SETTINGS_NOTIFICATIONS_ENCRYPTION = "NOTIFICATIONS_ENCRYPTION";
public static final String F_SETTINGS_INJECTOR_AUTOMATIC = "INJECTOR_AUTOMATIC";
Expand Down Expand Up @@ -99,6 +105,15 @@ private void matchSetting(String key, Object value) {
Settings.getInstance().tracker.setAutoFlushTimeout(autoFlushTimeout);
}
break;
case F_SETTINGS_TRACKER_EVENTS_TRIGGERING_FLUSH:
if (value instanceof ArrayList<?>) {
List<String> eventsFromFlutter = new ArrayList<>();
for (int i = 0; i < ((ArrayList<?>) value).size(); i++) {
eventsFromFlutter.add((String) ((ArrayList<?>) value).get(i));
}
Settings.getInstance().tracker.eventsTriggeringFlush = eventsFromFlutter;
}
break;
case F_SETTINGS_TRACKER_MAX_BATCH_SIZE:
if (value instanceof Integer) {
Settings.getInstance().tracker.setMaximumBatchSize((int) value);
Expand Down Expand Up @@ -156,6 +171,7 @@ private Map<String, Object> settingsMap() {
settings.put(F_SETTINGS_TRACKER_MIN_BATCH_SIZE, Synerise.settings.tracker.minBatchSize);
settings.put(F_SETTINGS_TRACKER_MAX_BATCH_SIZE, Synerise.settings.tracker.maxBatchSize);
settings.put(F_SETTINGS_TRACKER_AUTO_FLUSH_TIMEOUT, (Synerise.settings.tracker.autoFlushTimeout / 1000));
settings.put(F_SETTINGS_TRACKER_EVENTS_TRIGGERING_FLUSH, Synerise.settings.tracker.eventsTriggeringFlush);
settings.put(F_SETTINGS_NOTIFICATIONS_ENABLED, Synerise.settings.notifications.enabled);
settings.put(F_SETTINGS_NOTIFICATIONS_ENCRYPTION, Synerise.settings.notifications.getEncryption());
settings.put(F_SETTINGS_SHOULD_DESTROY_SESSION_ON_API_KEY_CHANGE, Synerise.settings.sdk.shouldDestroySessionOnApiKeyChange);
Expand Down
3 changes: 2 additions & 1 deletion example/android/app/google-services.json
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{}
{}

6 changes: 3 additions & 3 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ end

target 'SyneriseNotificationServiceExtension' do

pod 'SyneriseSDK', '4.16.0'
pod 'SyneriseSDK', '4.17.0'

end

target 'SyneriseSingleMediaNotificationContentExtension' do

pod 'SyneriseSDK', '4.16.0'
pod 'SyneriseSDK', '4.17.0'

end

target 'SyneriseCarouselNotificationContentExtension' do

pod 'SyneriseSDK', '4.16.0'
pod 'SyneriseSDK', '4.17.0'

end

Expand Down
14 changes: 7 additions & 7 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,18 @@ PODS:
- nanopb/decode (2.30909.1)
- nanopb/encode (2.30909.1)
- PromisesObjC (2.4.0)
- synerise_flutter_sdk (1.0.0):
- synerise_flutter_sdk (1.0.2):
- Flutter
- SyneriseSDK (= 4.16.0)
- SyneriseSDK (4.16.0)
- SyneriseSDK (= 4.17.0)
- SyneriseSDK (4.17.0)

DEPENDENCIES:
- firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- Flutter (from `Flutter`)
- synerise_flutter_sdk (from `.symlinks/plugins/synerise_flutter_sdk/ios`)
- SyneriseSDK (= 4.16.0)
- SyneriseSDK (= 4.17.0)

SPEC REPOS:
trunk:
Expand Down Expand Up @@ -173,9 +173,9 @@ SPEC CHECKSUMS:
GoogleUtilities: d053d902a8edaa9904e1bd00c37535385b8ed152
nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
synerise_flutter_sdk: ea4e2dbf2a29161b21c9a273e8bde61a99d522fb
SyneriseSDK: 29879beecd5fa2e0f7e9af8fc2f555ddc1dc112d
synerise_flutter_sdk: f7b3ad3c8044793bec53f230a4ebc7f5eb0ce8c0
SyneriseSDK: a560b03e0189fa61db29067c117b5875e0e4fa94

PODFILE CHECKSUM: 64946e23233acb962ae2b4c895503bcb60a1ecf8
PODFILE CHECKSUM: 092c9b8424896ad0504891d7fed05049742181b8

COCOAPODS: 1.13.0
Loading

0 comments on commit 6e7e3ea

Please sign in to comment.