diff --git a/ios/App/App/App.entitlements b/ios/App/App/App.entitlements index eeb23ac7a..df026f3ab 100644 --- a/ios/App/App/App.entitlements +++ b/ios/App/App/App.entitlements @@ -2,6 +2,8 @@ + aps-environment + development com.apple.security.application-groups group.gabinete diff --git a/ios/App/App/AppDelegate.swift b/ios/App/App/AppDelegate.swift index 0b80fba39..a30b0eeb3 100644 --- a/ios/App/App/AppDelegate.swift +++ b/ios/App/App/AppDelegate.swift @@ -1,6 +1,8 @@ import UIKit import Capacitor import SendIntent +import FirebaseCore +import Firebase @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { @@ -10,8 +12,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. + FirebaseApp.configure() + return true } + + func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. @@ -42,6 +48,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // Called when the application is about to terminate. // Save data if appropriate. See also applicationDidEnterBackground:. } + func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { + NotificationCenter.default.post(name: .capacitorDidRegisterForRemoteNotifications, object: deviceToken) + + Messaging.messaging().apnsToken = deviceToken + } + + func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { + NotificationCenter.default.post(name: .capacitorDidFailToRegisterForRemoteNotifications, object: error) + } func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { var success = true diff --git a/ios/App/App/Info.plist b/ios/App/App/Info.plist index 4854f5059..02e3d1d91 100644 --- a/ios/App/App/Info.plist +++ b/ios/App/App/Info.plist @@ -2,166 +2,93 @@ - CFBundleDevelopmentRegion - en - CFBundleDisplayName - Gabinete Digital - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleURLTypes - - - CFBundleTypeRole - Editor - CFBundleURLName - com.gpr.gabinetedigital.teste - CFBundleURLSchemes - - gabinetedigital - - - - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - LSApplicationCategoryType - - LSRequiresIPhoneOS - - NSCameraUsageDescription - This app requires access to the camera. - NSMicrophoneUsageDescription - This app does not require access to the microphone. - NSPhotoLibraryAddUsageDescription - This app requires access to the photo library. - NSPhotoLibraryUsageDescription - This app requires access to the photo library. - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - - - FirebaseAppDelegateProxyEnabled - - UNUserNotificationCenterDelegate - YourApp.NotificationDelegate - UIBackgroundModes - - remote-notification - + CFBundleDevelopmentRegion + en + CFBundleDisplayName + Gabinete Digital + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleURLTypes + + + CFBundleTypeRole + Editor + CFBundleURLName + com.gpr.gabinetedigital.teste + CFBundleURLSchemes + + gabinetedigital + + + + CFBundleTypeRole + Editor + CFBundleURLSchemes + + com.googleusercontent.apps.800733765231-5da370m1mntjk7cg8cc2d331sp8cj91d + + + + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + FirebaseAppDelegateProxyEnabled + + LSApplicationCategoryType + + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSCameraUsageDescription + This app requires access to the camera. + NSMicrophoneUsageDescription + This app does not require access to the microphone. + NSPhotoLibraryAddUsageDescription + This app requires access to the photo library. + NSPhotoLibraryUsageDescription + This app requires access to the photo library. + UIBackgroundModes + + processing + remote-notification + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + UNUserNotificationCenterDelegate + YourApp.NotificationDelegate - - - \ No newline at end of file