Synchronization of repositories with release 8.5.0#3
Synchronization of repositories with release 8.5.0#3RodrigoSMarques wants to merge 163 commits intoBranchMetrics:masterfrom
Conversation
PR Branch MASTER into BUGFIX
PR Branch MASTER into BUGFIX
PR Branch MASTER into BUGFIX
PR Branch MASTER into BUGFIX
PR Branch MASTER into BUGFIX
PR Branch MASTER into BUGFIX
### 🔧 Native SDK Updates * Updated included iOS SDK to 3.6.0 - [iOS Version History](https://github.com/BranchMetrics/ios-branch-deep-linking-attribution/releases) * Updated included Branch Android SDK to 5.12.2 - [Android Version History](https://github.com/BranchMetrics/android-branch-deep-linking-attribution/releases)
Release 8.1.0
PR MAASTER to DEV
PR Branch MASTER into BUGFIX
Migrate web implementation to js_interop
## 8.2.0 ###⚠️ BREAKING CHANGE * Minimum required Dart SDK version 3.3.0 (Flutter 3.19.0 - 15/02/2024) ### 🎉 Features * Issue #361: Migrate to dart:js_interop to support Webassamebly. Thanks @hnvn ### 🐛 Bug Fixes * Fix issue #368: "-118, Warning. Session initialization already happened" triggered in the listSession callback
### 🐛 Bug Fixes * Fix issue #368: "-118, Warning. Session initialization already happened" triggered in the listSession callback
Release 8.1.1
PR Branch BUGFIX into DEV
[Web] fix QRCode data type
Release 8.9.0
…ions. Reviewed branch-config.json example file to ensure correct configurations.
…son`. * Updated `README.MD` with correct configuration for `branch-config.json`.
* Updated `README.MD` with correct configuration for `branch-config.json`.
Code change to allow custom URL configuration per Operating System
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
## 8.10.0 ### 🎉 Features Improved the API URL configuration by moving to a platform-specific setup. - Added key `apiUrlAndroid` in `branch-config.json` to configure the API URL for the Android platform. - Added key `apiUrlIOS` in `branch-config.json` to configure the API URL for the iOS platform. This allows developers to define different API endpoints (or keep the SDK default) for Android and iOS within the `branch-config.json` file. ### 🗑️ Removals -⚠️ The `apiUrl` key has been removed from `branch-config.json`. Please update your configuration to use the new platform-specific keys.
## 8.10.0 ### 🎉 Features **Introduced platform-specific API URL configuration.** This allows developers to define different API endpoints for Android and iOS in `branch-config.json`. - Added key `apiUrlAndroid` in `branch-config.json` to configure the API URL for the Android platform. - Added key `apiUrlIOS` in `branch-config.json` to configure the API URL for the iOS platform. ### 🗑️ Removals -⚠️ The generic `apiUrl` key has been removed from `branch-config.json`. Please update your configuration to use the new platform-specific keys (`apiUrlAndroid` and `apiUrlIOS`).
feat: Add platform logging stream and log level configuration - Introduced `FlutterBranchSdk.platformLogs` stream for real-time log messages from the Branch SDK. - Added `logLevel` configuration to `branch-config.json` for controlling log verbosity. - Updated documentation to include examples for logging configuration in different environments. - Enhanced Android and iOS implementations to support logging levels and stream handling. - Updated README and CHANGELOG to reflect new features and usage instructions.
- Enhanced FlutterBranchSdkPlugin registration to clean up existing channels and handlers to prevent duplicates. - Added deinitialization logic to remove stream handlers and channels when the plugin instance is deallocated. - Refactored FlutterBranchSdkMethodChannel to use static channels and added initialization checks to prevent method calls before SDK initialization. - Improved error handling and validation in method calls to ensure proper SDK usage.
Introduced a private _validateUrl method in FlutterBranchSdkMethodChannel to enforce stricter URL validation for handleDeepLink. Updated related tests to cover validation scenarios and improved debug logging in home_page.dart to include timestamps.
Refactored the URL validation logic to remove unnecessary null checks for host and path, relying on empty string checks instead.
- Added buffer size limits and dropped message warnings to log stream handlers on Android and iOS to prevent unbounded memory usage. - Updated iOS plugin to prioritize JSON config for logging, and improved debug output formatting. - Clarified in documentation and web implementation that platform logs are only available on iOS and Android, not on Web. - Updated iOS example project configuration for better deep linking and plugin registration.
**New Platform Logging Stream**
- Added `FlutterBranchSdk.platformLogs` stream to receive Branch SDK log messages in real-time
- Enable logging via `branch-config.json` (`enableLogging` and `logLevel` keys) or programmatically through `FlutterBranchSdk.init()`
- Supports log levels: `VERBOSE`, `DEBUG`, `INFO`, `WARNING`, `ERROR`, and `NONE`
- Example usage:
```dart
FlutterBranchSdk.platformLogs.listen((logMessage) {
debugPrint('Branch Log: $logMessage');
});
```
…ts, and enhance iOS UISceneDelegate support
###⚠️ BREAKING CHANGES - **Minimum Flutter version**: 3.38.0 (was 3.19.0) - **Minimum Dart SDK**: 3.10.0 (was 3.3.0) - **Minimum iOS version : 13 ### 🎉 Features **iOS UISceneDelegate Support (iOS 13+)** [Fluuter UISceneDelegate adoption](https://docs.flutter.dev/release/breaking-changes/uiscenedelegate) - Added full support for iOS 13+ UISceneDelegate lifecycle - Maintains full backward compatibility with UIApplicationDelegate for apps not using scenes
There was a problem hiding this comment.
Pull request overview
This PR synchronizes the repository with version 9.0.0 (not 8.5.0 as stated in the title), introducing significant updates including Flutter 3.27+ support, Branch SDK updates (Android 5.20+, iOS 3.13+), and new features like platform logging streams and JSON-based configuration via branch-config.json.
Changes:
- Major version bump to 9.0.0 with breaking changes (minimum Flutter 3.27.0, minimum iOS 13, removed deprecated APIs)
- Added new configuration system via
branch-config.jsonfile for centralized key management - Introduced new features:
BranchLogLevelenum,BranchAttributionLevelenum, platform logs stream, and several new SDK methods - Updated native SDK dependencies and modernized iOS/Android code
- Added comprehensive test coverage for initialization and channel validation
Reviewed changes
Copilot reviewed 74 out of 114 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| pubspec.yaml | Version bump to 9.0.0, SDK constraints updated, removed js dependency, updated flutter_lints to 6.0.0 |
| CHANGELOG.md | Comprehensive changelog for versions 8.1.0 through 9.0.0 |
| lib/src/flutter_branch_sdk*.dart | Added init parameters for logLevel and branchAttributionLevel, new methods, deprecated disableTracking |
| lib/src/objects/*.dart | New enums (BranchLogLevel, BranchAttributionLevel), code style improvements, removed library directive |
| test/init_and_channels_test.dart | New test file for SDK initialization and deep link validation |
| example/** | Updated to demonstrate new features, added branch-config.json asset |
| ios/** | Swift Package Manager support, UISceneDelegate compatibility, BranchJsonConfig implementation, code modernization |
| android/** | Updated to AGP 8.6, added BranchJsonConfig, improved null safety, lambda expressions |
| README.md | Extensive documentation updates for new features and configuration options |
Files not reviewed (2)
- example/ios/Runner.xcworkspace/contents.xcworkspacedata: Language not supported
- ios/flutter_branch_sdk/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| fileName: src/flutter_branch_sdk_web.dart | ||
| name: flutter_branch_sdk | ||
| description: "Flutter Plugin for create deep link using Brach SDK (https://branch.io). This plugin provides a cross-platform (iOS, Android, Web)." | ||
| version: 9.0.0 |
There was a problem hiding this comment.
The PR title indicates "release 8.5.0", but the pubspec.yaml file shows the version being updated to "9.0.0". This is a significant discrepancy. The title should accurately reflect the version being released (9.0.0) rather than 8.5.0. Additionally, the CHANGELOG.md confirms this is version 9.0.0 with breaking changes.
| /// - `BranchLogLevel.NONE`: No logging | ||
| /// - [branchAttributionLevel]: The level of attribution data to collect. | ||
| /// - `BranchAttributionLevel.FULL`: Full Attribution (Default) | ||
| /// - `BranchAttributionLevel.REDUCE`: Reduced Attribution (Non-Ads + Privacy Frameworks) |
There was a problem hiding this comment.
Documentation inconsistency: The enum value is defined as REDUCED (line 21 in branch_attribution_level.dart), but the documentation here refers to it as REDUCE. This will cause confusion for users trying to use this API. The documentation should reference BranchAttributionLevel.REDUCED to match the actual enum value.
| environment: | ||
| sdk: ">=2.18.0 <4.0.0" | ||
| sdk: ">=3.3.0 <4.0.0" | ||
| flutter: 3.27.0 |
There was a problem hiding this comment.
The Flutter version constraint is set to exactly "3.27.0", which is overly restrictive. Using an exact version will prevent users from using any newer Flutter versions. This should use a more flexible constraint like ">=3.27.0" to allow newer versions.
| android:name="io.branch.sdk.BranchKey1" | ||
| android:value="key_live_bkJRqpb15wLqUAgsDVNUIobjyviWi6Wx" /> | ||
| <!-- For your test app, if you have one; Again, use your actual test Branch key --> | ||
| <meta-data | ||
| android:name="io.branch.sdk.BranchKey.test" | ||
| android:name="io.branch.sdk.BranchKey.test1" | ||
| android:value="key_test_ipQTteg11ENANDeCzSXgqdgfuycWoXYH" /> | ||
| <meta-data | ||
| android:name="io.branch.sdk.TestMode" android:value="true" /> | ||
| android:name="io.branch.sdk.TestMode1" android:value="true" /> |
There was a problem hiding this comment.
The Branch keys in AndroidManifest.xml have been intentionally disabled by appending "1" to the meta-data names (e.g., "io.branch.sdk.BranchKey1" instead of "io.branch.sdk.BranchKey"). While this may be intentional for testing purposes or to force use of the branch-config.json file, this change should be clearly documented and may break existing integrations that rely on these manifest entries. If this is intentional, consider adding a comment explaining why.
| <key>branch_disable_nativelink</key> | ||
| <false/> | ||
| <key>branch_key</key> | ||
| <dict> | ||
| <key>live</key> | ||
| <string>key_live_bkJRqpb15wLqUAgsDVNUIobjyviWi6Wx</string> | ||
| <key>test</key> | ||
| <string>key_test_ipQTteg11ENANDeCzSXgqdgfuycWoXYH</string> | ||
| </dict> | ||
| <key>branch_universal_link_domains</key> | ||
| <array> | ||
| <string>flutterbranchsdk.app.link</string> | ||
| <string>flutterbranchsdk-alternate.app.link</string> | ||
| <string>flutterbranchsdk-alternate.test-app.link</string> | ||
| <string>flutterbranchsdk.test-app.link</string> | ||
| </array> | ||
| <key>UIApplicationSupportsIndirectInputEvents</key> | ||
| <true/> | ||
| </dict> |
There was a problem hiding this comment.
The iOS Info.plist has removed the branch_key configuration section entirely. Combined with the similar change in Android, this appears to be forcing all configuration through the branch-config.json file. This is a breaking change that should be clearly documented in migration guides, as existing apps that rely on Info.plist configuration will stop working. The removal should either be reverted or very clearly documented as a breaking change with migration instructions.
| pluginClass: FlutterBranchSdkWeb | ||
| fileName: src/flutter_branch_sdk_web.dart | ||
| name: flutter_branch_sdk | ||
| description: "Flutter Plugin for create deep link using Brach SDK (https://branch.io). This plugin provides a cross-platform (iOS, Android, Web)." |
There was a problem hiding this comment.
The spelling in the description has a typo: "Brach SDK" should be "Branch SDK". This typo appears in the package description which is visible on pub.dev.
| /// - `BranchLogLevel.NONE`: No logging | ||
| /// - [branchAttributionLevel]: The level of attribution data to collect. | ||
| /// - `BranchAttributionLevel.FULL`: Full Attribution (Default) | ||
| /// - `BranchAttributionLevel.REDUCE`: Reduced Attribution (Non-Ads + Privacy Frameworks) |
There was a problem hiding this comment.
Documentation inconsistency: The enum value is defined as REDUCED in branch_attribution_level.dart, but the documentation here refers to it as REDUCE. This will cause confusion for users trying to use this API. The documentation should reference BranchAttributionLevel.REDUCED to match the actual enum value.
| - **Minimum iOS version : 13 | ||
|
|
||
| ### 🎉 Features | ||
| **iOS UISceneDelegate Support (iOS 13+)** [Fluuter UISceneDelegate adoption](https://docs.flutter.dev/release/breaking-changes/uiscenedelegate) |
There was a problem hiding this comment.
Typo in comment: "Fluuter" should be "Flutter".
| **iOS UISceneDelegate Support (iOS 13+)** [Fluuter UISceneDelegate adoption](https://docs.flutter.dev/release/breaking-changes/uiscenedelegate) | |
| **iOS UISceneDelegate Support (iOS 13+)** [Flutter UISceneDelegate adoption](https://docs.flutter.dev/release/breaking-changes/uiscenedelegate) |
| try (InputStream inputStream = context.getAssets().open(assetKey)) { | ||
| BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); |
There was a problem hiding this comment.
This InputStreamReader is not always closed on method exit.
| try (InputStream inputStream = context.getAssets().open(assetKey)) { | |
| BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); | |
| try (InputStream inputStream = context.getAssets().open(assetKey); | |
| BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { |
No description provided.