From f1c2fcaf2ddfa43e40d2f714dd875395b4dc2a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taj=20=E2=80=A2=20forcequit?= <62081155+forcequitOS@users.noreply.github.com> Date: Sat, 2 May 2026 13:22:33 -0400 Subject: [PATCH 1/4] Add error code for invalid platform --- TrollStore/TSApplicationsManager.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/TrollStore/TSApplicationsManager.m b/TrollStore/TSApplicationsManager.m index f873e37..2de735e 100644 --- a/TrollStore/TSApplicationsManager.m +++ b/TrollStore/TSApplicationsManager.m @@ -91,6 +91,9 @@ extern NSUserDefaults* trollStoreUserDefaults(); break; case 185: errorDescription = @"Failed to sign the app. The CoreTrust bypass returned a non zero status code."; + break; + case 186: + errorDescription = @"The app you tried to install is not supported on this platform. The installation has been prevented as this application will not launch at all if it were to be installed."; } NSError* error = [NSError errorWithDomain:TrollStoreErrorDomain code:code userInfo:@{NSLocalizedDescriptionKey : errorDescription}]; @@ -193,4 +196,4 @@ extern NSUserDefaults* trollStoreUserDefaults(); return spawnRoot(rootHelperPath(), @[@"modify-registration", appPath, newState], nil, nil); } -@end \ No newline at end of file +@end From dda4e636f69759e8893ec5b998bde1d09d010b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taj=20=E2=80=A2=20forcequitOS?= <62081155+forcequitOS@users.noreply.github.com> Date: Sat, 2 May 2026 14:09:21 -0400 Subject: [PATCH 2/4] Add platform check --- RootHelper/main.m | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/RootHelper/main.m b/RootHelper/main.m index d06d27a..1a01b3c 100644 --- a/RootHelper/main.m +++ b/RootHelper/main.m @@ -244,6 +244,10 @@ void setTSURLSchemeState(BOOL newState, NSString* customAppPath) } } +NSArray *getCurrentPlatforms(void) +{ + return infoDictionaryForAppPath(trollStoreAppPath())[@"CFBundleSupportedPlatforms"]; +} #ifdef TROLLSTORE_LITE BOOL isLdidInstalled(void) @@ -864,6 +868,7 @@ void applyPatchesToInfoDictionary(NSString* appPath) // 174: // 180: tried to sign app where the main binary is encrypted // 184: tried to sign app where an additional binary is encrypted +// 186: application is for the wrong platform int installApp(NSString* appPackagePath, BOOL sign, BOOL force, BOOL isTSUpdate, BOOL useInstalldMethod, BOOL skipUICache) { @@ -883,6 +888,23 @@ int installApp(NSString* appPackagePath, BOOL sign, BOOL force, BOOL isTSUpdate, } if(!infoDictionaryForAppPath(appBundleToInstallPath)) return 172; + + NSArray* currentPlatforms = getCurrentPlatforms(); + NSArray* supportedPlatforms = infoDictionaryForAppPath(appBundleToInstallPath)[@"CFBundleSupportedPlatforms"]; + + BOOL platformMatch = NO; + for (NSString *platform in supportedPlatforms) + { + if ([currentPlatforms containsObject:platform]) + { + platformMatch = YES; + break; + } + } + + if (!platformMatch) return 186; + + // if (![supportedPlatforms containsObject:@"iPhoneOS"]) return 186; if(!isTSUpdate) { From 620da61c1ad469b91e73ad76b519a577f7037e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taj=20=E2=80=A2=20forcequitOS?= <62081155+forcequitOS@users.noreply.github.com> Date: Sat, 2 May 2026 14:41:45 -0400 Subject: [PATCH 3/4] Fix new error case --- TrollStore/TSApplicationsManager.m | 1 + 1 file changed, 1 insertion(+) diff --git a/TrollStore/TSApplicationsManager.m b/TrollStore/TSApplicationsManager.m index 2de735e..6cb8626 100644 --- a/TrollStore/TSApplicationsManager.m +++ b/TrollStore/TSApplicationsManager.m @@ -94,6 +94,7 @@ extern NSUserDefaults* trollStoreUserDefaults(); break; case 186: errorDescription = @"The app you tried to install is not supported on this platform. The installation has been prevented as this application will not launch at all if it were to be installed."; + break; } NSError* error = [NSError errorWithDomain:TrollStoreErrorDomain code:code userInfo:@{NSLocalizedDescriptionKey : errorDescription}]; From 891292c2d6cf5dc0d6a20b724f6b8ba32ff0bbab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taj=20=E2=80=A2=20forcequitOS?= <62081155+forcequitOS@users.noreply.github.com> Date: Sat, 2 May 2026 14:43:24 -0400 Subject: [PATCH 4/4] Spelling fix :p --- TrollStore/TSSettingsListController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TrollStore/TSSettingsListController.m b/TrollStore/TSSettingsListController.m index 3a04a42..ab82e62 100644 --- a/TrollStore/TSSettingsListController.m +++ b/TrollStore/TSSettingsListController.m @@ -125,7 +125,7 @@ extern NSUserDefaults* trollStoreUserDefaults(void); utilitiesDescription = @"Apps will be registered as User by default since AppSync Unified is installed.\n\n"; } else { - utilitiesDescription = @"Apps will be registered as System by default since AppSync Unified is not installed. When apps loose their System registration and stop working, press \"Refresh App Registrations\" here to fix them.\n\n"; + utilitiesDescription = @"Apps will be registered as System by default since AppSync Unified is not installed. When apps lose their System registration and stop working, press \"Refresh App Registrations\" here to fix them.\n\n"; } #endif utilitiesDescription = [utilitiesDescription stringByAppendingString:@"If an app does not immediately appear after installation, respring here and it should appear afterwards."]; @@ -626,4 +626,4 @@ extern NSUserDefaults* trollStoreUserDefaults(void); return args; } -@end \ No newline at end of file +@end