{"action":"created","issue":{"url":"https://api.github.com/repos/zendesk/zendesk_sdk_ios/issues/136","labels_url":"https://api.github.com/repos/zendesk/zendesk_sdk_ios/issues/136/labels{/name}","comments_url":"https://api.github.com/repos/zendesk/zendesk_sdk_ios/issues/136/comments","events_url":"https://api.github.com/repos/zendesk/zendesk_sdk_ios/issues/136/events","html_url":"https://github.com/zendesk/zendesk_sdk_ios/issues/136","id":123433039,"number":136,"title":"ZDKRequestProvider crash","user":{"login":"sahara108","id":1707951,"avatar_url":"https://avatars.githubusercontent.com/u/1707951?v=3","gravatar_id":"","url":"https://api.github.com/users/sahara108","html_url":"https://github.com/sahara108","followers_url":"https://api.github.com/users/sahara108/followers","following_url":"https://api.github.com/users/sahara108/following{/other_user}","gists_url":"https://api.github.com/users/sahara108/gists{/gist_id}","starred_url":"https://api.github.com/users/sahara108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahara108/subscriptions","organizations_url":"https://api.github.com/users/sahara108/orgs","repos_url":"https://api.github.com/users/sahara108/repos","events_url":"https://api.github.com/users/sahara108/events{/privacy}","received_events_url":"https://api.github.com/users/sahara108/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zendesk/zendesk_sdk_ios/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-22T07:46:49Z","updated_at":"2015-12-24T01:37:06Z","closed_at":null,"body":"Here is how I add attachment into a support request:\r\n\r\n           let zdkUploader = ZDKUploadProvider()\r\n           let anonymousIdentity = ZDKAnonymousIdentity()\r\n           anonymousIdentity.externalId = \"An Identifier\"\r\n           ZDKConfig.instance().userIdentity = anonymousIdentity\r\n           MBProgressHUD.showHUDAddedTo(self.navigationController?.view, animated: true)\r\n           zdkUploader.uploadAttachment(UIImageJPEGRepresentation(image, 0.5), withFilename: fileName, andContentType: \"image/jpeg\") { (response, error) -> Void in\r\n            MBProgressHUD.hideHUDForView(self.navigationController?.view, animated: true)\r\n            if error == nil {\r\n                ...\r\n                self.attachments.append(att)\r\n                self.tableView.reloadData()\r\n            }\r\n        }\r\n\r\nAnd post the request\r\n        let anonymousIdentity = ZDKAnonymousIdentity()\r\n        \r\n        anonymousIdentity.email = email\r\n        anonymousIdentity.name = name\r\n        anonymousIdentity.externalId = \"An Identifier\"\r\n        \r\n        // Anonymous Auth\r\n        ZDKConfig.instance().userIdentity = anonymousIdentity\r\n        \r\n        // Submit request here!\r\n        let provider = ZDKRequestProvider()\r\n        \r\n        let request = ZDKCreateRequest()\r\n        \r\n        request.subject = subject\r\n        request.requestDescription = issueDescription\r\n        \r\n        for imageAtt in self.attachments {\r\n            request.attachments.append(imageAtt.uploadResponse.uploadToken)\r\n        }\r\n\r\n<img width=\"1004\" alt=\"screen shot 2015-12-22 at 2 42 23 pm\" src=\"https://cloud.githubusercontent.com/assets/1707951/11950375/669cbca0-a8ba-11e5-9879-1ce20ad88a75.png\">"},"comment":{"url":"https://api.github.com/repos/zendesk/zendesk_sdk_ios/issues/comments/167019535","html_url":"https://github.com/zendesk/zendesk_sdk_ios/issues/136#issuecomment-167019535","issue_url":"https://api.github.com/repos/zendesk/zendesk_sdk_ios/issues/136","id":167019535,"user":{"login":"sahara108","id":1707951,"avatar_url":"https://avatars.githubusercontent.com/u/1707951?v=3","gravatar_id":"","url":"https://api.github.com/users/sahara108","html_url":"https://github.com/sahara108","followers_url":"https://api.github.com/users/sahara108/followers","following_url":"https://api.github.com/users/sahara108/following{/other_user}","gists_url":"https://api.github.com/users/sahara108/gists{/gist_id}","starred_url":"https://api.github.com/users/sahara108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahara108/subscriptions","organizations_url":"https://api.github.com/users/sahara108/orgs","repos_url":"https://api.github.com/users/sahara108/repos","events_url":"https://api.github.com/users/sahara108/events{/privacy}","received_events_url":"https://api.github.com/users/sahara108/received_events","type":"User","site_admin":false},"created_at":"2015-12-24T01:37:06Z","updated_at":"2015-12-24T01:37:06Z","body":"Oops!. It is documented as: \r\n           /**\r\n     *  List of upload tokens.\r\n     *\r\n     *  @since 1.3.0.1\r\n     */\r\n    public var attachments: [AnyObject]!\r\nSo I use `uploadToken`.\r\n\r\nIt works now. THanks"}}