【发布时间】:2022-08-02 20:34:17
【问题描述】:
我正在尝试使用适用于 IOS 的 codemagic 构建我的颤振应用程序。因为我没有任何mac电脑。
但是我在构建过程中遇到了错误。
Running pod install... 64.3s
Running Xcode build...
Xcode build done. 126.8s
Failed to build iOS app
Error output from Xcode build:
↳
2022-05-03 21:14:57.055 xcodebuild[2494:21713] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-05-03 21:14:57.056 xcodebuild[2494:21713] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
Xcode\'s output:
↳
/Users/builder/clone/ios/Runner/GeneratedPluginRegistrant.m:30:9: fatal error: module \'flutter_udid\' not found
@import flutter_udid;
~~~~~~~^~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/builder/clone/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target \'IPHONEOS_DEPLOYMENT_TARGET\' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.4.99. (in target \'Toast\' from project \'Pods\')
/Users/builder/clone/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target \'IPHONEOS_DEPLOYMENT_TARGET\' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.4.99. (in target \'SAMKeychain\' from project \'Pods\')
/Users/builder/clone/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target \'IPHONEOS_DEPLOYMENT_TARGET\' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.4.99. (in target \'ReachabilitySwift\' from project \'Pods\')
我还没有在 IOS 上开发过任何东西。此配置未受影响。我在 Ubuntu 开发环境中
这是我的 codemagic 默认配置。
workflows:
default-workflow:
name: Default Workflow
max_build_duration: 60
environment:
flutter: \"v2.8.1\"
xcode: latest
cocoapods: default
scripts:
- flutter packages pub get
- find . -name \"Podfile\" -execdir pod install \\;
- flutter build ios --debug --no-codesign
artifacts:
- build/ios/ipa/*.ipa
- /tmp/xcodebuild_logs/*.log
- \'*.snap\'
- build/windows/**/*.msix
- flutter_drive.log
publishing:
email:
recipients:
- my@email.tld
我们必须注意find . -name \"Podfile\" -execdir pod install \\; 也失败了
[!] Invalid `Podfile` file: /Users/builder/clone/ios/Flutter/Generated.xcconfig must exist. If you\'re running pod install manually, make sure flutter pub get is executed first.
# from /Users/builder/clone/ios/Podfile:17
# -------------------------------------------
# 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
# -------------------------------------------
这是我的 pdofile(顺便说一下,这不是我的文件)
# Uncomment this line to define a global platform for your project
platform :ios, \'11.0\'
inhibit_all_warnings!
# 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
标签: ios xcode flutter codemagic