             curl_slist_free_all(curlHeaders!)
             
             // todo: Better unknown error handling?
-            return Result.error(apnsId: message.messageId, error: APNSError.unknownError(error: errorString))
-            
+            return Result.networkError(error: SimpleError.string(message: errorString))
+            
+        }
+    }
+    
+    open func send(_ message: ApplePushMessage, to deviceTokens: [String], perDeviceResultHandler: ((_ result: Result) -> Void)) {
+        for deviceToken in deviceTokens {
+            let result = self.send(message, to: deviceToken)
+            perDeviceResultHandler(result)
         }
     }
     

        curlHelperSetOptInt(curlHandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0)
    }
    
    open func send(applePushMessage message: ApplePushMessage) -> Result {
        // Set URL
        let url = ("\(self.hostURL(message.sandbox))/3/device/\(message.deviceToken)")
        curlHelperSetOptString(curlHandle, CURLOPT_URL, url)
        
        // force set port to 443

                let jwt2 = try JWT(token: tokenString, encoding: Base64URLEncoding())
                let verified = try jwt2.verifySignatureWith(ES256(key: publicKey))
                if !verified {
                    return Result.error(apnsId: message.messageId, deviceToken: deviceToken, error: .invalidSignature)
                }
            } catch {
                print ("Couldn't verify token. This is a non-fatal error, we'll try to send the notification anyway.")
                if options.debugLogging {
                    print("\(error)")
                }
            }
            
            curlHeaders = curl_slist_append(curlHeaders, "Authorization: bearer \(tokenString)")
