Post

Replies

Boosts

Views

Activity

Reply to Detect a subscription has expired
I'm having the same issue. Any updates on this? @kersten83 were you able to fix this issue, or was it simply a sandbox environment problem and in production, in fact, when the subscription expires while the app is still running, Transaction.updates is triggered and you were able to ensure that Transaction.currentEntitlements does not return the just expired subscription anymore so you could hide your content accordingly?
Topic: App & System Services SubTopic: StoreKit Tags:
Jun ’23
Reply to ToolbarItemGroup With Palette Style Cannot Present a View Controller While the Context Menu Is Visible
@DTS Engineer Thank you for your response Albert, Is it timing the issue? I don't think it is a timing issue because even if I don't trigger a navigation, basically just removing the action code for the "Edit" button, nothing happens, the system doesn't dismiss the context menu when an option is selected automatically. If that would happen I could try to get away with a short delay before presenting. (not ideal though) you should avoid calling UIKit's present() manually from a SwiftUI button action Thanks for the suggestion, unfortunately my whole project still relies on UINavigationControllers and UIHostingControllers to manage navigation and presentation, but I want to revisit migrating to full SwiftUI approach since its support has improved greatly with the introduction of NavigationStack. I tried the following just to see what happens: Since the context menu doesn't disappear when an option is tapped and no action is triggered, I tried updating a string property annotated with @State and if it has a valid value I simply insert a Text into the view stack, this also didn't make the menu disappear. Trying a .sheet modifier as you suggested works fine, the action menu disappears and then the sheet is presented. However, I feel like my use case is also a valid use case though, many iOS projects are still in the process of migrating to SwiftUI, and I know from colleagues and friends that many are still relying on UINavigationController/UIHostingControllers for pushing and presenting views. Do you think this is something that can be investigated or fixed on your end? If so, I can also send a report through the feedback assistant. If not, then I would just not use toolbar item group until I can migrate to SwiftUI presentation. Thanks!
Topic: UI Frameworks SubTopic: UIKit Tags:
1w
Reply to ToolbarItemGroup With Palette Style Cannot Present a View Controller While the Context Menu Is Visible
Thank you for the discussion, and all the details and your recommendations Albert. I just had the chance to try using Menu instead of ToolbarItemGroup and it worked just fine, without any workarounds. Leaving the final code as a reference: .toolbar { ToolbarItem(placement: .topBarTrailing) { Menu { Button("ft_commons_edit".localised, systemImage: "pencil") { viewModel.didTapEditAction() } Button("ft_commons_delete".localised, systemImage: "trash") { viewModel.didTapDeleteAction() } } label: { Image("edit-icon") .resizable() .frame(width: 24.0, height: 24.0) } } }
Topic: UI Frameworks SubTopic: UIKit Tags:
5d
Reply to Detect a subscription has expired
I'm having the same issue. Any updates on this? @kersten83 were you able to fix this issue, or was it simply a sandbox environment problem and in production, in fact, when the subscription expires while the app is still running, Transaction.updates is triggered and you were able to ensure that Transaction.currentEntitlements does not return the just expired subscription anymore so you could hide your content accordingly?
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to Transaction.currentEntitlements is not consistent
It actually never happens if I wait 5 seconds or longer between killing the app and relaunching, but it is happening if I only wait 2-3 seconds before relaunching it. Maybe there is a problem with emitting values from Transaction.currentEntitlements when an app is killed and relaunched right after, sometimes.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to .navigationTitle disappears when using .toolbar and List inside NavigationStack (iOS 26 beta)
Might also be relevant to this watchOS issue: https://developer.apple.com/forums/thread/823263
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
2w
Reply to ToolbarItemGroup With Palette Style Cannot Present a View Controller While the Context Menu Is Visible
@DTS Engineer Thank you for your response Albert, Is it timing the issue? I don't think it is a timing issue because even if I don't trigger a navigation, basically just removing the action code for the "Edit" button, nothing happens, the system doesn't dismiss the context menu when an option is selected automatically. If that would happen I could try to get away with a short delay before presenting. (not ideal though) you should avoid calling UIKit's present() manually from a SwiftUI button action Thanks for the suggestion, unfortunately my whole project still relies on UINavigationControllers and UIHostingControllers to manage navigation and presentation, but I want to revisit migrating to full SwiftUI approach since its support has improved greatly with the introduction of NavigationStack. I tried the following just to see what happens: Since the context menu doesn't disappear when an option is tapped and no action is triggered, I tried updating a string property annotated with @State and if it has a valid value I simply insert a Text into the view stack, this also didn't make the menu disappear. Trying a .sheet modifier as you suggested works fine, the action menu disappears and then the sheet is presented. However, I feel like my use case is also a valid use case though, many iOS projects are still in the process of migrating to SwiftUI, and I know from colleagues and friends that many are still relying on UINavigationController/UIHostingControllers for pushing and presenting views. Do you think this is something that can be investigated or fixed on your end? If so, I can also send a report through the feedback assistant. If not, then I would just not use toolbar item group until I can migrate to SwiftUI presentation. Thanks!
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
1w
Reply to ToolbarItemGroup With Palette Style Cannot Present a View Controller While the Context Menu Is Visible
Thank you for the discussion, and all the details and your recommendations Albert. I just had the chance to try using Menu instead of ToolbarItemGroup and it worked just fine, without any workarounds. Leaving the final code as a reference: .toolbar { ToolbarItem(placement: .topBarTrailing) { Menu { Button("ft_commons_edit".localised, systemImage: "pencil") { viewModel.didTapEditAction() } Button("ft_commons_delete".localised, systemImage: "trash") { viewModel.didTapDeleteAction() } } label: { Image("edit-icon") .resizable() .frame(width: 24.0, height: 24.0) } } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
5d