version bump
This commit is contained in:
@@ -433,7 +433,7 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.stream.flutter.Notifications;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.flutter.Notifications;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
@@ -460,7 +460,7 @@
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.3;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.stream.flutter.Notifications;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.flutter.Notifications;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
@@ -485,7 +485,7 @@
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.3;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.stream.flutter.Notifications;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.flutter.Notifications;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
@@ -568,7 +568,7 @@
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.stream.flutter;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.flutter;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
@@ -709,7 +709,7 @@
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.stream.flutter;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.flutter;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
@@ -743,7 +743,7 @@
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.stream.flutter;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.flutter;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
|
||||
+17
-15
@@ -17,7 +17,7 @@ void showLocalNotification(Message message, ChannelModel channel) async {
|
||||
initializationSettingsIOS,
|
||||
);
|
||||
await flutterLocalNotificationsPlugin.initialize(initializationSettings);
|
||||
flutterLocalNotificationsPlugin.show(
|
||||
await flutterLocalNotificationsPlugin.show(
|
||||
message.id.hashCode,
|
||||
'${message.user.name} @ ${channel.name}',
|
||||
message.text,
|
||||
@@ -37,8 +37,6 @@ void showLocalNotification(Message message, ChannelModel channel) async {
|
||||
Future backgroundHandler(Map<String, dynamic> notification) async {
|
||||
final messageId = notification['data']['message_id'];
|
||||
|
||||
print('messageId: ${messageId}');
|
||||
|
||||
final notificationData =
|
||||
await NotificationService.getAndStoreMessage(messageId);
|
||||
|
||||
@@ -48,18 +46,7 @@ Future backgroundHandler(Map<String, dynamic> notification) async {
|
||||
);
|
||||
}
|
||||
|
||||
void main() async {
|
||||
final client = Client(
|
||||
's2dxdhpxd94g',
|
||||
logLevel: Level.INFO,
|
||||
showFakeNotification: Platform.isAndroid ? showLocalNotification : null,
|
||||
);
|
||||
|
||||
await client.setUser(
|
||||
User(id: 'user1'),
|
||||
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidXNlcjEifQ.NGZPyPMx7KSVisJmh4tJhOIv7ZjCaMQpOh4gTINvCaU',
|
||||
);
|
||||
|
||||
void _initNotifications(Client client) {
|
||||
final connector = createPushConnector();
|
||||
connector.configure(
|
||||
onBackgroundMessage: backgroundHandler,
|
||||
@@ -74,6 +61,21 @@ void main() async {
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void main() async {
|
||||
final client = Client(
|
||||
's2dxdhpxd94g',
|
||||
logLevel: Level.INFO,
|
||||
showLocalNotification: Platform.isAndroid ? showLocalNotification : null,
|
||||
);
|
||||
|
||||
await client.setUser(
|
||||
User(id: 'user1'),
|
||||
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidXNlcjEifQ.NGZPyPMx7KSVisJmh4tJhOIv7ZjCaMQpOh4gTINvCaU',
|
||||
);
|
||||
|
||||
_initNotifications(client);
|
||||
|
||||
runApp(MyApp(client));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user