mac OS Catalina, Xcode 12.4 “Unsupported OS version” after iPhone iOS update 14.6, 老xcode如何支持新iphone os版本?

 ios, mac  mac OS Catalina, Xcode 12.4 “Unsupported OS version” after iPhone iOS update 14.6, 老xcode如何支持新iphone os版本?已关闭评论
7月 252021
 

老xcode如何支持新iphone os版本?(mac OS Catalina, Xcode 12.4 “Unsupported OS version” after iPhone iOS update 14.6 solved)

问题: iphone升级到了14.6, 但macOS还停留在Catalina 10.15.7, xcode只能升级到12.4,使用iphone调试app时提示 “Unsupported OS version” ,无法编译真机运行调试,难道只能升级mac OS并顺便升级Xcode,如果碰到老的mac,无法升级OS,难道就束以待毙,无法调试了吗??感谢万能的互联网和一群热心的网友!

解决方法:

  • . 打开Finder
    . 打开应用程序文件夹
    . 在里面找到Xcode应用
    . 点击Xcode,右键 -> 显示包内容
    . 在里面按下面目录层级找到支持的真机测试文件:Contents -> Developer -> Platforms -> iPhoneOS.platform -> DeviceSupport(/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport), 这个目录里面就是当前Xcode支持真机调试的真机iOS版本
    . 然后通过拷贝最新的DeviceSupport文件到这个目录里面就可以用最新的iOS设备真机调试了。可以通过哪些渠道获取DeviceSupport文件呢? https://github.com/iGhibli/iOS-DeviceSupport 这个网址收集了迄今为止所有支持的包,大家自行下载即可! 或者也可以到其它同学新的xcode下copy对应的目录过来也可以!

如:

IOS 14.5 (FromXcode_12.5)

IOS 14.6 (FromXcode_12.4)

下载DeviceSupport全集来源: https://github.com/iGhibli/iOS-DeviceSupport

 

DONE!

 

Mac OS 系统, 打开pycharm时右下角提示: xcrun: error: invalid active developer path, missing xcrun

 mac  Mac OS 系统, 打开pycharm时右下角提示: xcrun: error: invalid active developer path, missing xcrun已关闭评论
4月 092021
 

要解决此问题,请安装Xcode。如果您从事iOS App开发,则可以安装完整版本,它也将解决此问题。从Apple developers page下载Xcode .dmg文件。

如果你不使用xcode,则只需搜索Xcode的Command Line Tools(命令行工具包),然后下载.dmg文件并安装。

可以尝试下面的几个解决方案:

如果您不想下载任何内容,而只想在终端中运行一些命令来解决此问题,那么以下是适合您的命令:

xcode-select --install

这是可以在终端中运行的命令,它将为Xcode安装命令行工具。当您运行此命令时,系统将提示您接受许可证,同意条款和条件等。

 

也可以尝试下下面的命令后再使用上面的命令解决该问题:

xcode-select --reset

尽管这可以解决您的问题,但作为后续步骤,您可能需要设置命令行工具在不使用Xcode的情况下运行的路径。

xcode-select --switch /Library/Developer/CommandLineTools

如果在运行上述任何命令时遇到权限问题,请sudo与这些命令一起使用。例如,

sudo xcode-select --switch /Library/Developer/CommandLineTools

如果您已安装Xcode应用程序,请尝试运行以下命令:

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

xcode debug时一直显示的是汇编/内存地址界面的解决方法

 xcode  xcode debug时一直显示的是汇编/内存地址界面的解决方法已关闭评论
11月 132020
 

今天使用xcode单步调试代码时,发现一直进入的是汇编语言界面,显示的都是地址界面,无法定位到代码行,懵逼了,后来发现有个设置打开了,估计哪天误点了,具体位置在:

 

Debug -> Debug WorkFlow ->   Always Show Disassembly      (这项不要打勾 /  uncheck)

 

DONE!

macos 10.15.x catalina could not be verified/ xcode 11 An unknown error occurred. See the install log for more details.

 mac, macpro, xcode, 开发  macos 10.15.x catalina could not be verified/ xcode 11 An unknown error occurred. See the install log for more details.已关闭评论
1月 202020
 

