iOS16 xcode14 更新問題

  • 更新xcode14, iOS16, 編譯舊項目出現(xiàn)下面問題, 找不到方法閃退.
問題截圖
  • 問題描述

    • <_UINavigationBarContentViewLayout 0x7f7f53f58a40> valueForUndefinedKey:]: this class is not key value coding-compliant for the key inlineTitleView.
  • 問題解決

#if DEBUG
@interface Xcode14Beta4Fixer : NSObject
@end

@implementation Xcode14Beta4Fixer

+ (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
#endif

補(bǔ)充

  • 問題描述
Message from debugger: Xcode has killed the LLDB RPC server to allow the debugger to detach from your process.  You may need to manually terminate your process.
  • 解決方案
  • 重啟模擬器, 模擬器刪除應(yīng)用, 模擬器工具欄 -> Device -> Restart -> 徹底刪除應(yīng)用. 重啟項目
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。