CloudKit web services, not authorizing

Replies

I was running into the same thing for a while. For me, i was able to resolve it by making sure the session token was properly percent escaped. It needs to be escaped exactly like it's passed to you via URL. In code, i had to:


[[[[unencodedToken stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] 
                   stringByReplacingOccurrencesOfString:@"/" withString:@"%2F"] 
                   stringByReplacingOccurrencesOfString:@"+" withString:@"%2B"] 
                   stringByReplacingOccurrencesOfString:@"=" withString:@"%3D"];