最近、Xcode 8 beta 6(8S201h)ではこれが問題になっています。他UIApplicationLaunchOptionsShortcutItemKeyはSwift 3にはありませんか?
誰でもこの問題を持つ:ここで
UIApplicationLaunchOptionsShortcutItemKey
はエラーですか?
var performShortcutDelegate = true
if let shortcutItem = launchOptions[UIApplicationLaunchOptionsKey.shortcutItem] as? UIApplicationShortcutItem {
print("ok")
self.shortcutItem = shortcutItem
performShortcutDelegate = false
}
return performShortcutDelegate
は 'guard'を使用してみてください:http://stackoverflow.com/questions/33689933/ambiguous-reference-to-member -subscript-on-dictionary –
no luck :(同じエラー –
あなたはまだメンバーサブスクリプトへのあいまいな参照を取得していますか?あなたのコードは、表示されているとおりに正しいと見なされるので、囲む関数と関係します。また、あなたのショートカットコードの周りに 'if #available(iOS 9.0、*){}'ブロックを含める必要があります。より多くの情報/文脈が参考になります:) –