Post

Replies

Boosts

Views

Activity

Keys are missing in App Store Server API
For the subscription API, we’re using the Get All Subscription Statuses API to replace the deprecated verifyReceipt method. To determine if a user has canceled their subscription, we’re using the expirationIntent key from JWSRenewalInfo data. However, we’ve noticed that we sometimes receive this key and other times not. We’re also facing an issue with the offertype key. We use this key to determine if a user is currently in the introductory offer, the promotion offer, or neither. To obtain this key, we’re using JWSTransaction, but we occasionally receive it and other times not. Note: These issues are being tested in the sandbox environment. Thank you.
1
0
210
Feb ’25
Submitting an app for scheduled release not working.
Recently I tried to submit an app for review and selected 3rd option under "Version Release" section to release my app, i.e Automatically release this version after App Review, no earlier than Date of submission: May 4, 2022 Here I selected May 6, 2022, to automatically release my app but I couldn't get to save those settings and submit my app for review. I have attached a screenshot of the error in network logs when trying to save with the above settings.
0
0
520
May ’22
Not able to access the summary day values for Active Energy from Apple HealthKit
I have already created a function to fetch active energy data from HealthKit. But if I try to fetch records of 1 year with multiple active energy records per day, the app hangs and in some cases App does crash and I don't get any data. I couldn't find any other way to access the summary day values for Active Energy from Apple HealthKit. Below is my code for getting Active Energy from HealthKit. func getActiveEnergy(startDate : Date) { &#9;&#9;var startingDate = startDate &#9;&#9; &#9;&#9;HealthKitSetupManager.getActiveEnergy(date: startDate, withSuccess: { (isSuccess, error) in &#9;&#9;&#9;&#9;if isSuccess { &#9;&#9;&#9;&#9;&#9;&#9;print("Active Energy Fetch") &#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;startingDate = NSCalendar.current.date(byAdding: .day, value: 1, to: startDate) ?? Date() &#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;if startingDate <= Date() { &#9;&#9;&#9;&#9;&#9;&#9;self.getActiveEnergy(startDate: startingDate) &#9;&#9;&#9;&#9;} else { &#9;&#9;&#9;&#9;&#9;&#9;self.getSickNumber(startDate : self.globalDate) &#9;&#9;&#9;&#9;} &#9;&#9;}) } HealthKitSetupManager.swift class func getActiveEnergy(date:Date, withSuccess: @escaping(Bool,String?) -> Void) { &#9;&#9; &#9;&#9;let healthKitStore = HKHealthStore() &#9;&#9;if let energyType = HKQuantityType.quantityType(forIdentifier: HKQuantityTypeIdentifier.activeEnergyBurned) { &#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;let calendar = NSCalendar.current &#9;&#9;&#9;&#9;var components = DateComponents() &#9;&#9;&#9;&#9;components.day = 1 &#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;let eDateString = date.getFormattedString(format: DateFormateString.MM_dd_yyyy) &#9;&#9;&#9;&#9;let eDate =&#9;eDateString.getFormattedDate(inFormate: DateFormateString.MM_dd_yyyy) ?? Date() &#9;&#9;&#9;&#9;let endDate = calendar.date(byAdding: components, to: eDate) ?? Date() &#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;let predicate = HKQuery.predicateForSamples(withStart: date, end: endDate, options: .strictStartDate) &#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;let updateHandler = HKStatisticsQuery(quantityType: energyType, quantitySamplePredicate: predicate, options: .cumulativeSum) { (query, sample, error) -> Void in &#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;if error != nil { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;withSuccess(false,error?.localizedDescription ?? "") &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;return &#9;&#9;&#9;&#9;&#9;&#9;} &#9; &#9;&#9;&#9;&#9;&#9;&#9;if let sample = sample { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;let energy = sample.sumQuantity()?.doubleValue(for: HKUnit.kilocalorie()) ?? 0.0 &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;print(endDate, "->", energy) &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;withSuccess(true, nil) &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;return &#9;&#9;&#9;&#9;&#9;&#9;} else { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;withSuccess(false, nil) &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;return &#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;healthKitStore.execute(updateHandler) &#9;&#9;} }
0
0
695
Sep ’20