Преглед на файлове

latest changes, working with rootless as well

Kevin Bradley преди 1 година
родител
ревизия
9bf53d095a

+ 1 - 0
AppEnabler/Makefile

@@ -13,6 +13,7 @@ AppEnabler_LIBRARIES = substrate
 AppEnabler_FRAMEWORKS = Foundation UIKit CoreGraphics MobileCoreServices
 #AppEnabler_LDFLAGS = -undefined dynamic_lookup
 AppEnabler_CODESIGN=ldid
+AppEnabler_INSTALL_PATH=/fs/jb/Library/MobileSubstrate/DynamicLibraries/
 #AppEnabler_LIBRARIES += rocketbootstrap
 AppEnabler_CODESIGN_FLAGS=-Slibrespring.xml
 #AppEnabler_USE_SUBSTRATE=0

+ 74 - 0
AppEnabler/NSTask.h

@@ -0,0 +1,74 @@
+/*	NSTask.h
+	Copyright (c) 1996-2007, Apple Inc. All rights reserved.
+*/
+
+#import <Foundation/NSObject.h>
+
+@class NSString, NSArray, NSDictionary;
+
+@interface NSTask : NSObject
+
+// Create an NSTask which can be run at a later time
+// An NSTask can only be run once. Subsequent attempts to
+// run an NSTask will raise.
+// Upon task death a notification will be sent
+//   { Name = NSTaskDidTerminateNotification; object = task; }
+//
+
+- (id)init;
+
+// set parameters
+// these methods can only be done before a launch
+- (void)setLaunchPath:(NSString *)path;
+- (void)setArguments:(NSArray *)arguments;
+- (void)setEnvironment:(NSDictionary *)dict;
+	// if not set, use current
+- (void)setCurrentDirectoryPath:(NSString *)path;
+	// if not set, use current
+
+// set standard I/O channels; may be either an NSFileHandle or an NSPipe
+- (void)setStandardInput:(id)input;
+- (void)setStandardOutput:(id)output;
+- (void)setStandardError:(id)error;
+
+// get parameters
+- (NSString *)launchPath;
+- (NSArray *)arguments;
+- (NSDictionary *)environment;
+- (NSString *)currentDirectoryPath;
+
+// get standard I/O channels; could be either an NSFileHandle or an NSPipe
+- (id)standardInput;
+- (id)standardOutput;
+- (id)standardError;
+
+// actions
+- (void)launch;
+
+- (void)interrupt; // Not always possible. Sends SIGINT.
+- (void)terminate; // Not always possible. Sends SIGTERM.
+
+- (BOOL)suspend;
+- (BOOL)resume;
+
+// status
+- (int)processIdentifier; 
+- (BOOL)isRunning;
+
+- (int)terminationStatus;
+@property(readonly) long long terminationReason;
+@end
+
+@interface NSTask (NSTaskConveniences)
+
++ (NSTask *)launchedTaskWithLaunchPath:(NSString *)path arguments:(NSArray *)arguments;
+	// convenience; create and launch
+
+- (void)waitUntilExit;
+	// poll the runLoop in defaultMode until task completes
+
+@end
+
+FOUNDATION_EXPORT NSString * const NSTaskDidTerminateNotification;
+
+

+ 5 - 4
Makefile

@@ -1,9 +1,9 @@
 ARCHS=arm64
 TARGET=appletv
 export GO_EASY_ON_ME=1
-export SDKVERSION=10.1
-TARGET=appletv:clang:10.1:10.1
-SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS10.1.sdk
+export SDKVERSION=16.1
+TARGET=appletv:clang:16.1:13.1
+#SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS10.1.sdk
 THEOS_DEVICE_IP=guest-room.local
 
 include theos/makefiles/common.mk
@@ -16,6 +16,7 @@ librespring_FRAMEWORKS = Foundation UIKit CoreGraphics
 #librespring_CODESIGN_FLAGS=-Slibrespring.xml
 librespring_CODESIGN=ldid
 librespring_Frameworks += WebCore ImageIO Foundation CFNetwork AppSupport UIKit IOKit MobileCoreServices
+librespring_INSTALL_PATH=/fs/jb/usr/lib/
 #librespring_PRIVATE_FRAMEWORKS = GraphicsServices FMCore
 
 include $(THEOS_MAKE_PATH)/library.mk
@@ -32,5 +33,5 @@ after-stage::
 	#cp $(FW_STAGING_DIR)/Library/TweakInject/AppEnabler.dylib ../layout/Library/TweakInject/AppEnabler.dylib
 	#cp $(FW_STAGING_DIR)/Library/TweakInject/AppEnabler.plist ../layout/Library/TweakInject/AppEnabler.plist
 	#cp $(FW_STAGING_DIR)/usr/lib/librespring.dylib ../layout/usr/lib/librespring.dylib
-	cp rmcache $(THEOS_STAGING_DIR)/usr/bin/
+	cp rmcache $(THEOS_STAGING_DIR)/fs/jb/usr/bin/
 	#cp rmcache ../layout/usr/bin/rmcache

+ 74 - 0
NSTask.h

@@ -0,0 +1,74 @@
+/*	NSTask.h
+	Copyright (c) 1996-2007, Apple Inc. All rights reserved.
+*/
+
+#import <Foundation/NSObject.h>
+
+@class NSString, NSArray, NSDictionary;
+
+@interface NSTask : NSObject
+
+// Create an NSTask which can be run at a later time
+// An NSTask can only be run once. Subsequent attempts to
+// run an NSTask will raise.
+// Upon task death a notification will be sent
+//   { Name = NSTaskDidTerminateNotification; object = task; }
+//
+
+- (id)init;
+
+// set parameters
+// these methods can only be done before a launch
+- (void)setLaunchPath:(NSString *)path;
+- (void)setArguments:(NSArray *)arguments;
+- (void)setEnvironment:(NSDictionary *)dict;
+	// if not set, use current
+- (void)setCurrentDirectoryPath:(NSString *)path;
+	// if not set, use current
+
+// set standard I/O channels; may be either an NSFileHandle or an NSPipe
+- (void)setStandardInput:(id)input;
+- (void)setStandardOutput:(id)output;
+- (void)setStandardError:(id)error;
+
+// get parameters
+- (NSString *)launchPath;
+- (NSArray *)arguments;
+- (NSDictionary *)environment;
+- (NSString *)currentDirectoryPath;
+
+// get standard I/O channels; could be either an NSFileHandle or an NSPipe
+- (id)standardInput;
+- (id)standardOutput;
+- (id)standardError;
+
+// actions
+- (void)launch;
+
+- (void)interrupt; // Not always possible. Sends SIGINT.
+- (void)terminate; // Not always possible. Sends SIGTERM.
+
+- (BOOL)suspend;
+- (BOOL)resume;
+
+// status
+- (int)processIdentifier; 
+- (BOOL)isRunning;
+
+- (int)terminationStatus;
+@property(readonly) long long terminationReason;
+@end
+
+@interface NSTask (NSTaskConveniences)
+
++ (NSTask *)launchedTaskWithLaunchPath:(NSString *)path arguments:(NSArray *)arguments;
+	// convenience; create and launch
+
+- (void)waitUntilExit;
+	// poll the runLoop in defaultMode until task completes
+
+@end
+
+FOUNDATION_EXPORT NSString * const NSTaskDidTerminateNotification;
+
+

+ 1 - 1
control

@@ -2,7 +2,7 @@ Package: com.nito.uicache
 Name: uicache
 Pre-Depends: cy+model.appletv
 Depends:
-Version: 0.0.3
+Version: 0.0.5
 Architecture: appletvos-arm64
 Description: Respring and reload any applications added to /Applications
 Maintainer: Kevin Bradley

+ 1 - 1
layout/DEBIAN/control

@@ -2,7 +2,7 @@ Package: com.nito.uicache
 Name: uicache
 Pre-Depends: cy+model.appletv
 Depends:
-Version: 0.0.2
+Version: 0.0.5
 Architecture: appletvos-arm64
 Description: Respring and reload any applications added to /Applications
 Maintainer: Kevin Bradley

+ 28 - 0
librespring.xml

@@ -0,0 +1,28 @@
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>com.apple.private.mobileinstall.allowedSPI</key>
+	<array>
+		<string>InstallForLaunchServices</string>
+	</array>
+
+	<key>com.apple.lsapplicationworkspace.rebuildappdatabases</key>
+	<true/>
+
+	<key>com.apple.private.MobileContainerManager.allowed</key>
+	<true/>
+
+	<key>com.apple.private.kernel.override-cpumon</key>
+	<true/>
+
+	<key>com.apple.vpn.installer_events</key>
+	<true/>
+    
+    <key>com.apple.private.skip-library-validation</key>
+    <true/>
+    
+    <key>platform-application</key>
+    <true/>
+    
+</dict>
+</plist>

