今天使用xcode单步调试代码时,发现一直进入的是汇编语言界面,显示的都是地址界面,无法定位到代码行,懵逼了,后来发现有个设置打开了,估计哪天误点了,具体位置在:
Debug -> Debug WorkFlow -> Always Show Disassembly (这项不要打勾 / uncheck)
DONE!
今天使用xcode单步调试代码时,发现一直进入的是汇编语言界面,显示的都是地址界面,无法定位到代码行,懵逼了,后来发现有个设置打开了,估计哪天误点了,具体位置在:
Debug -> Debug WorkFlow -> Always Show Disassembly (这项不要打勾 / uncheck)
DONE!
2012 macpro 升级 macos 到 10.15.2 catalina 并 安装 新xcode时碰到下列问题,供其他碰到的同学参考。
Go to settings then date&time. Click and then unclick “set date and time automatically”. Save the changes by clicking the lock.
Then restart the computer and proceed to download the update once again through settings and software update. It resolved the issue of the update not being verified.
解决方法:
苹果公司就这么把版本放出来也是醉了!
xcode 11真机运行时提示”Install claimed to have succeeded, but application could not be found on device”,可以试验下方法:
还可以尝试下下面链接中的各个方法:https://stackoverflow.com/questions/56229960/track-google-play-refunds-performed-by-user-google
XCODE中获取添加的文件的路径的3个方法,以下以显示图片测试获取图片路径的方法:
测试的UIViewController的demo源码(TestImageViewController.swift),注释中详细描述3个不同添加文件方式下获取路径的方法,GOOD LUCK!
import AVFoundation
class TestImageViewController: UIViewController {
lazy var imageView: UIImageView = {
let imageView = UIImageView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height))
//方法1: 选择Targets中项目 –> build Phases中 –> copy Bundle Resources点击下面的+ 直接添加的alalay.jpg
//let testImage = UIImage(contentsOfFile: Bundle.main.path(forResource: “alalay”, ofType: “jpg”)!)
//方法2: 新建目录任意命名如imgs,将测试图片alalay.jpg文件拖入imgs目录后,将imgs目录名称修改为imgs.bundle,将这个imgs.bundle拖入xcode项目
//let testImage = UIImage(contentsOfFile: Bundle.main.path(forResource: “imgs”, ofType: “bundle”)! + “/” + “alalay.jpg”)
//方法3: 将alalay.jpg图片放在Assets.xcassets中
let testImage = UIImage(named:“alalay.jpg”)!
imageView.image = testImage
imageView.contentMode = .scaleAspectFit
return imageView
}()
override func viewDidLoad() {
super.viewDidLoad()
view.addSubview(imageView)
}
}
xcode项目签名已经使用 “Automatically manage signing”,但还是提示如下:
“
XXXXXX is automatically signed, but provisioning profile 1fe1af09-c71e-4300-94d8-76d14cec2eb4 has been manually specified. Set the provisioning profile value to “Automatic” in the build settings editor, or switch to manual signing in the Signing & Capabilities editor.
“
记录下自己错误提示中黑体字位置部分的文字:“1fe1af09-c71e-4300-94d8-76d14cec2eb4”
试下下面的方法:
原来mac 10 版本时安装过Network Link Conditioner,后来升级到macOS Mojave后,系统偏好设置里就没有了。 后来安装了xcode 11,需要用到Network Link Conditioner,就又下载Additional_Tools_for_Xcode_11.dmg,然后打开,进入Hardware目录里, 点击Network Link Conditioner.prefPane时提示:“Network Link Conditioner”偏好设置是随 macOS 安装,不能被替换。”
解决办法如下:
1. 第一种使用原来的。
按住 Command + Space 打开 spotlight 全局搜索
搜索 Network Link Conditioner
在结果列表里双击打开
(自动添加到设置面板并打开)
2. 第二种替换使用新的版本
将Network Link Conditioner.prefPane文件复制到/Library/PreferencePanes目录, 再进入“系统偏好设置”,就能在底部找到Network Link Conditioner工具了
我在xcode 11下使用 pod install 安装包时,总有提示如下: “target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/xxxxx.xcconfig’. This can lead to problems with the CocoaPods installation”
可以使用下面的方式解决:
DONE!!
xcode 升级后使用模拟器提示“The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated” 解决方案
在终端运行 :
xcrun simctl spawn booted log config --mode "level:off" --subsystem com.apple.CoreTelephony
新建xcode文件时,类名和文件名都起错了,文件里的类名可以修改(refactor->rename),但修改文件名时报错: rename failed,
可通过下面方式解决(此法似乎对类名修改报错也有效):
1.关闭 xCode
2.进入 ~/Library/Developer/Xcode/DerivedData 目录并删除包含 “ModuleCache”名的目录.
3.重新打开xcode
4.再尝试该名下。
Good Luck!