我的应用使用 appStoreOverlay 显示推荐的应用,但提交到应用商店时出现错误。
ITMS-90863: Apple silicon Macs support issue - The app uses symbols that are not present on Mac:
/System/Library/Frameworks/_StoreKit_SwiftUI.framework/_StoreKit_SwiftUI
_$s7SwiftUI4ViewP010_StoreKit_aB0F03appD7Overlay11isPresented13configurationQrAB7BindingVySbG_So22SKOverlayConfigurationCyctRQOMQ
我认为 SKOverlay.AppConfiguration 不存在于硅 Mac 上。根据“构建通用 macOS 二进制文件”,我添加了一些宏并且代码仅在 iOS 中运行,但错误仍然存在。有什么建议么?
#if !targetEnvironment(macCatalyst) && os(iOS)
Button(action: { showRecommendedApp.toggle() }) { Text("App recommended".localized)
.appStoreOverlay(isPresented: $showRecommendedApp) {
SKOverlay.AppConfiguration(appIdentifier: "12345", position: .bottom)
}
#endif