The example app can be used to test changes in the SDK. Just call flutter run
with either an iOS or Android device
plugged in and you should be able to test locally.
Before shipping a new version of the SDK we should always run the example app in release mode. This can be achieved by flutter run --release
.
There are substantial differences that mean this is worthwhile testing (development mode uses a Dart VM, release mode uses SO files).
You can test Android changes in our Flutter SDK by altering the dependency in the Flutter package's build.gradle. You can either publish a local artefact with ./gradlew publishToMavenLocal
, or if you need CI to pass - publish a beta as documented in the Android repo.
- Publish locally with
./gradlew publishToMavenLocal -Pversion=<your-version-here>
- Find
rootProject.allprojects.repositories
inembrace_android/android/build.gradle
and addmavenLocal()
- Find
allprojects.repositories
inembrace/example/android/build.gradle
and addmavenLocal()
- Set the correct
embrace-android-sdk
version in bothembrace_android/android/build.gradle
andembrace/example/android/build.gradle
- Run the app in the normal way
- Follow the Android repo instructions for creating a beta
- Find
rootProject.allprojects.repositories
inembrace_android/android/build.gradle
and addmaven {url "https://repo.embrace.io/repository/beta"}
- Find
allprojects.repositories
inembrace/example/android/build.gradle
and addmaven {url "https://repo.embrace.io/repository/beta"}
- Set the correct
embrace-android-sdk
version in bothembrace_android/android/build.gradle
andembrace/example/android/build.gradle
- Run the app in the normal way
You can test changes local changes to the iOS SDK by updating the Flutter project's podspec
and Podfile
to point to the local copy.
- In
embrace_ios/ios/embrace_ios.podspec
, change the dependency on the iOS SDK tos.dependency 'EmbraceIO-LOCAL'
- In
embrace/example/ios/Podfile
, add the following linepod 'EmbraceIO-LOCAL', :path => 'path/to/ios_sdk'
- In
embrace/example/ios
, run thepod update
command
- Ask the iOS team to publish a beta of the iOS SDK to the
EmbraceIO-DEV
pod - In
embrace_ios/ios/embrace_ios.podspec
, change the dependency on the iOS SDK tos.dependency 'EmbraceIO-DEV'
- In
embrace/example/ios/Podfile
, add the following linepod 'EmbraceIO-DEV'
- In
embrace/example/ios
, run thepod update
command
- Bump the Android/iOS dependencies to the latest available stable versions
- Bump the SDK version according to semver, with
./set_version.sh <your-version-here> && ./verify_versions.sh
- Update the Android SDK version in
embrace_android/android/gradle.properties
andembrace_platform_interface/lib/method_channel_embrace.dart
- Update the changelog of all 4 packages with a description of what changed
- Run the example app on Android + iOS (in release mode) and confirm that a session is captured & appears in the dashboard with useful info
- Create a PR with all these changes
- Add the 'release-candidate' label to the PR
- Merge the PR. If the label has been added, this will automatically publish the packages to pub.dev
To release a beta version of the SDK you should add a suffix to the version string. For example, 1.3.0-beta01
would be an appropriate name.
Otherwise, the release process will be exactly the same as for a regular release.