+ 1 - 1
rmcache

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/fs/jb/bin/bash
 
 rm /var/containers/Data/System/*/Library/Caches/com.apple.LaunchServices*.csstore
 

+ 207 - 0
uicache/CoreServices.framework/CoreServices.tbd

@@ -0,0 +1,207 @@
+--- !tapi-tbd
+tbd-version:     4
+targets:         [ arm64-tvos, arm64e-tvos ]
+uuids:
+  - target:          arm64-tvos
+    value:           F4CE78EF-34FC-3BD9-9FE3-B8C03B5E997A
+  - target:          arm64e-tvos
+    value:           39438254-EDEC-3275-8042-A27B92470633
+install-name:    '/System/Library/Frameworks/CoreServices.framework/CoreServices'
+current-version: 1226
+exports:
+  - targets:         [ arm64-tvos, arm64e-tvos ]
+    symbols:         [ '$ld$install_name$os10.0$/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices', 
+                       '$ld$install_name$os10.1$/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices', 
+                       '$ld$install_name$os10.2$/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices', 
+                       '$ld$install_name$os11.0$/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices', 
+                       '$ld$install_name$os11.1$/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices', 
+                       '$ld$install_name$os11.2$/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices', 
+                       '$ld$install_name$os11.3$/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices', 
+                       '$ld$install_name$os11.4$/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices', 
+                       '$ld$install_name$os11.5$/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices', 
+                       '$ld$install_name$os9.0$/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices', 
+                       '$ld$install_name$os9.1$/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices', 
+                       '$ld$install_name$os9.2$/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices', 
+                       _CSIdentityAuthorityCopyLocalizedName, _CSIdentityAuthorityGetTypeID, 
+                       _CSIdentityCreateCopy, _CSIdentityCreatePersistentReference, 
+                       _CSIdentityGetAuthority, _CSIdentityGetClass, _CSIdentityGetFullName, 
+                       _CSIdentityGetPosixName, _CSIdentityGetTypeID, _CSIdentityQueryCopyResults, 
+                       _CSIdentityQueryCreateForName, _CSIdentityQueryCreateForPersistentReference, 
+                       _CSIdentityQueryExecute, _CSIdentityQueryExecuteAsynchronously, 
+                       _CSIdentityQueryGetTypeID, _CSIdentityQueryStop, _FSEventStreamCopyDescription, 
+                       _FSEventStreamCopyPathsBeingWatched, _FSEventStreamCreate, 
+                       _FSEventStreamCreateRelativeToDevice, _FSEventStreamFlushAsync, 
+                       _FSEventStreamFlushSync, _FSEventStreamGetDeviceBeingWatched, 
+                       _FSEventStreamGetLatestEventId, _FSEventStreamInvalidate, 
+                       _FSEventStreamRelease, _FSEventStreamRetain, _FSEventStreamScheduleWithRunLoop, 
+                       _FSEventStreamSetDispatchQueue, _FSEventStreamSetExclusionPaths, 
+                       _FSEventStreamShow, _FSEventStreamStart, _FSEventStreamStop, 
+                       _FSEventStreamUnscheduleFromRunLoop, _FSEventsCopyUUIDForDevice, 
+                       _FSEventsGetCurrentEventId, _FSEventsGetLastEventIdForDeviceBeforeTime, 
+                       _FSEventsPurgeEventsForDeviceUpToEventId, _LSApplicationSINFKey, 
+                       _LSApplicationWorkspaceErrorDomain, _LSApplicationsChangedNotificationName, 
+                       _LSApplyURLOverridesForContacts, _LSBlockUntilCompleteKey, 
+                       _LSContinuityErrorDomain, _LSDefaultApplicationManagementDomain, 
+                       _LSDefaultIconName, _LSDisableURLOverrides, _LSDocumentTypesChangedNotificationName, 
+                       _LSFileProviderStringKey, _LSGeoJSONKey, _LSHiddenAppType, 
+                       _LSInit, _LSInstallTypeKey, _LSInternalApplicationType, _LSMoveDocumentOnOpenKey, 
+                       _LSNewsstandArtworkKey, _LSOpenApplicationPayloadOptionsKey, 
+                       _LSOpenInBackgroundKey, _LSPackageTypeCarrierBundle, _LSPackageTypeCustomer, 
+                       _LSPackageTypeDeveloper, _LSPackageTypeKey, _LSPackageTypePlaceholder, 
+                       _LSPlugInKitType, _LSReferrerURLKey, _LSRequireOpenInPlaceKey, 
+                       _LSRestrictedKey, _LSSimulatorRootPathKey, _LSSimulatorUserPathKey, 
+                       _LSSupressNotificationKey, _LSSystemApplicationType, _LSSystemPlaceholderType, 
+                       _LSTargetBSServiceConnectionEndpointKey, _LSTypeDeclarationsChangedNotificationName, 
+                       _LSURLTypesChangedNotificationName, _LSUninstallUserDataOnly, 
+                       _LSUpdatePlaceholderIconKey, _LSUserActivityAlwaysEligibleKey, 
+                       _LSUserActivityAlwaysPickKey, _LSUserActivityHasWebPageURLOptionKey, 
+                       _LSUserActivityIsForPairedDeviceOptionKey, _LSUserActivityIsHighPriorityOptionKey, 
+                       _LSUserActivityIsNotificationOptionKey, _LSUserActivityManagerActivityContinuationIsEnabledChangedNotification, 
+                       _LSUserActivityTypeNowPlaying, _LSUserActivityTypeSiri, _LSUserActivityTypeTeamIDOverideKey, 
+                       _LSUserApplicationType, _LSUserInitiatedUninstall, _LSVPNPluginType, 
+                       _LSiTunesArtworkKey, _LSiTunesMetadataKey, _UTTypeConformsTo, 
+                       _UTTypeCopyAllTagsWithClass, _UTTypeCopyChildIdentifiers, 
+                       _UTTypeCopyDeclaration, _UTTypeCopyDeclaringBundleURL, _UTTypeCopyDescription, 
+                       _UTTypeCopyParentIdentifiers, _UTTypeCopyPreferredTagWithClass, 
+                       _UTTypeCreateAllIdentifiersForTag, _UTTypeCreatePreferredIdentifierForTag, 
+                       _UTTypeEqual, _UTTypeIsDeclared, _UTTypeIsDynamic, _UTTypeShow, 
+                       __AppleIDAuthenticationAddAppleID, __AppleIDAuthenticationAddAppleIDWithBlock, 
+                       __AppleIDAuthenticationCopyAppleIDs, __AppleIDAuthenticationCopyCertificateInfo, 
+                       __AppleIDAuthenticationCopyCertificateInfoWithBlock, __AppleIDAuthenticationCopyMyInfo, 
+                       __AppleIDAuthenticationCopyMyInfoWithBlock, __AppleIDAuthenticationFindPerson, 
+                       __AppleIDAuthenticationFindPersonWithBlock, __AppleIDAuthenticationForgetAppleID, 
+                       __AppleIDAuthenticationForgetAppleIDWithBlock, __AppleIDCopyDSIDForCertificate, 
+                       __AppleIDCopySecIdentityForAppleIDAccount, __AppleIDUpdateLinkedIdentityProvisioning, 
+                       __AppleIDUpdateLinkedIdentityProvisioningWithBlock, __CSAddAppleIDAccount, 
+                       __CSAddAppleIDAccountUsingCompletionBlock, __CSBackToMyMacCopyDomain, 
+                       __CSBackToMyMacCopyDomains, __CSCopyAccountIdentifierForAppleIDCertificate, 
+                       __CSCopyAccountIdentifierForAppleIDCertificateChain, __CSCopyAccountInfoForAppleID, 
+                       __CSCopyAccountStatusForAppleID, __CSCopyAppleIDAccountForAppleIDCertificate, 
+                       __CSCopyAppleIDAccounts, __CSCopyCommentForServerName, __CSCopyDefaultSharingSecIdentities, 
+                       __CSCopyLocalHostnameForComputerName, __CSCopySecIdentityForAppleID, 
+                       __CSCreateAppleIDIdentityWithCertificate, __CSCreateAppleIDIdentityWithCertificateChain, 
+                       __CSCreateAppleIDIdentityWithNameAndAccountIdentifier, __CSCreatePosixNameFromString, 
+                       __CSDeviceSupportsAirDrop, __CSDisassociateWireless, __CSEnableWirelessP2P, 
+                       __CSGetAppleIDIdentityAuthority, __CSIdentityAuthenticateUsingCertificate, 
+                       __CSIdentityAuthenticateUsingCertificateChain, __CSIdentityAuthorityCopyIdentityWithName, 
+                       __CSIdentityUpdateLinkedIdentityProvisioning, __CSIsComputerToComputerEnabled, 
+                       __CSIsWirelessAccessPointEnabled, __CSIsWirelessP2PEnabled, 
+                       __CSLinkCurrentUserToAppleIDWithVerifiedAccountIdentifier, 
+                       __CSRemoveAppleIDAccount, __CSUnlinkCurrentUserFromAppleID, 
+                       __LSAdvertisementBytesKind, __LSAppRemovalServiceXPCInterface, 
+                       __LSAppStateBlockedKey, __LSAppStateInstalledKey, __LSAppStatePlaceholderKey, 
+                       __LSAppStateRemovedKey, __LSAppStateRestrictedKey, __LSAppStateValidKey, 
+                       __LSBindingSetLogFile, __LSBindingSetReasonTrackingEnabled, 
+                       __LSCompareHashedBytesFromAdvertisingStrings, __LSCopyActivityTypesClaimedHashedAdvertisingStrings, 
+                       __LSCopyAdvertisementStringForTeamIdentifierAndActivityType, 
+                       __LSCopyClaimedActivityIdentifiersAndDomains, __LSCopyUserActivityDomainNamesForBundleID, 
+                       __LSCreateDatabaseLookupStringFromHashedBytesForAdvertising, 
+                       __LSCreateDeviceTypeIdentifierWithModelCode, __LSCreateDeviceTypeIdentifierWithModelCodeAndColorComponents, 
+                       __LSCreateHashedBytesForAdvertisingFromString, __LSCreatePackageExtensionsArray, 
+                       __LSDServiceGetXPCProxyForServiceClass, __LSDatabaseContextSetDetachProxyObjects, 
+                       __LSDatabaseCopyURLForUser, __LSDebugAdvertismentValue, __LSDefaultLog, 
+                       __LSDisplayData, __LSExtensionsLog, __LSGetStatus, __LSGetVersionFromString, 
+                       __LSHandlerRankAlternate, __LSHandlerRankDefault, __LSHandlerRankNone, 
+                       __LSHandlerRankOwner, __LSIconDictionarySupportsAssetCatalogs, 
+                       __LSMakeVersionNumber, __LSPersistentIdentifierCompare, __LSPersistentIdentifierGetDebugDescription, 
+                       __LSPersistentIdentifierGetKnowledgeUUID4CoreDevice, __LSPersistentIdentifierGetSequenceNumber4CoreDevice, 
+                       __LSRegisterFilePropertyProvider, __LSServerMain, __LSSetDatabaseIsSeeded, 
+                       __LSSetDefaultWebBrowserWithBundleIdentifierAndVersion, __LSSetSchemeHandler, 
+                       __LSURLBindingReasonKey, __LSUserActivityContainsFileProviderURLKey, 
+                       __LSUserActivityContainsUnsynchronizedCloudDocsKey, __LSUserActivityOptionInvalidateAfterFetchKey, 
+                       __LSVersionNumberCompare, __LSVersionNumberCopyStringRepresentation, 
+                       __LSVersionNumberGetBugFixComponent, __LSVersionNumberGetCurrentSystemVersion, 
+                       __LSVersionNumberGetMajorComponent, __LSVersionNumberGetMinorComponent, 
+                       __LSVersionNumberGetStringRepresentation, __LSVersionNumberHash, 
+                       __LSVersionNumberMakeWithString, __LSWriteApplicationPlaceholderToURL, 
+                       __UTCopyDeclaredTypeIdentifiers, __UTTypeCopyDescriptionLocalizationDictionary, 
+                       __UTTypeCopyDynamicIdentifiersForTags, __UTTypeCopyGlyphName, 
+                       __UTTypeCopyIconName, __UTTypeCopyKindStringDictionaryForNonMaterializedItem, 
+                       __UTTypeCopyKindStringForNonMaterializedItem, __UTTypeCopyPedigree, 
+                       __UTTypeCopyPedigreeSet, __UTTypeCreateDynamicIdentifierForTaggedPointerObject, 
+                       __UTTypeCreateSuggestedFilename, __UTTypeGetStatus, __UTTypeHash, 
+                       __UTTypeIdentifierIsValid, __UTTypeIsWildcard, __UTTypePrecachePropertiesOfIdentifiers, 
+                       ___LSDefaultsGetSharedInstance, __kCSAppleIDAccountAllEmailAddresses, 
+                       __kCSAppleIDAccountAppleID, __kCSAppleIDAccountCertificateExpirationDate, 
+                       __kCSAppleIDAccountCertificateSerialNumber, __kCSAppleIDAccountFirstName, 
+                       __kCSAppleIDAccountLastName, __kCSAppleIDAccountStateCertificateAssumedOK, 
+                       __kCSAppleIDAccountStateCertificateExpired, __kCSAppleIDAccountStateCertificateMustBeRenewed, 
+                       __kCSAppleIDAccountStateCertificateOK, __kCSAppleIDAccountStateCertificatePending, 
+                       __kCSAppleIDAccountStateCertificateRevoked, __kCSAppleIDAccountStateCertificateShouldBeRenewed, 
+                       __kCSAppleIDAccountStateNoCertificate, __kCSAppleIDAccountStateNoEncodedDSID, 
+                       __kCSAppleIDAccountStatePasswordInaccessibleInKeychain, __kCSAppleIDAccountStatePasswordInvalid, 
+                       __kCSAppleIDAccountStateUnknown, __kCSAppleIDAccountStatusAccountStateKey, 
+                       __kCSAppleIDAccountStatusNextActionTimeKey, __kCSAppleIDAccountStatusRequiresUserActionKey, 
+                       __kCSAppleIDAccountStatusValidationDateKey, __kCSAppleIDAccountVerifiedEmailAddresses, 
+                       __kCSAppleIDAccountVerifiedPhoneNumbers, __kCSAppleIDOptionDeferServerCheck, 
+                       __kCSAppleIDOptionForceServerCheck, __kCSAppleIDOptionSkipServerCheck, 
+                       __kUTTypeGlyphNameKey, __kUTTypeIconNameKey, __kUTTypePassBundle, 
+                       __kUTTypePassData, _kAppleIDAccountAddedOrRemovedNotificationKey, 
+                       _kAppleIDAccountConfigurationChangeNotificationKey, _kAppleIDEncodedDSIDCertificateType, 
+                       _kAppleIDValidatedItemsRecordDataCertificateType, _kAppleIDValidationRecordOptionDoNotCheckValidAsOfDateKey, 
+                       _kAppleIDValidationRecordOptionDoNotCheckVersionKey, _kAppleIDValidationRecordOptionDoNotEvaluateTrustRefKey, 
+                       _kAppleIDValidationRecordOptionOverrideSuggestedDurationValueKey, 
+                       _kCSIdentityErrorDomain, _kLSCurrentDeviceModelCode, _kLSNotificationDatabaseSeedingComplete, 
+                       _kLSNotificationDatabaseSeedingStart, _kLSVersionNumberNull, 
+                       _kUTExportedTypeDeclarationsKey, _kUTImportedTypeDeclarationsKey, 
+                       _kUTTagClassDeviceModelCode, _kUTTagClassFilenameExtension, 
+                       _kUTTagClassMIMEType, _kUTType3DContent, _kUTTypeAVIMovie, 
+                       _kUTTypeAliasFile, _kUTTypeAliasRecord, _kUTTypeAppleICNS, 
+                       _kUTTypeAppleMac, _kUTTypeAppleProtectedMPEG4Audio, _kUTTypeAppleProtectedMPEG4Video, 
+                       _kUTTypeAppleScript, _kUTTypeApplication, _kUTTypeApplicationBundle, 
+                       _kUTTypeApplicationFile, _kUTTypeArchive, _kUTTypeAssemblyLanguageSource, 
+                       _kUTTypeAudio, _kUTTypeAudioInterchangeFileFormat, _kUTTypeAudiovisualContent, 
+                       _kUTTypeBMP, _kUTTypeBinaryPropertyList, _kUTTypeBookmark, 
+                       _kUTTypeBundle, _kUTTypeBzip2Archive, _kUTTypeCHeader, _kUTTypeCPlusPlusHeader, 
+                       _kUTTypeCPlusPlusSource, _kUTTypeCSource, _kUTTypeCalendarEvent, 
+                       _kUTTypeCommaSeparatedText, _kUTTypeCompositeContent, _kUTTypeComputer, 
+                       _kUTTypeConformsToKey, _kUTTypeContact, _kUTTypeContent, _kUTTypeData, 
+                       _kUTTypeDatabase, _kUTTypeDelimitedText, _kUTTypeDescriptionKey, 
+                       _kUTTypeDevice, _kUTTypeDirectory, _kUTTypeDiskImage, _kUTTypeElectronicPublication, 
+                       _kUTTypeEmailMessage, _kUTTypeExecutable, _kUTTypeFileURL, 
+                       _kUTTypeFlatRTFD, _kUTTypeFolder, _kUTTypeFont, _kUTTypeFramework, 
+                       _kUTTypeGIF, _kUTTypeGNUZipArchive, _kUTTypeGenericPC, _kUTTypeHTML, 
+                       _kUTTypeICO, _kUTTypeIconFileKey, _kUTTypeIdentifierKey, _kUTTypeImage, 
+                       _kUTTypeInkText, _kUTTypeInternetLocation, _kUTTypeItem, _kUTTypeJPEG, 
+                       _kUTTypeJPEG2000, _kUTTypeJSON, _kUTTypeJavaArchive, _kUTTypeJavaClass, 
+                       _kUTTypeJavaScript, _kUTTypeJavaSource, _kUTTypeLivePhoto, 
+                       _kUTTypeLog, _kUTTypeM3UPlaylist, _kUTTypeMIDIAudio, _kUTTypeMP3, 
+                       _kUTTypeMPEG, _kUTTypeMPEG2TransportStream, _kUTTypeMPEG2Video, 
+                       _kUTTypeMPEG4, _kUTTypeMPEG4Audio, _kUTTypeMessage, _kUTTypeMountPoint, 
+                       _kUTTypeMovie, _kUTTypeOSAScript, _kUTTypeOSAScriptBundle, 
+                       _kUTTypeObjectiveCPlusPlusSource, _kUTTypeObjectiveCSource, 
+                       _kUTTypePDF, _kUTTypePHPScript, _kUTTypePICT, _kUTTypePKCS12, 
+                       _kUTTypePNG, _kUTTypePackage, _kUTTypePerlScript, _kUTTypePlainText, 
+                       _kUTTypePlaylist, _kUTTypePluginBundle, _kUTTypePresentation, 
+                       _kUTTypePropertyList, _kUTTypePythonScript, _kUTTypeQuickLookGenerator, 
+                       _kUTTypeQuickTimeImage, _kUTTypeQuickTimeMovie, _kUTTypeRTF, 
+                       _kUTTypeRTFD, _kUTTypeRawImage, _kUTTypeReferenceURLKey, _kUTTypeResolvable, 
+                       _kUTTypeRubyScript, _kUTTypeScalableVectorGraphics, _kUTTypeScript, 
+                       _kUTTypeShellScript, _kUTTypeSourceCode, _kUTTypeSpotlightImporter, 
+                       _kUTTypeSpreadsheet, _kUTTypeSwiftSource, _kUTTypeSymLink, 
+                       _kUTTypeSystemPreferencesPane, _kUTTypeTIFF, _kUTTypeTXNTextAndMultimediaData, 
+                       _kUTTypeTabSeparatedText, _kUTTypeTagSpecificationKey, _kUTTypeText, 
+                       _kUTTypeToDoItem, _kUTTypeURL, _kUTTypeURLBookmarkData, _kUTTypeUTF16ExternalPlainText, 
+                       _kUTTypeUTF16PlainText, _kUTTypeUTF8PlainText, _kUTTypeUTF8TabSeparatedText, 
+                       _kUTTypeUnixExecutable, _kUTTypeVCard, _kUTTypeVersionKey, 
+                       _kUTTypeVideo, _kUTTypeVolume, _kUTTypeWaveformAudio, _kUTTypeWebArchive, 
+                       _kUTTypeWindowsExecutable, _kUTTypeX509Certificate, _kUTTypeXML, 
+                       _kUTTypeXMLPropertyList, _kUTTypeXPCService, _kUTTypeZipArchive ]
+    objc-classes:    [ LSAppClipMetadata, LSAppLink, LSApplicationExtensionRecord, 
+                       LSApplicationIdentity, LSApplicationIdentityMigrationResult, 
+                       LSApplicationIdentityMigrator, LSApplicationProxy, LSApplicationRecord, 
+                       LSApplicationWorkspace, LSApplicationWorkspaceObserver, LSBundleInfoCachedValues, 
+                       LSBundleProxy, LSBundleRecord, LSClaimBinding, LSClaimBindingConfiguration, 
+                       LSClaimRecord, LSDatabaseContext, LSDocumentProxy, LSEnumerator, 
+                       LSExtensionPoint, LSExtensionPointRecord, LSObserver, LSOperationRequestContext, 
+                       LSPlugInKitProxy, LSPlugInQuery, LSPlugInQueryWithIdentifier, 
+                       LSPlugInQueryWithQueryDictionary, LSPlugInQueryWithURL, LSPrecondition, 
+                       LSPropertyList, LSRecord, LSRecordPromise, LSResourceProxy, 
+                       LSSettingsStore, LSSpotlightAction, LSVPNPluginProxy, UTTypeRecord, 
+                       _LSApplicationState, _LSDefaults, _LSDiskUsage, _LSDisplayNameConstructor, 
+                       _LSLazyPropertyList, _LSOpenConfiguration, _LSQuery, _LSQueryContext, 
+                       _LSQueryResult, _LSRecordEnumerator, _LSStringLocalizer, _LSURLOverride ]
+reexports:
+  - targets:         [ arm64-tvos, arm64e-tvos ]
+    objc-classes:    [ NSUserActivity ]
+...

+ 12 - 0
uicache/CoreServices.framework/Headers/CoreServices.h

@@ -0,0 +1,12 @@
+/*	
+	CoreServices.h
+	Copyright (c) 2009, Apple Inc. All rights reserved.
+*/
+
+#ifndef __CORESERVICES__
+#define __CORESERVICES__
+
+#include <CoreServices/UTCoreTypes.h>
+#include <CoreServices/UTType.h>
+
+#endif /* __CORESERVICES__ */

