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!