Compile Error: Value of type 'some View' has no member 'appStoreOverlay'

I Down the Sample Code From Apple, The Example App For App Clips, Fruta.
When I built It with the Xcode 12 Bate4 , Error was happened, Who can tell me Why? Some one else has built the App Fruta?

The Error Code:
Code Block
#if APPCLIP
Text("App Store Overlay")
.hidden()
.appStoreOverlay(isPresented: $presentingAppStoreOverlay)
{
SKOverlay.AppClipConfiguration(position: .bottom)
}
 #endif


The complete Code:
Code Block
var body: some View {
        VStack(spacing: 0) {
            Spacer()
            
            orderStatusCard
            
            Spacer()
            
            if presentingBottomBanner {
                bottomBanner
            }
            
            #if APPCLIP
            Text("App Store Overlay")
                .hidden()
                .appStoreOverlay(isPresented: $presentingAppStoreOverlay) {
                    SKOverlay.AppClipConfiguration(position: .bottom)
                }
            #endif
        }
        .onChange(of: model.hasAccount) { _ in
            #if APPCLIP
            if model.hasAccount {
                presentingAppStoreOverlay = true
            }
            #endif
        }
        .frame(maxWidth: .infinity, maxHeight: .infinity)
        .background(
            ZStack {
                if let order = model.order {
                    order.smoothie.image
                        .resizable()
                        .aspectRatio(contentMode: .fill)
                } else {
                    Color("order-placed-background")
                }
                
                blurView
                    .opacity(model.order!.isReady ? 0 : 1)
            }
            .edgesIgnoringSafeArea(.all)
        )
        .animation(.spring(response: 0.25, dampingFraction: 1), value: orderReady)
        .animation(.spring(response: 0.25, dampingFraction: 1), value: model.hasAccount)
        .onAppear {
            DispatchQueue.main.asyncAfter(deadline: .now() + 4) {
                self.model.orderReadyForPickup()
            }
            #if APPCLIP
            if model.hasAccount {
                presentingAppStoreOverlay = true
            }
            #endif
        }
    }


Answered by Frameworks Engineer in 625987022
This is a known issue in beta 4 where the appStoreOverlay modifier isn't available when building for the simulator. You can workaround this issue by building for a non-simulator target or removing lines 27-35.

The appStoreOverlay(isPresented:configuration:) view modifier isn’t currently available when building for Simulator targets. (66177659)

https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-14-beta-release-notes


Accepted Answer
This is a known issue in beta 4 where the appStoreOverlay modifier isn't available when building for the simulator. You can workaround this issue by building for a non-simulator target or removing lines 27-35.

The appStoreOverlay(isPresented:configuration:) view modifier isn’t currently available when building for Simulator targets. (66177659)

https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-14-beta-release-notes


Dear Frameworks Engineer.

 Thanks so much for your answer but i'm not sure i understand which lines you mean by 27-35, could you specify ?

thanks so much for your time !
Lines 27-35 of the complete code you provided:
Code Block
            Text("App Store Overlay")
                .hidden()
                .appStoreOverlay(isPresented: $presentingAppStoreOverlay) {
                    SKOverlay.AppClipConfiguration(position: .bottom)
                }


Resolved in iOS & iPadOS 14 beta 5
The appStoreOverlay(isPresented:configuration:) view modifier is now available when building for Simulator targets. (66177659)


Compile Error: Value of type 'some View' has no member 'appStoreOverlay'
 
 
Q