从'(key:String,value:NSObject)'转换为不相关的类型'Dictionary <anyhashable,any?=“”>'总是失败

时间:2018-06-18 12:13:11

标签: swift

我应该担心这个警告吗?或者我可以做些什么来正确施放?我是IOS开发的新手

  

String myCustomizedString = String.format(Locale.getDefault(), "this is latitude: %f and this is longitude: %f", latLng.latitude, latLng.longitude); 投射到不相关的类型   (key: String, value: NSObject)总是失败

Dictionary<AnyHashable, Any?>

这是警告发生的行

ADClient.shared().requestAttributionDetails({ (attributionDetails, error) in
        if error == nil {
            for (type, adDictionary) in attributionDetails! {
                var attribution = adDictionary as? Dictionary<AnyHashable, Any>;
                let params = [
                    "iadLineitemName": attribution?["iad-lineitem-name"] as? String as Any,
                    "iadOrgName": attribution?["iad-org-name"] as? String as Any

                    ]
              print(params)
            }
        }
})

0 个答案:

没有答案