小编Etg*_*gar的帖子

解析云 - LiveQueries - iOS客户端不起作用

我正在尝试使用Parse LiveQueries.我使用这个Parse"Bootstrap":" https://github.com/parse-community/parse-server ",
我可以看到日志:info: Create new client: 1,
但我只是在查询中没有获得更新,尽管我订阅了它.它甚至没有到达的处理程序subscription.handle.

config.json:

{
  "appId": "",
  "masterKey": "",
  "appName": "",
  "cloud": "./cloud/main",
  "databaseURI": "",
  "publicServerURL": "",    

  // Relevant
  "startLiveQueryServer": true,
  "liveQuery": {
    "classNames": ["Channel"]
  },
}
Run Code Online (Sandbox Code Playgroud)

AppDelegate.swift:

// Initialize Parse.
let configuration = ParseClientConfiguration {
    $0.applicationId = self.PARSE_APP_ID
    $0.server = self.PARSE_SERVER
}
Parse.initialize(with: configuration)

AppDelegate.liveQueryClient = ParseLiveQuery.Client()
Run Code Online (Sandbox Code Playgroud)

The Subscription Code (iOS Swift):

public static func listenSubscribedChannels(handler: @escaping (_ channel: Channel) -> Void) {
    var subscription: Subscription<PFObject>? …
Run Code Online (Sandbox Code Playgroud)

livequery ios parse-platform swift parse-cloud

7
推荐指数
1
解决办法
676
查看次数

Swift 3 - 无法覆盖'imagePickerController'

我的代码:

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingImage image: UIImage, editingInfo: [String : AnyObject]?) {
    self.image = image
    self.imageStatusLabel.text = "There is a picture"
    self.imageStatusLabel.textColor = UIColor.blue()

    picker.dismiss(animated: true, completion: nil)
}
Run Code Online (Sandbox Code Playgroud)

这是错误:

无法覆盖已标记为不可用的'imagePickerController':从iOS 7及更早版本中弃用的API在Swift中不可用

好吧,我试过使用更新的功能:

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
    // But no image in the parameters
}
Run Code Online (Sandbox Code Playgroud)

但是,参数中没有图像,我可以得到图像.
我该怎么办?

xcode uiimagepickercontroller swift swift3 xcode8

0
推荐指数
1
解决办法
5143
查看次数