ユーザー Brian Advent による YouTube Swift チュートリアル、具体的には Parse を使用したリモート プッシュ通知に関するこのチュートリアルhttps://www.youtube.com/watch?v=__zMnlsfwj4を見始めました。サンプル アプリをダウンロードして Xcode 6 ベータ 6 で開くと、コンパイラは次のコードに 1 つのエラーを表示します。
func application(application: UIApplication!, didReceiveRemoteNotification userInfo:NSDictionary!) {
var notification:NSDictionary = userInfo.objectForKey("aps") as NSDictionary
if (notification.objectForKey("content-available") != nil){
if notification.objectForKey("content-available").isEqualToNumber(1){
NSNotificationCenter.defaultCenter().postNotificationName("reloadTimeline", object: nil)
}
}else{
PFPush.handlePush(userInfo)
}
エラーは AppDelegate.swift 内の下のこの行にあります
if notification.objectForKey("content-available").isEqualToNumber(1){
表示されたメッセージは「AnyObject?」です。「isEqualToNumber」という名前のメンバーがありません
これを修正する方法に関するヒント/ヘルプはありますか? 私は感謝します