小编Jit*_*dra的帖子

从[String:AnyObject]转换为不相关的类型NSMutableDictionary总是失败警告

代码正在运行,但我如何沉默这种每次都出现的警告?

let parentView = self.parentViewController as! SBProfileViewController
parentView.savedDetailsModel = SBSavedUserModel(data:responseObject["data"].dictionaryObject! as! NSMutableDictionary)
Run Code Online (Sandbox Code Playgroud)

从'[String:AnyObject]'转换为不相关的类型'NSMutableDictionary'总是失败警告

SavedUserModel存储已保存的信息: -

class SBSavedUserModel : NSObject { 
var userId : String!
var firstName : String!
var lastName : String!
var imageBase64 : String!

required init ( data : NSMutableDictionary) {
    self.userId =  data.objectForKey("userId") as! String
    self.firstName = data.objectForKey("fName") as! String
    self.lastName = data.objectForKey("lName") as! String
    self.imageBase64 = data.objectForKey("image") as! String
}
Run Code Online (Sandbox Code Playgroud)

dictionary casting nsmutabledictionary ios swift

8
推荐指数
1
解决办法
2万
查看次数

在 iOS13 上运行启用 VOIP 的应用程序时出现 NSInternalInconsistencyException

*** 由于未捕获的异常“NSInternalInconsistencyException”而终止应用程序,原因:“使用 VoIP 推送的 PushKit 应用程序必须链接 CallKit 或 IncomingCallNotifications 框架。”

此错误显示在使用 iOS 13 的 xcode 11 Beta 上。 xcode10 上没有问题。

使用 VoIP 推送的 PushKit 应用程序必须链接 CallKit 或 IncomingCallNotifications 框架。#voip

voip ios13 xcode11

3
推荐指数
1
解决办法
2410
查看次数

标签 统计

casting ×1

dictionary ×1

ios ×1

ios13 ×1

nsmutabledictionary ×1

swift ×1

voip ×1

xcode11 ×1