Codemagic IOS 构建 - 无法构建 iOS 应用程序 - 原因是什么?

如何解决Codemagic IOS 构建 - 无法构建 iOS 应用程序 - 原因是什么?

我正在尝试为 IOS 构建我的应用。

我有 windows + flutter/Dart 没有 IOS 开发工具。

使用 Codemagic 为 Android 版本构建和用于 IOS 的简单签名应用程序顺利完成。 IPHONEOS_DEPLOYMENT_TARGET = 12.0;

附加主应用程序的 Codemagic 构建日志

警告是失败的原因吗?

他们的主要问题是什么?

> flutter build ipa --release --export-options-plist /Users/builder/export_options.plist -t lib/main_app1.dart

Running "flutter pub get" in clone...                           
 1,418ms

Archiving com.xxx...
Upgrading contents.xcworkspacedata

Automatically signing iOS for device deployment using specified development team in Xcode project: xxxxx

Running pod install...                                          
   20.3s

Running Xcode build...                                          

Xcode archive done.                                         108.4s

Failed to build iOS app
Error output from Xcode build:
↳
    ** ARCHIVE FAILED **


Xcode's output:
↳
    2 warnings generated.
    /Users/builder/programs/flutter_2_0_3/.pub-cache/hosted/pub.dartlang.org/geolocator-7.0.1/ios/Classes/GeolocatorPlugin.m:199:11: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations]
              openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
              ^~~~~~~
              openURL:options:completionHandler:
    In module 'UIKit' imported from /Users/builder/clone/ios/Pods/Target Support Files/geolocator/geolocator-prefix.pch:2:
    /Applications/Xcode-12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:123:1: note: 'openURL:' has been explicitly marked deprecated here
    - (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:",ios(2.0,10.0)) NS_EXTENSION_UNAVAILABLE_IOS("");
    ^
    1 warning generated.
    /Users/builder/programs/flutter_2_0_3/.pub-cache/hosted/pub.dartlang.org/flutter_phone_direct_caller-1.0.1/ios/Classes/FlutterPhoneDirectCallerPlugin.m:24:22: warning: 'stringByAddingPercentEscapesUsingEncoding:' is deprecated: first deprecated in iOS 9.0 - Use -stringByAddingPercentEncodingWithAllowedCharacters: instead,which always uses the recommended UTF-8 encoding,and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid. [-Wdeprecated-declarations]
        number = [number stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
                         ^
    In module 'UIKit' imported from /Users/builder/clone/ios/Pods/Target Support Files/flutter_phone_direct_caller/flutter_phone_direct_caller-prefix.pch:2:
    In module 'Foundation' imported from /Applications/Xcode-12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
    /Applications/Xcode-12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:595:1: note: 'stringByAddingPercentEscapesUsingEncoding:' has been explicitly marked deprecated here
    - (nullable NSString *)stringByAddingPercentEscapesUsingEncoding:(NSStringEncoding)enc API_DEPRECATED("Use -stringByAddingPercentEncodingWithAllowedCharacters: instead,and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid.",macos(10.0,10.11),9.0),watchos(2.0,2.0),tvos(9.0,9.0));
    ^
    /Users/builder/programs/flutter_2_0_3/.pub-cache/hosted/pub.dartlang.org/flutter_phone_direct_caller-1.0.1/ios/Classes/FlutterPhoneDirectCallerPlugin.m:30:51: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations]
        } else if(![[UIApplication sharedApplication] openURL:[NSURL URLWithString:number]]) {
                                                      ^~~~~~~
                                                      openURL:options:completionHandler:
    In module 'UIKit' imported from /Users/builder/clone/ios/Pods/Target Support Files/flutter_phone_direct_caller/flutter_phone_direct_caller-prefix.pch:2:
    /Applications/Xcode-12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:123:1: note: 'openURL:' has been explicitly marked deprecated here
    - (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:",10.0)) NS_EXTENSION_UNAVAILABLE_IOS("");
    ^
    2 warnings generated.
    /Users/builder/programs/flutter_2_0_3/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.13.6/ios/Classes/AudioplayersPlugin.m:77:33: warning: incompatible pointer types sending 'FlutterEngine *' to parameter of type 'NSObject<FlutterBinaryMessenger> * _Nonnull' [-Wincompatible-pointer-types]
                    binaryMessenger:_headlessEngine];
                                    ^~~~~~~~~~~~~~~
    In module 'Flutter' imported from /Users/builder/programs/flutter_2_0_3/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.13.6/ios/Classes/AudioplayersPlugin.h:1:
    /Users/builder/programs/flutter_2_0_3/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-armv7_arm64/Flutter.framework/Headers/FlutterChannels.h:178:74: note: passing argument to parameter 'messenger' here
                          binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;
                                                                             ^
    /Users/builder/programs/flutter_2_0_3/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.13.6/ios/Classes/AudioplayersPlugin.m:384:66: warning: 'initWithImage:' is deprecated: first deprecated in iOS 10.0 - Use -initWithBoundsSize:requestHandler: [-Wdeprecated-declarations]
          MPMediaItemArtwork *albumArt = [[MPMediaItemArtwork alloc] initWithImage: artworkImage];
                                                                     ^
    In module 'MediaPlayer' imported from /Users/builder/programs/flutter_2_0_3/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.13.6/ios/Classes/AudioplayersPlugin.m:4:
    /Applications/Xcode-12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaItem.h:240:1: note: 'initWithImage:' has been explicitly marked deprecated here
    - (instancetype)initWithImage:(UIImage *)image MP_DEPRECATED("Use -initWithBoundsSize:requestHandler:",ios(5.0,10.0));
    ^
    /Users/builder/programs/flutter_2_0_3/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.13.6/ios/Classes/AudioplayersPlugin.m:607:25: warning: 'seekToTime:' is deprecated: first deprecated in iOS 11.0 - Use -seekToTime:completionHandler:,passing nil for the completionHandler if you don't require notification of completion [-Wdeprecated-declarations]
      [[player currentItem] seekToTime:time];
                            ^
    In module 'AVFoundation' imported from /Users/builder/programs/flutter_2_0_3/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.13.6/ios/Classes/AudioplayersPlugin.m:5:
    /Applications/Xcode-12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItem.h:809:1: note: 'seekToTime:' has been explicitly marked deprecated here
    - (void)seekToTime:(CMTime)time API_DEPRECATED("Use -seekToTime:completionHandler:,passing nil for the completionHandler if you don't require notification of completion",macos(10.7,10.13),ios(4.0,11.0),11.0)) API_UNAVAILABLE(watchos);
    ^
    3 warnings generated.
    ld: warning: Could not find or use auto-linked library 'swiftCoreFoundation'
    ld: warning: Could not find or use auto-linked library 'swiftCompatibility50'
    ld: warning: Could not find or use auto-linked library 'swiftCore'
    ld: warning: Could not find or use auto-linked library 'swiftQuartzCore'
    ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics'
    ld: warning: Could not find or use auto-linked library 'swiftDarwin'
    ld: warning: Could not find or use auto-linked library 'swiftUIKit'
    ld: warning: Could not find or use auto-linked library 'swiftFoundation'
    ld: warning: Could not find or use auto-linked library 'swiftCompatibility51'
    ld: warning: Could not find or use auto-linked library 'swiftObjectiveC'
    ld: warning: Could not find or use auto-linked library 'swiftCoreMedia'
    ld: warning: Could not find or use auto-linked library 'swiftDispatch'
    ld: warning: Could not find or use auto-linked library 'swiftMetal'
    ld: warning: Could not find or use auto-linked library 'swiftCompatibilityDynamicReplacements'
    ld: warning: Could not find or use auto-linked library 'swiftCor
