Skip to content

Commit

Permalink
fix otp not sent
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sidhdhi-p committed Jun 12, 2024
1 parent f19a0f0 commit bafb708
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
16 changes: 16 additions & 0 deletions khelo/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
import UIKit
import Flutter
import Firebase
import FirebaseAuth

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure()
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let firebaseAuth = Auth.auth()
firebaseAuth.setAPNSToken(deviceToken, type: AuthAPNSTokenType.sandbox)
}

override func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
let firebaseAuth = Auth.auth()
if (firebaseAuth.canHandleNotification(userInfo)){
print(userInfo)
return
}
}
}
6 changes: 6 additions & 0 deletions khelo/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<key>CFBundleURLSchemes</key>
<array>
<string>app-1-753506519474-ios-8cd38557e090c0b51e7cab</string>
<string>com.googleusercontent.apps.753506519474-6qolf71653023s197ur4ag97q2lvaf9r</string>
</array>
</dict>
</array>
Expand All @@ -45,6 +46,11 @@
<string>Select a profile image from your device's gallery to showcase your preferred photo in moments of your choice.</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand Down
2 changes: 1 addition & 1 deletion khelo/ios/Runner/RunnerRelease.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<string>unknown</string>
</dict>
</plist>
7 changes: 0 additions & 7 deletions khelo/macos/firebase_app_id_file.json

This file was deleted.

0 comments on commit bafb708

Please sign in to comment.