Post

Replies

Boosts

Views

Activity

SwiftUI.PreviewProvider MainActor isolation warning
I am receiving two (duplicate) warnings about concurrency on a file that is simply a SwiftUI View. This has started to happen after I have added Swift Concurrency on other parts of the codebase. The full warning is: SwiftUI.PreviewProvider Main actor-isolated static property '_previews' cannot be used to satisfy nonisolated protocol requirement '_previews' declared here Warning is caused by the CloseButton_Previews below. Here's the full file: import SwiftUI import DesignSystem struct CloseButton: View {   private enum Constants {     static let closeIconSize = CGSize(width: 32, height: 32)   }   var body: some View {     HStack {       IconButton {         print("Close button was tapped")       } icon: {         Icon.closeBig           .resizable()           .symbolRenderingMode(.hierarchical)           .foregroundColor(.gray)           .frame(             width: Constants.closeIconSize.width,             height: Constants.closeIconSize.height,             alignment: .center           )       }     }     .frame(       width: Spacing.minimumTappableLength,       height: Spacing.minimumTappableLength,       alignment: .center     )   } } struct CloseButton_Previews: PreviewProvider {   static var previews: some View {     ZStack {       Color(.systemMint)       CloseButton()     }     .ignoresSafeArea()   } } And the IconButton.swift: import SwiftUI public struct IconButton<Icon: View>: View {   private let action: (() -> Void)   private let icon: Icon   public init(action: @escaping (() -> Void), icon: () -> Icon) {     self.action = action     self.icon = icon()   }       public var body: some View {     Button {       action()     } label: {       icon     }     .frame(       width: Spacing.minimumTappableLength,       height: Spacing.minimumTappableLength,       alignment: .center     )     .padding()   } } I suspect maybe the problem is somewhere else but somehow the warning is shown on the Preview. Because CloseButton is only used by another SwiftUI View that uses some Swift Concurrency. In itself it doesn't have anything that I can think of that might cause this. Any help would be much appreciated. Thanks!
2
4
1.6k
Jan ’23
Auto renewable subscriptions disappear after submitting the app for review
I added auto renewable subscriptions to my app. First submission of IAPs require a new build along with it. I tested everything locally through the .storekit file. Everything worked perfectly so I submitted it for review. The moment I did so, StoreKit.Product.products(for:) stops returning the products. If I click on the "Sync" button on .storekit now the pre-existing subscriptions disappear. Apple reviews the build and states that there are no subscription options visible. Also in "Prepare for submission" phase, IAP & Subscriptions section disappears so one can no longer add them to the next builds. I have tried to explain this 7 times (with new version submissions) through App Review Comments. It looks like nobody reads the responses. I tried adding the issue as a note, screenshot, video in different parts of the submission. They are entirely ignored. I sent 3 support request none of which have resulted in a response. I tried setting up a 1 on 1 call with Apple and it got rejected. This issue has been reported by other people in this forum and others with no solutions provided. I am completely out of options at this point. If I and others are indeed right to think that there is a bug in App Store Connect on the specific scenario with first time IAP review submissions where the first build is rejected by developer's fault, it bugs out with subscriptions. My app's success entirely depends on this as I can't monetise it and I am in Apple Developer Program which means I am subscribing to this service. Can someone from Apple Team, please respond to this specific issue on whichever medium chosen. I am completely blocked and in dire need of help. Thanks for your understanding.
1
0
477
Dec ’24