From 9e05e6d8c5c752e4de506db7bf1dc51cb9cafdb4 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Fri, 12 Mar 2021 11:30:18 +0100 Subject: [PATCH] fix iOS build --- ios/Podfile.lock | 149 +++++++----------- .../contents.xcworkspacedata | 2 +- lib/utils/background_push.dart | 11 ++ macos/Flutter/GeneratedPluginRegistrant.swift | 2 + pubspec.lock | 9 +- pubspec.yaml | 7 +- 6 files changed, 73 insertions(+), 107 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 7a243277..125b3dbb 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -36,61 +36,59 @@ PODS: - SwiftyGif - emoji_picker (0.0.3): - Flutter + - fcm_shared_isolate (0.0.1): + - Firebase/Messaging + - Flutter - file_picker (0.0.1): - DKImagePickerController/PhotoGallery - Flutter - - Firebase/CoreOnly (6.26.0): - - FirebaseCore (= 6.7.2) - - Firebase/Messaging (6.26.0): + - Firebase/CoreOnly (6.33.0): + - FirebaseCore (= 6.10.3) + - Firebase/Messaging (6.33.0): - Firebase/CoreOnly - - FirebaseMessaging (~> 4.4.1) - - firebase_core (0.5.0-1): - - Firebase/CoreOnly (~> 6.26.0) + - FirebaseMessaging (~> 4.7.0) + - firebase_core (0.5.3): + - Firebase/CoreOnly (~> 6.33.0) - Flutter - firebase_messaging (7.0.3): - - Firebase/CoreOnly (~> 6.26.0) - - Firebase/Messaging (~> 6.26.0) + - Firebase/CoreOnly (~> 6.33.0) + - Firebase/Messaging (~> 6.33.0) - firebase_core - Flutter - - FirebaseAnalyticsInterop (1.5.0) - - FirebaseCore (6.7.2): - - FirebaseCoreDiagnostics (~> 1.3) - - FirebaseCoreDiagnosticsInterop (~> 1.2) - - GoogleUtilities/Environment (~> 6.5) - - GoogleUtilities/Logger (~> 6.5) + - FirebaseCore (6.10.3): + - FirebaseCoreDiagnostics (~> 1.6) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/Logger (~> 6.7) - FirebaseCoreDiagnostics (1.7.0): - GoogleDataTransport (~> 7.4) - GoogleUtilities/Environment (~> 6.7) - GoogleUtilities/Logger (~> 6.7) - nanopb (~> 1.30906.0) - - FirebaseCoreDiagnosticsInterop (1.2.0) - - FirebaseInstallations (1.3.0): - - FirebaseCore (~> 6.6) - - GoogleUtilities/Environment (~> 6.6) - - GoogleUtilities/UserDefaults (~> 6.6) + - FirebaseInstallations (1.7.0): + - FirebaseCore (~> 6.10) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/UserDefaults (~> 6.7) - PromisesObjC (~> 1.2) - - FirebaseInstanceID (4.3.4): - - FirebaseCore (~> 6.6) - - FirebaseInstallations (~> 1.0) - - GoogleUtilities/Environment (~> 6.5) - - GoogleUtilities/UserDefaults (~> 6.5) - - FirebaseMessaging (4.4.1): - - FirebaseAnalyticsInterop (~> 1.5) - - FirebaseCore (~> 6.6) - - FirebaseInstanceID (~> 4.3) - - GoogleUtilities/AppDelegateSwizzler (~> 6.5) - - GoogleUtilities/Environment (~> 6.5) - - GoogleUtilities/Reachability (~> 6.5) - - GoogleUtilities/UserDefaults (~> 6.5) + - FirebaseInstanceID (4.8.0): + - FirebaseCore (~> 6.10) + - FirebaseInstallations (~> 1.6) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/UserDefaults (~> 6.7) + - FirebaseMessaging (4.7.1): + - FirebaseCore (~> 6.10) + - FirebaseInstanceID (~> 4.7) + - GoogleUtilities/AppDelegateSwizzler (~> 6.7) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/Reachability (~> 6.7) + - GoogleUtilities/UserDefaults (~> 6.7) - Protobuf (>= 3.9.2, ~> 3.9) - Flutter (1.0.0) - flutter_keyboard_visibility (0.0.1): - Flutter - flutter_local_notifications (0.0.1): - Flutter - - flutter_olm (0.0.1): + - flutter_olm (3.2.2): - Flutter - - OLMKit - flutter_secure_storage (3.3.1): - Flutter - "flutter_sound_lite (7.5.3+1)": @@ -127,11 +125,6 @@ PODS: - nanopb/encode (1.30906.0) - native_imaging (0.0.1): - Flutter - - OLMKit (3.1.0): - - OLMKit/olmc (= 3.1.0) - - OLMKit/olmcpp (= 3.1.0) - - OLMKit/olmc (3.1.0) - - OLMKit/olmcpp (3.1.0) - open_file (0.0.1): - Flutter - package_info (0.0.1): @@ -144,9 +137,9 @@ PODS: - Protobuf (3.14.0) - receive_sharing_intent (0.0.1): - Flutter - - SDWebImage (5.10.3): - - SDWebImage/Core (= 5.10.3) - - SDWebImage/Core (5.10.3) + - SDWebImage (5.10.4): + - SDWebImage/Core (= 5.10.4) + - SDWebImage/Core (5.10.4) - share (0.0.1): - Flutter - shared_preferences (0.0.1): @@ -154,40 +147,21 @@ PODS: - sqflite (0.0.2): - Flutter - FMDB (>= 2.7.5) - - SQLCipher (4.4.2): - - SQLCipher/standard (= 4.4.2) - - SQLCipher/common (4.4.2) - - SQLCipher/standard (4.4.2): + - SQLCipher (4.4.3): + - SQLCipher/standard (= 4.4.3) + - SQLCipher/common (4.4.3) + - SQLCipher/standard (4.4.3): - SQLCipher/common - - sqlite3 (3.32.3): - - sqlite3/common (= 3.32.3) - - sqlite3/common (3.32.3) - - sqlite3/fts5 (3.32.3): - - sqlite3/common - - sqlite3/json1 (3.32.3): - - sqlite3/common - - sqlite3/perf-threadsafe (3.32.3): - - sqlite3/common - - sqlite3/rtree (3.32.3): - - sqlite3/common - - sqlite3_flutter_libs (0.0.1): - - Flutter - - sqlite3 (~> 3.32.3) - - sqlite3/fts5 - - sqlite3/json1 - - sqlite3/perf-threadsafe - - sqlite3/rtree - SwiftyGif (5.4.0) - "tau_sound_core (7.5.3+1)" - url_launcher (0.0.1): - Flutter - - webview_flutter (0.0.1): - - Flutter DEPENDENCIES: - android_path_provider (from `.symlinks/plugins/android_path_provider/ios`) - disk_space (from `.symlinks/plugins/disk_space/ios`) - emoji_picker (from `.symlinks/plugins/emoji_picker/ios`) + - fcm_shared_isolate (from `.symlinks/plugins/fcm_shared_isolate/ios`) - file_picker (from `.symlinks/plugins/file_picker/ios`) - firebase_core (from `.symlinks/plugins/firebase_core/ios`) - firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) @@ -208,19 +182,15 @@ DEPENDENCIES: - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) - sqflite (from `.symlinks/plugins/sqflite/ios`) - SQLCipher - - sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/ios`) - url_launcher (from `.symlinks/plugins/url_launcher/ios`) - - webview_flutter (from `.symlinks/plugins/webview_flutter/ios`) SPEC REPOS: trunk: - DKImagePickerController - DKPhotoGallery - Firebase - - FirebaseAnalyticsInterop - FirebaseCore - FirebaseCoreDiagnostics - - FirebaseCoreDiagnosticsInterop - FirebaseInstallations - FirebaseInstanceID - FirebaseMessaging @@ -228,12 +198,10 @@ SPEC REPOS: - GoogleDataTransport - GoogleUtilities - nanopb - - OLMKit - PromisesObjC - Protobuf - SDWebImage - SQLCipher - - sqlite3 - SwiftyGif - tau_sound_core @@ -244,6 +212,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/disk_space/ios" emoji_picker: :path: ".symlinks/plugins/emoji_picker/ios" + fcm_shared_isolate: + :path: ".symlinks/plugins/fcm_shared_isolate/ios" file_picker: :path: ".symlinks/plugins/file_picker/ios" firebase_core: @@ -282,12 +252,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/shared_preferences/ios" sqflite: :path: ".symlinks/plugins/sqflite/ios" - sqlite3_flutter_libs: - :path: ".symlinks/plugins/sqlite3_flutter_libs/ios" url_launcher: :path: ".symlinks/plugins/url_launcher/ios" - webview_flutter: - :path: ".symlinks/plugins/webview_flutter/ios" SPEC CHECKSUMS: android_path_provider: 708a32098dc3da99e5d0c09ec6a485833a07d28a @@ -295,21 +261,20 @@ SPEC CHECKSUMS: DKImagePickerController: b5eb7f7a388e4643264105d648d01f727110fc3d DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 emoji_picker: 0e868059aa18f9473d234f3d0701fbd4d5fd310c + fcm_shared_isolate: c322d17ae6fa396b68f5cb2f2f0fd04ee26a56e6 file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1 - Firebase: 7cf5f9c67f03cb3b606d1d6535286e1080e57eb6 - firebase_core: 00e54a4744164a6b5a250b96dd1ad5afaba7a342 - firebase_messaging: 666d9994651b1ecf8c582b52dd913f3fa58c17ef - FirebaseAnalyticsInterop: 3f86269c38ae41f47afeb43ebf32a001f58fcdae - FirebaseCore: f42e5e5f382cdcf6b617ed737bf6c871a6947b17 + Firebase: 8db6f2d1b2c5e2984efba4949a145875a8f65fe5 + firebase_core: 5d6a02f3d85acd5f8321c2d6d62877626a670659 + firebase_messaging: 0aea2cd5885b65e19ede58ee3507f485c992cc75 + FirebaseCore: d889d9e12535b7f36ac8bfbf1713a0836a3012cd FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1 - FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850 - FirebaseInstallations: 6f5f680e65dc374397a483c32d1799ba822a395b - FirebaseInstanceID: cef67c4967c7cecb56ea65d8acbb4834825c587b - FirebaseMessaging: 29543feb343b09546ab3aa04d008ee8595b43c44 - Flutter: 0e3d915762c693b495b44d77113d4970485de6ec + FirebaseInstallations: 466c7b4d1f58fe16707693091da253726a731ed2 + FirebaseInstanceID: bd3ffc24367f901a43c063b36c640b345a4a5dd1 + FirebaseMessaging: 5eca4ef173de76253352511aafef774caa1cba2a + Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069 flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743 - flutter_olm: be36ebeb6388f7d7b3097d39feaf459a3cad2091 + flutter_olm: d914c4200caa52640640675eeb9291d8d29b9c0d flutter_secure_storage: 7953c38a04c3fdbb00571bcd87d8e3b5ceb9daec flutter_sound_lite: 011ef5c3a7fc0d29ad48463485f595220f7d13c5 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a @@ -318,7 +283,6 @@ SPEC CHECKSUMS: image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09 nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc native_imaging: 633687fc14422729cc67ed80c3435e359ef7a92b - OLMKit: 4ee0159d63feeb86d836fdcfefe418e163511639 open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c @@ -326,18 +290,15 @@ SPEC CHECKSUMS: PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97 Protobuf: 0cde852566359049847168e51bd1c690e0f70056 receive_sharing_intent: c0d87310754e74c0f9542947e7cbdf3a0335a3b1 - SDWebImage: e378178472b735e84b007bfb55514c97948a0598 + SDWebImage: c666b97e1fa9c64b4909816a903322018f0a9c84 share: 0b2c3e82132f5888bccca3351c504d0003b3b410 shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 - SQLCipher: 1ab0b9486a77d141e72e92ff30681926ed79c07a - sqlite3: 8f7d2078ae27778699a622a94b853285793422a2 - sqlite3_flutter_libs: 5651f8ff48e3b44d910863c4ea5916085b1b245f + SQLCipher: 155ffeafc9ac102e5c9b68e3e9a1297a98a27096 SwiftyGif: 5d4af95df24caf1c570dbbcb32a3b8a0763bc6d7 tau_sound_core: d6dad8fc83230965615e53717711e0550a642702 url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef - webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96 PODFILE CHECKSUM: 98265b4e989e5e1e991bc8f97bc358d0dd616061 -COCOAPODS: 1.10.0 +COCOAPODS: 1.10.1 diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a16..919434a6 100644 --- a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart index d604f417..9815a40f 100644 --- a/lib/utils/background_push.dart +++ b/lib/utils/background_push.dart @@ -25,6 +25,7 @@ import 'dart:ui'; import 'package:adaptive_page_layout/adaptive_page_layout.dart'; import 'package:famedlysdk/famedlysdk.dart'; import 'package:fcm_shared_isolate/fcm_shared_isolate.dart'; +import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flushbar/flushbar_helper.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; @@ -127,6 +128,16 @@ class BackgroundPush { Set oldTokens, bool useDeviceSpecificAppId = false, }) async { + if (Platform.isIOS) { + Logs().v('Request notification permissions on iOS'); + await FirebaseMessaging().requestNotificationPermissions( + IosNotificationSettings( + sound: true, + alert: true, + badge: true, + ), + ); + } final clientName = PlatformInfos.clientName; oldTokens ??= {}; final pushers = await client.requestPushers().catchError((e) { diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index cc19df50..48c957df 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -10,6 +10,7 @@ import firebase_core import flutter_local_notifications import package_info import path_provider_macos +import shared_preferences_macos import sqflite import url_launcher_macos @@ -19,6 +20,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index 834a1d77..313e2568 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -410,7 +410,7 @@ packages: name: flutter_olm url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.1.1" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -1072,13 +1072,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.1.8" - sqlite3_flutter_libs: - dependency: "direct main" - description: - name: sqlite3_flutter_libs - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" stack_trace: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 60670dac..bacb9297 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -32,7 +32,7 @@ dependencies: image_picker: ^0.6.7+21 url_launcher: ^5.7.10 cached_network_image: ^2.5.0 - firebase_messaging: ^7.0.3 + firebase_messaging: any flutter_local_notifications: ^3.0.3 adaptive_page_layout: ^0.1.6 provider: ^4.3.3 @@ -58,16 +58,15 @@ dependencies: url: https://github.com/Sorunome/flutter_matrix_html.git ref: 6b6a850fcfc3b0a3e88a3dd6beb79eda3acac853 moor: ^3.4.0 - sqlite3_flutter_libs: ^0.3.0 sqlite3: ^0.1.8 + sqflite: ^1.3.2+2 # Still used to obtain the database location random_string: ^2.1.0 flutter_typeahead: ^2.0.0 - flutter_olm: ^1.0.1 + flutter_olm: ^1.1.1 intl: any circular_check_box: ^1.0.4 flutter_localizations: sdk: flutter - sqflite: ^1.3.2+2 # Still used to obtain the database location native_imaging: git: url: https://gitlab.com/famedly/libraries/native_imaging.git