Файловите разлики са ограничени, защото са твърде много
+ 1276 - 0
uicache/CoreServices.framework/Headers/UTCoreTypes.h


+ 644 - 0
uicache/CoreServices.framework/Headers/UTType.h

@@ -0,0 +1,644 @@
+/*
+     File:       UTType.h
+ 
+     Contains:   Public interfaces for uniform type identifiers
+ 
+     Copyright:  (c) 2003-2012 by Apple Inc. All rights reserved.
+ 
+     Bugs?:      For bug reports, consult the following page on
+                 the World Wide Web:
+ 
+                     http://developer.apple.com/bugreporter/
+
+*/
+
+#ifndef __UTTYPE__
+#define __UTTYPE__
+
+#ifndef __COREFOUNDATION__
+#include <CoreFoundation/CoreFoundation.h>
+#endif
+
+
+#include <Availability.h>
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+CF_ASSUME_NONNULL_BEGIN
+
+
+
+/* ======================================================================================================== */
+/* Uniform Type Identification API                                                                          */
+/* ======================================================================================================== */
+/*
+    Uniform Type Identification Primer
+
+    Uniform Type Identifiers (or UTIs) are strings which uniquely identify
+    abstract types. They can be used to describe a file format or an
+    in-memory data type, but can also be used to describe the type of
+    other sorts of entities, such as directories, volumes, or packages.
+
+    The syntax of a uniform type identifier looks like a bundle identifier.
+    It has the form of a reversed DNS name, although some special top-level 
+    UTI domains are reserved by Apple and are outside the current IANA 
+    top-level Internet domain name space.
+
+    Examples:
+
+        public.jpeg
+        public.utf16-plain-text
+        com.apple.xml-property-list
+
+    Types which are standard or not controlled by any one organization 
+    are declared in the "public" domain. Currently, public types may  
+    be declared only by Apple.
+
+    Types specific to Mac OS are declared with identifiers in the 
+    com.apple.macos domain.
+
+    Third parties should declare their own uniform type identifiers
+    in their respective registered Internet domain spaces.
+
+    Type declarations appear in bundle property lists and tell
+    the system several things about a type, including the following:
+
+    Conformance
+
+    A type may "conform" to one or more other types. For example, the
+    type com.apple.xml-property-list conforms to both the
+    com.apple.property-list and public.xml types. The public.xml 
+    type in turn conforms to type public.text. Finally, type public.text  
+    conforms to public.data, which is the base type for all types 
+    describing bytes stream formats. Conformance relationships between 
+    types are established in type declarations.
+
+    Conformance relationships establish a multiple inheritanace hierarchy
+    between types. Type property values may be inherited at runtime
+    according to the conformance relationships for each type. When a type's 
+    declaration does not include a value for particular type property, 
+    then the type's supertypes are searched for a value. Supertypes are 
+    searched depth-first, in the order given in the type declaration. 
+    This is the only way in which the declared order of the conforms-to 
+    supertypes is significant.
+
+    Tags
+
+    A "tag" is a string which indicates a type in some other type 
+    identification space, such as a filename extension, MIME Type,
+    or NSPboardType. Each type declaration may include a 
+    "tag specification", which is a dictionary listing all of the 
+    tags associated with the type.
+
+    A tag's "class" is the namespace of a tag: filename extension, 
+    MIME type, OSType, etc. Tag classes are themselves identified by 
+    uniform type identifiers so that the set of valid tag classes is 
+    easily extendend in the future.
+
+    Other Type Properties
+
+    Type declarations may include several other properties: a localizable
+    user description of the type, the name of an icon resource in
+    the declaring bundle, a reference URL identifying technical 
+    documentation about the type itself, and finally a version number, 
+    which can be incremented as a type evolves. All of these properties
+    are optional.
+
+    Exported vs. Imported Type Declarations
+
+    Type declarations are either exported or imported. An exported
+    type declaration means that the type itself is defined or owned 
+    by the organization making the declaration. For example, a propietary
+    document type declaration should only be exported by the application
+    which controls the document format.
+
+    An imported declaration is for applications which depend on the
+    existence of someone else's type declaration. If application A can
+    open application B's document format, then application A makes
+    an imported declaration of application B's document type so that
+    even if application B is not present on the system, there is an
+    acessible declaration of its document type.
+
+    An exported declaration of a particular type identifier is always
+    preferred over an imported declaration.
+
+    Example XML Type Declaration
+
+    Appearing below is an XML excerpt from a bundle Info.plist file which 
+    declares the public type "public.jpeg":
+    
+        <key>UTExportedTypeDeclarations</key>
+        <array>
+            <dict>
+                <key>UTTypeIdentifier</key>
+                <string>public.jpeg</string>
+                <key>UTTypeDescription</key>
+                <string>JPEG image</string>
+                <key>UTTypeIconFile</key>
+                <string>public.jpeg.icns</string>
+                <key>UTTypeConformsTo</key>
+                <array>
+                    <string>public.image</string>
+                </array>
+                <key>UTTypeTagSpecification</key>
+                <dict>
+                    <key>com.apple.ostype</key>
+                    <string>JPEG</string>
+                    <key>public.filename-extension</key>
+                    <array>
+                        <string>jpeg</string>
+                        <string>jpg</string>
+                    </array>
+                    <key>public.mime-type</key>
+                    <string>image/jpeg</string>
+                </dict>
+            </dict>
+        </array>
+
+
+    Dynamic Type Identifiers
+
+    Uniform Type Identifiation uses dynamic type identifiers to
+    represent types for which no identifier has been declared. A
+    dynamic type identifier is syntactially a regular uniform
+    type identifier in the "dyn" domain. However, after the
+    initial domain label, a dynamic type identifier is an 
+    opaque encoding of a tag specification. Dynamic type 
+    identifiers cannot be declared. They are generated on-demand
+    with whatever type information is available at the time, often 
+    a single (otherwise unknown) type tag.
+
+    A dynamic identifier therefore carries within it a minimal
+    amount of type information, but enough to work well with the
+    Uniform Type Identification API. For example, a client can
+    extract from a dynamic type identifier the original tag
+    specification with which it was created. A client can also
+    test a dynamic type identifier for equality to another
+    uniform type identifier. If the dynamic identifier's
+    tag specification is a subset of the other identifier's
+    tags, the two are considered equal.
+
+    Dynamic type identifiers do not express the full richness
+    of type information associated with a declared type 
+    identifier, but dynamic type identifiers allow the behavior
+    to degrade gracefully in the presence of incomplete 
+    declared type information.
+
+    A dynamic type identifier may be transmitted across processes
+    on a given system, but it should never be stored persistently
+    or transmitted over the wire to another system. In particular,
+    dynamic identifiers should not appear in bundle info property
+    lists, and they will generally be ignored when they do. Apple 
+    reserves the right to change the opaque format of dynamic
+    identifiers in future versions of Mac OS X.
+*/
+
+/*
+    Type Declaration Dictionary Keys
+
+    The following keys are used in type declarations
+*/
+/*
+ *  kUTExportedTypeDeclarationsKey
+ */
+extern const CFStringRef kUTExportedTypeDeclarationsKey              API_AVAILABLE( ios(3.0), macos(10.3), tvos(9.0), watchos(1.0) );
+/*
+ *  kUTImportedTypeDeclarationsKey
+ */
+extern const CFStringRef kUTImportedTypeDeclarationsKey              API_AVAILABLE( ios(3.0), macos(10.3), tvos(9.0), watchos(1.0) );
+/*
+ *  kUTTypeIdentifierKey
+ */
+extern const CFStringRef kUTTypeIdentifierKey                        API_AVAILABLE( ios(3.0), macos(10.3), tvos(9.0), watchos(1.0) );
+/*
+ *  kUTTypeTagSpecificationKey
+ */
+extern const CFStringRef kUTTypeTagSpecificationKey                  API_AVAILABLE( ios(3.0), macos(10.3), tvos(9.0), watchos(1.0) );
+/*
+ *  kUTTypeConformsToKey
+ */
+extern const CFStringRef kUTTypeConformsToKey                        API_AVAILABLE( ios(3.0), macos(10.3), tvos(9.0), watchos(1.0) );
+/*
+ *  kUTTypeDescriptionKey
+ */
+extern const CFStringRef kUTTypeDescriptionKey                       API_AVAILABLE( ios(3.0), macos(10.3), tvos(9.0), watchos(1.0) );
+/*
+ *  kUTTypeIconFileKey
+ */
+extern const CFStringRef kUTTypeIconFileKey                          API_AVAILABLE( ios(3.0), macos(10.3), tvos(9.0), watchos(1.0) );
+/*
+ *  kUTTypeReferenceURLKey
+ */
+extern const CFStringRef kUTTypeReferenceURLKey                      API_AVAILABLE( ios(3.0), macos(10.3), tvos(9.0), watchos(1.0) );
+/*
+ *  kUTTypeVersionKey
+ */
+extern const CFStringRef kUTTypeVersionKey                           API_AVAILABLE( ios(3.0), macos(10.3), tvos(9.0), watchos(1.0) );
+
+
+/*
+    Type Tag Classes
+
+    The following constant strings identify tag classes for use 
+    when converting uniform type identifiers to and from
+    equivalent tags.
+*/
+/*
+ *  kUTTagClassFilenameExtension   *** DEPRECATED ***
+ */
+extern const CFStringRef kUTTagClassFilenameExtension                API_DEPRECATED("Use UTTagClassFilenameExtension instead.", ios(3.0, 15.0), macos(10.3, 12.0), tvos(9.0, 15.0), watchos(1.0, 8.0));
+/*
+ *  kUTTagClassMIMEType   *** DEPRECATED ***
+ */
+extern const CFStringRef kUTTagClassMIMEType                         API_DEPRECATED("Use UTTagClassMIMEType instead.", ios(3.0, 15.0), macos(10.3, 12.0), tvos(9.0, 15.0), watchos(1.0, 8.0));
+/*
+ *  kUTTagClassNSPboardType   *** DEPRECATED ***
+ */
+extern const CFStringRef kUTTagClassNSPboardType                     API_DEPRECATED("NSPasteboard types are obsolete.", macos(10.3, 12.0)) API_UNAVAILABLE(ios, tvos, watchos);
+/*
+ *  kUTTagClassOSType   *** DEPRECATED ***
+ */
+extern const CFStringRef kUTTagClassOSType                           API_DEPRECATED("HFS file types are obsolete.", macos(10.3, 12.0)) API_UNAVAILABLE(ios, tvos, watchos);
+
+/*
+ *  UTTypeCreatePreferredIdentifierForTag()   *** DEPRECATED ***
+ *  
+ *  Discussion:
+ *    Creates a uniform type identifier for the type indicated by the
+ *    specified tag. This is the primary function to use for going from
+ *    tag (extension/MIMEType/OSType) to uniform type identifier.
+ *    Optionally, the returned type identifiers must conform to the
+ *    identified "conforming-to" type argument. This is a hint to the
+ *    implementation to constrain the search to a particular tree of
+ *    types. For example, the client may want to know the type
+ *    indicated by a particular extension tag. If the client knows that
+ *    the extension is associated with a directory (rather than a
+ *    file), the client may specify "public.directory" for the
+ *    conforming-to argument. This will allow the implementation to
+ *    ignore all types associated with byte data formats (public.data
+ *    base type). If more than one type is indicated, preference is
+ *    given to a public type over a non-public type on the theory that
+ *    instances of public types are more common, and therefore more
+ *    likely to be correct. When there a choice must be made between
+ *    multiple public types or multiple non-public types, the selection
+ *    rules are undefined. Clients needing finer control should use
+ *    UTTypeCreateAllIdentifiersForTag. If no declared type is
+ *    indicated, a dynamic type identifier is generated which satisfies
+ *    the parameters.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    inTagClass:
+ *      the class identifier of the tag argument
+ *    
+ *    inTag:
+ *      the tag string
+ *    
+ *    inConformingToUTI:
+ *      the identifier of a type to which the result must conform
+ *  
+ *  Result:
+ *    a new CFStringRef containing the type identifier, or NULL if
+ *    inTagClass is not a known tag class
+ */
+extern __nullable CFStringRef
+UTTypeCreatePreferredIdentifierForTag(
+  CFStringRef              inTagClass,
+  CFStringRef              inTag,
+  __nullable CFStringRef   inConformingToUTI)                        API_DEPRECATED("Use the UTType class instead.", ios(3.0, 15.0), macos(10.3, 12.0), tvos(9.0, 15.0), watchos(1.0, 8.0));
+
+
+
+/*
+ *  UTTypeCreateAllIdentifiersForTag()   *** DEPRECATED ***
+ *  
+ *  Discussion:
+ *    Creates an array of all uniform type identifiers indicated by the
+ *    specified tag. An overloaded tag (e.g., an extension used by
+ *    several applications for different file formats) may indicate
+ *    multiple types. If no declared type identifiers have the
+ *    specified tag, then a single dynamic type identifier will be
+ *    created for the tag. Optionally, the returned type identifiers
+ *    must conform to the identified "conforming-to" type argument.
+ *    This is a hint to the implementation to constrain the search to a
+ *    particular tree of types. For example, the client may want to
+ *    know the type indicated by a particular extension tag. If the
+ *    client knows that the extension is associated with a directory
+ *    (rather than a file), the client may specify "public.directory"
+ *    for the conforming-to argument. This will allow the
+ *    implementation to ignore all types associated with byte data
+ *    formats (public.data base type).
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    inTagClass:
+ *      the class identifier of the tag argument
+ *    
+ *    inTag:
+ *      the tag string
+ *    
+ *    inConformingToUTI:
+ *      the identifier of a type to which the results must conform
+ *  
+ *  Result:
+ *    An array of uniform type identifiers, or NULL if inTagClass is
+ *    not a known tag class
+ */
+extern __nullable CFArrayRef
+UTTypeCreateAllIdentifiersForTag(
+  CFStringRef              inTagClass,
+  CFStringRef              inTag,
+  __nullable CFStringRef   inConformingToUTI)                        API_DEPRECATED("Use the UTType class instead.", ios(3.0, 15.0), macos(10.3, 12.0), tvos(9.0, 15.0), watchos(1.0, 8.0));
+
+
+
+/*
+ *  UTTypeCopyPreferredTagWithClass()   *** DEPRECATED ***
+ *  
+ *  Discussion:
+ *    Returns the identified type's preferred tag with the specified
+ *    tag class as a CFString. This is the primary function to use for
+ *    going from uniform type identifier to tag. If the type
+ *    declaration included more than one tag with the specified class,
+ *    the first tag in the declared tag array is the preferred tag.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    inUTI:
+ *      the uniform type identifier
+ *    
+ *    inTagClass:
+ *      the class of tags to return
+ *  
+ *  Result:
+ *    the tag string, or NULL if there is no tag of the specified class.
+ */
+extern __nullable CFStringRef
+UTTypeCopyPreferredTagWithClass(
+  CFStringRef   inUTI,
+  CFStringRef   inTagClass)                                          API_DEPRECATED("Use the UTType class instead.", ios(3.0, 15.0), macos(10.3, 12.0), tvos(9.0, 15.0), watchos(1.0, 8.0));
+
+
+
+/*
+ *  UTTypeCopyAllTagsWithClass()   *** DEPRECATED ***
+ *  
+ *  Discussion:
+ *    Returns each of the identified type's tags with the specified
+ *    tag class as a CFArray of CFStrings.
+ *  
+ *  Parameters:
+ *    
+ *    inUTI:
+ *      the uniform type identifier
+ *    
+ *    inTagClass:
+ *      the class of tags to return
+ *  
+ *  Result:
+ *    an array of tag strings, or NULL if there is no tag of the specified class.
+ */
+extern __nullable CFArrayRef
+UTTypeCopyAllTagsWithClass(
+  CFStringRef   inUTI,
+  CFStringRef   inTagClass)                                          API_DEPRECATED("Use the UTType class instead.", ios(8.0, 15.0), macos(10.10, 12.0), tvos(9.0, 15.0), watchos(1.0, 8.0));
+
+
+
+/*
+ *  UTTypeEqual()   *** DEPRECATED ***
+ *  
+ *  Discussion:
+ *    Compares two identified types for equality. Types are equal if
+ *    their identifier strings are equal using a case-insensitive
+ *    comparison.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    inUTI1:
+ *      a uniform type identifier
+ *    
+ *    inUTI2:
+ *      another uniform type identifier
+ */
+extern Boolean 
+UTTypeEqual(
+  CFStringRef   inUTI1,
+  CFStringRef   inUTI2)                                              API_DEPRECATED("Use -[UTType isEqual:] instead.", ios(3.0, 15.0), macos(10.3, 12.0), tvos(9.0, 15.0), watchos(1.0, 8.0));
+
+
+
+/*
+ *  UTTypeConformsTo()   *** DEPRECATED ***
+ *  
+ *  Discussion:
+ *    Tests for a conformance relationship between the two identified
+ *    types. Returns true if the types are equal, or if the first type
+ *    conforms, directly or indirectly, to the second type.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    inUTI:
+ *      the uniform type identifier to test
+ *    
+ *    inConformsToUTI:
+ *      the uniform type identifier against which to test conformance.
+ */
+extern Boolean 
+UTTypeConformsTo(
+  CFStringRef   inUTI,
+  CFStringRef   inConformsToUTI)                                     API_DEPRECATED("Use -[UTType conformsToType:] instead.", ios(3.0, 15.0), macos(10.3, 12.0), tvos(9.0, 15.0), watchos(1.0, 8.0));
+
+
+
+/*
+ *  UTTypeCopyDescription()   *** DEPRECATED ***
+ *  
+ *  Discussion:
+ *    Returns the localized, user-readable type description string
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    inUTI:
+ *      the uniform type identifier
+ *  
+ *  Result:
+ *    a localized string, or NULL of no type description is available
+ */
+extern __nullable CFStringRef
+UTTypeCopyDescription(CFStringRef inUTI)                             API_DEPRECATED("Use UTType.localizedDescription instead.", ios(3.0, 15.0), macos(10.3, 12.0), tvos(9.0, 15.0), watchos(1.0, 8.0));
+
+
+
+/*
+ *  UTTypeIsDeclared()   *** DEPRECATED ***
+ *  
+ *  Discussion:
+ *    Returns whether or not the specified UTI has a declaration
+ *    registered on the current system. Dynamic UTIs are never
+ *    registered.
+ *  
+ *  Parameters:
+ *    
+ *    inUTI:
+ *      the uniform type identifier
+ *  
+ *  Result:
+ *    Whether or not the UTI is registered.
+ */
+extern Boolean
+UTTypeIsDeclared(CFStringRef inUTI)                                  API_DEPRECATED("Use UTType.declared instead.", ios(8.0, 15.0), macos(10.10, 12.0), tvos(9.0, 15.0), watchos(1.0, 8.0));
+
+
+
+/*
+ *  UTTypeIsDynamic()   *** DEPRECATED ***
+ *  
+ *  Discussion:
+ *    Returns whether or not the specified UTI is a dynamic UTI.
+ *
+ *  Parameters:
+ *    
+ *    inUTI:
+ *      the uniform type identifier
+ *  
+ *  Result:
+ *    Whether or not the UTI is dynamic.
+ */
+extern Boolean
+UTTypeIsDynamic(CFStringRef inUTI)                                   API_DEPRECATED("Use UTType.dynamic instead.", ios(8.0, 15.0), macos(10.10, 12.0), tvos(9.0, 15.0), watchos(1.0, 8.0));
+
+
+
+/*
+ *  UTTypeCopyDeclaration()   *** DEPRECATED ***
+ *  
+ *  Discussion:
+ *    Returns the identified type's declaration dictionary, as it
+ *    appears in the declaring bundle's info property list. This the
+ *    access path to other type properties for which direct access is
+ *    rarely needed.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    inUTI:
+ *      the uniform type identifier
+ *  
+ *  Result:
+ *    a tag declaration dictionary, or NULL if the type is not declared
+ */
+extern __nullable CFDictionaryRef
+UTTypeCopyDeclaration(CFStringRef inUTI)                             API_DEPRECATED("Use the UTType class instead.", ios(3.0, 15.0), macos(10.3, 12.0), tvos(9.0, 15.0), watchos(1.0, 8.0));
+
+
+
+/*
+ *  UTTypeCopyDeclaringBundleURL()   *** DEPRECATED ***
+ *  
+ *  Discussion:
+ *    Returns the URL of the bundle containing the type declaration of
+ *    the identified type.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    inUTI:
+ *      the uniform type identifier
+ *  
+ *  Result:
+ *    a URL, or NULL if the bundle cannot be located.
+ */
+extern __nullable CFURLRef
+UTTypeCopyDeclaringBundleURL(CFStringRef inUTI)                      API_DEPRECATED("", ios(3.0, 14.0), macos(10.3, 11.0), tvos(9.0, 14.0), watchos(1.0, 7.0));
+
+
+
+/*
+ *  UTCreateStringForOSType()   *** DEPRECATED ***
+ *  
+ *  Discussion:
+ *    A helper function to canonically encode an OSType as a CFString
+ *    suitable for use as a tag argument.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    inOSType:
+ *      the OSType value to encode
+ *  
+ *  Result:
+ *    a new CFString representing the OSType
+ */
+extern CFStringRef
+UTCreateStringForOSType(OSType inOSType)                             API_DEPRECATED("HFS type codes are obsolete.", macos(10.3, 12.0)) API_UNAVAILABLE(ios, tvos, watchos);
+
+
+
+/*
+ *  UTGetOSTypeFromString()   *** DEPRECATED ***
+ *  
+ *  Discussion:
+ *    A helper function to canonically decode a string-encoded OSType
+ *    back to the original OSType value.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    inString:
+ *      the string to decode
+ *  
+ *  Result:
+ *    the OSType value encoded in the string, or 0 if the string is not
+ *    a valid encoding of an OSType
+ */
+extern OSType 
+UTGetOSTypeFromString(CFStringRef inString)                          API_DEPRECATED("HFS type codes are obsolete.", macos(10.3, 12.0)) API_UNAVAILABLE(ios, tvos, watchos);
+
+
+
+CF_ASSUME_NONNULL_END
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __UTTYPE__ */
+

