I don't seem to be able to get DeviceCheck to work. I have the following on my phone:
DCDevice.current.generateToken { (token, error) in
if let token = token {
let base64EncodedToken = token.base64EncodedString()
// send token to server
}
}
On the server I send the payload with device_token unmodified. Half the time I'll just get 500 error from apple, the other half I get 400 with missing or incorrectly formatted device token payload as message.