Posts

Post not yet marked as solved
5 Replies
6.0k Views
I'd like to confirm the battery usage of an app I am developing on iOS, specifically on Xcode 13 and iOS 15. (Note: This app previously showed no issues with battery usage on previous versions of iOS.) Previously, it seems that there were two ways to gather energy usage information: #1. On the device under Settings > Developer > Logging As per Apple's documentation described in the section titled "Log Energy Usage Directly on an iOS Device". However, on iOS15, I can't find any options for logging under Developer or anywhere under settings even when searching. #2. Profiling via Instruments using the "Energy Log" template As per the same documentation from Apple described in the section "Use the Energy Diagnostics Profiling Template". While it is still available in Xcode 12, this template is missing in Xcode 13. Naturally, it's also not possible to profile an iOS15 device with Xcode 12. Digging through the Xcode 13 release notes, I found the following: Instruments no longer includes the Energy template; use metrics reporting in the Xcode Organizer instead. (74161279) When I access the Organizer in Xcode (12 or 13), select an app and click "Energy" for all versions of the app, it shows the following: Apple's documentation for "Analyzing the Performance of Your Shipping App" says: "In some cases the pane shows “Insufficient usage data available,” because there may not be enough anonymized data reported by participating user devices. When this happens, try checking back in a few days." Well over a year into production and having sufficient install numbers, I have a feeling that waiting a few days might not do much. I would like to determine if this is a bug in my app or a bug in iOS15. How can energy usage data be gathered using Xcode 13 on iOS 15?
Posted
by drock.
Last updated
.
Post marked as solved
1 Replies
1.6k Views
After watching all related WWDC content on auto-renewing subscriptions, including the most recent 2021 session titled "Manage IAP On Your Server," it's still unclear what actions are required for developers when an auto-renewing subscription is initially purchased using Store Kit 1 + Server Notifications v2. From "Manage IAP On Your Server" around 21:30 a diagram of the initial subscription flow is shown: What is most unclear to me is: Is it necessary to retrieve the receipt data from the device and send it to the application server (to then be sent to Apple's server to verify and get the decoded data) if the App Store server is going to be sending a SUBSCRIBED + INITIAL_BUY notification around the same time to the application server anyway? If it is still necessary to verify the receipt data from the local device, then what purpose does the SUBSCRIBED + INITIAL_BUY notification serve? What should the application server do when this notification is received if the subscription status has already been updated based on the receipt data? It seems that the recommendation from Apple is to verify the receipt data from the device to obtain the original_transaction_id and then use this value to relate future server notifications received for this id. Looking at the JWSTransactionDecodedPayload, it includes a field called appAccountToken however, it appears as though this can only be utilized with the iOS15+ StoreKit2 API. It would be greatly appreciated if someone could clarify the required steps for managing an initial purchase on both the client and server for: StoreKit 1 + Server Notifications v2 StoreKit 2 + Server Notifications v2 (I would love to start with StoreKit 2; however, I don't think it is feasible to limit purchases to iOS15+ at this time, given the large # of users still using older versions of iOS.) Thank you!
Posted
by drock.
Last updated
.