gpt4 book ai didi

xcode - 升级后,Xcode 上的 Flutter 应用程序无法启动

转载 作者:行者123 更新时间:2023-12-03 16:58:53 26 4
gpt4 key购买 nike

我有一个用 Flutter 制作的应用程序,因为最新版本的 Xcode 绝对没有像以前那样工作。
我已经为这个问题苦苦挣扎了将近一个星期,错误因小时而异。
主要问题是,当将应用程序分发给 Apple 进行审核时,他们拒绝了它并显示以下消息:

2.1 Performance: App Completeness Guideline

2.1 - Performance - App Completeness

We discovered one or more bugs in your app when reviewed on iPadrunning iOS 14.0 on Wi-Fi.

Specifically, we were still unable to login through Sign in with Apple



我觉得这很奇怪,因为我之前上传的所有内容都得到了验证,没有任何问题。
所以为了解决这个问题,我试图通过模拟器运行应用程序,因为我没有 iPad。
这就是问题开始的地方。
旁注:在物理 iPhone 上运行没有问题,我正在打开项目 runner.xcworkspace ,而不是 runner.xccodeproj .
主要问题是 Xcode 找不到任何库,从第一个开始:

GeneratedPluginRegistrant.m:10:9: Module 'apple_sign_in' not found


我已经尝试了与此问题相关的所有解决方案,但无济于事。
  • 删除pod文件,pod安装,
  • pod 分解、pod 初始化、pod 安装
  • flutter build ios --release, flutter run
  • 我试过删除我的项目并克隆它以重新开始
  • 有时甚至样板应用程序都无法运行
  • 我检查过类似 https://github.com/flutter/flutter/issues/53573 的 github 帖子和 https://github.com/flutter/flutter/issues/33423没有运气。
  • ...检查了无数线程。

  • Flutter 医生和 pod 文件如下:

    [✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.6 19G2021,locale en-ES)• Flutter version 1.20.4 at /Users/peter/flutter• Framework revision fba99f6cf9 (11 days ago), 2020-09-14 15:32:52 -0700• Engine revision d1bc06f032• Dart version 2.9.2

    [✓] Android toolchain - develop for Android devices (Android SDKversion 30.0.1)• Android SDK at /Users/peter/Library/Android/sdk• Platform android-30, build-tools 30.0.1• Java binary at:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin/java• Java version Java(TM) SE Runtime Environment (build 1.8.0_51-b16)• All Android licenses accepted.

    [✓] Xcode - develop for iOS and macOS (Xcode 12.0)• Xcode at /Applications/Xcode.app/Contents/Developer• Xcode 12.0, Build version 12A7209• CocoaPods version 1.9.3

    [!] Android Studio (not installed)• Android Studio not found; download fromhttps://developer.android.com/studio/index.html(or visit https://flutter.dev/docs/get-started/install/macos#android-setupfor detailed instructions).

    [!] IntelliJ IDEA Community Edition (version 2017.2.5)• IntelliJ at /Applications/IntelliJ IDEA CE.app✗ Flutter plugin not installed; this adds Flutter specific functionality.✗ Dart plugin not installed; this adds Dart specific functionality.• For information about installing plugins, seehttps://flutter.dev/intellij-setup/#installing-the-plugins

    [✓] Connected device (1 available)• iPhone 11 (mobile) • F1B8AE15-9028-4E0D-BD9D-2F2C7CC93ECE • ios •com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)

    ! Doctor found issues in 2 categories.


    播客文件:
    # Uncomment this line to define a global platform for your project
    platform :ios, '9.0'

    # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
    ENV['COCOAPODS_DISABLE_STATS'] = 'true'

    project 'Runner', {
    'Debug' => :debug,
    'Profile' => :release,
    'Release' => :release,
    }

    def flutter_root
    generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
    unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
    end

    File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
    end
    raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
    end

    require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

    flutter_ios_podfile_setup

    target 'Runner' do
    use_frameworks!
    use_modular_headers!

    flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
    end

    post_install do |installer|
    installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
    config.build_settings['ENABLE_BITCODE'] = 'YES'
    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
    end
    end
    end

    最佳答案

    Flutter 1.20.4 和 XCode12/iOS14 有问题。
    您需要将 Flutter 更新到当前测试版(1.22.0-12.3.pre),其中包含许多针对新 iOS/XCode 版本的修复。
    https://flutter.dev/docs/development/ios-14
    编辑 10/01/2020:
    Flutter 1.22.0 已发布稳定版,开箱即可与 XCode 12 和 iOS 14 一起使用。

    关于xcode - 升级后,Xcode 上的 Flutter 应用程序无法启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64063385/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com