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:
The complete Code:
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 } }
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.
https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-14-beta-release-notesThe appStoreOverlay(isPresented:configuration:) view modifier isn’t currently available when building for Simulator targets. (66177659)