mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 14:28:40 +00:00
ios version should work
This commit is contained in:
parent
8c74a8249f
commit
d20015fa43
14 changed files with 74 additions and 68 deletions
|
|
@ -15,7 +15,7 @@ if (keystorePropertiesFile.exists()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "com.example.connect"
|
namespace = "eu.twonly"
|
||||||
// compileSdk = flutter.compileSdkVersion
|
// compileSdk = flutter.compileSdkVersion
|
||||||
compileSdk 35
|
compileSdk 35
|
||||||
//ndkVersion = flutter.ndkVersion
|
//ndkVersion = flutter.ndkVersion
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.example.connect
|
package eu.twonly
|
||||||
|
|
||||||
import io.flutter.embedding.android.FlutterFragmentActivity
|
import io.flutter.embedding.android.FlutterFragmentActivity
|
||||||
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"flutter":{"platforms":{"android":{"default":{"projectId":"twonly-ff605","appId":"1:650346093942:android:706cb87c3131dabe81ae57","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"twonly-ff605","appId":"1:650346093942:ios:e80075ff3de823c581ae57","uploadDebugSymbols":false,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"twonly-ff605","configurations":{"android":"1:650346093942:android:706cb87c3131dabe81ae57","ios":"1:650346093942:ios:e80075ff3de823c581ae57"}}}}}}
|
{"flutter":{"platforms":{"android":{"default":{"projectId":"twonly-ff605","appId":"1:650346093942:android:040816fb819b1bfb81ae57","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"twonly-ff605","appId":"1:650346093942:ios:ee67080974eadb6681ae57","uploadDebugSymbols":false,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"twonly-ff605","configurations":{"android":"1:650346093942:android:040816fb819b1bfb81ae57","ios":"1:650346093942:ios:ee67080974eadb6681ae57"}}}}}}
|
||||||
|
|
@ -66,6 +66,7 @@
|
||||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
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 = "<group>"; };
|
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 = "<group>"; };
|
||||||
|
D2265DD42D920142000D99BB /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
|
||||||
E96A5ACA32A7118204F050A5 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
|
E96A5ACA32A7118204F050A5 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
|
@ -133,6 +134,7 @@
|
||||||
97C146F01CF9000F007C117D /* Runner */ = {
|
97C146F01CF9000F007C117D /* Runner */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
D2265DD42D920142000D99BB /* Runner.entitlements */,
|
||||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||||
|
|
@ -476,14 +478,19 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
|
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
DEVELOPMENT_TEAM = CN332ZUGRP;
|
DEVELOPMENT_TEAM = CN332ZUGRP;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
INFOPLIST_KEY_CFBundleDisplayName = twonly;
|
||||||
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 13;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
|
MARKETING_VERSION = 0.0.5;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = eu.twonly;
|
PRODUCT_BUNDLE_IDENTIFIER = eu.twonly;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
|
@ -664,14 +671,19 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
|
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
DEVELOPMENT_TEAM = CN332ZUGRP;
|
DEVELOPMENT_TEAM = CN332ZUGRP;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
INFOPLIST_KEY_CFBundleDisplayName = twonly;
|
||||||
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 13;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
|
MARKETING_VERSION = 0.0.5;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = eu.twonly;
|
PRODUCT_BUNDLE_IDENTIFIER = eu.twonly;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
|
@ -688,14 +700,19 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
|
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
DEVELOPMENT_TEAM = CN332ZUGRP;
|
DEVELOPMENT_TEAM = CN332ZUGRP;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
INFOPLIST_KEY_CFBundleDisplayName = twonly;
|
||||||
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 13;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
|
MARKETING_VERSION = 0.0.5;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = eu.twonly;
|
PRODUCT_BUNDLE_IDENTIFIER = eu.twonly;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,15 @@ import UIKit
|
||||||
_ application: UIApplication,
|
_ application: UIApplication,
|
||||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||||
) -> Bool {
|
) -> Bool {
|
||||||
|
|
||||||
|
if #available(iOS 10.0, *) {
|
||||||
|
UNUserNotificationCenter.current().delegate = self as UNUserNotificationCenterDelegate
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (@available(iOS 10.0, *)) {
|
||||||
|
// [UNUserNotificationCenter currentNotificationCenter].delegate = (id<UNUserNotificationCenterDelegate>) self;
|
||||||
|
// }
|
||||||
|
|
||||||
GeneratedPluginRegistrant.register(with: self)
|
GeneratedPluginRegistrant.register(with: self)
|
||||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<key>PLIST_VERSION</key>
|
<key>PLIST_VERSION</key>
|
||||||
<string>1</string>
|
<string>1</string>
|
||||||
<key>BUNDLE_ID</key>
|
<key>BUNDLE_ID</key>
|
||||||
<string>com.example.connect</string>
|
<string>eu.twonly</string>
|
||||||
<key>PROJECT_ID</key>
|
<key>PROJECT_ID</key>
|
||||||
<string>twonly-ff605</string>
|
<string>twonly-ff605</string>
|
||||||
<key>STORAGE_BUCKET</key>
|
<key>STORAGE_BUCKET</key>
|
||||||
|
|
@ -25,6 +25,6 @@
|
||||||
<key>IS_SIGNIN_ENABLED</key>
|
<key>IS_SIGNIN_ENABLED</key>
|
||||||
<true></true>
|
<true></true>
|
||||||
<key>GOOGLE_APP_ID</key>
|
<key>GOOGLE_APP_ID</key>
|
||||||
<string>1:650346093942:ios:e80075ff3de823c581ae57</string>
|
<string>1:650346093942:ios:ee67080974eadb6681ae57</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
@ -36,6 +36,11 @@
|
||||||
<string>Store photos in the gallery.</string>
|
<string>Store photos in the gallery.</string>
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>UIBackgroundModes</key>
|
||||||
|
<array>
|
||||||
|
<string>fetch</string>
|
||||||
|
<string>remote-notification</string>
|
||||||
|
</array>
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
<string>LaunchScreen</string>
|
<string>LaunchScreen</string>
|
||||||
<key>UIMainStoryboardFile</key>
|
<key>UIMainStoryboardFile</key>
|
||||||
|
|
|
||||||
8
ios/Runner/Runner.entitlements
Normal file
8
ios/Runner/Runner.entitlements
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>aps-environment</key>
|
||||||
|
<string>development</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
@ -51,7 +51,7 @@ class DefaultFirebaseOptions {
|
||||||
|
|
||||||
static const FirebaseOptions android = FirebaseOptions(
|
static const FirebaseOptions android = FirebaseOptions(
|
||||||
apiKey: 'AIzaSyA4d5ORP11WpuVgmoYtWmOcMzZYWLPVtBk',
|
apiKey: 'AIzaSyA4d5ORP11WpuVgmoYtWmOcMzZYWLPVtBk',
|
||||||
appId: '1:650346093942:android:706cb87c3131dabe81ae57',
|
appId: '1:650346093942:android:040816fb819b1bfb81ae57',
|
||||||
messagingSenderId: '650346093942',
|
messagingSenderId: '650346093942',
|
||||||
projectId: 'twonly-ff605',
|
projectId: 'twonly-ff605',
|
||||||
storageBucket: 'twonly-ff605.firebasestorage.app',
|
storageBucket: 'twonly-ff605.firebasestorage.app',
|
||||||
|
|
@ -59,10 +59,11 @@ class DefaultFirebaseOptions {
|
||||||
|
|
||||||
static const FirebaseOptions ios = FirebaseOptions(
|
static const FirebaseOptions ios = FirebaseOptions(
|
||||||
apiKey: 'AIzaSyDr7MEoz2XvrYxU0kYvZVVjej53q0gANnE',
|
apiKey: 'AIzaSyDr7MEoz2XvrYxU0kYvZVVjej53q0gANnE',
|
||||||
appId: '1:650346093942:ios:e80075ff3de823c581ae57',
|
appId: '1:650346093942:ios:ee67080974eadb6681ae57',
|
||||||
messagingSenderId: '650346093942',
|
messagingSenderId: '650346093942',
|
||||||
projectId: 'twonly-ff605',
|
projectId: 'twonly-ff605',
|
||||||
storageBucket: 'twonly-ff605.firebasestorage.app',
|
storageBucket: 'twonly-ff605.firebasestorage.app',
|
||||||
iosBundleId: 'com.example.connect',
|
iosBundleId: 'eu.twonly',
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import 'dart:collection';
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:cryptography_plus/cryptography_plus.dart';
|
import 'package:cryptography_plus/cryptography_plus.dart';
|
||||||
import 'package:drift/drift.dart';
|
import 'package:drift/drift.dart';
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import 'package:twonly/src/app.dart';
|
||||||
import 'package:twonly/src/database/twonly_database.dart';
|
import 'package:twonly/src/database/twonly_database.dart';
|
||||||
import 'package:twonly/src/providers/api_provider.dart';
|
import 'package:twonly/src/providers/api_provider.dart';
|
||||||
import 'package:twonly/src/utils/misc.dart';
|
import 'package:twonly/src/utils/misc.dart';
|
||||||
|
import 'dart:io' show Platform;
|
||||||
import '../../firebase_options.dart';
|
import '../../firebase_options.dart';
|
||||||
|
|
||||||
// see more here: https://firebase.google.com/docs/cloud-messaging/flutter/receive?hl=de
|
// see more here: https://firebase.google.com/docs/cloud-messaging/flutter/receive?hl=de
|
||||||
|
|
@ -52,10 +52,14 @@ Future initFCMService() async {
|
||||||
await FirebaseMessaging.instance.requestPermission(provisional: true);
|
await FirebaseMessaging.instance.requestPermission(provisional: true);
|
||||||
|
|
||||||
// For apple platforms, ensure the APNS token is available before making any FCM plugin API calls
|
// For apple platforms, ensure the APNS token is available before making any FCM plugin API calls
|
||||||
// final apnsToken = await FirebaseMessaging.instance.getAPNSToken();
|
if (Platform.isIOS) {
|
||||||
// if (apnsToken != null) {
|
final apnsToken = await FirebaseMessaging.instance.getAPNSToken();
|
||||||
|
if (apnsToken == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// APNS token is available, make FCM plugin API requests...
|
// APNS token is available, make FCM plugin API requests...
|
||||||
// }
|
|
||||||
|
|
||||||
FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
|
FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,57 +70,16 @@ Future<void> setupPushNotification() async {
|
||||||
AndroidInitializationSettings("ic_launcher_foreground");
|
AndroidInitializationSettings("ic_launcher_foreground");
|
||||||
|
|
||||||
final List<DarwinNotificationCategory> darwinNotificationCategories =
|
final List<DarwinNotificationCategory> darwinNotificationCategories =
|
||||||
<DarwinNotificationCategory>[
|
<DarwinNotificationCategory>[];
|
||||||
DarwinNotificationCategory(
|
|
||||||
darwinNotificationCategoryText,
|
|
||||||
actions: <DarwinNotificationAction>[
|
|
||||||
DarwinNotificationAction.text(
|
|
||||||
'text_1',
|
|
||||||
'Action 1',
|
|
||||||
buttonTitle: 'Send',
|
|
||||||
placeholder: 'Placeholder',
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
DarwinNotificationCategory(
|
|
||||||
darwinNotificationCategoryPlain,
|
|
||||||
actions: <DarwinNotificationAction>[
|
|
||||||
DarwinNotificationAction.plain('id_1', 'Action 1'),
|
|
||||||
DarwinNotificationAction.plain(
|
|
||||||
'id_2',
|
|
||||||
'Action 2 (destructive)',
|
|
||||||
options: <DarwinNotificationActionOption>{
|
|
||||||
DarwinNotificationActionOption.destructive,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
DarwinNotificationAction.plain(
|
|
||||||
navigationActionId,
|
|
||||||
'Action 3 (foreground)',
|
|
||||||
options: <DarwinNotificationActionOption>{
|
|
||||||
DarwinNotificationActionOption.foreground,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
DarwinNotificationAction.plain(
|
|
||||||
'id_4',
|
|
||||||
'Action 4 (auth required)',
|
|
||||||
options: <DarwinNotificationActionOption>{
|
|
||||||
DarwinNotificationActionOption.authenticationRequired,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
options: <DarwinNotificationCategoryOption>{
|
|
||||||
DarwinNotificationCategoryOption.hiddenPreviewShowTitle,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
];
|
|
||||||
|
|
||||||
/// Note: permissions aren't requested here just to demonstrate that can be
|
/// Note: permissions aren't requested here just to demonstrate that can be
|
||||||
/// done later
|
/// done later
|
||||||
final DarwinInitializationSettings initializationSettingsDarwin =
|
final DarwinInitializationSettings initializationSettingsDarwin =
|
||||||
DarwinInitializationSettings(
|
DarwinInitializationSettings(
|
||||||
requestAlertPermission: false,
|
requestAlertPermission: true,
|
||||||
requestBadgePermission: false,
|
requestBadgePermission: true,
|
||||||
requestSoundPermission: false,
|
requestSoundPermission: true,
|
||||||
|
requestProvisionalPermission: false,
|
||||||
notificationCategories: darwinNotificationCategories,
|
notificationCategories: darwinNotificationCategories,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -220,8 +179,12 @@ Future localPushNotificationNewMessage(
|
||||||
priority: Priority.max,
|
priority: Priority.max,
|
||||||
ticker: 'You got a new message.',
|
ticker: 'You got a new message.',
|
||||||
);
|
);
|
||||||
const NotificationDetails notificationDetails =
|
|
||||||
NotificationDetails(android: androidNotificationDetails);
|
const DarwinNotificationDetails darwinNotificationDetails =
|
||||||
|
DarwinNotificationDetails();
|
||||||
|
const NotificationDetails notificationDetails = NotificationDetails(
|
||||||
|
android: androidNotificationDetails, iOS: darwinNotificationDetails);
|
||||||
|
|
||||||
await flutterLocalNotificationsPlugin.show(
|
await flutterLocalNotificationsPlugin.show(
|
||||||
messageId,
|
messageId,
|
||||||
getContactDisplayName(user),
|
getContactDisplayName(user),
|
||||||
|
|
|
||||||
|
|
@ -129,11 +129,11 @@ class _SettingsMainViewState extends State<SettingsMainView> {
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
BetterListTile(
|
// BetterListTile(
|
||||||
icon: FontAwesomeIcons.bell,
|
// icon: FontAwesomeIcons.bell,
|
||||||
text: context.lang.settingsNotification,
|
// text: context.lang.settingsNotification,
|
||||||
onTap: () async {},
|
// onTap: () async {},
|
||||||
),
|
// ),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
BetterListTile(
|
BetterListTile(
|
||||||
icon: FontAwesomeIcons.circleQuestion,
|
icon: FontAwesomeIcons.circleQuestion,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ description: "Send pictures to friends in real time and be sure you are the only
|
||||||
# Prevent accidental publishing to pub.dev.
|
# Prevent accidental publishing to pub.dev.
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
version: 0.0.4+4
|
version: 0.0.5+5
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.6.0
|
sdk: ^3.6.0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue