/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
iOS16手机未打开开发者模式时:
1、Xcode 无法选中 iOS16的设备,报错:developer mode disable
2、无法打开升级前编译的App
解决办法:打开调试手机-设置-隐私与安全-开发者模式-开启开发者模式(需要重启手机)
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["DEVELOPMENT_TEAM"] = "Your Team ID"
end
end
end
end
方法三:在Podfile脚本中设置CODE_SIGN_IDENTITY
为空来避免报错,这是目前在用的,也是最简单的方法
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['CODE_SIGN_IDENTITY'] = ''
end
end
end
end
Thread 1: "[<_UINavigationBarContentViewLayout 0x7fd1a090d730> valueForUndefinedKey:]: this class is not key value coding-compliant for the key inlineTitleView."
打开全局断点就会出现这个报错,虽然不会闪退,但是很影响调试,是Xcode的bug,但是还没有修复,找到两个比较好的办法:
!(BOOL)[(id)[$arg1 reason] containsString:@"_UINavigationBarContentViewLayout"]
#import <objc/runtime.h>
@interface Xcode14Fixer : NSObject
@end
@implementation Xcode14Fixer
+ (void)load
{
Class cls = NSClassFromString(@"_UINavigationBarContentViewLayout");
SEL selector = @selector(valueForUndefinedKey:);
Method impMethod = class_getInstanceMethod([self class], selector);
if (impMethod) {
class_addMethod(cls, selector, method_getImplementation(impMethod), method_getTypeEncoding(impMethod));
}
}
- (id)valueForUndefinedKey:(NSString *)key
{
return nil;
}
@end
参考: Xcode 14 Beta 5 throws an exception
warning: libobjc.A.dylib is being read from process memory. This indicates that LLDB could not find the on-disk shared cache for this device. This will likely reduce debugging performance.
解决办法:应该是Xcode的bug,识别不了正确路径,需要删除等Xcode重新建立路径
rm -r ~/Library/Developer/Xcode/iOS\ DeviceSupport
问题:
更新到xcode14以后,在iOS12以下运行报错dyld: Library not loaded: /usr/lib/swift/libswiftCoreGraphics.dylib
工程报错的话在工程添加:
target -> Build Phases -> Link Binary With Libraries中添加:libswiftCoreGraphics.tbd
xcode14:Library not loaded: /usr/lib/swift/libswiftCoreGraphics.dylib