だから私のFirebaseプッシュ通知は、iOS上で動作していない(シミュレータ+私は、これはすでに理由かもしれないが、開発者アカウントを持っていない?)Firebaseプッシュ通知
私がやったこと:
-
私のプロジェクトのディレクトリに私のPodfile
- 追加GoogleService-Info.plistファイルへのGoogleのFirebase中アプリ(私はまだそれを持っていないので、私は指紋を追加していないと思います)
- 追加Firebase/FirebaseMessagingを作成し
- 私のアプリデリゲートにコードを次のような機能
- 追加で
- 追加キーホルダー共有:
ここに私のコードです:
import Firebase
import UserNotifcations
import Firebase
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
FIRApp.configure()
let center = UNUserNotificationCenter.current()
center.requestAuthorization(options: [.badge, .alert, .sound] {(granted, error) in}
application.registerForRemoteNotifications()
return true;
}
}
ミスは?私は何か見落としてますか?私は開発者アカウントを持っていないか、プッシュ通知を受信できないシミュレータですか?どんな助けもありがとう!