Post

Replies

Boosts

Views

Activity

Reply to Xcode 15.1 and 15.2 Objective-C Category/Extension Creation Issue
This is because new Xcode 15.1/15/2 does not contain CategoryNSObject and CategoryNSObject files on path Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/MultiPlatform/Source/Objective-C File.xctemplate ,you can copy this file from previous version,or click this link(https://pan.baidu.com/s/1Xs_8PnKyA0rY_8fpBKxhHQ?pwd=g2sm#list/path=%2F) to download and copy it to path. open path: /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/MultiPlatform/Source/Objective-C File.xctemplate copy CategoryNSObject file and ExtensionNSObject file to Objective-C File.xctemplate restart xcode 这是由于新版Xcode安装包目录中缺少 CategoryNSObject 和 CategoryNSObject文件导致的,对应目录:Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/MultiPlatform/Source/Objective-C File.xctemplate,可以从旧版Xcode目录中找到对应文件复制到这个目录下,如果无 旧版 Xcode,可以用这个链接下载(https://pan.baidu.com/s/1Xs_8PnKyA0rY_8fpBKxhHQ?pwd=g2sm#list/path=%2F); 打开目录:/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/MultiPlatform/Source/Objective-C File.xctemplate 复制文件 CategoryNSObject 及 ExtensionNSObject 重启Xcode
Feb ’24