Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/update_native_sdks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fi
echo "iOS SDK last version is $iOSVersion"

sed -i~ -e "s|s.dependency 'Didomi-XCFramework', '[0-9]\{1,2\}.[0-9]\{1,2\}.[0-9]\{1,2\}'|s.dependency 'Didomi-XCFramework', '$iOSVersion'|g" ios/didomi_sdk.podspec || exit 1
sed -i~ -e "s|from: \"[0-9]\{1,2\}.[0-9]\{1,2\}.[0-9]\{1,2\}\"|from: \"$iOSVersion\"|g" ios/didomi_sdk/Package.swift || exit 1
sed -i~ -e "s|\(didomi-ios-sdk-spm\".*from: \)\"[0-9]\{1,2\}.[0-9]\{1,2\}.[0-9]\{1,2\}\"|\1\"$iOSVersion\"|g" ios/didomi_sdk/Package.swift || exit 1

# Cleanup backup files
find . -type f -name '*~' -delete
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,14 @@ jobs:
runs-on: macos-latest

steps:
# Checkout into a directory matching the plugin name (didomi_sdk) so
# Flutter's SPM integration generates the right symlink identity.
# Flutter 3.44+ derives the SPM package identity from the plugin's
# root directory name; checking out into `flutter/` (the repo name)
# produces identity `flutter` which collides with the override.
- uses: actions/checkout@v6
with:
path: didomi_sdk
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
Expand All @@ -88,19 +95,20 @@ jobs:
channel: "stable"

- name: Install dependencies
working-directory: ./didomi_sdk
run: flutter pub get

- name: Add Homebrew to PATH
run: echo "/opt/homebrew/bin" >> $GITHUB_PATH

# pod update
- name: Run pod update
working-directory: ./example/ios
working-directory: ./didomi_sdk/example/ios
run: pod update

# iOS IPA with SPM
- name: Build iOS Sample (SPM)
working-directory: ./example
working-directory: ./didomi_sdk/example
run: |
flutter config --enable-swift-package-manager
flutter build ios --no-codesign
Expand All @@ -113,7 +121,7 @@ jobs:

# iOS IPA with CocoaPods
- name: Build iOS Sample (CocoaPods)
working-directory: ./example
working-directory: ./didomi_sdk/example
run: |
flutter config --no-enable-swift-package-manager
flutter build ios --no-codesign
Expand All @@ -129,7 +137,7 @@ jobs:
uses: actions/upload-artifact@v7
with:
name: ios-app
path: example/build/ios/iphoneos/*.ipa
path: didomi_sdk/example/build/ios/iphoneos/*.ipa
retention-days: 5

publish:
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ jobs:
runs-on: self-hosted

steps:
# Checkout into a directory matching the plugin name (didomi_sdk) so
# Flutter's SPM integration generates the right symlink identity on
# Flutter 3.44+ (see build.yml for full context).
- uses: actions/checkout@v6
with:
path: didomi_sdk
- uses: actions/setup-java@v5
with:
distribution: "temurin"
Expand All @@ -51,26 +56,28 @@ jobs:
architecture: arm64 # optional value for v2 (use self-hosted mac mini)

- name: Install dependencies
working-directory: ./didomi_sdk
run: flutter pub get

- name: Add Homebrew to PATH
run: echo "/opt/homebrew/bin" >> $GITHUB_PATH

- name: Run pod update
working-directory: ./example/ios
working-directory: ./didomi_sdk/example/ios
run: pod update

- name: List all simulators
run: xcrun xctrace list devices

- name: Build & run all tests
working-directory: ./didomi_sdk
run: sh .github/scripts/uitests_for_ios.sh

- name: Archive test results
uses: actions/upload-artifact@v7
with:
name: logs_ios
path: example/machine.log
path: didomi_sdk/example/machine.log

# job responsible for running Flutter tests on Android devices
test_android:
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ jobs:
runs-on: self-hosted

steps:
# Checkout into a directory matching the plugin name (didomi_sdk) so
# Flutter's SPM integration generates the right symlink identity on
# Flutter 3.44+ (see build.yml for full context).
- uses: actions/checkout@v6
with:
path: didomi_sdk
- uses: actions/setup-java@v5
with:
distribution: "temurin"
Expand All @@ -53,27 +58,29 @@ jobs:
architecture: arm64 # optional value for v2 (use self-hosted mac mini)

- name: Install dependencies
working-directory: ./didomi_sdk
run: flutter pub get

- name: Add Homebrew to PATH
run: echo "/opt/homebrew/bin" >> $GITHUB_PATH

- name: Run pod update
working-directory: ./example/ios
working-directory: ./didomi_sdk/example/ios
run: pod update

- name: List all simulators
run: xcrun xctrace list devices

- name: Build & run all tests
working-directory: ./didomi_sdk
run: sh .github/scripts/uitests_for_ios.sh

- name: Archive test results
if: ${{ failure() }}
uses: actions/upload-artifact@v7
with:
name: logs_ios
path: example/machine.log
path: didomi_sdk/example/machine.log

# job responsible for running Flutter tests on Android devices
android:
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
- uses: actions/checkout@v6
with:
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo

- uses: actions/setup-java@v5
Expand All @@ -49,13 +48,12 @@ jobs:
run: bash .github/scripts/update.sh ${{ github.event.inputs.increment }}

- name: Commit & Push changes
uses: actions-js/push@master
uses: stefanzweifel/git-auto-commit-action@v6
with:
author_email: ${{ secrets.AUTHOR_EMAIL }}
author_name: ${{ secrets.AUTHOR_NAME }}
branch: ${{ github.ref }}
github_token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
message: "Update Dependencies and increment ${{ github.event.inputs.increment }} version"
commit_message: "Update Dependencies and increment ${{ github.event.inputs.increment }} version"
commit_user_name: ${{ secrets.AUTHOR_NAME }}
commit_user_email: ${{ secrets.AUTHOR_EMAIL }}
commit_author: ${{ secrets.AUTHOR_NAME }} <${{ secrets.AUTHOR_EMAIL }}>

- name: Trigger Tag
run: |
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
.dart_tool/
.packages
build/
.build/
# If you're building an application, you may want to check-in your pubspec.lock
pubspec.lock

Expand All @@ -26,3 +27,8 @@ runConfigurations.xml

# AI
CLAUDE.md

# Swift Package Manager (Flutter SPM integration generates these per-build)
.swiftpm/
**/Flutter/ephemeral/
**/xcshareddata/swiftpm/
2 changes: 2 additions & 0 deletions example/ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
Flutter/ephemeral/
**/xcshareddata/swiftpm/
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*

Expand Down