+ 5 - 0
uicache/CoreServices.framework/Modules/module.modulemap

@@ -0,0 +1,5 @@
+framework module CoreServices [extern_c] [system] {
+  umbrella header "CoreServices.h"
+  export *
+  module * { export * }
+}

+ 9 - 8
uicache/Makefile

@@ -1,5 +1,5 @@
 IPHONE_ARCHS = arm64
-TARGET = appletv:10.2.2:10.0
+TARGET = appletv:16.1:13.0
 export GO_EASY_ON_ME=1
 #TARGET_IPHONEOS_DEPLOYMENT_VERSION = 6.0
 DEBUG = 0
@@ -8,10 +8,11 @@ include $(THEOS)/makefiles/common.mk
 TOOL_NAME = uicache
 uicache_FILES = uicache.mm csstore.cpp
 uicache_CFLAGS += -fvisibility=hidden -I.
-uicache_LDFLAGS += -F. -framework PineBoardServices
+uicache_LDFLAGS += -F. -framework PineBoardServices -framework CoreServices
 uicache_INSTALL_PATH = /usr/bin
 uicache_CODESIGN_FLAGS=-Suicache.xml
 uicache_CODESIGN=ldid
+uicache_INSTALL_PATH=/fs/jb/usr/bin/
 #uicache_LIBRARIES += rocketbootstrap
 uicache_Frameworks += WebCore ImageIO Foundation CFNetwork AppSupport UIKit IOKit MobileCoreServices
 #uicache_PRIVATE_FRAMEWORKS = GraphicsServices FMCore
@@ -20,14 +21,14 @@ uicache_USE_SUBSTRATE=0
 include $(THEOS_MAKE_PATH)/tool.mk
 
 ARCHS=arm64
-TARGET = appletv:10.2.2:10.0
+TARGET = appletv:16.1:13.0
 export GO_EASY_ON_ME=1
 #TARGET_IPHONEOS_DEPLOYMENT_VERSION = 6.0
 
-TARGET = appletv:10.2.2:10.0
+TARGET = appletv:16.1:13.0
 TOOL_NAME = wake
 wake_FILES = wake.m
-wake_INSTALL_PATH = /usr/bin
+wake_INSTALL_PATH = /fs/jb/usr/bin
 wake_CODESIGN_FLAGS=-Ssleep.xml
 wake_CODESIGN=ldid
 #wake_CODESIGN_FLAGS=--sign platform --ent sleep.xml --inplace
@@ -37,14 +38,14 @@ wake_FRAMEWORKS = Foundation
 include $(THEOS_MAKE_PATH)/tool.mk
 
 ARCHS=arm64
-TARGET = appletv:10.2.2:10.0
+TARGET = appletv:16.1:13.0
 export GO_EASY_ON_ME=1
 #TARGET_IPHONEOS_DEPLOYMENT_VERSION = 6.0
 
-TARGET = appletv:10.2.2:10.0
+TARGET = appletv:16.1:13.0
 TOOL_NAME = sleepy
 sleepy_FILES = sleep.m
-sleepy_INSTALL_PATH = /usr/bin
+sleepy_INSTALL_PATH = /fs/jb/usr/bin
 sleepy_CODESIGN_FLAGS=-Ssleep.xml
 sleepy_CODESIGN=ldid
 sleepy_FRAMEWORKS = Foundation

+ 279 - 0
uicache/PineBoardServices.framework/PineBoardServices.tbd

