From 313c17b96efca236543dcad4300637f2745a1717 Mon Sep 17 00:00:00 2001 From: tisfeng Date: Thu, 2 May 2024 22:48:09 +0800 Subject: [PATCH] fix: bundleIdentifier cannot be nil --- .../EZDisableAutoSelectTextViewController.m | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Easydict/objc/PerferenceWindow/DisableAutoSelectTextViewController/EZDisableAutoSelectTextViewController.m b/Easydict/objc/PerferenceWindow/DisableAutoSelectTextViewController/EZDisableAutoSelectTextViewController.m index e53c4c3f6..19981bde5 100644 --- a/Easydict/objc/PerferenceWindow/DisableAutoSelectTextViewController/EZDisableAutoSelectTextViewController.m +++ b/Easydict/objc/PerferenceWindow/DisableAutoSelectTextViewController/EZDisableAutoSelectTextViewController.m @@ -82,9 +82,18 @@ - (void)setupAppModelList { NSArray *allAppModelList = [EZLocalStorage.shared selectTextTypeAppModelList]; NSWorkspace* workspace = [NSWorkspace sharedWorkspace]; for (EZAppModel *appModel in allAppModelList) { - NSURL *appURL = [workspace URLForApplicationWithBundleIdentifier:appModel.appBundleID]; - if (appURL) { - [self.appModelList addObject:appModel]; + /** + Fix appcenter issue + + -[EZDisableAutoSelectTextViewController setupAppModelList] + EZDisableAutoSelectTextViewController.m, line 85 + SIGABRT: Invalid parameter not satisfying: bundleIdentifier != nil + */ + if (appModel.appBundleID) { + NSURL *appURL = [workspace URLForApplicationWithBundleIdentifier:appModel.appBundleID]; + if (appURL) { + [self.appModelList addObject:appModel]; + } } } }