eImage'
    ld: warning: Could not find or use auto-linked library 'swiftCoreAudio'
    Undefined symbols for architecture arm64:
      "__swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements",referenced from:
          __swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements_$_telephony in libtelephony.a(SwiftTelephonyPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements_$_telephony)
      "__swift_FORCE_LOAD_$_swiftCompatibility51",referenced from:
          __swift_FORCE_LOAD_$_swiftCompatibility51_$_telephony in libtelephony.a(SwiftTelephonyPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCompatibility51_$_telephony)
      "__swift_FORCE_LOAD_$_swiftCompatibility50",referenced from:
          __swift_FORCE_LOAD_$_swiftCompatibility50_$_telephony in libtelephony.a(SwiftTelephonyPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCompatibility50_$_telephony)
      "__swift_FORCE_LOAD_$_swiftCoreAudio",referenced from:
          __swift_FORCE_LOAD_$_swiftCoreAudio_$_telephony in libtelephony.a(SwiftTelephonyPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCoreAudio_$_telephony)
      "type metadata for Swift.String",referenced from:
          telephony.SwiftTelephonyPlugin.handle(_: __C.FlutterMethodCall,result: (Any?) -> ()) -> () in libtelephony.a(SwiftTelephonyPlugin.o)
          function signature specialization <Arg[0] = Dead,Arg[1] = Dead,Arg[2] = Owned To Guaranteed> of function signature specialization <Arg[1] = [Closure Propagated : reabstraction thunk helper from @escaping @callee_unowned @convention(block) (@unowned Swift.Optional<Swift.AnyObject>) -> () to @escaping @callee_guaranteed (@in_guaranteed Swift.Optional<Any>) -> (),Argument Types : [@escaping @callee_unowned @convention(block) (@unowned Swift.AnyObject?) -> ()]> of telephony.SwiftTelephonyPlugin.handle(_: __C.FlutterMethodCall,result: (Any?) -> ()) -> () in libtelephony.a(SwiftTelephonyPlugin.o)
      "_swift_bridgeObjectRelease",result: (Any?) -> ()) -> () in libtelephony.a(SwiftTelephonyPlugin.o)
      "__swift_FORCE_LOAD_$_swiftCoreMedia",referenced from:
          __swift_FORCE_LOAD_$_swiftCoreMedia_$_telephony in libtelephony.a(SwiftTelephonyPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCoreMedia_$_telephony)
      "__swift_FORCE_LOAD_$_swiftCoreImage",referenced from:
          __swift_FORCE_LOAD_$_swiftCoreImage_$_telephony in libtelephony.a(SwiftTelephonyPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCoreImage_$_telephony)
      "__swift_FORCE_LOAD_$_swiftCoreGraphics",referenced from:
          __swift_FORCE_LOAD_$_swiftCoreGraphics_$_telephony in libtelephony.a(SwiftTelephonyPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCoreGraphics_$_telephony)
      "__swift_FORCE_LOAD_$_swiftQuartzCore",referenced from:
          __swift_FORCE_LOAD_$_swiftQuartzCore_$_telephony in libtelephony.a(SwiftTelephonyPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftQuartzCore_$_telephony)
      "_swift_release",referenced from:
          ___swift_destroy_boxed_opaque_existential_0 in libtelephony.a(SwiftTelephonyPlugin.o)
      "__swift_FORCE_LOAD_$_swiftDispatch",referenced from:
          __swift_FORCE_LOAD_$_swiftDispatch_$_telephony in libtelephony.a(SwiftTelephonyPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftDispatch_$_telephony)
      "__swift_FORCE_LOAD_$_swiftCoreFoundation",referenced from:
          __swift_FORCE_LOAD_$_swiftCoreFoundation_$_telephony in libtelephony.a(SwiftTelephonyPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCoreFoundation_$_telephony)
      "_swift_getInitializedObjCClass",referenced from:
          static telephony.SwiftTelephonyPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libtelephony.a(SwiftTelephonyPlugin.o)
          type metadata accessor for telephony.SwiftTelephonyPlugin in libtelephony.a(SwiftTelephonyPlugin.o)
          @objc static telephony.SwiftTelephonyPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libtelephony.a(SwiftTelephonyPlugin.o)
          telephony.SwiftTelephonyPlugin.handle(_: __C.FlutterMethodCall,result: (Any?) -> ()) -> () in libtelephony.a(SwiftTelephonyPlugin.o)
      "__swift_FORCE_LOAD_$_swiftFoundation",referenced from:
          __swift_FORCE_LOAD_$_swiftFoundation_$_telephony in libtelephony.a(SwiftTelephonyPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftFoundation_$_telephony)
      "value witness table for Builtin.UnknownObject",referenced from:
          full type metadata for telephony.SwiftTelephonyPlugin in libtelephony.a(SwiftTelephonyPlugin.o)
      "(extension in Foundation):Swift.String._bridgeToObjectiveC() -> __C.NSString",referenced from:
          static telephony.SwiftTelephonyPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libtelephony.a(SwiftTelephonyPlugin.o)
          @objc static telephony.SwiftTelephonyPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libtelephony.a(SwiftTelephonyPlugin.o)
      "Swift._bridgeAnythingToObjectiveC(A) -> Swift.AnyObject",referenced from:
          function signature specialization <Arg[0] = Dead,result: (Any?) -> ()) -> () in libtelephony.a(SwiftTelephonyPlugin.o)
      "_swift_getTypeByMangledNameInContext",referenced from:
          ___swift_instantiateConcreteTypeFromMangledName in libtelephony.a(SwiftTelephonyPlugin.o)
      "__swift_FORCE_LOAD_$_swiftUIKit",referenced from:
          __swift_FORCE_LOAD_$_swiftUIKit_$_telephony in libtelephony.a(SwiftTelephonyPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftUIKit_$_telephony)
      "Swift.String.append(Swift.String) -> ()",result: (Any?) -> ()) -> () in libtelephony.a(SwiftTelephonyPlugin.o)
      "__swift_FORCE_LOAD_$_swiftDarwin",referenced from:
          __swift_FORCE_LOAD_$_swiftDarwin_$_telephony in libtelephony.a(SwiftTelephonyPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftDarwin_$_telephony)
      "_swift_unknownObjectRelease",referenced from:
          static telephony.SwiftTelephonyPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libtelephony.a(SwiftTelephonyPlugin.o)
          @objc static telephony.SwiftTelephonyPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libtelephony.a(SwiftTelephonyPlugin.o)
          function signature specialization <Arg[0] = Dead,result: (Any?) -> ()) -> () in libtelephony.a(SwiftTelephonyPlugin.o)
      "static (extension in Foundation):Swift.String._unconditionallyBridgeFromObjectiveC(__C.NSString?) -> Swift.String",result: (Any?) -> ()) -> () in libtelephony.a(SwiftTelephonyPlugin.o)
      "__swift_FORCE_LOAD_$_swiftMetal",referenced from:
          __swift_FORCE_LOAD_$_swiftMetal_$_telephony in libtelephony.a(SwiftTelephonyPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftMetal_$_telephony)
      "_swift_unknownObjectRetain",referenced from:
          @objc static telephony.SwiftTelephonyPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libtelephony.a(SwiftTelephonyPlugin.o)
      "__swift_FORCE_LOAD_$_swiftObjectiveC",referenced from:
          __swift_FORCE_LOAD_$_swiftObjectiveC_$_telephony in libtelephony.a(SwiftTelephonyPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftObjectiveC_$_telephony)
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    warning: Provisioning profile "com XXX ios_app_development xxxxxxx" for "Runner" contains entitlements that aren't in the entitlements file: com.apple.developer.devicecheck.appattest-environment. To use these entitlements,add them to your entitlements file. Otherwise,remove unused entitlements from your provisioning profile. (in target 'Runner' from project 'Runner')

Encountered error while archiveing for device.


Build failed :|
Failed to build for iOS

解决方法

我认为你应该尝试在你的 xcode 项目中创建一个空文件,比如 BridgeHeader.swift,如果你手动创建这个文件,只需添加

import Foundation

如果这不起作用,请尝试确保您拥有开发人员工具/工具链

,

我删除了IOS文件夹 从简单示例中复制 IOS 并更新所有IOS权限

它开始工作但很快就失败了 我将记录器添加到 mongodb 图集以解决问题

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?
Java在半透明框架/面板/组件上重新绘画。
Java“ Class.forName()”和“ Class.forName()。newInstance()”之间有什么区别?
在此环境中不提供编译器。也许是在JRE而不是JDK上运行?
Java用相同的方法在一个类中实现两个接口。哪种接口方法被覆盖?
Java 什么是Runtime.getRuntime()。totalMemory()和freeMemory()?
java.library.path中的java.lang.UnsatisfiedLinkError否*****。dll
JavaFX“位置是必需的。” 即使在同一包装中
Java 导入两个具有相同名称的类。怎么处理?
Java 是否应该在HttpServletResponse.getOutputStream()/。getWriter()上调用.close()?
Java RegEx元字符(。)和普通点?