Post

Replies

Boosts

Views

Activity

StoreKit 2: currentEntitlements always returns empty on Restore...
I tried deleting the configuration file, but I ended up with an alert asking me to sign in with my sandbox ID. I did, and it returned an error: "Request Canceled". It is as if the purchase function doesn't update the currentEntitlements. This is my purchase function. Am I doing something wrong? func purchase(_ product: Product) async throws { let result = try await product.purchase() switch result { case .success(let verificationResult): switch verificationResult { case .verified(let transaction): // Successful purchase - deliver content await updatePurchasedProducts() await transaction.finish() // Go back to the map integratePlanAhead() case .unverified(_, let error): // Purchase failed verification throw error } case .userCancelled: // User cancelled the purchase break case .pending: // Purchase is pending (e.g., parental approval needed) break @unknown default: break } } It looks like purchases are never updated for my sandbox user... Thanks for any help :)
1
0
109
Nov ’25
Once sandbox is set up, cannot go back to XCode testing with config file.
I was testing with XCode (14) and a *.storekit configuration file, and everything was working just fine testing on simulators. Then, I set up a sandbox tester account and was able to test on a device. So far so good. Now, I need to go back to the simulators to test the UI after payment. However, the XCode testing with *.storekit file is not working anymore (even though I loaded the file in the scheme), and every time I try to purchase, it asks for my Apple ID and password, which happens with sandbox, but should not happen with *.storekit option in the scheme. How can I go back to testing In App Purchase (non-consumable) with XCode and the simulators? Thank you!
2
1
874
Mar ’23
Strange behavior of TimeZone abbreviation in reverse Geocoding...
I am trying to get local times for an event, and I keep getting different time depending on the type of device I am running on, either simulator, or real device. The code: `do {       let placemarks = try await CLGeocoder().reverseGeocodeLocation(location)       if (placemarks.count) > 0 {         let localPlacemark = placemarks.first!         let timeZone = localPlacemark.timeZone!         let tzString = timeZone.abbreviation()         print("Time Zone for \(String(describing: localPlacemark.locality)) is \(tzString )")         return localPlacemark.locality ?? "Unknown Locale"       }       else {         print("Problem with the data received from geocoder")       }     }  On an iPhone 14, the timeZone.abbreviation I get (for the same location) is "EST". But on an iPhone 13, I get "GMT-5", same on an iPhone 8. All three are running iOS 16.2. Has anyone ever seen this? Also, since I am working with a full date during daylight savings time, on the 14 the time returned is correct (DST time), but "isDaylightSavingsTime" always returns false. This makes sense since the abbreviation is "EST" and not "EDT". However, the time returned is correct. On the iPhones 13 mini and 8, the time returned is Standard and not Daylight Savings. This is truly baffling. Any insights, suggestions or help are welcome! Thank you!!
2
0
970
Feb ’23
StoreKit 2: currentEntitlements always returns empty on Restore...
I tried deleting the configuration file, but I ended up with an alert asking me to sign in with my sandbox ID. I did, and it returned an error: "Request Canceled". It is as if the purchase function doesn't update the currentEntitlements. This is my purchase function. Am I doing something wrong? func purchase(_ product: Product) async throws { let result = try await product.purchase() switch result { case .success(let verificationResult): switch verificationResult { case .verified(let transaction): // Successful purchase - deliver content await updatePurchasedProducts() await transaction.finish() // Go back to the map integratePlanAhead() case .unverified(_, let error): // Purchase failed verification throw error } case .userCancelled: // User cancelled the purchase break case .pending: // Purchase is pending (e.g., parental approval needed) break @unknown default: break } } It looks like purchases are never updated for my sandbox user... Thanks for any help :)
Replies
1
Boosts
0
Views
109
Activity
Nov ’25
App Crashing on launch only when downloaded from App store but works fine on Test Flight
Baffled by this problem. I have searched everywhere for a solution, or even a recommendation as to what to do, and have found nothing. Anyone who has any insight, ideas or suggestions, please reply :) I am convinced that it has to do with my In App Purchase, but I can't really be sure... Thank you for any help ! :)
Replies
0
Boosts
0
Views
474
Activity
May ’23
Once sandbox is set up, cannot go back to XCode testing with config file.
I was testing with XCode (14) and a *.storekit configuration file, and everything was working just fine testing on simulators. Then, I set up a sandbox tester account and was able to test on a device. So far so good. Now, I need to go back to the simulators to test the UI after payment. However, the XCode testing with *.storekit file is not working anymore (even though I loaded the file in the scheme), and every time I try to purchase, it asks for my Apple ID and password, which happens with sandbox, but should not happen with *.storekit option in the scheme. How can I go back to testing In App Purchase (non-consumable) with XCode and the simulators? Thank you!
Replies
2
Boosts
1
Views
874
Activity
Mar ’23
Strange behavior of TimeZone abbreviation in reverse Geocoding...
I am trying to get local times for an event, and I keep getting different time depending on the type of device I am running on, either simulator, or real device. The code: `do {       let placemarks = try await CLGeocoder().reverseGeocodeLocation(location)       if (placemarks.count) > 0 {         let localPlacemark = placemarks.first!         let timeZone = localPlacemark.timeZone!         let tzString = timeZone.abbreviation()         print("Time Zone for \(String(describing: localPlacemark.locality)) is \(tzString )")         return localPlacemark.locality ?? "Unknown Locale"       }       else {         print("Problem with the data received from geocoder")       }     }  On an iPhone 14, the timeZone.abbreviation I get (for the same location) is "EST". But on an iPhone 13, I get "GMT-5", same on an iPhone 8. All three are running iOS 16.2. Has anyone ever seen this? Also, since I am working with a full date during daylight savings time, on the 14 the time returned is correct (DST time), but "isDaylightSavingsTime" always returns false. This makes sense since the abbreviation is "EST" and not "EDT". However, the time returned is correct. On the iPhones 13 mini and 8, the time returned is Standard and not Daylight Savings. This is truly baffling. Any insights, suggestions or help are welcome! Thank you!!
Replies
2
Boosts
0
Views
970
Activity
Feb ’23