@@ -0,0 +1,279 @@
+---
+archs:                 [ arm64 ]
+platform:              tvos
+install-name:          /System/Library/PrivateFrameworks/PineBoardServices.framework/PineBoardServices
+current-version:       1
+compatibility-version: 1
+exports:
+  - archs:              [ arm64 ]
+    symbols:            [ _ConferenceRoomDisplayBackgroundPhotoNameContext, _ConferenceRoomDisplayMessageContext,
+                          _ConferenceRoomDisplayModeContext, _PBAppLaunchOptionDeactivation, _PBAppLaunchOptionLaunchOverSiri,
+                          _PBAppLaunchOptionLaunchedForPlayback, _PBAppProviderServicesAppIdentifierKey,
+                          _PBAppProviderServicesAppTitleKey, _PBLogComponentUserActivityMonitoring, _PBSActivateScreenItemActionName,
+                          _PBSAirPlayServiceInfoSessionIDKey, _PBSAirPlayUIActiveChangedNotification, _PBSAllModesAllowedKey,
+                          _PBSAppDepotProxyChangedAppIdentifier, _PBSAppDepotProxyChangedKey, _PBSAppDepotProxyDidChangeNotification,
+                          _PBSAspectRatioDescription, _PBSAuthorizeRestrictionsWithResult, _PBSCableCheckRequestFromSource,
+                          _PBSCableMinimumCheckInterval, _PBSCalculateAspectRatio, _PBSCanAttemptUpgradeWithDisplayAssistant,
+                          _PBSConnectedToHDMI2, _PBSCoreControlErrorDomain, _PBSCoreControlPolicyFromString,
+                          _PBSDisplayConnectionForDisplayState, _PBSDisplayManagerErrorDomain,
+                          _PBSDisplayManagerUpdateRegionChangeKey, _PBSDisplayManagerUpdateRequestCanHandleHighBandwidthModesKey,
+                          _PBSDisplayManagerUpdateRequestDisplayMode, _PBSDisplayManagerUpdateRequestPassthroughKey,
+                          _PBSDisplayManagerUpdateRequestTreatAsFallbackMode,
+                          _PBSDisplayManagerUpdateRequestUpgradeModeToNonVirtual, _PBSDisplayManagerUpdateRequestUseForNextWake,
+                          _PBSDisplayManagerUpdateRequestWriteModeToDisk, _PBSDisplayRefreshRateEqualToRefreshRate,
+                          _PBSDisplayResolutionEqualToResolution, _PBSDisplayResolutionIs1080p, _PBSDisplayResolutionIs480p,
+                          _PBSDisplayResolutionIs4K, _PBSDisplayResolutionIs576p, _PBSDisplayResolutionIs720p,
+                          _PBSDisplayResolutionIsFullHD, _PBSDisplayResolutionIsHD, _PBSDisplayResolutionMake,
+                          _PBSDolbyVisionUpgradeDisplayMode, _PBSDynamicRangeIsDolbyVision, _PBSDynamicRangeIsHDR,
+                          _PBSExternalControlBasicIRLearningConfiguration, _PBSExternalControlCustomVolumeDownNotification,
+                          _PBSExternalControlCustomVolumeUpNotification, _PBSExternalControlIRLearningManagerErrorDomain,
+                          _PBSExternalControlPlaybackIRLearningConfiguration, _PBSExternalControlSystemConfigurationChanged,
+                          _PBSExternalControlSystemErrorDomain, _PBSExternalControlVolumeIRLearningConfiguration,
+                          _PBSFilteredModesForDisplayState, _PBSFindFirstModeForDisplayState,
+                          _PBSFindMatchingLocaleModeForDisplayState, _PBSHDRAttemptDisplayMode, _PBSHDRDisplayModeMatchingOnlyVirtual,
+                          _PBSHDRUpgradeDisplayMode, _PBSHiddenAppTag, _PBSInternalAppTag, _PBSKioskAppPurgeTopShelfContentNotification,
+                          _PBSKioskAppTransitionAnimationFenceKey, _PBSKioskAppTransitionDelayKey, _PBSKioskAppTransitionDurationKey,
+                          _PBSKioskAppTransitionTypeKey, _PBSLocalizedStringFromCoreControlAction,
+                          _PBSMediaRemoteServiceDialogOptionMessageKey, _PBSMediaRemoteServiceDialogOptionPINKey,
+                          _PBSMediaRemoteServiceDialogOptionTimeoutKey, _PBSMediaRemoteServiceDialogOptionTitleKey,
+                          _PBSMediaRemoteServiceDialogOptionTokenKey,
+                          _PBSMediaRemoteServiceNotificationReliableTVAVRPowerControlAvailable,
+                          _PBSMediaRemoteServiceNotificationVolumeControlAvailable, _PBSMediaRemoteSiriContextSourceNameAppleRemote,
+                          _PBSMediaRemoteSiriContextSourceNameMediaRemoteService, _PBSMediaRemoteSiriContextSourceNameSystemService,
+                          _PBSNeedsHDRBuddyForDisplayMode, _PBSNonDefaultSystemAppTag, _PBSNowPlayingUIOptionBundleIdentifier,
+                          _PBSNowPlayingUIOptionShowActiveEndpoint, _PBSOSUpdatePreferenceDomain, _PBSOSUpdateServiceErrorDomain,
+                          _PBSOSUpdateServiceKeyAvailableUpdate, _PBSOSUpdateServiceKeyCurrentDownload,
+                          _PBSOSUpdateServiceKeyDidConfirmApply, _PBSOSUpdateServiceKeyDidFailErrorCode,
+                          _PBSOSUpdateServiceKeyDidFailErrorDomain, _PBSOSUpdateServiceKeyDidFailErrorString,
+                          _PBSOSUpdateServiceKeyDidSucceed, _PBSOSUpdateServiceKeyIsAlreadyDownloaded,
+                          _PBSOSUpdateServiceKeyIsAutoCheck, _PBSOSUpdateServiceKeyIsAvailable, _PBSOSUpdateServiceKeyIsLargeUpdate,
+                          _PBSOSUpdateServiceKeyIsManagedAction, _PBSOSUpdateServiceKeyIsRedownload, _PBSOSUpdateServiceKeyIsRestore,
+                          _PBSOSUpdateServiceKeyProgressAmount, _PBSOSUpdateServiceKeyProgressIsQueued,
+                          _PBSOSUpdateServiceKeyProgressTime, _PBSPoorCableWarningRequest,
+                          _PBSPowerManagerDeviceSleepStateWillChangeNotification,
+                          _PBSPowerManagerDeviceWillSleepIdleDistributedNotification,
+                          _PBSPowerManagerDeviceWillSleepManualDistributedNotification, _PBSPowerManagerDeviceWillSleepNotification,
+                          _PBSPowerManagerDeviceWillWakeNotification, _PBSPowerManagerSleepOptionReasonKey,
+                          _PBSPowerManagerThermalNotification, _PBSPowerManagerThermalNotificationIsIncreasingKey,
+                          _PBSPowerManagerThermalNotificationLevelKey, _PBSPowerManagerThermalNotificationTooHotKey,
+                          _PBSPowerManagerWakeOptionReasonKey, _PBSPreferredRefreshRateForCountryCode,
+                          _PBSPresenceDetectionDidBeginNotification, _PBSPresenceDetectionDidEndNotification, _PBSPresentBulletin,
+                          _PBSRecoveryModeActionResetAllSettings, _PBSRecoveryModeActionRestart, _PBSRecoveryModeActionTriggered,
+                          _PBSRestrictionsSettingsDidChangeNotification, _PBSRoutingUIOptionBundleIdentifier,
+                          _PBSRoutingUIOptionInitiatedByPicker, _PBSRoutingUIOptionSupportsSharedQueue, _PBSSleepDevice,
+                          _PBSSleepReasonCEC, _PBSSleepReasonExternalDevice, _PBSSleepReasonIdle, _PBSSleepReasonSiri,
+                          _PBSSleepReasonSiriCommand, _PBSSleepReasonUserSettingsMenu, _PBSSleepReasonUserSystemMenu,
+                          _PBSSpgradeAttemptRequestFromSource, _PBSStringFromCoreControlEventType, _PBSStringFromCoreControlPolicy,
+                          _PBSStringFromCoreControlPolicyState, _PBSSystemAppearanceDidChangeNotification,
+                          _PBSSystemBulletinActivationActionKey, _PBSSystemBulletinImageDataKey, _PBSSystemBulletinImageIDAlert,
+                          _PBSSystemBulletinImageIDAudio, _PBSSystemBulletinImageIDB39, _PBSSystemBulletinImageIDBluetooth,
+                          _PBSSystemBulletinImageIDController, _PBSSystemBulletinImageIDKey, _PBSSystemBulletinImageIDKeyboard,
+                          _PBSSystemBulletinImageIDMusic, _PBSSystemBulletinImageIDPairing, _PBSSystemBulletinImageIDPodcast,
+                          _PBSSystemBulletinImageIDRemote, _PBSSystemBulletinImageIDRemoteBatteryWarning,
+                          _PBSSystemBulletinImageIDRemoteCharging, _PBSSystemBulletinImageIDScreenSharing,
+                          _PBSSystemBulletinImageIDTV, _PBSSystemBulletinImageIDVolume, _PBSSystemBulletinImageURLKey,
+                          _PBSSystemBulletinImageURLPlaceholderKey, _PBSSystemBulletinMessageKey, _PBSSystemBulletinNumValueLevelsKey,
+                          _PBSSystemBulletinServiceName, _PBSSystemBulletinStyleKey, _PBSSystemBulletinTimeoutKey,
+                          _PBSSystemBulletinTitleKey, _PBSSystemBulletinValueLevelKey, _PBSSystemBulletinViewControllerClassName,
+                          _PBSSystemIdleStateDidChangeNotification, _PBSSystemServiceSpecialLaunchScheme,
+                          _PBSTopShelfAppIdentifiersKey, _PBSUPRDialogCustomViewControllerClassNameKey,
+                          _PBSUPRDialogCustomViewServiceNameKey, _PBSUPRDialogTypeCustom, _PBSUPRDialogTypeKey,
+                          _PBSUserPresentationServiceLogSubsystem, _PBSViewServiceOptionsAnimateKey,
+                          _PBSViewServiceOptionsUserInitiatedKey, _PBSWakeDevice, _PBSWakeReasonAirPlay, _PBSWakeReasonCEC,
+                          _PBSWakeReasonExternalDevice, _PBSWakeReasonForcePair, _PBSWakeReasonSiri, _PBSWakeReasonSiriButton,
+                          _PBSWakeReasonSiriCommand, _PBSWakeReasonUserActivity, _PineBoardServicesErrorDomain, _airPlayLog,
+                          _appDelegateLog, _appDepotLog, _appLaunchLog, _appLifecycleLog, _appSwitcherLog, _appTestingLog, _bulletinLog,
+                          _crdLog, _diagnosticServiceLog, _displayManagerLog, _eventLog, _externalControlActionLog,
+                          _externalControlEventLog, _externalControlIRLearningLog, _externalControlLog, _externalControlVolumeLog,
+                          _kPBSOSUpdateDownloadPhaseBrainExtracting, _kPBSOSUpdateDownloadPhaseBrainFetching,
+                          _kPBSOSUpdateDownloadPhaseBrainFetchingQueuedLocal, _kPBSOSUpdateDownloadPhaseBrainFetchingQueuedRemote,
+                          _kPBSOSUpdateDownloadPhaseBrainFetchingStalled, _kPBSOSUpdateDownloadPhaseBrainVerifying,
+                          _kPBSOSUpdateDownloadPhasePreparingForInstallation, _kPBSOSUpdateDownloadPhaseStarting,
+                          _kPBSOSUpdateDownloadPhaseUpdateFetching, _kPBSOSUpdateDownloadPhaseUpdateFetchingStalled, _mediaRemoteLog,
+                          _mediaRemoteObserverLog, _mediaRemoteServiceLog, _migrationLog, _modeSwitchingManagerLog, _nowPlayingLog,
+                          _osUpdateLog, _osUpdateProgressLog, _powerManagerLog, _processManagerLog, _restrictionServiceLog, _screenSaverLog,
+                          _screenSharingLog, _singleAppLog, _snapshotServiceLog, _systemAppearanceLog, _systemServiceLog, _systemStatusLog,
+                          _userNotificationLog, _userPresentationServiceLog, _verificationOperationLog,
+                          _videoSubscriberAccountServiceLog, _windowLog, _windowManagerLog ]
+    objc-classes:       [ _PBSAccessibilitySettings, _PBSAirPlayService, _PBSAirPlaySettings, _PBSAppDepotProxy, _PBSAppState,
+                          _PBSAppleConnectSettings, _PBSAssertion, _PBSAssetDownloadPriorityAssertion, _PBSBadgeValue, _PBSBulletin,
+                          _PBSConferenceRoomDisplaySettings, _PBSDiagnosticLogsService, _PBSDisplayAssistantPresentationRequest,
+                          _PBSDisplayManager, _PBSDisplayManagerServiceProxy, _PBSDisplayManagerUpdateRequest, _PBSDisplayMode,
+                          _PBSExternalControlFeature, _PBSExternalControlIRLearningConfiguration,
+                          _PBSExternalControlIRLearningManager, _PBSExternalControlSettings, _PBSExternalControlSystem,
+                          _PBSIRVolumeButtonConfiguration, _PBSMediaRemoteServiceProxy, _PBSMediaRemoteSiriContext, _PBSMigration,
+                          _PBSMigrationContext, _PBSMigrator, _PBSMutableAppState, _PBSOSUpdateDescriptor, _PBSOSUpdateDownload,
+                          _PBSOSUpdateManagerClient, _PBSOSUpdateOperationProgress, _PBSOSUpdateScanOptions, _PBSOSUpdateService,
+                          _PBSOSUpdateSettings, _PBSPlayPauseButtonEventAssertion, _PBSPowerManager, _PBSRecoveryModeReporter,
+                          _PBSRestrictionService, _PBSRestrictionsSettings, _PBSSiriSettings, _PBSStoreSettings, _PBSSystemService,
+                          _PBSSystemServiceConnection, _PBSSystemServiceProxy, _PBSSystemStatus, _PBSUserActivityTrigger,
+                          _PBSUserPresentationRequest, _PBSUserPresentationServiceProxy, _PBSVPNSettings,
+                          _PBSVideoSubscriberAccountServiceProxy, _PBSVolumeButtonEventAssertion, _PBUIPluginController,
+                          __PBSAssertionManager ]
+    objc-ivars:         [ _PBSAccessibilitySettings._accessibilityMenuOptions, _PBSAccessibilitySettings._boldTextEnabled,
+                          _PBSAccessibilitySettings._displayFilterColorAdjustmentsEnabled,
+                          _PBSAccessibilitySettings._displayFilterInvertColorsEnabled,
+                          _PBSAccessibilitySettings._displayFilterLightSensitivityEnabled,
+                          _PBSAccessibilitySettings._displayFilterReduceWhitePointEnabled,
+                          _PBSAccessibilitySettings._domainObserver, _PBSAccessibilitySettings._highContrastFocusIndicatorsEnabled,
+                          _PBSAccessibilitySettings._reduceMotionEnabled, _PBSAccessibilitySettings._reduceTransparencyEnabled,
+                          _PBSAccessibilitySettings._switchControlEnabled, _PBSAccessibilitySettings._voiceOverEnabled,
+                          _PBSAccessibilitySettings._zoomEnabled, _PBSAirPlaySettings._accessType,
+                          _PBSAirPlaySettings._airPlayAllowed, _PBSAirPlaySettings._airPlayObserverToken,
+                          _PBSAirPlaySettings._airPlayPreferences, _PBSAirPlaySettings._availableSecurityModesByAccessType,
+                          _PBSAirPlaySettings._availableSecurityTypes, _PBSAirPlaySettings._enabled,
+                          _PBSAirPlaySettings._mcObserverToken, _PBSAirPlaySettings._nearbyAirPlayEnabled,
+                          _PBSAirPlaySettings._overscanAdjustment, _PBSAirPlaySettings._password,
+                          _PBSAirPlaySettings._preferCloudPlayback, _PBSAirPlaySettings._securityType,
+                          _PBSAirPlaySettings._settingsModificationAllowed, _PBSAppDepotProxy._appState,
+                          _PBSAppDepotProxy._appStateMonitorQueue, _PBSAppDepotProxy._monitor,
+                          _PBSAppDepotProxy._provisionedAppIdentifiers, _PBSAppState._applicationIdentifier,
+                          _PBSAppState._badgeEnabled, _PBSAppState._badgeValue, _PBSAppState._cacheDeleting,
+                          _PBSAppState._disabledReasons, _PBSAppState._enabled, _PBSAppState._iconName, _PBSAppState._recentlyUpdated,
+                          _PBSAppState._store, _PBSAppleConnectSettings._accountID, _PBSAppleConnectSettings._enabled,
+                          _PBSAppleConnectSettings._password, _PBSAssertion._identifier, _PBSAssertion._uniqueIdentifier,
+                          _PBSBadgeValue._badgeNumber, _PBSBadgeValue._badgeString, _PBSBulletin._message,
+                          _PBSBulletin._serviceIdentifier, _PBSBulletin._viewControllerClassName,
+                          _PBSConferenceRoomDisplaySettings._conferenceRoomDisplayBackgroundPhoto,
+                          _PBSConferenceRoomDisplaySettings._conferenceRoomDisplayBackgroundPhotoName,
+                          _PBSConferenceRoomDisplaySettings._conferenceRoomDisplayMessage,
+                          _PBSConferenceRoomDisplaySettings._defaults, _PBSConferenceRoomDisplaySettings._domain,
+                          _PBSConferenceRoomDisplaySettings._mode, _PBSConferenceRoomDisplaySettings._restrictionsObserver,
+                          _PBSDisplayAssistantPresentationRequest._destinationDisplayMode,
+                          _PBSDisplayAssistantPresentationRequest._kind, _PBSDisplayAssistantPresentationRequest._source,
+                          _PBSDisplayAssistantPresentationRequest._sourceDisplayMode,
+                          _PBSDisplayManager._canHandleHighBandwidthModes, _PBSDisplayManager._currentDisplayID,
+                          _PBSDisplayManager._currentDisplayMode, _PBSDisplayManager._deemed4KCapable,
+                          _PBSDisplayManager._detectedPoorCableConnection, _PBSDisplayManager._displayConnection,
+                          _PBSDisplayManager._fallbackDisplayMode, _PBSDisplayManager._lastCablePollStatus,
+                          _PBSDisplayManager._localeRefreshRate, _PBSDisplayManager._promotedVirtualDisplayModes,
+                          _PBSDisplayManager._seenDisplayIDs, _PBSDisplayManager._serviceProxy,
+                          _PBSDisplayManager._shouldModeSwitchForDynamicRange, _PBSDisplayManager._shouldModeSwitchForFrameRate,
+                          _PBSDisplayManager._sortedDisplayModes, _PBSDisplayManager._stateObservers,
+                          _PBSDisplayManager._userSelectedDisplayMode, _PBSDisplayManagerServiceProxy._pendingMessageReplies,
+                          _PBSDisplayManagerServiceProxy._remoteProxy, _PBSDisplayManagerUpdateRequest._displayMode,
+                          _PBSDisplayManagerUpdateRequest._treatDisplayModeAsFallback,
+                          _PBSDisplayManagerUpdateRequest._upgradeDisplayModeToNonVirtual,
+                          _PBSDisplayManagerUpdateRequest._useDisplayModeAsDefaultForNextWake,
+                          _PBSDisplayManagerUpdateRequest._userInfo, _PBSDisplayManagerUpdateRequest._writeDisplayModeToDisk,
+                          _PBSDisplayMode._HDR10ChromaSubsampling, _PBSDisplayMode._SDRChromaSubsampling,
+                          _PBSDisplayMode._SDRColorMapping, _PBSDisplayMode._caModeIsVirtual,
+                          _PBSDisplayMode._canBeUsedToEstablishDisplayOnNextWake, _PBSDisplayMode._colorGamut,
+                          _PBSDisplayMode._dynamicRange, _PBSDisplayMode._promotedToReal, _PBSDisplayMode._refreshRate,
+                          _PBSDisplayMode._resolution, _PBSDisplayMode._scale, _PBSExternalControlFeature._featureType,
+                          _PBSExternalControlFeature._isAutomaticallyConfigured, _PBSExternalControlFeature._isConfiguredForUse,
+                          _PBSExternalControlFeature._isEnabled, _PBSExternalControlFeature._isReadyForUse,
+                          _PBSExternalControlFeature._transport, _PBSExternalControlFeature._updatePending,
+                          _PBSExternalControlIRLearningConfiguration._actions,
+                          _PBSExternalControlIRLearningConfiguration._allowsNavigation,
+                          _PBSExternalControlIRLearningConfiguration._deviceType,
+                          _PBSExternalControlIRLearningConfiguration._deviceUUID, _PBSExternalControlIRLearningConfiguration._name,
+                          _PBSExternalControlIRLearningConfiguration._requiredActions,
+                          _PBSExternalControlIRLearningManager._configuration, _PBSExternalControlIRLearningManager._currentAction,
+                          _PBSExternalControlIRLearningManager._delegate,
+                          _PBSExternalControlIRLearningManager._externalControlSystem, _PBSExternalControlIRLearningManager._flags,
+                          _PBSExternalControlIRLearningManager._learnedActions,
+                          _PBSExternalControlIRLearningManager._learningInProgress, _PBSExternalControlIRLearningManager._waitTimer,
+                          _PBSExternalControlSettings._cachedAdjustDisplayStateOnSleep,
+                          _PBSExternalControlSettings._cachedAdjustDisplayStateOnWake,
+                          _PBSExternalControlSettings._cachedAssertActiveSourceOnAirPlay,
+                          _PBSExternalControlSettings._cachedAssertActiveSourceOnAppRestart,
+                          _PBSExternalControlSettings._cachedAssertActiveSourceOnBoot,
+                          _PBSExternalControlSettings._cachedAssertActiveSourceOnRemoteAppEvent,
+                          _PBSExternalControlSettings._cachedAssertActiveSourceOnWake,
+                          _PBSExternalControlSettings._cachedAssertPowerOnAirPlay,
+                          _PBSExternalControlSettings._cachedAssertPowerOnBoot,
+                          _PBSExternalControlSettings._cachedAssertPowerOnWake,
+                          _PBSExternalControlSettings._cachedAssertStandbyOnSleep,
+                          _PBSExternalControlSettings._cachedCreateCoreControl, _PBSExternalControlSettings._cachedHibernate,
+                          _PBSExternalControlSettings._cachedMuteOnPressHold,
+                          _PBSExternalControlSettings._cachedResignActiveSourceOnSleep,
+                          _PBSExternalControlSettings._cachedRetryCoreControlActions,
+                          _PBSExternalControlSettings._cachedWakeOnDisplayChange, _PBSExternalControlSettings._domainObserver,
+                          _PBSExternalControlSystem._actionBeingLearned, _PBSExternalControlSystem._coreControl,
+                          _PBSExternalControlSystem._coreControlPrefsObserver, _PBSExternalControlSystem._coreControlQueue,
+                          _PBSExternalControlSystem._delegate, _PBSExternalControlSystem._delegateVolumeRepeatTimer,
+                          _PBSExternalControlSystem._deviceTypeBeingLearned, _PBSExternalControlSystem._domainObserver,
+                          _PBSExternalControlSystem._effectiveVolumeButtonConfiguration,
+                          _PBSExternalControlSystem._internalVolumeButtonBehavior, _PBSExternalControlSystem._isActiveSource,
+                          _PBSExternalControlSystem._isAppleIRRemotePaired,
+                          _PBSExternalControlSystem._lastProgrammedMuteConfiguration,
+                          _PBSExternalControlSystem._lastProgrammedMutePolicy, _PBSExternalControlSystem._lastProgrammedRemoteIDStr,
+                          _PBSExternalControlSystem._lastProgrammedVolumeConfiguration,
+                          _PBSExternalControlSystem._lastProgrammedVolumePolicy,
+                          _PBSExternalControlSystem._lastVolumeButtonsEnabledState,
+                          _PBSExternalControlSystem._learnedIRConfigurations, _PBSExternalControlSystem._needToUpdateCachedState,
+                          _PBSExternalControlSystem._noIdleAssertionID, _PBSExternalControlSystem._noIdleAssertionRefCount,
+                          _PBSExternalControlSystem._pendingVolumeDownReleaseEvents,
+                          _PBSExternalControlSystem._pendingVolumeUpReleaseEvents, _PBSExternalControlSystem._queuedActions,
+                          _PBSExternalControlSystem._rapidCECVolumeButtonReleaseTimer,
+                          _PBSExternalControlSystem._rapidDelegateVolumeButtonReleaseTimer,
+                          _PBSExternalControlSystem._selectedVolumeButtonConfiguration,
+                          _PBSExternalControlSystem._serialActionQueue, _PBSExternalControlSystem._shortVolumeDownHeldChord,
+                          _PBSExternalControlSystem._shortVolumeUpHeldChord, _PBSExternalControlSystem._volumeDeviceName,
+                          _PBSIRVolumeButtonConfiguration._configurationName, _PBSIRVolumeButtonConfiguration._configurationUUID,
+                          _PBSIRVolumeButtonConfiguration._isBuiltIn, _PBSMediaRemoteServiceProxy._TVAVRPowerControlNotifyToken,
+                          _PBSMediaRemoteServiceProxy._pendingCompletionHandlers,
+                          _PBSMediaRemoteServiceProxy._reliableTVAVRPowerControlAvailable, _PBSMediaRemoteServiceProxy._remoteProxy,
+                          _PBSMediaRemoteServiceProxy._volumeControlAvailable,
+                          _PBSMediaRemoteServiceProxy._volumeControlNotifyToken, _PBSMediaRemoteSiriContext._deviceID,
+                          _PBSMediaRemoteSiriContext._requestorBundleID, _PBSMediaRemoteSiriContext._sourceName,
+                          _PBSMediaRemoteSiriContext._testingContext, _PBSMigration._error, _PBSMigration._handler,
+                          _PBSMigration._handlingClass, _PBSMigration._name, _PBSMigration._state, _PBSMigrationContext._fromBuild,
+                          _PBSMigrationContext._fromVersion, _PBSMigrationContext._toBuild, _PBSMigrationContext._toVersion,
+                          _PBSMigrator._allMigrations, _PBSOSUpdateDescriptor._action, _PBSOSUpdateDescriptor._downloadSize,
+                          _PBSOSUpdateDescriptor._installationSize, _PBSOSUpdateDescriptor._minimumSystemPartitionSize,
+                          _PBSOSUpdateDescriptor._msuPrepareSize, _PBSOSUpdateDescriptor._productBuildVersion,
+                          _PBSOSUpdateDescriptor._productSystemName, _PBSOSUpdateDescriptor._productVersion,
+                          _PBSOSUpdateDescriptor._publisher, _PBSOSUpdateDescriptor._rampEnabled, _PBSOSUpdateDescriptor._releaseDate,
+                          _PBSOSUpdateDescriptor._releaseType, _PBSOSUpdateDescriptor._systemPartitionPadding,
+                          _PBSOSUpdateDescriptor._unarchivedSize, _PBSOSUpdateDescriptor._updateType,
+                          _PBSOSUpdateDownload._descriptor, _PBSOSUpdateDownload._progress, _PBSOSUpdateManagerClient._delegate,
+                          _PBSOSUpdateOperationProgress._isDone, _PBSOSUpdateOperationProgress._normalizedPercentComplete,
+                          _PBSOSUpdateOperationProgress._percentComplete, _PBSOSUpdateOperationProgress._phase,
+                          _PBSOSUpdateOperationProgress._timeRemaining, _PBSOSUpdateScanOptions._MDMUseDelayPeriod,
+                          _PBSOSUpdateScanOptions._delayPeriod, _PBSOSUpdateScanOptions._identifier,
+                          _PBSOSUpdateScanOptions._requestedPMV, _PBSOSUpdateSettings._assetServerURLString,
+                          _PBSOSUpdateSettings._brainServerURLString, _PBSOSUpdateSettings._buildNumber,
+                          _PBSOSUpdateSettings._buildTrain, _PBSOSUpdateSettings._defaultAssetServerURLString,
+                          _PBSOSUpdateSettings._defaultBrainServerURLString, _PBSOSUpdateSettings._domainObserver,
+                          _PBSOSUpdateSettings._enableMobileAssetLogging, _PBSOSUpdateSettings._lastAttemptedTargetOSBuild,
+                          _PBSOSUpdateSettings._lastAttemptedUUID, _PBSOSUpdateSettings._lastCheckDate,
+                          _PBSOSUpdateSettings._lastUpdatedFromOSBuildVersion, _PBSOSUpdateSettings._lastUpdatedFromOSVersion,
+                          _PBSOSUpdateSettings._periodicCheckInterval, _PBSOSUpdateSettings._personalizationServerURLString,
+                          _PBSOSUpdateSettings._postponedRecheckDelay, _PBSOSUpdateSettings._preferences,
+                          _PBSOSUpdateSettings._shouldAutomaticallyApplyUpdates, _PBSOSUpdateSettings._shouldForceAllowAutoApply,
+                          _PBSOSUpdateSettings._shouldForceRedownloadOnce, _PBSOSUpdateSettings._shouldIgnoreEngineeringFiles,
+                          _PBSOSUpdateSettings._shouldSkipUpdate, _PBSOSUpdateSettings._sleepCheckDelay,
+                          _PBSOSUpdateSettings._slowUpdateRebootCount, _PBSOSUpdateSettings._slowUpdateTimeoutInSeconds,
+                          _PBSOSUpdateSettings._vpnProfileServerURLString, _PBSPowerManager._currentIdleTimeInterval,
+                          _PBSPowerManager._delegate, _PBSPowerManager._deviceAsleep, _PBSPowerManager._deviceSleptManually,
+                          _PBSPowerManager._ignoreEvents, _PBSPowerManager._ioConnection, _PBSPowerManager._ioNotifier,
+                          _PBSPowerManager._mutableUserActivityTriggers, _PBSPowerManager._needsDisplayWakeOnPowerOn,
+                          _PBSPowerManager._pmNoIdleSleepAssertionID, _PBSPowerManager._pmSystemActivityAssertionID,
+                          _PBSPowerManager._powerAssertionTimer, _PBSPowerManager._sleepStateNotificationToken,
+                          _PBSRecoveryModeReporter._actions, _PBSRestrictionsSettings._gameCenterEnabled,
+                          _PBSSiriSettings._connection, _PBSSiriSettings._dictationEnabled, _PBSSiriSettings._language,
+                          _PBSSiriSettings._offeredEnableAssistant, _PBSSiriSettings._offeredEnableDictation,
+                          _PBSSiriSettings._siriEnabled, _PBSStoreSettings._cachedShowSampleFlowcases,
+                          _PBSStoreSettings._cachedShowSampleUberRow, _PBSStoreSettings._domainObserver,
+                          _PBSSystemServiceConnection._airplayServiceProxy, _PBSSystemServiceConnection._bulletinServiceProxy,
+                          _PBSSystemServiceConnection._connection, _PBSSystemServiceConnection._diagnosticLogsServiceProxy,
+                          _PBSSystemServiceConnection._displayManagerServiceProxy,
+                          _PBSSystemServiceConnection._mediaRemoteServiceProxy, _PBSSystemServiceConnection._osUpdateServiceProxy,
+                          _PBSSystemServiceConnection._proxyAccessGroupsByName,
+                          _PBSSystemServiceConnection._restrictionServiceProxy, _PBSSystemServiceConnection._systemServiceProxy,
+                          _PBSSystemServiceConnection._userPresentationServiceProxy, _PBSSystemServiceConnection._valid,
+                          _PBSSystemServiceConnection._videoSubscriberAccountServiceProxy, _PBSSystemServiceProxy._hiliteModeActive,
+                          _PBSSystemServiceProxy._hiliteModeNotifyToken, _PBSSystemServiceProxy._presenceDetectionNotifyToken,
+                          _PBSSystemServiceProxy._screenSaverActive, _PBSSystemServiceProxy._screenSaverNotifyToken,
+                          _PBSSystemServiceProxy._systemServiceConnection, _PBSUserActivityTrigger._action,
+                          _PBSUserActivityTrigger._idle, _PBSUserActivityTrigger._name, _PBSUserActivityTrigger._target,
+                          _PBSUserActivityTrigger._timeoutInSeconds, _PBSUserPresentationRequest._options,
+                          _PBSUserPresentationRequest._type, _PBSUserPresentationServiceProxy._pendingCompletionHandlers,
+                          _PBSUserPresentationServiceProxy._pendingMessageReplies, _PBSUserPresentationServiceProxy._remoteProxy,
+                          _PBSVideoSubscriberAccountServiceProxy._proxy, _PBUIPluginController._listening,
+                          _PBUIPluginController._mode, _PBUIPluginController._pluginHost,
+                          __PBSAssertionManager._activeAssertionIdentifiers, __PBSAssertionManager._assertionClass,
+                          __PBSAssertionManager._workQueue ]
+...

