Skip to content

Instantly share code, notes, and snippets.

View cagatayk's full-sized avatar

Cagatay cagatayk

View GitHub Profile
@cagatayk
cagatayk / SimpleSampleAppStoreReceiptValidation.txt
Last active September 13, 2017 22:06
Simple Receipt Validation Code With the App Store
- (void)getReceiptDataWithCompletionBlock:(void(^)(NSError *error))completionBlock {
NSURL *recieptURL = [[NSBundle mainBundle] appStoreReceiptURL];
NSData *recieptData = [NSData dataWithContentsOfURL:recieptURL];
NSMutableDictionary *payLoad;
if (recieptData){
payLoad = [NSMutableDictionary dictionaryWithObject:[recieptData base64EncodedStringWithOptions:0] forKey:@"receipt-data"];
@cagatayk
cagatayk / Google OAuth redirectURL
Last active September 13, 2017 22:17
Correct form of Google OAuth 2.0 redirectURL
Error Message
"400. That’s an error."
Error: invalid_request
Invalid parameter value for redirect_uri: Missing scheme:
Solution
The redirect_uri should match with this syntax: your.bundle.id:/oauth2Callback