2012 macpro  升级 macos 到 10.15.2  catalina  并 安装 新xcode时碰到下列问题,供其他碰到的同学参考。

  • 问题1.  “macOS Catalina” could not be verified, 在”系统偏好设置 ” -> “软件更新”下下载完catalina更新包后点安装,提示  “macOS Catalina” could not be verified.
    解决办法:打开“ 系统偏好设置”->“日期与时间”->去掉打勾”自动设置日期与时间”, 重启机器,并再次软件更新并安装。

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.

 

  • 问题2. macos catalina安装完,打开xcode时,提示“An unknown error occurred. See the install log for more details.”

解决方法:

  • 这个问题再次在Xcode 11.1出现,是有个证书在2019年的10月份某天过期引起的。
  • 你可以通过暂时把系统日期修改到过期的日期之前来解决。
  • 在Xcode 11这个版本下,设置系统日期为2019年10月3日,然后运行Xcode,再安装组件,(就可以安装成功了),完成之后再把系统日期改回正常状态。
  • This problem has once again appeared in Xcode 11.1 and is caused by an invalid certificate that expired some day in October 2019.
  • You can work around the problem by temporarily changing the system date to before the certificate expiration date.
  • In the case of Xcode 11, set the system date to Oct 3, 2019, run Xcode, then change the date back after the components have installed.

苹果公司就这么把版本放出来也是醉了!

 

 

xcode运行提示”Install claimed to have succeeded, but application could not be found on device…”

 开发  xcode运行提示”Install claimed to have succeeded, but application could not be found on device…”已关闭评论
12月 302019
 

xcode 11真机运行时提示”Install claimed to have succeeded, but application could not be found on device”,可以试验下方法:

  • 方法一:Product -> Clean;close xcode(关闭xcode);reopen xcode再重新打开(呵呵,我的竟然就是这么解决的,就是这么神奇!)
  • 方法二:File > Project Settings… > Build System > Legacy Build System

还可以尝试下下面链接中的各个方法:https://stackoverflow.com/questions/56229960/track-google-play-refunds-performed-by-user-google

XCODE中不同添加方式下获取文件/图片的路径的方法(Bundle.main.path,Bundle)

 swift, xcode  XCODE中不同添加方式下获取文件/图片的路径的方法(Bundle.main.path,Bundle)已关闭评论
12月 202019
 

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”,还提示“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.”解决方案

 开发  xcode下已经使用 “Automatically manage signing”,还提示“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.”解决方案已关闭评论
12月 092019
 

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”

试下下面的方法:

  1.  右键点击 项目文件  xxxx.xcodeproj –> 显示包内容(Show Package Contents)–> 打开并编辑 project.pbxproj
  2. 在project.pbxproj 搜索“1fe1af09-c71e-4300-94d8-76d14cec2eb4”,找到对应的行,删除
  3. 再次进入xcode,使用“Automatically manage signing”,Done!

macOS Mojave下安装Network Link Conditioner,提示“Network Link Conditioner”偏好设置是随 macOS 安装,不能被替换。”

 mac, xcode  macOS Mojave下安装Network Link Conditioner,提示“Network Link Conditioner”偏好设置是随 macOS 安装,不能被替换。”已关闭评论
10月 252019
 

原来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 解决方法

 pod, xcode  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 解决方法已关闭评论
10月 212019
 

我在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”

可以使用下面的方式解决:

screen shot 2017-01-08 at 6 02 54 pm

screen shot 2017-01-08 at 6 03 04 pm

screen shot 2017-01-08 at 6 03 12 pm

 

DONE!!

xcode 升级后使用模拟器提示“The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated” 解决方案

 swift  xcode 升级后使用模拟器提示“The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated” 解决方案已关闭评论
10月 082019
 

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
DONE!

xcode 10.2.1 里修改文件名,提示”rename failed”的解决方法

 mac, xcode  xcode 10.2.1 里修改文件名,提示”rename failed”的解决方法已关闭评论
8月 062019
 

新建xcode文件时,类名和文件名都起错了,文件里的类名可以修改(refactor->rename),但修改文件名时报错: rename failed,
可通过下面方式解决(此法似乎对类名修改报错也有效):

1.关闭 xCode
2.进入 ~/Library/Developer/Xcode/DerivedData 目录并删除包含 “ModuleCache”名的目录.
3.重新打开xcode
4.再尝试该名下。

Good Luck!