+ 10 - 0
uicache/layout/DEBIAN/control

@@ -0,0 +1,10 @@
+Package: com.nito.uicache
+Name: uicache
+Pre-Depends: cy+model.appletv
+Depends:
+Version: 0.0.4
+Architecture: appletvos-arm64
+Description: Respring and reload any applications added to /Applications
+Maintainer: Kevin Bradley
+Author: Kevin Bradley
+Section: Library

+ 3 - 0
uicache/layout/DEBIAN/postinst

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo 'finish:restart'

+ 238 - 77
uicache/uicache.mm

@@ -54,7 +54,7 @@
 /* }}} */
 
 #import <Foundation/Foundation.h>
-#import "NSTask.h"
+//#import <Foundation/NSTask.h>
 #import <dlfcn.h>
 #import <notify.h>
 #import <sys/types.h>
@@ -65,10 +65,20 @@
 #import <objc/runtime.h>
 #import <crt_externs.h>
 #import <xpc/xpc.h>
+
+#import "NSTask.h"
 #include <spawn.h>
 #include <sys/wait.h>
+
 #include "csstore.hpp"
 
+#if TARGET_OS_IPHONE
+#define FRONTBOARD "SpringBoard"
+#define FRONTBOARD_ID "com.apple.SpringBoard"
+#elif TARGET_OS_TV
+#define FRONTBOARD "PineBoard"
+#define FRONTBOARD_ID "com.apple.PineBoard"
+
 @interface PBSSystemService : NSObject
 +(id)sharedInstance;
 -(void)relaunchBackboardd;
