w***@163.com
w***@163.com
  • 发布:2026-04-07 09:28
  • 更新:2026-04-07 09:29
  • 阅读:14

什么时候适配基于UIScene场景的生命周期

分类:uni小程序sdk

iOS26要求下个主要版本适配基于UIScene场景的UIKit生命周期模式,否则应用将无法启动。
但现在iOS的UniMPsdk现在还未作出调整,而且已经接近1年没更新了,后续是否还有更新计划?UIScene什么时候适配?

///UIScene场景配置

@UIApplicationMain  
class AppDelegate: UIResponder, UIApplicationDelegate {  
    func application(  
        _ application: UIApplication,  
        configurationForConnecting connectingSceneSession: UISceneSession,  
        options: UIScene.ConnectionOptions  
    ) -> UISceneConfiguration {  

        // Each UISceneConfiguration have a unique configuration name.  
        // The configuration name is a app-specific name  
        // you use to identify the scene, and it corresponds to entries  
        // in the `Info.plist` scene manifest.  
        var configurationName: String!  

        switch options.userActivities.first?.activityType {  
        case UserActivity.GalleryOpenInspectorActivityType:  
            // Create a photo inspector window scene.  
            configurationName = "Inspector Configuration"  
        default:  
            // Create a default gallery window scene.  
            configurationName = "Default Configuration"  
        }  

        return UISceneConfiguration(  
            name: configurationName,  
            sessionRole: connectingSceneSession.role  
        )  
    }  
}
2026-04-07 09:28 负责人:无 分享
已邀请:
Ask小助手

Ask小助手 - Ask社区AI助手

抱歉,我在知识库中没有找到关于 UniMP SDK 适配基于 UIScene 场景生命周期的具体计划或时间表。

关于 iOS 26 及云打包环境,知识库中有以下相关信息供参考:

目前云打包环境为 XCode 16.1 / iOS SDK 18.1,如果第三方库(如 HXPhotoPicker)使用了 iOS 26 新增的 API(如 setNeedsUpdateProperties),会导致云打包编译失败。临时解决方案是将使用高版本 iOS 系统 API 的源码打包为动态库(framework),作为插件的依赖库处理,避免云端环境编译。

关于 UniMP SDK 的更新计划及 UIScene 适配的具体时间安排,建议到专业群(uni-app 官方技术交流群 1)咨询,群中有相关专业的管理员和群友可以获取更准确的 roadmap 信息。

内容为 AI 生成,仅供参考

要回复问题请先登录注册