Skip to content

Commit

Permalink
Merge pull request #85 from Notificare/release/4.0.0
Browse files Browse the repository at this point in the history
4.0.0
  • Loading branch information
hpinhal authored Oct 7, 2024
2 parents 6ae049d + a3f1943 commit 355c38d
Show file tree
Hide file tree
Showing 113 changed files with 1,671 additions and 2,146 deletions.
1 change: 0 additions & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 52 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,55 @@
# CHANGELOG

## 4.0.0

- Device identifiers become long-lived
- Add methods to register callbacks in order to handle background location events on Android
- Add support for customisable hosts
- Add `NotificarePush.onSubscriptionChanged` event for push token updates
- `launch()`, `unlaunch()`, `enableRemoteNotifications()` and `disableRemoteNotifications()` functions now complete after all the work is done

#### Breaking changes

- Drops support for the monetize module
- Drops support for Huawei Mobile Services
- `NotificareDevice.id` attribute no longer contains the push token. Use `NotificarePush.subscription` instead
- `NotificareDevice.transport` attribute no longer contains the transport. Use `NotificarePush.transport` instead
- The `NotificareDevice` data model was reduced to only publicly relevant attributes
- `onDeviceRegistered` only triggers once, when the device is created
- Removed deprecated `NotificarePush.onNotificationReceived(notification)` event. Use `NotificarePush.onNotificationInfoReceived(notification, deliveryMechanism)` instead

#### Native changes

##### Android

- Fix padding discrepancies in alert dialog with actions

## 4.0.0-beta.2

- Changed the `subscriptionId` properties to a more robust data model
- Add methods to register callbacks in order to handle background location events on Android

## 4.0.0-beta.1

- Device identifiers become long-lived
- Add `NotificarePush.onSubscriptionIdChanged` event for push token updates

#### Breaking changes

- Drops support for the monetize module
- Drops support for Huawei Mobile Services
- `NotificareDevice.id` attribute no longer contains the push token. Use `NotificarePush.subscriptionId` instead
- `NotificareDevice.transport` attribute no longer contains the transport. Use `NotificarePush.transport` instead
- The `NotificareDevice` data model was reduced to only publicly relevant attributes
- `onDeviceRegistered` only triggers once, when the device is created
- Removed deprecated `NotificarePush.onNotificationReceived(notification)` event. Use `NotificarePush.onNotificationInfoReceived(notification, deliveryMechanism)` instead

#### Native changes

##### Android

- Fix padding discrepancies in alert dialog with actions

## 3.10.0

