Skip to content

Synchronization of repositories with release 8.5.0#3

Open
RodrigoSMarques wants to merge 163 commits intoBranchMetrics:masterfrom
RodrigoSMarques:master
Open

Synchronization of repositories with release 8.5.0#3
RodrigoSMarques wants to merge 163 commits intoBranchMetrics:masterfrom
RodrigoSMarques:master

Conversation

@RodrigoSMarques
Copy link

No description provided.

RodrigoSMarques and others added 30 commits February 1, 2024 10:22
### 🔧 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)
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
[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-sa-branch
Copy link

snyk-sa-branch commented Oct 4, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 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');
  });
  ```
### ⚠️ 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
Copilot AI review requested due to automatic review settings January 24, 2026 02:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json file for centralized key management
  • Introduced new features: BranchLogLevel enum, BranchAttributionLevel enum, 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
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
/// - `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)
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
environment:
sdk: ">=2.18.0 <4.0.0"
sdk: ">=3.3.0 <4.0.0"
flutter: 3.27.0
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +53 to +60
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" />
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +86 to 95
<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>
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
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)."
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
/// - `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)
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
- **Minimum iOS version : 13

### 🎉 Features
**iOS UISceneDelegate Support (iOS 13+)** [Fluuter UISceneDelegate adoption](https://docs.flutter.dev/release/breaking-changes/uiscenedelegate)
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in comment: "Fluuter" should be "Flutter".

Suggested change
**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)

Copilot uses AI. Check for mistakes.
Comment on lines +42 to +43
try (InputStream inputStream = context.getAssets().open(assetKey)) {
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This InputStreamReader is not always closed on method exit.

Suggested change
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))) {

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants