DoraemonKit 无法在模拟器运行

sqougxex  于 3个月前  发布在  其他
关注(0)|答案(1)|浏览(83)

无法运行模拟器
环境: Apple M1 Pro, Xcode 14.0

重现步骤:(必现)
Cocoapods导入配置

target 'DokitTest' do
  use_frameworks!
  pod 'DoraemonKit/Core', '~> 3.0.4', :configurations => ['Debug']
  pod 'DoraemonKit/WithLogger', '~> 3.0.4', :configurations => ['Debug'] 
end

pod install之后, 直接选择模拟器运行失败, 下面是信息

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_DDAbstractLogger", referenced from:
      _OBJC_CLASS_$_DoraemonCocoaLumberjackLogger in DoraemonCocoaLumberjackLogger.o
  "_OBJC_CLASS_$_DDLog", referenced from:
      objc-class-ref in DoraemonCocoaLumberjackLogger.o
  "_OBJC_CLASS_$_FMDatabase", referenced from:
      objc-class-ref in DoraemonFileSyncManager.o
  "_OBJC_CLASS_$_GCDWebServer", referenced from:
      _OBJC_CLASS_$_DoraemonFileSyncManager in DoraemonFileSyncManager.o
  "_OBJC_CLASS_$_GCDWebServerDataRequest", referenced from:
      objc-class-ref in DoraemonFileSyncManager.o
  "_OBJC_CLASS_$_GCDWebServerDataResponse", referenced from:
      objc-class-ref in DoraemonFileSyncManager.o
  "_OBJC_CLASS_$_GCDWebServerFileResponse", referenced from:
      objc-class-ref in DoraemonFileSyncManager.o
  "_OBJC_CLASS_$_GCDWebServerMultiPartFormRequest", referenced from:
      objc-class-ref in DoraemonFileSyncManager.o
  "_OBJC_CLASS_$_GCDWebServerRequest", referenced from:
      objc-class-ref in DoraemonFileSyncManager.o
  "_OBJC_METACLASS_$_DDAbstractLogger", referenced from:
      _OBJC_METACLASS_$_DoraemonCocoaLumberjackLogger in DoraemonCocoaLumberjackLogger.o
  "_OBJC_METACLASS_$_GCDWebServer", referenced from:
      _OBJC_METACLASS_$_DoraemonFileSyncManager in DoraemonFileSyncManager.o
ld: symbol(s) not found for architecture x86_64
inb24sb2

inb24sb21#

可能是M1环境问题, 通过Carthage导入失败

carthage update --platform ios --use-xcframeworks
*** Fetching DoraemonKit
*** Checking out DoraemonKit at "android_dokit_v3.7.1"
*** xcodebuild output can be found in /var/folders/cd/b0dbc7n90s57_drqsjc5kgrc0000gp/T/carthage-xcodebuild.SyncBY.log
*** Downloading DoraemonKit binary at "Android DoKit v3.7.1"
*** Building scheme "DoraemonLoadAnalyze" in DoraemonLoadAnalyzeDemo.xcodeproj
Build Failed
	Task failed with exit code 1:
	/usr/bin/xcrun dsymutil /.../.../Library/Caches/org.carthage.CarthageKit/DerivedData/14.2_14C18/DoraemonKit/android_dokit_v3.7.1/Build/Intermediates.noindex/ArchiveIntermediates/DoraemonLoadAnalyze/BuildProductsPath/Release-iphoneos/DoraemonLoadAnalyze.framework/DoraemonLoadAnalyze -o /.../.../Library/Caches/org.carthage.CarthageKit/DerivedData/14.2_14C18/DoraemonKit/android_dokit_v3.7.1/Build/Intermediates.noindex/ArchiveIntermediates/DoraemonLoadAnalyze/BuildProductsPath/Release-iphoneos/DoraemonLoadAnalyze.framework.dSYM

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/cd/b0dbc7n90s57_drqsjc5kgrc0000gp/T/carthage-xcodebuild.SyncBY.log

相关问题