0
何かを言う前に - はい、私はパースが閉じていることを知っています:)しかし、私は本当にこれが必要です。チャンネルを購読しない - Swiftを解析する
チャンネルに登録しようとしています(documented in Parseのように)。 しかし、コア画面に追加したチャンネルは表示されません。バージョンが正しいと確信しています。ここで
私のコードです:
let currentInstallation = PFInstallation.currentInstallation()
currentInstallation.addUniqueObject("myChannel", forKey: "channels")
currentInstallation.saveInBackground()
私はこのような配列に"myChannel"
を追加してみました:私は間違って
let currentInstallation = PFInstallation.currentInstallation()
currentInstallation.addUniqueObject(["myChannel"], forKey: "channels")
currentInstallation.saveInBackground()
何をしているのですか?
編集:ブロック内
let currentInstallation = PFInstallation.currentInstallation()
currentInstallation.addUniqueObject("beybey", forKey: "channels")
currentInstallation.saveInBackgroundWithBlock { (bool: Bool, error: NSError?) in
print(bool)
print(error)
}
ブレークポイントがトリガされなかった。sujjested Shubank として、私は次の試み。
を作成され、そのインスタンスまでアクセスするリモート通知のために登録されるのを待つのか?エラー/結果コールバックを 'saveInBackground'メソッド – Shubhank
@ Shubhankに渡すこともできます。コードは呼び出されています。どのようにエラー/結果を渡すのですか? – Luda
https://www.parse.com/docs/osx/api/Categories/PFObject(Deprecated).html#/c:objc(cs)PFObject(im)saveInBackgroundWithTarget:selector: – Shubhank