我需要在我的初始控制器上显示一个视图,并在Firebase电子邮件验证期间通过UILabel启动应用程序时设置一个UILabel。
我遇到的问题是标签没有初始化,所以应用程序在这个过程中崩溃。我尝试过许多方法,但无法让它显示我的视图,并在打开动态链接时设置标签,即使应用程序已经打开。
场景代表
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
if let link = userActivity.webpageURL?.absoluteString
{
if
我已经为Firebase通知注册了应用程序,我已经实现了UNUserNotificationCenterDelegate。在应用程序运行时或在后台调用didReceive方法。
当我终止应用程序并发送通知时。调用willFinishLaunchingWithOptions和didFinishLaunchingWithOptions方法,但launchOptions对象为零,并且不包含任何.remoteNotificaiton键。
if launchOptions != nil {
logger.log("There is stuff in launch opti
在iOS 13之前,导航控制器和根视图是在AppDelegate中定义的。然而,在iOS 13中,苹果引入了SceneDelegate,它接管了这些视图功能的处理。但是,AppDelegate仍然处理诸如本地通知处理之类的事情。See this answer for some code that outlines these changes for root views. 如果我想在用户点击本地通知时推送视图,我会在AppDelegate中执行类似以下操作: extension AppDelegate: UNUserNotificationCenterDelegate {
var