{"action":"created","issue":{"url":"https://api.github.com/repos/matthijs2704/vapor-apns/issues/16","repository_url":"https://api.github.com/repos/matthijs2704/vapor-apns","labels_url":"https://api.github.com/repos/matthijs2704/vapor-apns/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/matthijs2704/vapor-apns/issues/16/comments","events_url":"https://api.github.com/repos/matthijs2704/vapor-apns/issues/16/events","html_url":"https://github.com/matthijs2704/vapor-apns/issues/16","id":187055488,"number":16,"title":"crash on Ubuntu 16.04","user":{"login":"pkcs12","id":12585658,"avatar_url":"https://avatars.githubusercontent.com/u/12585658?v=3","gravatar_id":"","url":"https://api.github.com/users/pkcs12","html_url":"https://github.com/pkcs12","followers_url":"https://api.github.com/users/pkcs12/followers","following_url":"https://api.github.com/users/pkcs12/following{/other_user}","gists_url":"https://api.github.com/users/pkcs12/gists{/gist_id}","starred_url":"https://api.github.com/users/pkcs12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkcs12/subscriptions","organizations_url":"https://api.github.com/users/pkcs12/orgs","repos_url":"https://api.github.com/users/pkcs12/repos","events_url":"https://api.github.com/users/pkcs12/events{/privacy}","received_events_url":"https://api.github.com/users/pkcs12/received_events","type":"User","site_admin":false},"labels":[{"id":444257695,"url":"https://api.github.com/repos/matthijs2704/vapor-apns/labels/bug","name":"bug","color":"ee0701","default":true},{"id":444257698,"url":"https://api.github.com/repos/matthijs2704/vapor-apns/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/matthijs2704/vapor-apns/milestones/3","html_url":"https://github.com/matthijs2704/vapor-apns/milestones/1.1.2","labels_url":"https://api.github.com/repos/matthijs2704/vapor-apns/milestones/3/labels","id":2116786,"number":3,"title":"1.1.2","description":null,"creator":{"login":"matthijs2704","id":4346200,"avatar_url":"https://avatars.githubusercontent.com/u/4346200?v=3","gravatar_id":"","url":"https://api.github.com/users/matthijs2704","html_url":"https://github.com/matthijs2704","followers_url":"https://api.github.com/users/matthijs2704/followers","following_url":"https://api.github.com/users/matthijs2704/following{/other_user}","gists_url":"https://api.github.com/users/matthijs2704/gists{/gist_id}","starred_url":"https://api.github.com/users/matthijs2704/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthijs2704/subscriptions","organizations_url":"https://api.github.com/users/matthijs2704/orgs","repos_url":"https://api.github.com/users/matthijs2704/repos","events_url":"https://api.github.com/users/matthijs2704/events{/privacy}","received_events_url":"https://api.github.com/users/matthijs2704/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2016-11-05T22:19:29Z","updated_at":"2016-11-16T16:08:26Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2016-11-03T13:11:09Z","updated_at":"2016-11-24T07:56:38Z","closed_at":null,"body":"```\r\nUbuntu 16.04\r\n\r\nSwift version 3.0.1 (swift-3.0.1-RELEASE)\r\n\r\ncurl 7.51.1-DEV (x86_64-pc-linux-gnu) libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3\r\nProtocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp \r\nFeatures: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets\r\n```\r\n\r\nHere is the code I'm trying to make work: \r\n```\r\nimport VaporAPNS\r\nlet options = try! Options(topic: \"bundle ID\", teamId: \"teamID\", keyId: \"keyID\", keyPath: \"/whatever/APNsAuthKey.p8\")\r\nlet vaporAPNS = try VaporAPNS(options: options)\r\n\r\nlet payload = Payload(title: \"Title\", body: \"Your push message comes here\", badge: 1)\r\npayload.sound = \"default\"\r\n\r\nlet pushMessage = ApplePushMessage(topic: \"bundleID\", priority: .immediately, payload: payload, sandbox: true)\r\n\r\nvaporAPNS.send(pushMessage, to: [\"device UDID\"]) { result in\r\n    print(result)\r\n    if case let .success(messageId, deviceToken, serviceStatus) = result, case .success = serviceStatus {\r\n        print (\"Success!\")\r\n    }\r\n}\r\n```\r\n\r\nIt compiles, but crashes on `vaporAPNS.send`\r\n\r\n```\r\nfatal error: Index out of range\r\nCurrent stack trace:\r\n0    libswiftCore.so                    0x00007fe5086438e0 swift_reportError + 117\r\n1    libswiftCore.so                    0x00007fe508654e00 _swift_stdlib_reportFatalError + 61\r\n2    libswiftCore.so                    0x00007fe5084608a3 <unavailable> + 0\r\n3    libswiftCore.so                    0x00007fe5085bdffd <unavailable> + 0\r\n4    libswiftCore.so                    0x00007fe5084608a3 <unavailable> + 0\r\n5    libswiftCore.so                    0x00007fe50857f8b0 specialized _fatalErrorMessage(StaticString, StaticString, StaticString, UInt, flags : UInt32) -> Never + 96\r\n6    libswiftSwiftOnoneSupport.so       0x00007fe508b611f4 <unavailable> + 0\r\n7    App                                0x00000000007dddf6 <unavailable> + 0\r\n8    App                                0x00000000007e10ce <unavailable> + 0\r\n9    App                                0x0000000000425d93 <unavailable> + 0\r\n10   libc.so.6                          0x00007fe50616d740 __libc_start_main + 240\r\n11   App                                0x0000000000424a59 <unavailable> + 0\r\n```"},"comment":{"url":"https://api.github.com/repos/matthijs2704/vapor-apns/issues/comments/262712183","html_url":"https://github.com/matthijs2704/vapor-apns/issues/16#issuecomment-262712183","issue_url":"https://api.github.com/repos/matthijs2704/vapor-apns/issues/16","id":262712183,"user":{"login":"gomfucius","id":682280,"avatar_url":"https://avatars.githubusercontent.com/u/682280?v=3","gravatar_id":"","url":"https://api.github.com/users/gomfucius","html_url":"https://github.com/gomfucius","followers_url":"https://api.github.com/users/gomfucius/followers","following_url":"https://api.github.com/users/gomfucius/following{/other_user}","gists_url":"https://api.github.com/users/gomfucius/gists{/gist_id}","starred_url":"https://api.github.com/users/gomfucius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gomfucius/subscriptions","organizations_url":"https://api.github.com/users/gomfucius/orgs","repos_url":"https://api.github.com/users/gomfucius/repos","events_url":"https://api.github.com/users/gomfucius/events{/privacy}","received_events_url":"https://api.github.com/users/gomfucius/received_events","type":"User","site_admin":false},"created_at":"2016-11-24T07:56:38Z","updated_at":"2016-11-24T07:56:38Z","body":"@alexaubry do you happen to have a tutorial about how to use VaporAPNS on Heroku? I'm struggling to even run `vapor docker build` on an example Vapor project."}}
{"actor":{"display_login":"gomfucius"}}