@@ -79,6 +89,10 @@
 -(id)systemServiceProxy;
 @end
 
+#else
+#error "Unsupported target OS"
+#endif
+
 @interface NSMutableArray (Cydia)
 - (void) addInfoDictionary:(NSDictionary *)info;
 @end
@@ -112,14 +126,22 @@
 
 @end
 
+@interface _LSApplicationState : NSObject
+-(bool)isValid;
+@end
+
 @interface LSApplicationProxy : NSObject
-- (NSString*) applicationIdentifier;
-- (NSURL*) bundleURL;
-- (NSDate*) registeredDate;
++(LSApplicationProxy*)applicationProxyForIdentifier:(NSString*)appid;
+-(NSString*)applicationIdentifier;
+-(_LSApplicationState*)appState;
+-(NSURL*)bundleURL;
+-(NSURL*)resourcesDirectoryURL;
+-(NSURL*)containerURL;
+-(NSDate*)registeredDate;
 @end
 
 @interface LSApplicationWorkspace : NSObject
-+ (id) defaultWorkspace;
++ (LSApplicationWorkspace*) defaultWorkspace;
 - (BOOL) registerApplication:(id)application;
 - (BOOL) unregisterApplication:(id)application;
 - (BOOL) invalidateIconCache:(id)bundle;
@@ -127,6 +149,7 @@
 - (BOOL) installApplication:(id)application withOptions:(id)options;
 - (BOOL) _LSPrivateRebuildApplicationDatabasesForSystemApps:(BOOL)system internal:(BOOL)internal user:(BOOL)user;
 - (NSArray<LSApplicationProxy*>*) allApplications;
+- (NSArray<NSString*>*) installedApplications;
 @end
 
 @interface MCMAppDataContainer
