iOS_Error(二)

2022-07-20 13:36:49 浏览数 (1)

之前的博客添加不了了, 只能重新写一个了

  • (null): warning: (arm64) /Users/scmbuild/workspace/standard-pay/IOS/cp_record_client_release_729146/2134/mspc_iphone_msdk/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(UTDIDOpenUDID.o) unable to open object file: No such file or directory

治标不治本: 我需要符号文件

http://blog.csdn.net/Jerk_G/article/details/51135273

  • Entitlement文件移动位置后找不着
  • 手动添加Entitlement文件

通常,Xcode会自动管理Entitlement文件,所以我们并不需要在Xcode Project的Buidling Settings -> Code Signing -> Code Signing Entitlements 特意设置文件。

旧版本的Xcode,你需要自己添加Entitlement文件:

  • ERROR: missing Change-Id in commit message footer

git pull --rebase

  • This application is modifying the autolayout engine from a background thread after the engine was accessed from the main thread. This can lead to engine corruption and weird crashes

在子线程中访问了UIKit

  • Implicit declaration of function 'CC_SHA256' is invalid in C99

#include <CommonCrypto/CommonCrypto.h>

  • (projectName) does not have an architecture that (deviceName) can execute.

项目支持的版本, 不包括当前设备

查看 Target -> General -> Deployment Indo -> Deployment Target (所支持的版本)

和当前手机的系统版本

  • Xcode10版本工程cocoapod <=1.5.3问题

/Library/Ruby/Gems/2.3.0/gems/gh_inspector-1.1.3/lib/gh_inspector/sidekick.rb:95:in `parse_results': undefined method `map' for nil:NilClass (NoMethodError)

解决办法: sudo gem install -n /usr/local/bin cocoapods --pre

  • fatal: unable to access 'https://gitee.com/mo_xiao_yan/Monopoly.git/': Could not resolve proxy: gerrit

当我们修改完git 代理时,git clone往往出现错误,此时如果想重置代理,卸载git是没有用的,而是重置git代理

因此,我们只需要执行以下两句命令即可

git config --global --unset http.proxy git config --global --unset https.proxy

  • this project has not been localized

The other solutions didn't work for me so I ended up solving this by editing the project.pbxproj file in textedit. Change knownRegions from an empty list to include en and Base:

        knownRegions = (

            en,

            Base,

        );

  • missing Change-Id in commit message footer

删掉项目, 重新拉取, 再推送, 按提示运行

  • sourceTree push error

remote: Invalid username or password.

  • framework not found *****

Targets -> General -> Linked Farmeworks and Libraries

将你需要分framework手动导入就行

  • pod search *** 找不到库最新版本

参考:http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/

删除本地缓存,重新setup, 问题解决

rm -fr ~/.cocoapods/repos/master

pod setup

以下2019.08.07添加:

  • xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

MacOS 升级后 提交代码报错

执行  xcode-select --install  (重新安装CommandLineTools)

  • didDisconnect Error Domain=CBErrorDomain Code=7 "The specified device has disconnected from us."

调用 [peripheral discoverServices:] 时报错,ble的服务有问题

  • Failed to find a suitable device for the type Apple Watch Series 3 - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-3-42mm) with runtime watchOS 5.3 (5.3 - 16U567) - com.apple.CoreSimulator.SimRuntime.watchOS-5-3

sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService

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

查看target的Build Phases 是否重复导入

以下2020.01.08添加:

  • filenames are used to distinguish private declarations with the same name

Targets -> BuildSettings -> Compile Sources 直接搜索报错的文件,就发现了,导入了相同的文件

  • Command CompileSwift failed with a nonzero exit code

打开你的 Target 的 Build Settings:

点击加号,添加一个 User-Defined Setting:

命名为 SWIFT_ENABLE_BATCH_MODE,设置为 NO:

设置完,再编译就能显示确切的 Error 位置。

  • git push origin HEAD:refs/for/pod
  • xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist

Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.

See `man xcode-select` for more details.

sudo xcode-select --reset

  • Swift Compiler Error Group

关掉Xcode;删除DerivedData文件;打开Xcdoe先Clean再Run

  • Pod install 报错:跑到Generating Pods project 处报错:[!] Oh no, an error occurred. 

删除 Pods 文件后

执行 pod install

  • Swift Compiler Error

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

很多行 error: filename " pb.swift" used twice: ….

因为我直接右键 Add到一个项目里,导致整个文件夹里的文件都复制导入了一份

所以删除复制的文件夹,删除需要导入的文件,重新导入时,选取多个项目就行了

  • Cannot find interface declaration for ‘***’

父类出现了循环引用

  • The Application does not have a valid signature

0 人点赞