半亩花草 发表于 2024-11-7 17:10:45

iOS_Error(五)

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


[*]1275 duplicate symbols
[*]Linker command failed with exit code 1 (use -v to see invocation)
缘故起因1:Xcode 15 对编译要求更严酷些,用xcode14提交上来的代码 Xcode 15就会报符号重复错误
方法1:Target -> Build Settings -> Other Linker Flags:添加 -ld64
缘故起因2:podfile 手动引入了一份;不知道哪个库又自动引入一份
方法2:删除podfile手动引入的
缘故起因3:podfile导入了两个版本。解决:删除其中一个
[*]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: 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.

[*]Delete all provisioning profiles at ~/Library/MobileDevice/Provisioning\ Profiles
[*]Clean the project by holding Shift(⇧)+Command(⌘)+K or selecting Product > Clean (it might be labelled “Clean Build Folder”)
[*]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 一下

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: iOS_Error(五)