swift 生成错误:在XCode 14中不能使用“@available”将存储属性标记为可能不可用

c2e8gylq  于 2022-10-31  发布在  Swift
关注(0)|答案(1)|浏览(936)

我正在使用stripe/react-native-stripe,但当我准备创建iOS版本时,它给了我错误Stored properties cannot be marked potentially unavailable with '@available'。我想解决这个问题,有人能帮我解决这个问题吗?

r7s23pms

r7s23pms1#

Stripe React Native SDK需要Xcode 13.2.1或更高版本,并且与面向iOS 12或更高版本的应用兼容。
然后在podfile中更改平台:ios 11.0.到12.0
并使用以下内容更新安装后配置

post_install do |installer|
        installer.pods_project.targets.each do |target|
          target.build_configurations.each do |config|
            if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
              target.build_configurations.each do |config|
                  config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
              end
            end
          end
        end
      end

并运行podupdate和podinstall命令,希望此解决方案可以从您这边运行

相关问题