Post

Replies

Boosts

Views

Activity

Reply to server to server notifications - no dates
some additional info: Maybe something that is deprecated has been disabled, but I can not find a sample of the new data that is being sent and understanding the docs is a bit confusing. I am trying (and previously was) collecting the following info from the JSON data that is sent: perl {latest_receipt_info}-{purchase_date_ms}; //now missing - no info here {latest_receipt_info}-{expires_date}; //now missing - no info here {latest_receipt_info}-{is_trial_period}; //now missing - no info here {latest_receipt_info}-{product_id}; //this is still OK {notification_type}; //this is still OK {auto_renew_status}; //this is still OK If anyone has any info that could help me out it would be greatly appreciated. Thx
Mar ’21
Reply to server to server notifications - no dates
I figured it out. It was from the original format being deprecated. If anyone else needs assistance on this, this is an example of what the new data structure looks like: perl {unified_receipt}-{latest_receipt_info}[0]-{purchase_date_ms} Notice there is an array of data in the unified receipt-latest_receipt_info with record 0 being the latest record
Mar ’21
Reply to SK2 - why so overly complicated?
to further get my point across, and because I know Apple Engineers read this, something like this would be really ideal, it obviously does not work, but it should be this simple... I have faith in you Apple! struct MyMainView: View {          @State var products: [Product] = []          var body = some View {         List {             ForEach(products) { product in                 ThisView(product: Product)             }         }     }         .task {             //fill up my products with my current entitlements:             products = await Transaction.currentEntitlements         } } struct ThisView: View {          @State var product: Product     @State private var productName = ""     @State private var productStatus = ""     @State private var expOrRenewDate = ""     @State private var isAutoRenew = "Disabled"          var body: some View {         VStack {             Text("You are subscribed to: \(productName)")             Text("Current Status: \(productStatus)")             Text("Your \(expOrRenewDate)")             Text("Your auto-renew preference is: \(isAutoRenew)")         }         .task {                          let billingDate = product.expirationDate                          productName = product.displayName             productStatus = product.subscription?.status.state             if (product.SubscriptionInfo.RenewalInfo.autoRenewPreference) {                 isAutoRenew = "Active"                 expOrRenewDate = "next billing date is \(billingDate)"             } else {                 isAutoRenew = "Disabled"                 expOrRenewDate = "subscription will expire on \(billingDate)"             }                                                }     } }
Jun ’21
Reply to Storekit: get transaction history return 404
Did you use the sandbox URL? Important This API is supported in the sandbox environment only. Use the sandbox URL: https://api.storekit-sandbox.itunes.apple.com/ to access this endpoint. is this the only response you got back? It looks like just the response header. The content of the response should give more details on the cause of the failure: 404 Not Found (AccountNotFoundError | AccountNotFoundRetryableError | AppNotFoundError | AppNotFoundRetryableError | OriginalTransactionIdNotFoundError | OriginalTransactionIdNotFoundRetryableError) Content-Type: application/json
Jul ’21
Reply to iOS 15 SwiftUI App crashes SOMETIMES on SOME devices
Here is another TestFlight Crash report, same user: Thread 0#0 (null) in _getNSValueBytes () #1 (null) in -[NSValue(NSValueUIGeometryExtensions) UIEdgeInsetsValue] () #2 (null) in -[UIApplicationSceneSettings safeAreaInsetsPortrait] () #3 (null) in -[UIWindowScene _safeAreaInsetsForInterfaceOrientation:] () #4 (null) in -[UIWindow _sceneSafeAreaInsetsIncludingStatusBar:] () #5 (null) in -[UIScrollView _baseInsetsForAccessoryOnEdge:hasCustomClientInsets:accessorySize:additionalInsetFromEdge:] () #6 (null) in -[UIScrollView _effectiveHorizontalScrollIndicatorInsets] () #7 (null) in -[UIScrollView _layoutHorizontalScrollIndicatorWithBounds:effectiveInset:contentOffset:fraction:additionalInset:cornerAdjust:showing:recalcSize:verticalIndicatorFrame:] () #8 (null) in -[UIScrollView _adjustScrollerIndicators:alwaysShowingThem:] () #9 (null) in -[UIScrollView _updateForChangedScrollIndicatorRelatedInsets] () #10 (null) in _UIScrollViewAdjustForOverlayInsetsChangeIfNecessary () #11 (null) in -[UIScrollView setSafeAreaInsets:] () #12 (null) in -[UIView _eagerlyUpdateSafeAreaInsetsToDescendant:] () #13 (null) in -[UIViewController _updateViewSafeAreaInsetsAndEagerlyUpdateContentScrollView:] () #14 (null) in -[UIViewController _setContentOverlayInsets:andLeftMargin:rightMargin:] () #15 (null) in __121-[UIViewController __updateContentOverlayInsetsWithOurRect:inBoundsOfAncestorViewController:viaImmediateChildOfAncestor:]_block_invoke () #16 (null) in -[UIViewController __updateContentOverlayInsetsWithOurRect:inBoundsOfAncestorViewController:viaImmediateChildOfAncestor:] () #17 (null) in -[UIViewController _updateContentOverlayInsetsFromParentIfNecessary] () #18 (null) in -[UIView(CALayerDelegate) layoutSublayersOfLayer:] () #19 (null) in CA::Layer::layout_if_needed(CA::Transaction*) () #20 (null) in CA::Layer::layout_and_display_if_needed(CA::Transaction*) () #21 (null) in CA::Context::commit_transaction(CA::Transaction*, double, double*) () #22 (null) in CA::Transaction::commit() () #23 (null) in _UIApplicationFlushCATransaction () #24 (null) in _UIUpdateSequenceRun () #25 (null) in schedulerStepScheduledMainSection () #26 (null) in runloopSourceCallback () #27 (null) in CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION () #28 (null) in __CFRunLoopDoSource0 () #29 (null) in __CFRunLoopDoSources0 () #30 (null) in __CFRunLoopRun () #31 (null) in CFRunLoopRunSpecific () #32 (null) in GSEventRunModal () #33 (null) in -[UIApplication _run] () #34 (null) in UIApplicationMain () #35 0x00000001020e8118 in main at /Users/macbook/Desktop/SS-Origin-Swift/SSApp/NotesView.swift:14 #36 (null) in start ()
Oct ’21
Reply to iOS 15 SwiftUI App crashes SOMETIMES on SOME devices
I have found the lines of offending code: struct LoadingViewMainDownloading<Content>: View where Content: View {     @Binding var isShowing: Bool     @Binding var message: String     var content: () -> Content     var body: some View {         GeometryReader { geometry in             ZStack(alignment: .center) {                 self.content()                     .disabled(self.isShowing)                     .blur(radius: self.isShowing ? 3 : 0)                 VStack {                     Text(self.message).multilineTextAlignment(.center)                     ActivityIndicator(isAnimating: .constant(true), style: .large)                 }                 .frame(width: geometry.size.width / 2,                        height: geometry.size.height / 5)                 .background(Color.secondary.colorInvert())                 .foregroundColor(Color.primary)                 .cornerRadius(20)                 .opacity(self.isShowing ? 1 : 0)             }         }     } } Removing the GeometryReader section does not help. I am using this in a view where it is wrapped around everything in the view and displays an activity indicator when triggered. This works completely fine when built with ios14 binaries, but when built on iOS 15, it causes the freezing issue on certain devices.
Oct ’21
Reply to iOS 15 SwiftUI App crashes SOMETIMES on SOME devices
I have confirmed that is also is a problem on iOS 14, but I can not edit this post, so just posting updates and reproducible code here: import SwiftUI struct ContentView: View {     var body: some View {         NavigationView {             VStack {                 NavigationLink(destination: SecondView()) {                     Text("Click Me to go to second view (MAY FREEZE)")                 }.padding()                 NavigationLink(destination: ThirdView()) {                     Text("Go to third view first (Multi-Layer)")                 }.padding()                              }         }     } } struct SecondView: View {          @State var downloading = false     @State var message = "Please Wait"          var body: some View {         LoadingView(isShowing: $downloading, message: $message) {             VStack {                 Spacer()                 HStack{                     Spacer()                     Text("This is a second view.").padding()                     Spacer()                 }                 Spacer()             }         }                  .onAppear(perform: {             downloading = true             let twoSecondsFromNow = DispatchTime.now() + 2.0             DispatchQueue.main.asyncAfter(deadline: twoSecondsFromNow) {                 downloading = false             }         })              } } struct ThirdView: View {     var body: some View {         NavigationLink(destination: SecondView()) {             Text("Click Me to go to second view (NO FREEZE)")         }     } } struct LoadingView<Content>: View where Content: View {          @Binding var isShowing: Bool     @Binding var message: String     var content: () -> Content          var body: some View {         GeometryReader { geometry in             ZStack(alignment: .center) {                                  self.content()                     .disabled(self.isShowing)                     .blur(radius: self.isShowing ? 3 : 0)                                  VStack {                     Text(self.message).multilineTextAlignment(.center)                     ProgressView()                 }                 .frame(width: geometry.size.width / 2,                        height: geometry.size.height / 5)                 .background(Color.secondary.colorInvert())                 .foregroundColor(Color.primary)                 .cornerRadius(20)                 .opacity(self.isShowing ? 1 : 0)                              }         }     } } struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView()     } }
Oct ’21