From 736a718c70b5d0e037f67906090a059399d00fec Mon Sep 17 00:00:00 2001 From: otsmr Date: Sun, 8 Feb 2026 12:42:21 +0100 Subject: [PATCH 1/3] fix: sharing links and media files on ios --- CHANGELOG.md | 7 ++++++- ios/Runner.xcodeproj/project.pbxproj | 6 +++++- ios/Runner/Runner.entitlements | 4 ++++ ios/Runner/RunnerRelease.entitlements | 20 +++++++++++++++++++ .../ShareExtension.entitlements | 10 ++++++++++ .../api/mediafiles/download.service.dart | 4 +++- pubspec.yaml | 2 +- 7 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 ios/Runner/RunnerRelease.entitlements create mode 100644 ios/ShareExtension/ShareExtension.entitlements diff --git a/CHANGELOG.md b/CHANGELOG.md index 92b3f4b..3815b2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.0.91 + +- Fixes link preview on iOS +- Fixes sharing images from other apps on iOS + ## 0.0.90 - Fixes issue that media files where not reuploaded @@ -11,7 +16,7 @@ ## 0.0.87 -- Adds link preview to images +- Adds link preview to shared links - Adds option to manual focus in the camera - Adds support to switch between front and back cameras during video recording - Adds basic face filters diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 5739f2b..da0f11f 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -103,6 +103,7 @@ B3B27B7FBEEA31DB7793A0C2 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; D21FCEA42D9F2B750088701D /* NotificationService.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = NotificationService.appex; sourceTree = BUILT_PRODUCTS_DIR; }; D2265DD42D920142000D99BB /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; + D24E27CC2F38ABC10055D9D1 /* RunnerRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerRelease.entitlements; sourceTree = ""; }; D25D4D1D2EF626E30029F805 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; D25D4D702EFF41DB0029F805 /* ShareExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = ShareExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; D25D4D802EFF437F0029F805 /* RunnerDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerDebug.entitlements; sourceTree = ""; }; @@ -234,6 +235,7 @@ 97C146F01CF9000F007C117D /* Runner */ = { isa = PBXGroup; children = ( + D24E27CC2F38ABC10055D9D1 /* RunnerRelease.entitlements */, D25D4D802EFF437F0029F805 /* RunnerDebug.entitlements */, D2265DD42D920142000D99BB /* Runner.entitlements */, 97C146FA1CF9000F007C117D /* Main.storyboard */, @@ -976,7 +978,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; + CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; CUSTOM_GROUP_ID = group.eu.twonly.shareIntent; DEVELOPMENT_TEAM = CN332ZUGRP; @@ -1175,6 +1177,7 @@ CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_ENTITLEMENTS = ShareExtension/ShareExtension.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; CUSTOM_GROUP_ID = group.eu.twonly.shareIntent; @@ -1216,6 +1219,7 @@ CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_ENTITLEMENTS = ShareExtension/ShareExtension.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; CUSTOM_GROUP_ID = group.eu.twonly.shareIntent; diff --git a/ios/Runner/Runner.entitlements b/ios/Runner/Runner.entitlements index 1e7475d..dc9d4cc 100644 --- a/ios/Runner/Runner.entitlements +++ b/ios/Runner/Runner.entitlements @@ -8,6 +8,10 @@ applinks:me.twonly.eu + com.apple.security.application-groups + + group.eu.twonly.shareIntent + keychain-access-groups $(AppIdentifierPrefix)eu.twonly.shared diff --git a/ios/Runner/RunnerRelease.entitlements b/ios/Runner/RunnerRelease.entitlements new file mode 100644 index 0000000..dc9d4cc --- /dev/null +++ b/ios/Runner/RunnerRelease.entitlements @@ -0,0 +1,20 @@ + + + + + aps-environment + development + com.apple.developer.associated-domains + + applinks:me.twonly.eu + + com.apple.security.application-groups + + group.eu.twonly.shareIntent + + keychain-access-groups + + $(AppIdentifierPrefix)eu.twonly.shared + + + diff --git a/ios/ShareExtension/ShareExtension.entitlements b/ios/ShareExtension/ShareExtension.entitlements new file mode 100644 index 0000000..bb03fc7 --- /dev/null +++ b/ios/ShareExtension/ShareExtension.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.application-groups + + group.eu.twonly.shareIntent + + + diff --git a/lib/src/services/api/mediafiles/download.service.dart b/lib/src/services/api/mediafiles/download.service.dart index 8ebf018..a2a7802 100644 --- a/lib/src/services/api/mediafiles/download.service.dart +++ b/lib/src/services/api/mediafiles/download.service.dart @@ -37,7 +37,9 @@ Future canMediaFileBeDownloaded(MediaFile mediaFile) async { // If not delete the message as it can not be downloaded from the server anymore. if (messages.length != 1) { - Log.error('A media for download must have one original message.'); + Log.warn( + 'A media for download must have one original message, but it has ${messages.length}.', + ); return false; } diff --git a/pubspec.yaml b/pubspec.yaml index 5cf436c..72fb8fd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: "twonly, a privacy-friendly way to connect with friends through sec publish_to: 'none' -version: 0.0.90+90 +version: 0.0.91+91 environment: sdk: ^3.6.0 From 408a2237bd151150d878532e917a3a9f314213cf Mon Sep 17 00:00:00 2001 From: otsmr Date: Sun, 8 Feb 2026 19:17:37 +0100 Subject: [PATCH 2/3] remove v --- .github/workflows/release_github.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_github.yml b/.github/workflows/release_github.yml index 58c7ff7..1224abd 100644 --- a/.github/workflows/release_github.yml +++ b/.github/workflows/release_github.yml @@ -57,6 +57,6 @@ jobs: uses: ncipollo/release-action@v1.18.0 with: token: ${{ secrets.GITHUB_TOKEN }} - tag: v${{ env.PUBSPEC_VERSION }} + tag: ${{ env.PUBSPEC_VERSION }} allowUpdates: true artifacts: build/app/outputs/flutter-apk/*.apk \ No newline at end of file From dbc3ee62d02a0f54b61ee2d9c7ec5553d55d610b Mon Sep 17 00:00:00 2001 From: otsmr Date: Sun, 8 Feb 2026 19:18:21 +0100 Subject: [PATCH 3/3] add v again --- .github/workflows/release_github.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_github.yml b/.github/workflows/release_github.yml index 1224abd..58c7ff7 100644 --- a/.github/workflows/release_github.yml +++ b/.github/workflows/release_github.yml @@ -57,6 +57,6 @@ jobs: uses: ncipollo/release-action@v1.18.0 with: token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ env.PUBSPEC_VERSION }} + tag: v${{ env.PUBSPEC_VERSION }} allowUpdates: true artifacts: build/app/outputs/flutter-apk/*.apk \ No newline at end of file