#### Native changes
Expand Down Expand Up @@ -238,7 +288,7 @@ Notificare.onReady.listen((application) async {

#### Native changes

##### iOS
##### iOS

- Add option to preserve existing notification categories

Expand Down Expand Up @@ -359,4 +409,4 @@ Notificare.onReady.listen((application) async {

## 3.0.0

Please check our [migration guide](./MIGRATION.md) before adopting the v3.x generation.
Please check our [migration guide](./MIGRATION-3.0.md) before adopting the v3.x generation.
66 changes: 33 additions & 33 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ GEM
base64
nkf
rexml
activesupport (7.1.3.4)
activesupport (7.2.1)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
algoliasearch (1.27.5)
Expand All @@ -23,20 +24,20 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.950.0)
aws-sdk-core (3.200.0)
aws-partitions (1.984.0)
aws-sdk-core (3.209.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.87.0)
aws-sdk-core (~> 3, >= 3.199.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.155.0)
aws-sdk-core (~> 3, >= 3.199.0)
aws-sdk-kms (1.94.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.167.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.10.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
Expand Down Expand Up @@ -83,7 +84,7 @@ GEM
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
concurrent-ruby (1.3.3)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
declarative (0.0.20)
digest-crc (0.6.5)
Expand All @@ -95,8 +96,8 @@ GEM
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
excon (0.110.0)
faraday (1.10.3)
excon (0.112.0)
faraday (1.10.4)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
Expand All @@ -117,15 +118,15 @@ GEM
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http (1.0.2)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.3.1)
fastlane (2.221.1)
fastlane (2.223.1)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -186,7 +187,7 @@ GEM
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.31.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.7.0)
google-cloud-core (1.7.1)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
Expand All @@ -207,22 +208,22 @@ GEM
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.6)
http-cookie (1.0.7)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
jmespath (1.6.2)
json (2.7.2)
jwt (2.8.2)
jwt (2.9.3)
base64
mini_magick (4.13.1)
logger (1.6.1)
mini_magick (4.13.2)
mini_mime (1.1.5)
minitest (5.24.1)
minitest (5.25.1)
molinillo (0.8.0)
multi_json (1.15.0)
multipart-post (2.4.1)
mutex_m (0.2.0)
nanaimo (0.3.0)
nap (1.1.0)
naturally (2.2.1)
Expand All @@ -238,12 +239,12 @@ GEM
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.9)
strscan
rexml (3.3.8)
rouge (2.0.7)
ruby-macho (2.5.1)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
securerandom (0.3.1)
security (0.1.5)
signet (0.19.0)
addressable (~> 2.8)
Expand All @@ -253,7 +254,6 @@ GEM
simctl (1.6.10)
CFPropertyList
naturally
strscan (3.1.0)
terminal-notifier (2.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
Expand All @@ -267,15 +267,15 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uber (0.1.0)
unicode-display_width (2.5.0)
unicode-display_width (2.6.0)
word_wrap (1.0.0)
xcodeproj (1.24.0)
xcodeproj (1.25.1)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
Expand Down
96 changes: 96 additions & 0 deletions MIGRATION-3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# MIGRATING

Notificare 3.x upgrades our native implementation languages from Java to Kotlin and Objective-C to Swift, as well as providing a fully sound null-safety. This new generation also brings a highly modular system.
If you are already using null safety in your project, you should have a first class experience.

## Requirements

We have increased the minimum versions required to run the Notificare libraries to Android 6.0+ (API level 23+) and iOS 10+. According to Google's API version distribution stats, this minimum version should support ~94% of the Android devices, and, virtually, every iOS device worldwide.

## Configuration file

### Android

Instead of the `notificareconfig.properties` you are used to having in the v2.x library and that contains two sets of app keys — development and production — we have moved to a `notificare-services.json` for each environment, similar to what Firebase offers.

We have also created a Gradle plugin to help you automatically configure the Notificare libraries. Add the following to your `build.gradle` files.

```gradle
//
// root build.gradle
//
buildscript {
repositories {
maven { url 'https://maven.notifica.re/releases' }
}
dependencies {
classpath 're.notifica.gradle:notificare-services:1.0.1'
}
}
allprojects {
repositories {
maven { url 'https://maven.notifica.re/releases' }
}
}
//
// app build.gradle
//
plugins {
// ...
id 're.notifica.gradle.notificare-services'
}
```

### iOS

Similar to the change in Android, the `Notificare.plist` has been removed in favour of a `NotificareServices.plist` for each environment.

We have also created a blog post that illustrates how we can use Build Phases to pick which configuration to embed in the app during the build. You can read more about it [here](https://notificare.com/blog/2021/12/17/Configuration-files-in-a-multiple-environment-app).

## Packages

We have moved to several new packages. Here's all the dependencies available:

```ruby
dependencies:
flutter:
sdk: flutter

# Notificare dependencies
notificare: ^3.0.0
notificare_assets: ^3.0.0
notificare_geo: ^3.0.0
notificare_inbox: ^3.0.0
notificare_loyalty: ^3.0.0
notificare_push: ^3.0.0
notificare_push_ui: ^3.0.0
notificare_scannables: ^3.0.0
```

## Package cherry-picking

In the v2.x iteration, we already took the first steps to a more modular library. In this iteration we took it a whole new level.

We understand that not every app will take advantage of every bit of functionality provided by our platform. To help reduce your app's size, dependency footprint and automatically included permissions, now you are able to cherry-pick which modules you want to include in your app.

In the hypothetical scenario where you have an app that wants to add push notifications and an in-app inbox, only supporting devices running Google's mobile services, you would include the following dependencies.

```ruby
dependencies:
flutter:
sdk: flutter

# Notificare dependencies
notificare: ^3.0.0
notificare_inbox: ^3.0.0
notificare_push: ^3.0.0
notificare_push_ui: ^3.0.0
```

## Moving forward

Given the foundational changes and large differences in the Public API in the new libraries, we found the best way to cover every detail is to go through the [documentation](https://docs.notifica.re/sdk/v3/flutter/implementation) for each of the modules you want to include and adjust accordingly.

As always, if you have anything to add or require further assistance, we are available via our [Support Channel](mailto:support@notifica.re).
Loading

0 comments on commit 355c38d

Please sign in to comment.