Posts

Post not yet marked as solved
2 Replies
1.4k Views
Hello,I am have trouble trying to update our app from relying on 'shouldAutorotate'. Currently, the 'shouldAutorotate' updated the location and size of some items in the current view depending on the orientation of the device. In iOS16, shouldAutorotate is deprecated and I have reviewed the docs, but I am soooo confused, can anyone help? Any examples on how to implement this???
Posted
by JS CEO.
Last updated
.
Post not yet marked as solved
0 Replies
821 Views
I am working on our first in-app purchase and trying to use our server to verify the receipt using our server to connect to Apple's server.  I keep getting Status 21003.  Here is our Objective C  code....  -(IBAction)NewVerifyReceipt { NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL];     NSData *receipt = [NSData dataWithContentsOfURL:receiptURL];     if (receipt) {         NSString *receiptEncoded = [receipt base64EncodedStringWithOptions:0];         // In addition we need to replace +(plus) sign for encoding         receiptEncoded = [receiptEncoded stringByReplacingOccurrencesOfString:@"+" withString:@"%2B"];         NSString *post = [NSString stringWithFormat:@"receipt-data=%@", receiptEncoded];     NSLog(@"\n\n\n        POST:%@", receiptEncoded);         NSData *postData = [post dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO];         NSString *postLength = [NSString stringWithFormat:@"%lu",(unsigned long)[postData length]];   NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];         [request setURL:[NSURL URLWithString:@“our_server_code.php”]];         [request setHTTPMethod:@"POST"];         [request setValue:postLength forHTTPHeaderField:@"Content-Length"];         [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];   [request setHTTPBody:postData];         NSURLSession *session = [NSURLSession sharedSession];         NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error)     {             NSDictionary* json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error];             NSString *result = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding];             NSLog(@"result =%@",result);             NSLog(@"json =%@",json);             if (!error) {                 int statusCode = [[json objectForKey:@"status"] intValue];                 if (statusCode == 0) {         // Receipt-data is valid                 }             }         }];         [dataTask resume]; } Here is our server code: PHP $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://sandbox.itunes.apple.com/verifyReceipt"); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); $result=curl_exec ($ch); curl_close ($ch); Can anyone please help?
Posted
by JS CEO.
Last updated
.
Post not yet marked as solved
4 Replies
14k Views
We recently received an app transfer and are ready to submit the first update since the transfer. The questiion is can we change the bundle id to reflect the new company's name? Existing bunlde id: com.oldcompany.appnameCan we change it to: com.newcompany.appname
Posted
by JS CEO.
Last updated
.