Flutter square_in_app_payments 应用程序不会在模拟器上运行

问题描述 投票:0回答:0

我正在尝试将 square sdk 安装到我的 flutter 应用程序中,但我在 ios 模拟器上运行时遇到问题。我收到一条错误消息,应用程序在安装到模拟器之前终止。安装在 VSCode 中停止。

这是我的播客文件:

# Uncomment this line to define a global platform for your project
platform :ios, '13.1'

# 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|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
      # Force CocoaPods targets to always build for x86_64
      config.build_settings['ARCHS[sdk=iphonesimulator*]'] = 'x86_64'
    end
  end
end

关于我的系统设置:

macbook air M1 2020
os: Ventura 13.3.1
ios simulator:16.4
Xcode version : 14.3

尝试在 ios 模拟器上运行时出现的错误:

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: DYLD 1 Library missing
Library not loaded: @rpath/ThreeDS_SDK.framework/ThreeDS_SDK
Referenced from: <EAF8E1BA-E3AE-372F-B629-A255114E419B> /Users/juliapak/Library/Developer/CoreSimulator/Devices/63D54239-A58D-4E24-8D89-901EA6209734/data/Containers/Bundle/Application/C6630B21-CF36-4CEA-897F-10128AF7D448/Runner.app/Frameworks/SquareBuyerVerificationSDK.framework/SquareBuyerVerificationSDK
Reason: tried: '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (no such file), '/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (no such file, no dyld cache), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (no such file), '/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (no such file, no dyld cache), '/Appl
(terminated at launch; ignore backtrace)
ios flutter square
© www.soinside.com 2019 - 2024. All rights reserved.