Tai*_*der 21 xcode ios flutter flutter-build flutter-ios-build
我已经创建了 flutter 应用程序,现在想要创建存档以便在 Xcode 14.3 中分发。
问题
PhaseScriptExecution failed with a nonzero exit code已经尝试过了
注意 转到“钥匙串访问”。从禁用的登录选项中再次选择“锁定和解锁”。如何启用它?
期待您的帮助。
Podfile
# Uncomment this line to define a global platform for your project
platform :ios, '12.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|
flutter_additional_ios_build_settings(target)
end
end
Run Code Online (Sandbox Code Playgroud)
Maz*_*far 57
你应该在你的项目中搜索这个文件:
Pods-[您的项目名称]-frameworks.sh (...-frameworks.sh)
并编辑此部分:
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink "${source}")"
fi
Run Code Online (Sandbox Code Playgroud)
到
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink -f "${source}")"
fi
Run Code Online (Sandbox Code Playgroud)
源=“$(readlink“$ {source}”)”----->源=“$(readlink -f“$ {source}”)”
解决方法是更新所有生成的 ...-frameworks.sh 文件,以将 -f 标志添加到对 readlink 的调用中。换句话说,将 source="$(readlink "${source}")" 替换为 source="$(readlink -f "${source}")"
此链接可能对您有帮助: https ://github.com/CocoaPods/CocoaPods/issues/11808
Tai*_*der 29
正如建议的
@Maziar萨达法尔
按照下面步骤 1 中的说明进行操作,在此之后,我还必须按照步骤 2 中的说明做另一件事。
Pods-[您的项目名称]-frameworks.sh (...-frameworks.sh)
并编辑此部分:
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink "${source}")"
fi
Run Code Online (Sandbox Code Playgroud)
到
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink -f "${source}")"
fi
Run Code Online (Sandbox Code Playgroud)
源=“$(readlink“$ {source}”)”----->源=“$(readlink -f“$ {source}”)”
解决方法是更新所有生成的 ...-frameworks.sh 文件,以将 -f 标志添加到对 readlink 的调用中。换句话说,将 source="$(readlink "${source}")" 替换为 source="$(readlink -f "${source}")"