@@ -150,20 +173,42 @@ typedef enum {
 +(id)actionWithReason:(id)reason options:(int64_t)options targetURL:(NSURL*)url;
 @end
 
+@implementation LSApplicationProxy (uicache)
+-(NSURL*)appURL {
+    return [self respondsToSelector:@selector(bundleURL)]?[self bundleURL]:[self resourcesDirectoryURL];
+}
+@end
+
 static int verbose=0;
 static int standard_uicache(void);
 static Class $MCMPluginKitPluginDataContainer;
 static Class $MCMAppDataContainer;
 static Class $LSApplicationWorkspace;
-LSApplicationWorkspace *workspace=nil;
+LSApplicationWorkspace *workspace;
+static bool force;
+
 extern char **environ;
+static NSString *prefixPath = @"/fs/jb";
+
+BOOL _determineUsePrefixes(void) {
+    return ([[NSFileManager defaultManager] contentsOfDirectoryAtPath:prefixPath error:nil].count > 0);
+}
+
+NSString *applicationPath(void) {
+    return _determineUsePrefixes() ? [prefixPath stringByAppendingPathComponent:@"Applications"] : @"/Applications";
+}
 
 int my_system(const char *cmd) {
     pid_t pid;
-    char *argv[] = {"sh", "-c", (char*)cmd, NULL};
+    char *argv[] = {"bash", "-c", (char*)cmd, NULL};
     int status;
     fprintf(stderr, "Run command: %s\n", cmd);
-    status = posix_spawn(&pid, "/bin/sh", NULL, NULL, argv, environ);
+    BOOL prefixes = _determineUsePrefixes();
+    NSString *shPath = @"/bin/sh";
+    if (prefixes) {
+        shPath = [prefixPath stringByAppendingPathComponent:shPath];
+    }
+    status = posix_spawn(&pid, [shPath UTF8String], NULL, NULL, argv, environ);;
     if (status == 0) {
         printf("Child pid: %i\n", pid);
         if (waitpid(pid, &status, 0) != -1) {
@@ -178,23 +223,78 @@ int my_system(const char *cmd) {
     return status;
 }
 
-NSString *getAppPath(NSString *path)
+NSArray *getAllApplications()
+{
+    LSApplicationWorkspace *w = workspace ?: [LSApplicationWorkspace defaultWorkspace];
+    if ([w respondsToSelector:@selector(allApplications)])
+        return [w allApplications];
+    else if ([w respondsToSelector:@selector(installedApplications)]) {
+        NSMutableArray *apps = [NSMutableArray array];
+        for (NSString *applicationIdentifier in [w installedApplications]) {
+            [apps addObject:[LSApplicationProxy applicationProxyForIdentifier:applicationIdentifier]];
+        }
+        return apps;
+    }
+    fprintf(stderr, "Error: This iOS version doesn't support listing all applications\n");
+    return [NSArray array];
+}
+
+int list_all_apps(void)
 {
-    path = [path stringByResolvingSymlinksInPath];
-    if (![path hasPrefix:@"/Applications/"]) {
-        fprintf(stderr, "Error: Path must be within /Applications/\n");
-        return nil;
+    NSArray *allApps = getAllApplications();
+    for (LSApplicationProxy *app in allApps) {
+        printf("%s : %s\n", app.applicationIdentifier.UTF8String, app.appURL.path.UTF8String);
+    }
+    return 0;
+}
+
+int list_app(NSString *appid) {
+    if (appid == NULL) {
+        return 1;
+    }
+    LSApplicationProxy *app = [LSApplicationProxy applicationProxyForIdentifier:appid];
+    _LSApplicationState *appState = nil;
+    BOOL hasAppState = [app respondsToSelector:@selector(appState)];
+    if (hasAppState) {
+        appState = [app appState];
+        if (![appState isValid]) {
+            fprintf(stderr, "Invalid appID provided: %s\n", appid.UTF8String);
+            return 1;
+        }
     }
-    return [NSString pathWithComponents:[[path pathComponents] subarrayWithRange:NSMakeRange(0, 3)]];
+    printf("Information for %s\n", appid.UTF8String);
+    if (hasAppState)
+        printf("State: %s\n", [[appState description] UTF8String]);
+    printf("Path: %s\n", app.appURL.path.UTF8String);
+    printf("Container Path: %s\n", app.containerURL.path.UTF8String);
+    return 0;
+}
+
+NSString *pathInApplications(NSString *path) {
+    NSArray *pathComponents = [path pathComponents];
+    if ([path hasPrefix:@"/Applications/"]) {
+        return [NSString pathWithComponents:[pathComponents subarrayWithRange:NSMakeRange(0, 3)]];
+    } else if ([path hasPrefix:@"/var/stash"] && [pathComponents[4] isEqualToString:@"Applications"]) {
+        // Matches /var/stash/*/Applications/
+        return [@"/Applications/" stringByAppendingPathComponent:pathComponents[5]];
+    }
+    return nil;
+}
+
+NSString *getAppPath(NSString *path)
+{
+    if (force) return path;
+    return pathInApplications(path);;
 }
 
 bool appIsRegistered(NSString *path)
 {
+    if (force) return true;
     @autoreleasepool {
         path = getAppPath(path);
-        if (!path) return false;
-        for (LSApplicationProxy *app in [workspace allApplications]) {
-            if ([path isEqualToString:[[app bundleURL] path]]) return true;
+        for (LSApplicationProxy *app in getAllApplications()) {
+            NSString *appPath = getAppPath(app.appURL.path);
+            if ([path isEqualToString:appPath]) return true;
         }
         return false;
     }
@@ -203,10 +303,26 @@ bool appIsRegistered(NSString *path)
 bool unregisterPath(NSString *path)
 {
     @autoreleasepool {
+        NSURL *url = nil;
+        if (![path hasPrefix:@"/"]) {
+            // Maybe it's an app_id
+            LSApplicationProxy *app = [LSApplicationProxy applicationProxyForIdentifier:path];
+            if (app) {
+                url = [app appURL];
+                if (verbose) fprintf(stderr, "Resolved bundle ID %s to path %s\n", path.UTF8String, url.path.UTF8String);
+                path = [url path]; 
+            }
+        } else {
+            path = getAppPath(path);
+            if (!path) {
+                fprintf(stderr, "Error: Path \"%s\" must be within /Applications/\n", path.UTF8String);
+                return false;
+            }
+            url = [NSURL fileURLWithPath:path];
+        }
+        if (!url) return false;
         if (verbose) fprintf(stderr, "Unregistering %s\n", path.lastPathComponent.UTF8String);
-        path = getAppPath(path);
-        if (!path) return false;
-        if (appIsRegistered(path) && ![workspace unregisterApplication:[NSURL fileURLWithPath:path]]) {
+        if (appIsRegistered(path) && ![workspace unregisterApplication:url]) {
             fprintf(stderr, "Error: unregisterApplication failed for %s\n", path.lastPathComponent.UTF8String);
             return false;
         }
@@ -223,9 +339,10 @@ bool registerPath(NSString *path)
     }
     NSString *realPath = getAppPath(path);
     if (!realPath) {
-        if (verbose) fprintf(stderr, "unable to determine path for %s\n", path.UTF8String);
+        fprintf(stderr, "Error: Path \"%s\" must be within /Applications/\n", path.UTF8String);
         return false;
     }
+    if (verbose) fprintf(stderr, "Refreshing %s\n", realPath.lastPathComponent.UTF8String);
     NSDictionary *infoDictionary = [NSDictionary dictionaryWithContentsOfFile:
                                     [realPath stringByAppendingPathComponent:@"Info.plist"]];
     NSString *bundleID = [infoDictionary objectForKey:@"CFBundleIdentifier"];
@@ -236,6 +353,9 @@ bool registerPath(NSString *path)
         if ([infoDictionary objectForKey:@"CFBundleExecutable"]) {
             NSString *executable = [realPath stringByAppendingPathComponent:[infoDictionary objectForKey:@"CFBundleExecutable"]];
             if (![fm fileExistsAtPath:executable]) {
+                if ([bundleID isEqual:@"com.apple.TrustMe"]) {
+                    return true;
+                }
                 fprintf(stderr, "Error: CFBundleExecutable defined but missing for %s - this is a fatal error. Aborting.\n", realPath.lastPathComponent.UTF8String);
                 return false;
             }
@@ -251,8 +371,8 @@ bool registerPath(NSString *path)
                                      [NSMutableDictionary dictionary], @"_LSBundlePlugins",
                                      nil];
 
-        id appContainer = [$MCMAppDataContainer containerWithIdentifier:bundleID
-                                                createIfNecessary:YES existed:NULL error:nil];
+        id appContainer = $MCMAppDataContainer?[$MCMAppDataContainer containerWithIdentifier:bundleID
+                                                createIfNecessary:YES existed:NULL error:nil]:nil;
 
         NSString *appContainerPath = [[appContainer url] path];
         if (appContainerPath) {
@@ -263,7 +383,7 @@ bool registerPath(NSString *path)
             NSString *pluginPath = [pluginsPath stringByAppendingPathComponent:plugin];
             NSString *pluginInfoPlistPath = [pluginPath stringByAppendingPathComponent:@"Info.plist"];
             NSString *pluginBundleIdentifier = [[NSDictionary dictionaryWithContentsOfFile:pluginInfoPlistPath] objectForKey:@"CFBundleIdentifier"];
-            if (pluginBundleIdentifier) {
+            if ($MCMPluginKitPluginDataContainer && pluginBundleIdentifier) {
                 id pluginContainer = [$MCMPluginKitPluginDataContainer containerWithIdentifier:pluginBundleIdentifier
                                                                        createIfNecessary:YES existed:NULL error:nil];
                 NSURL *pluginContainerURL = [pluginContainer url];
@@ -291,7 +411,7 @@ bool registerPath(NSString *path)
 
 void usage(void)
 {
-    fprintf(stderr, "Usage: %s [-hrv] [[-p | -u] /Applications/App.app]]\n", getprogname());
+    fprintf(stderr, "Usage: %s [-hrv] [[-p | -u] %s/App.app]] | -l [application.id]\n", getprogname(), [applicationPath() UTF8String]);
     exit(EXIT_FAILURE);
 }
 
@@ -339,7 +459,7 @@ int standard_uicache(void)
     NSString *home(NSHomeDirectory());
     NSString *path([NSString stringWithFormat:@"%@/Library/Caches/com.apple.mobile.installation.plist", home]);
 
-    my_system("killall -SIGSTOP SpringBoard");
+    my_system("killall -SIGSTOP " FRONTBOARD);
     sleep(1);
 
     @try {
@@ -374,10 +494,10 @@ int standard_uicache(void)
             if (NSString *path = [info objectForKey:@"Path"])
                 [removed addObject:path];
 
-        if (NSArray *apps = [manager contentsOfDirectoryAtPath:@"/Applications" error:&error]) {
+        if (NSArray *apps = [manager contentsOfDirectoryAtPath:applicationPath() error:&error]) {
             for (NSString *app in apps)
                 if ([app hasSuffix:@".app"]) {
-                    NSString *path = [@"/Applications" stringByAppendingPathComponent:app];
+                    NSString *path = [applicationPath() stringByAppendingPathComponent:app];
                     NSString *plist = [path stringByAppendingPathComponent:@"Info.plist"];
 
                     if (NSMutableDictionary *info = [NSMutableDictionary dictionaryWithContentsOfFile:plist]) {
@@ -453,7 +573,7 @@ int standard_uicache(void)
     my_system("killall installd");
 
     } @finally {
-        my_system("killall -SIGCONT SpringBoard");
+        my_system("killall -SIGCONT " FRONTBOARD);
     }
 
     notify_post("com.apple.mobile.application_installed");
@@ -478,6 +598,7 @@ pid_t pidOfCydia(void) {
                 if (verbose) fprintf(stderr, "Found Cydia running with PID: %d\n", pid);
                 return false;
             }
+            if (verbose>2) fprintf(stderr, "%s is not Cydia...\n", program);
         }
         return true;
     });
@@ -488,6 +609,38 @@ pid_t pidOfCydia(void) {
     return -1;
 }
 
+bool cydiaCache(pid_t cydia_pid) {
+    // We are in cydia and trying to refresh it - this will kill it.  Let's schedule it for later.
+    if (verbose) fprintf(stderr, "Waiting to refresh Cydia...\n");
+    pid_t pid = fork();
+    if (pid == 0) {
+        setpgrp();
+        signal(SIGHUP, SIG_IGN);
+        signal(SIGPIPE, SIG_IGN);
+        fclose(stdin);
+        freopen("/dev/null", "a", stderr);
+        freopen("/dev/null", "a", stdout);
+        pid = fork();
+        if (pid == 0) {
+            while (kill(cydia_pid, 0)==0) {
+                sleep(1);
+            }
+            const char *uicache = (*_NSGetArgv())[0];
+            execl(uicache, uicache, "-vvvvvvv", NULL);
+            fprintf(stderr, "Unable to exec\n");
+            fflush(stderr);
+            exit(-1);
+        }
+        exit(0);
+    } else if (pid > 0) {
+        int stat;
+        waitpid(pid, &stat, 0);
+        return true;
+    }
+    fprintf(stderr, "Unable to fork\n");
+    return false;
+}
+
 int optimized_uicache(void) {
     __block int rv=0;
     NSMutableDictionary *registered = [NSMutableDictionary new];
@@ -497,7 +650,7 @@ int optimized_uicache(void) {
         const char *found_path = (const char *)[output bytes];
         NSArray *found = [@(found_path) pathComponents];
         if (found.count >= 3) {
-            NSString *appPath = [@"/Applications" stringByAppendingPathComponent:found[2]];
+            NSString *appPath = [applicationPath() stringByAppendingPathComponent:found[2]];
             @synchronized (registered) {
                 if (registered[appPath]) return;
                 if (verbose) fprintf(stderr, "Updating %s\n", appPath.lastPathComponent.UTF8String);
@@ -505,36 +658,10 @@ int optimized_uicache(void) {
             }
             pid_t cydia_pid;
             if ([found[2] isEqualToString:@"Cydia.app"] &&
-                    (cydia_pid = pidOfCydia()) > 0) {
-                // We are in cydia and trying to refresh it - this will kill it.  Let's schedule it for later.
-                if (verbose) fprintf(stderr, "Waiting to refresh Cydia...\n");
-                pid_t pid = fork();
-                if (pid == 0) {
-                    setpgrp();
-                    signal(SIGHUP, SIG_IGN);
-                    signal(SIGPIPE, SIG_IGN);
-                    fclose(stdin);
-                    freopen("/dev/null", "a", stderr);
-                    freopen("/dev/null", "a", stdout);
-                    pid = fork();
-                    if (pid == 0) {
-                        while (kill(cydia_pid, 0)==0) {
-                            sleep(1);
-                        }
-                        const char *uicache = (*_NSGetArgv())[0];
-                        execl(uicache, uicache, "-vvvvvvv", NULL);
-                        fprintf(stderr, "Unable to exec\n");
-                        fflush(stderr);
-                        exit(-1);
-                    }
-                    exit(0);
-                } else if (pid > 0) {
-                    int stat;
-                    waitpid(pid, &stat, 0);
-                    return;
-                } else {
-                    fprintf(stderr, "Unable to fork\n");
-                }
+                    (cydia_pid = pidOfCydia()) > 0 &&
+                    cydiaCache(cydia_pid)) {
+                // Is cydia and we queued a uicache in background so skip
+                return;
             }
             if (!registerPath(appPath)) rv++;
         }
@@ -544,17 +671,18 @@ int optimized_uicache(void) {
     NSMutableArray *cleanup = [NSMutableArray new];
     NSMutableArray *finds = [NSMutableArray new];
     if (verbose>1) fprintf(stderr, "Enumerating apps\n");
-    for (LSApplicationProxy *app in [workspace allApplications]) {
-        NSString *path = [[app bundleURL] path];
-        if (![path hasPrefix:@"/Applications/"]) continue;
+    for (LSApplicationProxy *app in getAllApplications()) {
+        NSString *path = pathInApplications([[app appURL] path]);
+        if (!path) continue;
         if (verbose>1) fprintf(stderr, "Checking %s\n", path.lastPathComponent.UTF8String);
         
-        NSDate *lastRegistered = [app registeredDate];
         
         if ([fm fileExistsAtPath:path]) {
+            NSDate *lastRegistered = [app registeredDate];
+            pid_t cydia_pid;
             // Check for updated components
             NSTask *find = [NSTask new];
-            [find setLaunchPath:@"/usr/bin/find"];
+            [find setLaunchPath:@"/fs/jb/usr/bin/find"];
             [find setStandardOutput:[NSPipe pipe]];
             NSString *stampPath = [NSString stringWithFormat:@"/var/tmp/uicache.stamp.%@", app.applicationIdentifier];
             [fm createFileAtPath:stampPath contents:nil attributes:@{NSFileModificationDate: lastRegistered}];
@@ -573,8 +701,8 @@ int optimized_uicache(void) {
         }
     }
     
-    for (NSString* existing in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:@"/Applications" error:nil]) {
-        NSString *path = [@"/Applications" stringByAppendingPathComponent:existing];
+    for (NSString* existing in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:applicationPath() error:nil]) {
+        NSString *path = [applicationPath() stringByAppendingPathComponent:existing];
         if (apps[existing] || registered[path] || ![existing hasSuffix:@".app"]) continue;
         if (verbose) fprintf(stderr, "Registering new app: %s\n", existing.UTF8String);
         @synchronized (registered) {
@@ -593,8 +721,6 @@ int optimized_uicache(void) {
     return rv;
 }
 
-
-
 int main(int argc, const char *argv[])
 {
     if (getuid() == 0) {
@@ -616,7 +742,7 @@ int main(int argc, const char *argv[])
 
     static int rv=0;
     @autoreleasepool {
-        bool respring=false, do_all=false;
+        bool respring=false, do_all=false, list_apps=false;
         void (*jb_oneshot_entitle_now)(pid_t a, uint64_t b);
         void *libjb = dlopen("/usr/lib/libjailbreak.dylib", RTLD_LAZY);
         
@@ -632,6 +758,7 @@ int main(int argc, const char *argv[])
         {
             {"all",        no_argument,       0, 'a'},
             {"help",       no_argument,       0, 'h'},
+            {"list",       optional_argument, 0, 'l'},
             {"path",       required_argument, 0, 'p'},
             {"unregister", required_argument, 0, 'u'},
             {"respring",   no_argument,       0, 'r'},
@@ -639,52 +766,81 @@ int main(int argc, const char *argv[])
             {0, 0, 0, 0}
         };
         int option_index = 0;
+        NSString *app_id = NULL;
         char ch;
         bool have_path = false;
-        while ((ch = getopt_long(argc, (char *const *)argv, "ap:ru:vh?", long_options, &option_index)) != -1) {
+        force = true;
+        while ((ch = getopt_long(argc, (char *const *)argv, "afl::p:ru:vh?", long_options, &option_index)) != -1) {
             switch (ch)
             {
                 case 'a':
                     do_all = true;
                     break;
+                case 'f':
+                    force = true;
+                    break;
                 case 'h':
                     usage();
                     break;
+                case 'l':
+                    force = true;
+                    if (optarg) {
+                        app_id = @(optarg);
+                    } else if (argv[optind] != NULL && argv[optind][0] != '-') {
+                        app_id = @(argv[optind++]);
+                    }
+                    list_apps = true;
+                    break;
                 case 'p':
-                    paths[@(optarg)] = @YES;
+                    [paths setObject:@YES forKey:@(optarg)];
                     have_path = true;
                     break;
                 case 'r':
                     respring = true;
                     break;
                 case 'u':
-                    unregister_paths[@(optarg)] = @YES;
+                    force = true;
+                    [unregister_paths setObject:@YES forKey:@(optarg)];
+                    fprintf(stderr, "%s\n", optarg);
                     have_path = true;
                     break;
                 case 'v':
                     verbose++;
                     break;
                 default:
+                    force = true;
                     break;
             }
         }
+        if (list_apps) {
+            if (verbose>2) fprintf(stderr, "Listing apps\n");
+            if (do_all || have_path || respring) {
+                usage();
+                return 1;
+            }
+            if (app_id != NULL) {
+                return list_app(app_id);
+            }
+            return list_all_apps();
+        }
         if (do_all || !$MCMPluginKitPluginDataContainer || !$MCMAppDataContainer || !$LSApplicationWorkspace) {
+            if (verbose>2) fprintf(stderr, "Using standard uicache\n");
             rv = standard_uicache();
         } else if (have_path) {
+            if (verbose>2) fprintf(stderr, "Using per-path uicache\n");
             for (NSString *path in [paths allKeys]) {
-                if (verbose) fprintf(stderr, "Refreshing %s\n", path.UTF8String);
                 if (!registerPath(path)) rv++;
             }
             for (NSString *path in [unregister_paths allKeys]) {
                 if (!unregisterPath(path)) rv++;
             }
         } else {
+            if (verbose>2) fprintf(stderr, "Using optimized uicache\n");
             rv += optimized_uicache();
         }
         if ( respring )
         {
-            [[[PBSSystemServiceConnection sharedConnection] systemServiceProxy] relaunchBackboardd];
-             
+#if TARGET_OS_IPHONE
             pid_t sb_pid = launch_get_job_pid("com.apple.SpringBoard");
             if ($SBSRelaunchAction && $FBSSystemService) {
                 id action = [$SBSRelaunchAction actionWithReason:@"respring" options:RestartRenderServer targetURL:nil];
@@ -697,9 +853,14 @@ int main(int argc, const char *argv[])
                     usleep(1000);
                 }
             } else {
-                my_system("launchctl stop com.apple.PineBoard");
+                my_system("launchctl stop " FRONTBOARD_ID);
                 my_system("launchctl stop com.apple.backboardd");
             }
+#elif TARGET_OS_TV
+            [[[PBSSystemServiceConnection sharedConnection] systemServiceProxy] relaunchBackboardd];
+#else
+#error "Unsupported target OS"
+#endif
         }
     } // @autoreleasepool
     return rv;