openkraken / kraken

A web standards-compliant, high-performance rendering engine based on Flutter.
https://openkraken.com
Apache License 2.0
4.93k stars 304 forks source link

flutte版本2.2.1 Kraken版本0.7.3+2 xcode版本12.5编译失败 #412

Closed sisychen closed 3 years ago

sisychen commented 3 years ago

重现代码main.dart: import 'package:flutter/material.dart'; import 'package:kraken/kraken.dart';

void main() { runApp(MyApp()); }

class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { Kraken kraken = Kraken(bundleURL: 'https://raw.githubusercontent.com/openkraken/kraken/master/kraken/example/assets/bundle.js',); return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, visualDensity: VisualDensity.adaptivePlatformDensity, ), home: kraken, ); } }

出现的问题: Failed to build iOS app Error output from Xcode build: ↳ 2021-06-12 19:51:37.407 xcodebuild[23612:196611] CFURLRequestSetHTTPCookieStorageAcceptPolicy_block_invoke: no longer implemented and should not be called 2021-06-12 19:51:37.536 xcodebuild[23612:196256] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-18108/DTDeviceKitBase/DTDKRemoteDeviceData.m:371 Details: (null) deviceType from 656fc0285122788a5c7733ad49d4832161b2ebe0 was NULL when -platform called. Object: <DTDKMobileDeviceToken: 0x7fc548cec1e0> Method: -platform Thread: <NSThread: 0x7fc548d4ab70>{number = 4, name = (null)} Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide. 2021-06-12 19:51:38.340 xcodebuild[23612:196611] DVTPortal: Service '<DVTPortalViewDeveloperService: 0x7fc548cfe370; action='viewDeveloper'>' encountered an unexpected result code from the portal ('1100') 2021-06-12 19:51:38.340 xcodebuild[23612:196611] DVTPortal: Error: Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={ creationTimestamp = "2021-06-12T11:51:38Z"; httpCode = 200; protocolVersion = QH65B2; requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"; responseId = "34d510bb-42bf-498b-9d99-a460b3048118"; resultCode = 1100; resultString = "Your session has expired. Please log in."; userLocale = "en_US"; userString = "Your session has expired. Please log in."; }, NSLocalizedDescription=Your session has expired. Please log in.} 2021-06-12 19:51:40.341 xcodebuild[23612:196611] DVTPortal: Service '<DVTPortalViewDeveloperService: 0x7fc54975fba0; action='viewDeveloper'>' encountered an unexpected result code from the portal ('1100') 2021-06-12 19:51:40.341 xcodebuild[23612:196611] DVTPortal: Error: Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={ creationTimestamp = "2021-06-12T11:51:40Z"; httpCode = 200; protocolVersion = QH65B2; requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"; responseId = "d4f2246d-d202-47d1-91d5-0059d8ee7d0e"; resultCode = 1100; resultString = "Your session has expired. Please log in."; userLocale = "en_US"; userString = "Your session has expired. Please log in."; }, NSLocalizedDescription=Your session has expired. Please log in.} 2021-06-12 19:51:41.495 xcodebuild[23612:196611] DVTPortal: Service '<DVTPortalViewDeveloperService: 0x7fc54947d4c0; action='viewDeveloper'>' encountered an unexpected result code from the portal ('1100') 2021-06-12 19:51:41.495 xcodebuild[23612:196611] DVTPortal: Error: Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={ creationTimestamp = "2021-06-12T11:51:41Z"; httpCode = 200; protocolVersion = QH65B2; requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"; responseId = "d707a854-0b91-4576-a8cc-5ed0a7ccbcf2"; resultCode = 1100; resultString = "Your session has expired. Please log in."; userLocale = "en_US"; userString = "Your session has expired. Please log in."; }, NSLocalizedDescription=Your session has expired. Please log in.} 2021-06-12 19:51:42.686 xcodebuild[23612:196611] DVTPortal: Service '<DVTPortalViewDeveloperService: 0x7fc54970e8b0; action='viewDeveloper'>' encountered an unexpected result code from the portal ('1100') 2021-06-12 19:51:42.686 xcodebuild[23612:196611] DVTPortal: Error: Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={ creationTimestamp = "2021-06-12T11:51:42Z"; httpCode = 200; protocolVersion = QH65B2; requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"; responseId = "b96b558c-7ee9-41b4-8cc8-b11427921c27"; resultCode = 1100; resultString = "Your session has expired. Please log in."; userLocale = "en_US"; userString = "Your session has expired. Please log in."; }, NSLocalizedDescription=Your session has expired. Please log in.} 2021-06-12 19:51:43.846 xcodebuild[23612:196611] DVTPortal: Service '<DVTPortalViewDeveloperService: 0x7fc549813f10; action='viewDeveloper'>' encountered an unexpected result code from the portal ('1100') 2021-06-12 19:51:43.846 xcodebuild[23612:196611] DVTPortal: Error: Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={ creationTimestamp = "2021-06-12T11:51:43Z"; httpCode = 200; protocolVersion = QH65B2; requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"; responseId = "6d921b16-a19f-41d7-8304-16eee03368f1"; resultCode = 1100; resultString = "Your session has expired. Please log in."; userLocale = "en_US"; userString = "Your session has expired. Please log in."; }, NSLocalizedDescription=Your session has expired. Please log in.} BUILD FAILED

Xcode's output: ↳ ../../../../flutter/.pub-cache/hosted/pub.flutter-io.cn/kraken-0.7.3+2/lib/src/dom/elements/input.dart:56:7: Error: The non-abstract class 'EditableTextDelegate' is missing implementations for these members:

openkraken-bot[bot] commented 3 years ago

Thanks for opening this issue!

andycall commented 3 years ago

0.7.3+2 还是 flutter 1.22.4 的版本,支持 flutter 2.2.0 的版本目前还在 main 分支上,还需要等几个 PR 合并之后发布的 0.8 版本的包

sisychen commented 3 years ago

根据上面描述的版本,安卓是可以编译起来了,ios还是一堆的报错(Xcode12.5版本),以下是报错内容: Xcode's output: ↳ /Users/~/Desktop/study/kraken/myapp/ios/Pods/Reachability/Reachability.m:465:63: warning: cast to smaller integer type 'unsigned int' from 'Reachability *' [-Wpointer-to-int-cast] NSStringFromClass([self class]), (unsigned int) self, [self currentReachabilityFlags]]; ^~~~~~~ 1 warning generated. 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 'swiftMetal' ld: warning: Could not find or use auto-linked library 'swiftObjectiveC' 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 'swiftCoreImage' ld: warning: Could not find or use auto-linked library 'swiftCompatibilityDynamicReplacements' 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 'swiftDispatch' ld: warning: Could not find or use auto-linked library 'swiftCoreMedia' ld: warning: Could not find or use auto-linked library 'swiftCoreMIDI' ld: warning: Could not find or use auto-linked library 'swiftCoreAudio' ld: warning: Could not find or use auto-linked library 'swiftSwiftOnoneSupport' Undefined symbols for architecture arm64: "swift_FORCELOAD$_swiftCoreMIDI", referenced from: swift_FORCELOAD$swiftCoreMIDI$_vibration in libvibration.a(VibrationPluginSwift.o) (maybe you meant: swift_FORCELOAD$swiftCoreMIDI$_vibration) "swift_FORCELOAD$_swiftMetal", referenced from: swift_FORCELOAD$swiftMetal$_vibration in libvibration.a(VibrationPluginSwift.o) (maybe you meant: swift_FORCELOAD$swiftMetal$_vibration) "swift_FORCELOAD$_swiftCoreImage", referenced from: swift_FORCELOAD$swiftCoreImage$_vibration in libvibration.a(VibrationPluginSwift.o) (maybe you meant: swift_FORCELOAD$swiftCoreImage$_vibration) "swift_FORCELOAD$_swiftDispatch", referenced from: swift_FORCELOAD$swiftDispatch$_vibration in libvibration.a(VibrationPluginSwift.o) (maybe you meant: swift_FORCELOAD$swiftDispatch$_vibration) "swift_FORCELOAD$_swiftFoundation", referenced from: swift_FORCELOAD$swiftFoundation$_vibration in libvibration.a(VibrationPluginSwift.o) (maybe you meant: swift_FORCELOAD$swiftFoundation$_vibration) "type metadata accessor for Swift.Optional", referenced from: type metadata accessor for C.NSError? in libvibration.a(VibrationPluginSwift.o) "protocol conformance descriptor for Swift.AutoreleasingUnsafeMutablePointer : Swift._Pointer in Swift", referenced from: lazy protocol witness table accessor for type Swift.AutoreleasingUnsafeMutablePointer<C.NSError?> and conformance Swift.AutoreleasingUnsafeMutablePointer : Swift._Pointer in Swift in libvibration.a(VibrationPluginSwift.o) "_swift_getWitnessTable", referenced from: lazy protocol witness table accessor for type Swift.AutoreleasingUnsafeMutablePointer<__C.NSError?> and conformance Swift.AutoreleasingUnsafeMutablePointer : Swift._Pointer in Swift in libvibration.a(VibrationPluginSwift.o) "Swift._convertInOutToPointerArgument(Builtin.RawPointer) -> A", referenced from: @nonobjc C.CHHapticEngine.init() throws -> C.CHHapticEngine in libvibration.a(VibrationPluginSwift.o) @nonobjc C.CHHapticPattern.init(events: [C.CHHapticEvent], parameters: [C.CHHapticDynamicParameter]) throws -> C.CHHapticPattern in libvibration.a(VibrationPluginSwift.o) "_swift_deallocObject", referenced from: l_objectdestroy in libvibration.a(VibrationPluginSwift.o) "Swift._bridgeAnythingToObjectiveC(A) -> Swift.AnyObject", referenced from: reabstraction thunk helper from @escaping @callee_unowned @convention(block) (@unowned Swift.AnyObject?) -> () to @escaping @callee_guaranteed (@in_guaranteed Any?) -> () in libvibration.a(VibrationPluginSwift.o) "static (extension in Foundation):Swift.String._unconditionallyBridgeFromObjectiveC(C.NSString?) -> Swift.String", referenced from: vibration.VibrationPluginSwift.handle(_: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libvibration.a(VibrationPluginSwift.o) "Swift.bridgeAnyObjectToAny(Swift.AnyObject?) -> Any", referenced from: vibration.VibrationPluginSwift.handle(: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libvibration.a(VibrationPluginSwift.o) "type metadata for Swift.Bool", referenced from: vibration.VibrationPluginSwift.handle(_: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libvibration.a(VibrationPluginSwift.o) "static Swift.String.== infix(Swift.String, Swift.String) -> Swift.Bool", referenced from: vibration.VibrationPluginSwift.handle(_: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libvibration.a(VibrationPluginSwift.o) "protocol witness table for Swift.String : Swift.Hashable in Swift", referenced from: vibration.VibrationPluginSwift.(playPattern in 3A3257C106E34F8F40D4D9BC5ACEDFA2)(myArgs: [Swift.String : Any], pattern: [Swift.Int]) -> () in libvibration.a(VibrationPluginSwift.o) vibration.VibrationPluginSwift.handle(: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libvibration.a(VibrationPluginSwift.o) "_swift_dynamicCast", referenced from: vibration.VibrationPluginSwift.(playPattern in 3A3257C106E34F8F40D4D9BC5ACEDFA2)(myArgs: [Swift.String : Any], pattern: [Swift.Int]) -> () in libvibration.a(VibrationPluginSwift.o) vibration.VibrationPluginSwift.handle(: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libvibration.a(VibrationPluginSwift.o) "Swift.Array.count.getter : Swift.Int", referenced from: vibration.VibrationPluginSwift.(playPattern in 3A3257C106E34F8F40D4D9BC5ACEDFA2)(myArgs: [Swift.String : Any], pattern: [Swift.Int]) -> () in libvibration.a(VibrationPluginSwift.o) vibration.VibrationPluginSwift.handle(: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libvibration.a(VibrationPluginSwift.o) "swift_FORCELOAD$_swiftUIKit", referenced from: swift_FORCELOAD$swiftUIKit$_vibration in libvibration.a(VibrationPluginSwift.o) (maybe you meant: __swift_FORCELOAD$swiftUIKit$_vibration) "Swift.assertionFailure(: Swift.StaticString, _: Swift.StaticString, file: Swift.StaticString, line: Swift.UInt, flags: Swift.UInt32) -> Swift.Never", referenced from: vibration.VibrationPluginSwift.(playPattern in 3A3257C106E34F8F40D4D9BC5ACEDFA2)(myArgs: [Swift.String : Any], pattern: [Swift.Int]) -> () in libvibration.a(VibrationPluginSwift.o) vibration.VibrationPluginSwift.handle(: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libvibration.a(VibrationPluginSwift.o) "swift_FORCELOAD$_swiftCoreAudio", referenced from: swift_FORCELOAD$swiftCoreAudio$_vibration in libvibration.a(VibrationPluginSwift.o) (maybe you meant: swift_FORCELOAD$swiftCoreAudio$_vibration) "Swift.Array.subscript.getter : (Swift.Int) -> A", referenced from: vibration.VibrationPluginSwift.(playPattern in _3A3257C106E34F8F40D4D9BC5ACEDFA2)(myArgs: [Swift.String : Any], pattern: [Swift.Int]) -> () in libvibration.a(VibrationPluginSwift.o) Swift.Array.subscript.read : (Swift.Int) -> A in libvibration.a(VibrationPluginSwift.o) "(extension in Foundation):Swift.Error.localizedDescription.getter : Swift.String", referenced from: vibration.VibrationPluginSwift.(playPattern in _3A3257C106E34F8F40D4D9BC5ACEDFA2)(myArgs: [Swift.String : Any], pattern: [Swift.Int]) -> () in libvibration.a(VibrationPluginSwift.o) "Foundation._convertNSErrorToError(__C.NSError?) -> Swift.Error", referenced from: closure #2 () -> () in static vibration.VibrationPluginSwift.createEngine() -> () in libvibration.a(VibrationPluginSwift.o) vibration.VibrationPluginSwift.(playPattern in _3A3257C106E34F8F40D4D9BC5ACEDFA2)(myArgs: [Swift.String : Any], pattern: [Swift.Int]) -> () in libvibration.a(VibrationPluginSwift.o) @nonobjc C.CHHapticEngine.init() throws -> C.CHHapticEngine in libvibration.a(VibrationPluginSwift.o) @nonobjc C.CHHapticPattern.init(events: [C.CHHapticEvent], parameters: [C.CHHapticDynamicParameter]) throws -> C.CHHapticPattern in libvibration.a(VibrationPluginSwift.o) "protocol witness table for Swift.String : Swift.CustomStringConvertible in Swift", referenced from: vibration.VibrationPluginSwift.(playPattern in _3A3257C106E34F8F40D4D9BC5ACEDFA2)(myArgs: [Swift.String : Any], pattern: [Swift.Int]) -> () in libvibration.a(VibrationPluginSwift.o) "Swift.DefaultStringInterpolation.appendInterpolation<A where A: Swift.CustomStringConvertible, A: Swift.TextOutputStreamable>(A) -> ()", referenced from: vibration.VibrationPluginSwift.(playPattern in _3A3257C106E34F8F40D4D9BC5ACEDFA2)(myArgs: [Swift.String : Any], pattern: [Swift.Int]) -> () in libvibration.a(VibrationPluginSwift.o) "_swift_retain", referenced from: reabstraction thunk helper from @escaping @callee_guaranteed (@unowned __C.CHHapticEngineStoppedReason) -> () to @escaping @callee_unowned @convention(block) (@unowned C.CHHapticEngineStoppedReason) -> () in libvibration.a(VibrationPluginSwift.o) reabstraction thunk helper from @escaping @callee_guaranteed () -> () to @escaping @callee_unowned @convention(block) () -> () in libvibration.a(VibrationPluginSwift.o) _block_copy_helper in libvibration.a(VibrationPluginSwift.o) _block_copyhelper.1 in libvibration.a(VibrationPluginSwift.o) vibration.VibrationPluginSwift.handle(: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libvibration.a(VibrationPluginSwift.o) "Swift.Array.append(owned A) -> ()", referenced from: vibration.VibrationPluginSwift.(playPattern in _3A3257C106E34F8F40D4D9BC5ACEDFA2)(myArgs: [Swift.String : Any], pattern: [Swift.Int]) -> () in libvibration.a(VibrationPluginSwift.o) "_swift_release", referenced from: reabstraction thunk helper from @escaping @callee_guaranteed (@unowned C.CHHapticEngineStoppedReason) -> () to @escaping @callee_unowned @convention(block) (@unowned __C.CHHapticEngineStoppedReason) -> () in libvibration.a(VibrationPluginSwift.o) reabstraction thunk helper from @escaping @callee_guaranteed () -> () to @escaping @callee_unowned @convention(block) () -> () in libvibration.a(VibrationPluginSwift.o) _block_destroy_helper in libvibration.a(VibrationPluginSwift.o) _block_destroyhelper.2 in libvibration.a(VibrationPluginSwift.o) vibration.VibrationPluginSwift.handle(: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libvibration.a(VibrationPluginSwift.o) _swift_destroy_boxed_opaque_existential0 in libvibration.a(VibrationPluginSwift.o) @objc vibration.VibrationPluginSwift.handle(: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libvibration.a(VibrationPluginSwift.o) ... "type metadata for Swift.Int", referenced from: closure #1 (C.CHHapticEngineStoppedReason) -> () in static vibration.VibrationPluginSwift.createEngine() -> () in libvibration.a(VibrationPluginSwift.o) vibration.VibrationPluginSwift.(playPattern in 3A3257C106E34F8F40D4D9BC5ACEDFA2)(myArgs: [Swift.String : Any], pattern: [Swift.Int]) -> () in libvibration.a(VibrationPluginSwift.o) vibration.VibrationPluginSwift.handle(: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libvibration.a(VibrationPluginSwift.o) "Swift.Float.init(Swift.Double) -> Swift.Float", referenced from: vibration.VibrationPluginSwift.(playPattern in _3A3257C106E34F8F40D4D9BC5ACEDFA2)(myArgs: [Swift.String : Any], pattern: [Swift.Int]) -> () in libvibration.a(VibrationPluginSwift.o) "swift_FORCELOAD$_swiftCompatibility51", referenced from: swift_FORCELOAD$swiftCompatibility51$_vibration in libvibration.a(VibrationPluginSwift.o) (maybe you meant: swift_FORCELOAD$swiftCompatibility51$_vibration) "Swift.assertionFailure(: Swift.StaticString, _: Swift.String, file: Swift.StaticString, line: Swift.UInt, flags: Swift.UInt32) -> Swift.Never", referenced from: vibration.VibrationPluginSwift.(playPattern in 3A3257C106E34F8F40D4D9BC5ACEDFA2)(myArgs: [Swift.String : Any], pattern: [Swift.Int]) -> () in libvibration.a(VibrationPluginSwift.o) vibration.VibrationPluginSwift.handle(: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libvibration.a(VibrationPluginSwift.o) "Swift.DefaultStringInterpolation.appendInterpolation(A) -> ()"

andycall commented 3 years ago

你的 Xcode 工程里面没有添加 swift 的支持

https://stackoverflow.com/questions/52536380/why-linker-link-static-libraries-with-errors-ios