From b97952c667aab5bd1fe03dbc48ba0f910728ef43 Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 17 Nov 2026 13:56:57 -0800 Subject: [PATCH 1/2] chore: [SDK-5589] sign demos with enterprise team and sdkdemo IDs - iOS bundle IDs move to com.onesignal.sdkdemo (.NSE, .LA) and the group.com.onesignal.sdkdemo.onesignal app group in every demo. - Team DL8TF3X4K3; the e2e demo's Release configs sign with the in-house iPhone Distribution cert and ExportOptions uses enterprise, so BrowserStack can install the IPA without re-signing. Co-Authored-By: Claude Opus 5.5 --- examples/build-ios.md | 15 ++++-- ...lNotificationServiceExtension.entitlements | 2 +- .../ios/Runner.xcodeproj/project.pbxproj | 36 +++++++------- ...lNotificationServiceExtension.entitlements | 2 +- .../ios/Runner.xcodeproj/project.pbxproj | 36 +++++++------- ...lNotificationServiceExtension.entitlements | 2 +- .../ios/Runner.xcodeproj/project.pbxproj | 36 +++++++------- .../demo-pods/ios/Runner/Runner.entitlements | 2 +- examples/demo/README.md | 2 +- examples/demo/ios/ExportOptions.plist | 10 ++-- ...lNotificationServiceExtension.entitlements | 2 +- .../demo/ios/Runner.xcodeproj/project.pbxproj | 48 +++++++++---------- examples/demo/ios/Runner/Runner.entitlements | 2 +- 13 files changed, 100 insertions(+), 95 deletions(-) diff --git a/examples/build-ios.md b/examples/build-ios.md index baa0240c..775901f8 100644 --- a/examples/build-ios.md +++ b/examples/build-ios.md @@ -1,6 +1,6 @@ # iOS Setup: Push Notifications + Live Activities -Configure the demo Flutter iOS project (`com.onesignal.example`) for OneSignal push notifications and live activities. All paths below are relative to the `ios/` directory. +Configure the demo Flutter iOS project (`com.onesignal.sdkdemo`) for OneSignal push notifications and live activities. All paths below are relative to the `ios/` directory. --- @@ -53,7 +53,7 @@ Create `Runner/Runner.entitlements`: development com.apple.security.application-groups - group.com.onesignal.example.onesignal + group.com.onesignal.sdkdemo.onesignal @@ -159,7 +159,7 @@ The App Group must match the one in `Runner.entitlements`. com.apple.security.application-groups - group.com.onesignal.example.onesignal + group.com.onesignal.sdkdemo.onesignal @@ -385,17 +385,22 @@ The `project.pbxproj` needs native target entries for both extensions. These are **OneSignalNotificationServiceExtension target** (`com.apple.product-type.app-extension`): - Sources, Frameworks, Resources build phases -- `PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.NSE` (must be prefixed with parent app's bundle ID) +- `PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE` (must be prefixed with parent app's bundle ID) - `CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements` - `INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist` - `SKIP_INSTALL = YES`, `SWIFT_VERSION = 5.0`, `IPHONEOS_DEPLOYMENT_TARGET = 15.0` **OneSignalWidgetExtension target** (`com.apple.product-type.app-extension`): - Sources, Frameworks (linking WidgetKit.framework and SwiftUI.framework), Resources build phases -- `PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.LA` +- `PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA` - `INFOPLIST_FILE = OneSignalWidget/Info.plist` (note: folder is `OneSignalWidget`, not `OneSignalWidgetExtension`) - `SKIP_INSTALL = YES`, `SWIFT_VERSION = 5.0`, `IPHONEOS_DEPLOYMENT_TARGET = 16.2` (Live Activities require iOS 16.2+) +**Signing (all three targets):** +- `DEVELOPMENT_TEAM = DL8TF3X4K3` (OneSignal Enterprise team) +- Release: `CODE_SIGN_STYLE = Manual`, `"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"` (in-house cert), and `"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]"` set to the In House profiles `Appium Demo - Main`, `Appium Demo - NSE` and `Appium Demo - Live Activity` +- `ios/ExportOptions.plist` uses `method` `enterprise`, so BrowserStack can install the IPA without re-signing it + --- ## 6. Install dependencies diff --git a/examples/demo-no-location-pods/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements b/examples/demo-no-location-pods/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements index c70461e8..68ed0e50 100644 --- a/examples/demo-no-location-pods/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements +++ b/examples/demo-no-location-pods/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements @@ -4,7 +4,7 @@ com.apple.security.application-groups - group.com.onesignal.example.onesignal + group.com.onesignal.sdkdemo.onesignal diff --git a/examples/demo-no-location-pods/ios/Runner.xcodeproj/project.pbxproj b/examples/demo-no-location-pods/ios/Runner.xcodeproj/project.pbxproj index 7fd82bd8..952d5386 100644 --- a/examples/demo-no-location-pods/ios/Runner.xcodeproj/project.pbxproj +++ b/examples/demo-no-location-pods/ios/Runner.xcodeproj/project.pbxproj @@ -590,7 +590,7 @@ CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; @@ -600,7 +600,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.NSE; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -670,14 +670,14 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -695,7 +695,7 @@ CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; @@ -705,7 +705,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.NSE; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -834,14 +834,14 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -858,14 +858,14 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -882,7 +882,7 @@ CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = OneSignalWidget/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 16.2; @@ -892,7 +892,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.LA; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -912,7 +912,7 @@ CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; @@ -922,7 +922,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.NSE; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -940,7 +940,7 @@ CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = OneSignalWidget/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 16.2; @@ -950,7 +950,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.LA; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -970,7 +970,7 @@ CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = OneSignalWidget/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 16.2; @@ -980,7 +980,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.LA; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; diff --git a/examples/demo-no-location/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements b/examples/demo-no-location/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements index c70461e8..68ed0e50 100644 --- a/examples/demo-no-location/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements +++ b/examples/demo-no-location/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements @@ -4,7 +4,7 @@ com.apple.security.application-groups - group.com.onesignal.example.onesignal + group.com.onesignal.sdkdemo.onesignal diff --git a/examples/demo-no-location/ios/Runner.xcodeproj/project.pbxproj b/examples/demo-no-location/ios/Runner.xcodeproj/project.pbxproj index 34377bed..5b0f4e4f 100644 --- a/examples/demo-no-location/ios/Runner.xcodeproj/project.pbxproj +++ b/examples/demo-no-location/ios/Runner.xcodeproj/project.pbxproj @@ -535,14 +535,14 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -558,7 +558,7 @@ CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = OneSignalWidget/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 16.2; @@ -568,7 +568,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.LA; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -587,7 +587,7 @@ CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; @@ -597,7 +597,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.NSE; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -615,7 +615,7 @@ CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = OneSignalWidget/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 16.2; @@ -625,7 +625,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.LA; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -755,14 +755,14 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -779,14 +779,14 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -803,7 +803,7 @@ CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; @@ -813,7 +813,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.NSE; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -831,7 +831,7 @@ CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = OneSignalWidget/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 16.2; @@ -841,7 +841,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.LA; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -861,7 +861,7 @@ CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; @@ -871,7 +871,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.NSE; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; diff --git a/examples/demo-pods/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements b/examples/demo-pods/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements index c70461e8..68ed0e50 100644 --- a/examples/demo-pods/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements +++ b/examples/demo-pods/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements @@ -4,7 +4,7 @@ com.apple.security.application-groups - group.com.onesignal.example.onesignal + group.com.onesignal.sdkdemo.onesignal diff --git a/examples/demo-pods/ios/Runner.xcodeproj/project.pbxproj b/examples/demo-pods/ios/Runner.xcodeproj/project.pbxproj index 1a487d80..8fabe253 100644 --- a/examples/demo-pods/ios/Runner.xcodeproj/project.pbxproj +++ b/examples/demo-pods/ios/Runner.xcodeproj/project.pbxproj @@ -627,14 +627,14 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -761,14 +761,14 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -785,14 +785,14 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -813,7 +813,7 @@ CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; @@ -826,7 +826,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.NSE; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; @@ -850,7 +850,7 @@ CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; @@ -863,7 +863,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.NSE; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; @@ -885,7 +885,7 @@ CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; @@ -898,7 +898,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.NSE; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; @@ -921,7 +921,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = OneSignalWidget/Info.plist; @@ -934,7 +934,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.LA; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; @@ -959,7 +959,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = OneSignalWidget/Info.plist; @@ -972,7 +972,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.LA; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; @@ -995,7 +995,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = OneSignalWidget/Info.plist; @@ -1008,7 +1008,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.LA; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; diff --git a/examples/demo-pods/ios/Runner/Runner.entitlements b/examples/demo-pods/ios/Runner/Runner.entitlements index 34463649..6a1199ae 100644 --- a/examples/demo-pods/ios/Runner/Runner.entitlements +++ b/examples/demo-pods/ios/Runner/Runner.entitlements @@ -6,7 +6,7 @@ development com.apple.security.application-groups - group.com.onesignal.example.onesignal + group.com.onesignal.sdkdemo.onesignal diff --git a/examples/demo/README.md b/examples/demo/README.md index 888c257c..a5ed6395 100644 --- a/examples/demo/README.md +++ b/examples/demo/README.md @@ -28,7 +28,7 @@ ONESIGNAL_ANDROID_CHANNEL_ID= - `ONESIGNAL_API_KEY`: REST API key, used to update and end live activities. Sending notifications from the demo doesn't need it. - `ONESIGNAL_ANDROID_CHANNEL_ID`: optional Android notification channel for the sound test notification. Falls back to a built-in default channel. -The OneSignal app needs FCM credentials for the `com.onesignal.sdkdemo` Android package and APNs credentials for the `com.onesignal.example` bundle ID on iOS. +The OneSignal app needs FCM credentials for the `com.onesignal.sdkdemo` Android package and APNs credentials for the `com.onesignal.sdkdemo` bundle ID on iOS. Then fetch dependencies: diff --git a/examples/demo/ios/ExportOptions.plist b/examples/demo/ios/ExportOptions.plist index 935873e2..29c5b97c 100644 --- a/examples/demo/ios/ExportOptions.plist +++ b/examples/demo/ios/ExportOptions.plist @@ -3,20 +3,20 @@ method - development + enterprise teamID - 99SW8E36CT + DL8TF3X4K3 signingStyle manual stripSwiftSymbols provisioningProfiles - com.onesignal.example + com.onesignal.sdkdemo Appium Demo - Main - com.onesignal.example.NSE + com.onesignal.sdkdemo.NSE Appium Demo - NSE - com.onesignal.example.LA + com.onesignal.sdkdemo.LA Appium Demo - Live Activity diff --git a/examples/demo/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements b/examples/demo/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements index c70461e8..68ed0e50 100644 --- a/examples/demo/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements +++ b/examples/demo/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements @@ -4,7 +4,7 @@ com.apple.security.application-groups - group.com.onesignal.example.onesignal + group.com.onesignal.sdkdemo.onesignal diff --git a/examples/demo/ios/Runner.xcodeproj/project.pbxproj b/examples/demo/ios/Runner.xcodeproj/project.pbxproj index 1382c438..44dc8145 100644 --- a/examples/demo/ios/Runner.xcodeproj/project.pbxproj +++ b/examples/demo/ios/Runner.xcodeproj/project.pbxproj @@ -525,14 +525,14 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -626,7 +626,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; @@ -661,14 +661,14 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -685,18 +685,18 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 99SW8E36CT; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = DL8TF3X4K3; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "Appium Demo - Main"; "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Appium Demo - Main"; @@ -718,7 +718,7 @@ CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; @@ -735,7 +735,7 @@ MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.NSE; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; STRING_CATALOG_GENERATE_SYMBOLS = YES; @@ -759,11 +759,11 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = DL8TF3X4K3; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; @@ -779,7 +779,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.NSE; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "Appium Demo - NSE"; "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Appium Demo - NSE"; @@ -805,7 +805,7 @@ CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; @@ -821,7 +821,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.NSE; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; STRING_CATALOG_GENERATE_SYMBOLS = YES; @@ -847,7 +847,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; @@ -864,7 +864,7 @@ MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.LA; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; STRING_CATALOG_GENERATE_SYMBOLS = YES; @@ -890,10 +890,10 @@ CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; @@ -909,7 +909,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.LA; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "Appium Demo - Live Activity"; SKIP_INSTALL = YES; @@ -936,7 +936,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; + DEVELOPMENT_TEAM = DL8TF3X4K3; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; @@ -952,7 +952,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.LA; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; STRING_CATALOG_GENERATE_SYMBOLS = YES; diff --git a/examples/demo/ios/Runner/Runner.entitlements b/examples/demo/ios/Runner/Runner.entitlements index 34463649..6a1199ae 100644 --- a/examples/demo/ios/Runner/Runner.entitlements +++ b/examples/demo/ios/Runner/Runner.entitlements @@ -6,7 +6,7 @@ development com.apple.security.application-groups - group.com.onesignal.example.onesignal + group.com.onesignal.sdkdemo.onesignal From 745036587a7802deb231c648285b33978e8ad311 Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 17 Nov 2026 14:03:28 -0800 Subject: [PATCH 2/2] feat: [SDK-5589] demo button grid, top-anchored dialogs, shorter labels - ButtonGrid lays out section buttons two per row; an odd last button spans, hidden buttons reflow. - Dialogs anchor at the top below the safe area instead of centering. - Shorter labels (ADD TAGS/ALIASES/TRIGGERS, CLEAR ALL, START/END ACTIVITY, CHECK LOCATION); outlined button labels scale down to fit. Co-Authored-By: Claude Opus 5.5 --- examples/demo/lib/theme.dart | 3 + examples/demo/lib/widgets/action_button.dart | 30 ++++- examples/demo/lib/widgets/dialogs.dart | 20 ++-- .../lib/widgets/sections/aliases_section.dart | 79 +++++++------ .../sections/live_activities_section.dart | 42 +++---- .../widgets/sections/location_section.dart | 33 +++--- .../widgets/sections/send_iam_section.dart | 23 ++-- .../widgets/sections/send_push_section.dart | 73 ++++++------ .../lib/widgets/sections/tags_section.dart | 108 ++++++++--------- .../widgets/sections/triggers_section.dart | 111 +++++++++--------- .../lib/widgets/sections/user_section.dart | 55 +++++---- 11 files changed, 308 insertions(+), 269 deletions(-) diff --git a/examples/demo/lib/theme.dart b/examples/demo/lib/theme.dart index 5ff97b8e..ab3491fe 100644 --- a/examples/demo/lib/theme.dart +++ b/examples/demo/lib/theme.dart @@ -75,8 +75,11 @@ class AppTheme { disabledForegroundColor: AppColors.osGrey500, ), ), + // Top-anchored: a dialog that moves while open desyncs XCUITest frame + // reporting from the rendered layout. dialogTheme: const DialogThemeData( backgroundColor: Colors.white, + alignment: Alignment.topCenter, ), dividerColor: AppColors.osDivider, inputDecorationTheme: InputDecorationTheme( diff --git a/examples/demo/lib/widgets/action_button.dart b/examples/demo/lib/widgets/action_button.dart index 5bfdcaed..1a7f6bf7 100644 --- a/examples/demo/lib/widgets/action_button.dart +++ b/examples/demo/lib/widgets/action_button.dart @@ -73,7 +73,7 @@ class DestructiveButton extends StatelessWidget { foregroundColor: AppColors.osPrimary, side: const BorderSide(color: AppColors.osPrimary), ), - child: Text(label), + child: FittedBox(fit: BoxFit.scaleDown, child: Text(label)), ), ); if (semanticsLabel != null) { @@ -82,3 +82,31 @@ class DestructiveButton extends StatelessWidget { return button; } } + +/// Lays out buttons two per row in equal columns; an odd last button spans +/// both. Callers omit hidden buttons from [children] so the rest reflow. +class ButtonGrid extends StatelessWidget { + final List children; + + const ButtonGrid({super.key, required this.children}); + + @override + Widget build(BuildContext context) { + return Column( + spacing: AppSpacing.gap, + children: [ + for (var i = 0; i < children.length; i += 2) + if (i == children.length - 1) + children[i] + else + Row( + spacing: AppSpacing.gap, + children: [ + Expanded(child: children[i]), + Expanded(child: children[i + 1]), + ], + ), + ], + ); + } +} diff --git a/examples/demo/lib/widgets/dialogs.dart b/examples/demo/lib/widgets/dialogs.dart index 10ad3233..78bcc7e7 100644 --- a/examples/demo/lib/widgets/dialogs.dart +++ b/examples/demo/lib/widgets/dialogs.dart @@ -6,6 +6,10 @@ import '../services/tooltip_helper.dart'; import '../theme.dart'; import 'app_text_field.dart'; +/// Dialog doesn't apply the top safe area, so top-anchored dialogs add it. +EdgeInsets dialogInsets(BuildContext context) => + EdgeInsets.fromLTRB(16, MediaQuery.paddingOf(context).top + 24, 16, 24); + // Single input dialog (login, email, sms) class SingleInputDialog extends StatefulWidget { final String title; @@ -39,7 +43,7 @@ class _SingleInputDialogState extends State { @override Widget build(BuildContext context) { return AlertDialog( - insetPadding: const EdgeInsets.symmetric(horizontal: 16), + insetPadding: dialogInsets(context), title: Text(widget.title), content: SizedBox( width: double.maxFinite, @@ -113,7 +117,7 @@ class _PairInputDialogState extends State { @override Widget build(BuildContext context) { return AlertDialog( - insetPadding: const EdgeInsets.symmetric(horizontal: 16), + insetPadding: dialogInsets(context), title: Text(widget.title), content: SizedBox( width: double.maxFinite, @@ -238,7 +242,7 @@ class _MultiPairInputDialogState extends State { @override Widget build(BuildContext context) { return AlertDialog( - insetPadding: const EdgeInsets.symmetric(horizontal: 16), + insetPadding: dialogInsets(context), title: Text(widget.title), content: SizedBox( width: double.maxFinite, @@ -349,7 +353,7 @@ class _MultiSelectRemoveDialogState extends State { @override Widget build(BuildContext context) { return AlertDialog( - insetPadding: const EdgeInsets.symmetric(horizontal: 16), + insetPadding: dialogInsets(context), title: Text(widget.title), content: SizedBox( width: double.maxFinite, @@ -434,7 +438,7 @@ class _OutcomeDialogState extends State { @override Widget build(BuildContext context) { return AlertDialog( - insetPadding: const EdgeInsets.symmetric(horizontal: 16), + insetPadding: dialogInsets(context), title: const Text('Send Outcome'), content: SizedBox( width: double.maxFinite, @@ -580,7 +584,7 @@ class _TrackEventDialogState extends State { @override Widget build(BuildContext context) { return AlertDialog( - insetPadding: const EdgeInsets.symmetric(horizontal: 16), + insetPadding: dialogInsets(context), title: const Text('Custom Event'), content: SizedBox( width: double.maxFinite, @@ -672,7 +676,7 @@ class _CustomNotificationDialogState extends State { @override Widget build(BuildContext context) { return AlertDialog( - insetPadding: const EdgeInsets.symmetric(horizontal: 16), + insetPadding: dialogInsets(context), title: const Text('Custom Notification'), content: SizedBox( width: double.maxFinite, @@ -721,7 +725,7 @@ class TooltipDialog extends StatelessWidget { @override Widget build(BuildContext context) { return AlertDialog( - insetPadding: const EdgeInsets.symmetric(horizontal: 16), + insetPadding: dialogInsets(context), title: Semantics( identifier: 'tooltip_title', container: true, diff --git a/examples/demo/lib/widgets/sections/aliases_section.dart b/examples/demo/lib/widgets/sections/aliases_section.dart index 9f0eb2ba..83fa2c01 100644 --- a/examples/demo/lib/widgets/sections/aliases_section.dart +++ b/examples/demo/lib/widgets/sections/aliases_section.dart @@ -36,44 +36,47 @@ class AliasesSection extends StatelessWidget { ), ), AppSpacing.gapBox, - PrimaryButton( - label: 'ADD ALIAS', - semanticsLabel: 'add_alias_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: - (_) => const PairInputDialog( - title: 'Add Alias', - keyLabel: 'Label', - valueLabel: 'ID', - keySemanticsLabel: 'alias_label_input', - valueSemanticsLabel: 'alias_id_input', - ), - ); - if (result != null) { - vm.addAlias(result.key, result.value); - } - }, - ), - AppSpacing.gapBox, - PrimaryButton( - label: 'ADD MULTIPLE ALIASES', - semanticsLabel: 'add_multiple_aliases_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: - (_) => const MultiPairInputDialog( - title: 'Add Multiple Aliases', - keyLabel: 'Label', - valueLabel: 'ID', - ), - ); - if (result != null) { - vm.addAliases(result); - } - }, + ButtonGrid( + children: [ + PrimaryButton( + label: 'ADD ALIAS', + semanticsLabel: 'add_alias_button', + onPressed: () async { + final result = await showDialog>( + context: context, + builder: + (_) => const PairInputDialog( + title: 'Add Alias', + keyLabel: 'Label', + valueLabel: 'ID', + keySemanticsLabel: 'alias_label_input', + valueSemanticsLabel: 'alias_id_input', + ), + ); + if (result != null) { + vm.addAlias(result.key, result.value); + } + }, + ), + PrimaryButton( + label: 'ADD ALIASES', + semanticsLabel: 'add_multiple_aliases_button', + onPressed: () async { + final result = await showDialog>( + context: context, + builder: + (_) => const MultiPairInputDialog( + title: 'Add Multiple Aliases', + keyLabel: 'Label', + valueLabel: 'ID', + ), + ); + if (result != null) { + vm.addAliases(result); + } + }, + ), + ], ), ], ), diff --git a/examples/demo/lib/widgets/sections/live_activities_section.dart b/examples/demo/lib/widgets/sections/live_activities_section.dart index 2a267b80..a5ac7eee 100644 --- a/examples/demo/lib/widgets/sections/live_activities_section.dart +++ b/examples/demo/lib/widgets/sections/live_activities_section.dart @@ -71,26 +71,28 @@ class _LiveActivitiesSectionState extends State { ), ), AppSpacing.gapBox, - PrimaryButton( - label: 'START LIVE ACTIVITY', - semanticsLabel: 'start_live_activity_button', - onPressed: activityEmpty ? null : () => vm.startLiveActivity(), - ), - AppSpacing.gapBox, - PrimaryButton( - label: 'UPDATE → ${vm.nextStatusLabel}', - semanticsLabel: 'update_live_activity_button', - onPressed: activityEmpty || vm.isLaUpdating || !vm.hasApiKey - ? null - : () => vm.updateLiveActivity(), - ), - AppSpacing.gapBox, - DestructiveButton( - label: 'END LIVE ACTIVITY', - semanticsLabel: 'end_live_activity_button', - onPressed: activityEmpty || !vm.hasApiKey - ? null - : () => vm.endLiveActivity(), + ButtonGrid( + children: [ + PrimaryButton( + label: 'START ACTIVITY', + semanticsLabel: 'start_live_activity_button', + onPressed: activityEmpty ? null : () => vm.startLiveActivity(), + ), + PrimaryButton( + label: 'UPDATE → ${vm.nextStatusLabel}', + semanticsLabel: 'update_live_activity_button', + onPressed: activityEmpty || vm.isLaUpdating || !vm.hasApiKey + ? null + : () => vm.updateLiveActivity(), + ), + DestructiveButton( + label: 'END ACTIVITY', + semanticsLabel: 'end_live_activity_button', + onPressed: activityEmpty || !vm.hasApiKey + ? null + : () => vm.endLiveActivity(), + ), + ], ), ], ), diff --git a/examples/demo/lib/widgets/sections/location_section.dart b/examples/demo/lib/widgets/sections/location_section.dart index 82607c4e..74999f76 100644 --- a/examples/demo/lib/widgets/sections/location_section.dart +++ b/examples/demo/lib/widgets/sections/location_section.dart @@ -36,21 +36,24 @@ class LocationSection extends StatelessWidget { ), ), AppSpacing.gapBox, - PrimaryButton( - label: 'PROMPT LOCATION', - semanticsLabel: 'prompt_location_button', - onPressed: vm.promptLocation, - ), - AppSpacing.gapBox, - PrimaryButton( - label: 'CHECK LOCATION SHARED', - semanticsLabel: 'check_location_button', - onPressed: () async { - final shared = await vm.checkLocationShared(); - if (context.mounted) { - context.showSnackBar('Location shared: $shared'); - } - }, + ButtonGrid( + children: [ + PrimaryButton( + label: 'PROMPT LOCATION', + semanticsLabel: 'prompt_location_button', + onPressed: vm.promptLocation, + ), + PrimaryButton( + label: 'CHECK LOCATION', + semanticsLabel: 'check_location_button', + onPressed: () async { + final shared = await vm.checkLocationShared(); + if (context.mounted) { + context.showSnackBar('Location shared: $shared'); + } + }, + ), + ], ), ], ), diff --git a/examples/demo/lib/widgets/sections/send_iam_section.dart b/examples/demo/lib/widgets/sections/send_iam_section.dart index 29246e7d..3f2e66c0 100644 --- a/examples/demo/lib/widgets/sections/send_iam_section.dart +++ b/examples/demo/lib/widgets/sections/send_iam_section.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../../models/in_app_message_type.dart'; -import '../../theme.dart'; import '../../viewmodels/app_viewmodel.dart'; import '../action_button.dart'; import '../section_card.dart'; @@ -21,22 +20,14 @@ class SendIamSection extends StatelessWidget { title: 'Send In-App Message', sectionKey: 'send_iam', onInfoTap: onInfoTap, - child: Column( - spacing: AppSpacing.gap, + child: ButtonGrid( children: [ - for (var i = 0; i < types.length; i += 2) - Row( - spacing: AppSpacing.gap, - children: types.sublist(i, i + 2).map((type) { - return Expanded( - child: PrimaryButton( - label: type.label.toUpperCase(), - onPressed: () => vm.sendInAppMessage(type), - semanticsLabel: 'send_iam_${type.triggerValue}_button', - padding: const EdgeInsets.symmetric(horizontal: 8), - ), - ); - }).toList(), + for (final type in types) + PrimaryButton( + label: type.label.toUpperCase(), + onPressed: () => vm.sendInAppMessage(type), + semanticsLabel: 'send_iam_${type.triggerValue}_button', + padding: const EdgeInsets.symmetric(horizontal: 8), ), ], ), diff --git a/examples/demo/lib/widgets/sections/send_push_section.dart b/examples/demo/lib/widgets/sections/send_push_section.dart index 3ea7a965..e07600d8 100644 --- a/examples/demo/lib/widgets/sections/send_push_section.dart +++ b/examples/demo/lib/widgets/sections/send_push_section.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../../models/notification_type.dart'; -import '../../theme.dart'; import '../../viewmodels/app_viewmodel.dart'; import '../action_button.dart'; import '../dialogs.dart'; @@ -23,42 +22,42 @@ class SendPushSection extends StatelessWidget { onInfoTap: onInfoTap, child: Column( children: [ - PrimaryButton( - label: 'SIMPLE', - semanticsLabel: 'send_simple_button', - onPressed: () => vm.sendNotification(NotificationType.simple), - ), - AppSpacing.gapBox, - PrimaryButton( - label: 'WITH IMAGE', - semanticsLabel: 'send_image_button', - onPressed: () => vm.sendNotification(NotificationType.withImage), - ), - AppSpacing.gapBox, - PrimaryButton( - label: 'WITH SOUND', - semanticsLabel: 'send_sound_button', - onPressed: () => vm.sendNotification(NotificationType.withSound), - ), - AppSpacing.gapBox, - PrimaryButton( - label: 'CUSTOM', - semanticsLabel: 'send_custom_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: (_) => const CustomNotificationDialog(), - ); - if (result != null) { - vm.sendCustomNotification(result['title']!, result['body']!); - } - }, - ), - AppSpacing.gapBox, - DestructiveButton( - label: 'CLEAR ALL', - semanticsLabel: 'clear_all_button', - onPressed: vm.clearAllNotifications, + ButtonGrid( + children: [ + PrimaryButton( + label: 'SIMPLE', + semanticsLabel: 'send_simple_button', + onPressed: () => vm.sendNotification(NotificationType.simple), + ), + PrimaryButton( + label: 'WITH IMAGE', + semanticsLabel: 'send_image_button', + onPressed: () => vm.sendNotification(NotificationType.withImage), + ), + PrimaryButton( + label: 'WITH SOUND', + semanticsLabel: 'send_sound_button', + onPressed: () => vm.sendNotification(NotificationType.withSound), + ), + PrimaryButton( + label: 'CUSTOM', + semanticsLabel: 'send_custom_button', + onPressed: () async { + final result = await showDialog>( + context: context, + builder: (_) => const CustomNotificationDialog(), + ); + if (result != null) { + vm.sendCustomNotification(result['title']!, result['body']!); + } + }, + ), + DestructiveButton( + label: 'CLEAR ALL', + semanticsLabel: 'clear_all_button', + onPressed: vm.clearAllNotifications, + ), + ], ), ], ), diff --git a/examples/demo/lib/widgets/sections/tags_section.dart b/examples/demo/lib/widgets/sections/tags_section.dart index 041aa3d6..8bf65efb 100644 --- a/examples/demo/lib/widgets/sections/tags_section.dart +++ b/examples/demo/lib/widgets/sections/tags_section.dart @@ -37,60 +37,62 @@ class TagsSection extends StatelessWidget { ), ), AppSpacing.gapBox, - PrimaryButton( - label: 'ADD TAG', - semanticsLabel: 'add_tag_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: - (_) => const PairInputDialog( - title: 'Add Tag', - keySemanticsLabel: 'tag_key_input', - valueSemanticsLabel: 'tag_value_input', - ), - ); - if (result != null) { - vm.addTag(result.key, result.value); - } - }, - ), - AppSpacing.gapBox, - PrimaryButton( - label: 'ADD MULTIPLE TAGS', - semanticsLabel: 'add_multiple_tags_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: - (_) => - const MultiPairInputDialog(title: 'Add Multiple Tags'), - ); - if (result != null) { - vm.addTags(result); - } - }, + ButtonGrid( + children: [ + PrimaryButton( + label: 'ADD TAG', + semanticsLabel: 'add_tag_button', + onPressed: () async { + final result = await showDialog>( + context: context, + builder: + (_) => const PairInputDialog( + title: 'Add Tag', + keySemanticsLabel: 'tag_key_input', + valueSemanticsLabel: 'tag_value_input', + ), + ); + if (result != null) { + vm.addTag(result.key, result.value); + } + }, + ), + PrimaryButton( + label: 'ADD TAGS', + semanticsLabel: 'add_multiple_tags_button', + onPressed: () async { + final result = await showDialog>( + context: context, + builder: + (_) => + const MultiPairInputDialog(title: 'Add Multiple Tags'), + ); + if (result != null) { + vm.addTags(result); + } + }, + ), + if (vm.tagsList.isNotEmpty) ...[ + DestructiveButton( + label: 'REMOVE TAGS', + semanticsLabel: 'remove_tags_button', + onPressed: () async { + final result = await showDialog>( + context: context, + builder: + (_) => MultiSelectRemoveDialog( + title: 'Remove Tags', + items: vm.tagsList, + ), + ); + if (result != null) { + vm.removeSelectedTags(result); + } + }, + ), + ], + ], ), - if (vm.tagsList.isNotEmpty) ...[ - AppSpacing.gapBox, - DestructiveButton( - label: 'REMOVE TAGS', - semanticsLabel: 'remove_tags_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: - (_) => MultiSelectRemoveDialog( - title: 'Remove Tags', - items: vm.tagsList, - ), - ); - if (result != null) { - vm.removeSelectedTags(result); - } - }, - ), - ], ], ), ); diff --git a/examples/demo/lib/widgets/sections/triggers_section.dart b/examples/demo/lib/widgets/sections/triggers_section.dart index 7f650ae8..761a408a 100644 --- a/examples/demo/lib/widgets/sections/triggers_section.dart +++ b/examples/demo/lib/widgets/sections/triggers_section.dart @@ -36,64 +36,65 @@ class TriggersSection extends StatelessWidget { ), ), AppSpacing.gapBox, - PrimaryButton( - label: 'ADD TRIGGER', - semanticsLabel: 'add_trigger_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: (_) => const PairInputDialog( - title: 'Add Trigger', - keySemanticsLabel: 'trigger_key_input', - valueSemanticsLabel: 'trigger_value_input', + ButtonGrid( + children: [ + PrimaryButton( + label: 'ADD TRIGGER', + semanticsLabel: 'add_trigger_button', + onPressed: () async { + final result = await showDialog>( + context: context, + builder: (_) => const PairInputDialog( + title: 'Add Trigger', + keySemanticsLabel: 'trigger_key_input', + valueSemanticsLabel: 'trigger_value_input', + ), + ); + if (result != null) { + vm.addTrigger(result.key, result.value); + } + }, + ), + PrimaryButton( + label: 'ADD TRIGGERS', + semanticsLabel: 'add_multiple_triggers_button', + onPressed: () async { + final result = await showDialog>( + context: context, + builder: (_) => const MultiPairInputDialog( + title: 'Add Multiple Triggers', + ), + ); + if (result != null) { + vm.addTriggers(result); + } + }, + ), + if (vm.triggersList.isNotEmpty) ...[ + DestructiveButton( + label: 'REMOVE TRIGGERS', + semanticsLabel: 'remove_triggers_button', + onPressed: () async { + final result = await showDialog>( + context: context, + builder: (_) => MultiSelectRemoveDialog( + title: 'Remove Triggers', + items: vm.triggersList, + ), + ); + if (result != null) { + vm.removeSelectedTriggers(result); + } + }, ), - ); - if (result != null) { - vm.addTrigger(result.key, result.value); - } - }, - ), - AppSpacing.gapBox, - PrimaryButton( - label: 'ADD MULTIPLE TRIGGERS', - semanticsLabel: 'add_multiple_triggers_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: (_) => const MultiPairInputDialog( - title: 'Add Multiple Triggers', + DestructiveButton( + label: 'CLEAR ALL', + semanticsLabel: 'clear_triggers_button', + onPressed: vm.clearAllTriggers, ), - ); - if (result != null) { - vm.addTriggers(result); - } - }, + ], + ], ), - if (vm.triggersList.isNotEmpty) ...[ - AppSpacing.gapBox, - DestructiveButton( - label: 'REMOVE TRIGGERS', - semanticsLabel: 'remove_triggers_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: (_) => MultiSelectRemoveDialog( - title: 'Remove Triggers', - items: vm.triggersList, - ), - ); - if (result != null) { - vm.removeSelectedTriggers(result); - } - }, - ), - AppSpacing.gapBox, - DestructiveButton( - label: 'CLEAR ALL TRIGGERS', - semanticsLabel: 'clear_triggers_button', - onPressed: vm.clearAllTriggers, - ), - ], ], ), ); diff --git a/examples/demo/lib/widgets/sections/user_section.dart b/examples/demo/lib/widgets/sections/user_section.dart index 8e1a23b3..f9799742 100644 --- a/examples/demo/lib/widgets/sections/user_section.dart +++ b/examples/demo/lib/widgets/sections/user_section.dart @@ -152,34 +152,37 @@ class UserSection extends StatelessWidget { ), ), AppSpacing.gapBox, - PrimaryButton( - label: vm.isLoggedIn ? 'SWITCH USER' : 'LOGIN USER', - semanticsLabel: 'login_user_button', - onPressed: () async { - final result = await showDialog( - context: context, - builder: (_) => const SingleInputDialog( - title: 'Login User', - fieldLabel: 'External User Id', - confirmLabel: 'Login', - semanticsLabel: 'login_user_id_input', + ButtonGrid( + children: [ + PrimaryButton( + label: vm.isLoggedIn ? 'SWITCH USER' : 'LOGIN USER', + semanticsLabel: 'login_user_button', + onPressed: () async { + final result = await showDialog( + context: context, + builder: (_) => const SingleInputDialog( + title: 'Login User', + fieldLabel: 'External User Id', + confirmLabel: 'Login', + semanticsLabel: 'login_user_id_input', + ), + ); + if (result != null && context.mounted) { + await vm.loginUser(result); + } + }, + ), + if (vm.isLoggedIn) ...[ + DestructiveButton( + label: 'LOGOUT USER', + semanticsLabel: 'logout_user_button', + onPressed: () async { + await vm.logoutUser(); + }, ), - ); - if (result != null && context.mounted) { - await vm.loginUser(result); - } - }, + ], + ], ), - if (vm.isLoggedIn) ...[ - AppSpacing.gapBox, - DestructiveButton( - label: 'LOGOUT USER', - semanticsLabel: 'logout_user_button', - onPressed: () async { - await vm.logoutUser(); - }, - ), - ], ], ), );