iOS

iOS_Error(五)

平时遇到的一些error+解决办法,记录 for 再次遇到

  • 1275 duplicate symbols

  • Linker command failed with exit code 1 (use -v to see invocation)

    原因:Xcode 15 对编译要求更严格些,用xcode14提交上来的代码 Xcode 15就会报符号重复错误

    解决:Target -> Build Settings -> Other Linker Flags:添加 -ld64

  • The linked framework ‘Pods_QNBUALiveIncubator_Example.framework’ is missing one or more architectures required by this target: armv7.

    Target > Build Settings > Build Options > Allow Multi-Platform Builds: YES

  • Could not build Objective-C module ‘LiveHoverKit’

    Build Settings -> packaging -> enable modules -> YES

    Podspec -> ‘CLANG_ENABLE_MODULES’ => ‘YES’,

  • found architecture ‘arm64’, required architecture ‘x86_64’

    Build Active Architecture Only -> No

  • double-quoted include “xxx.h” in framework header, expected angle-bracketed instead

    Pods Project -> CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER -> NO

  • Command SwiftCompile failed with a nonzero exit code

    Clean + del DerivedData, pods

  • Xxx-Swift.h file not found

    需要有swift文件

  • dyld[2802]: Library not loaded: @rpath/libswiftCore.dylib

    报错的 Target -> Build Settings -> Runpath Serach Patchs 添加 /usr/lib/swift

    Clean -> build

  • `search_for’: Unable to resolve dependency: user requested ‘did_you_mean (= 1.6.3)’ (Gem::UnsatisfiableDependencyError)

    bundle install

  • Build service could not create build operation: unknown error while handling message: MsgHandlingError(message: “unable to initiate PIF transfer session (operation in progress?)”)

    Clean Xcode

    Delete DerivedData

  • Compiling for iOS 9.0, but module ‘JSONPreview’ has a minimum deployment target of iOS 11.0: /JSONPreview.swiftmodule/arm64-apple-ios.swiftmodule

    原因:第三方库要求的iOS系统版本为11,而工程的最低版本为iOS 9

    解决:修改工程支持最低版本为iOS 11

  • Command CodeSign failed with a nonzero exit code

    证书重新下载安装一遍

  • File not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a

    Linker command failed with exit code 1 (use -v to see invocation)

  • 对应库的iOS版本限制太低:Target -> General -> Minimum Deployments -> 11.0
  • 或者:在 podfile 里加这一串指定iOS版本,再 pod install
post_install do |installer|
    installer.generated_projects.each do |project|
          project.targets.each do |target|
              target.build_configurations.each do |config|
                  config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
               end
          end
   end
end

  • 找不到类

    Target – Search paths – User Header Search paths

    新增一个值 ${SRCROOT} – Recursive (在根目录递归查找)

  • “XCBBuildService”意外退出。

    退出Xcode,清理DerivedData,后打开重试

  • The certificate used to sign “*” has either expired or has been revoked. An updated certificate is required to sign and install the application.

  1. Delete all provisioning profiles at ~/Library/MobileDevice/Provisioning\ Profiles
  2. Clean the project by holding Shift(⇧)+Command(⌘)+K or selecting Product > Clean (it might be labelled “Clean Build Folder”)
  3. Restart Xcode
  • Build service could not create build operation: unknown error while handling message: MsgHandlingError(message: “unable to initiate PIF transfer session (operation in progress?)”)

    1.Clean Xcode and Close Xcode

    2.delete ~/Library/Developer/Xcode/DerivedData

  • ~/Pods/RenderCore/RenderCore.framework/Headers/CKNonNull.h:47:33 No member named ‘move’ in namespace ‘std’; did you mean ‘modf’?

    #include

  • Cannot find ‘XXX’ in scope

    pod install 时某些库安装失败了,重新 pod install 一下

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://net2asp.com/d52f8957e4.html