No edit summary |
mNo edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
== Using LSApplicationProxy in your project == | == Using LSApplicationProxy in your project == | ||
Add | Add MobileCoreServices to your Makefile | ||
<source> | <source> | ||
Line 43: | Line 43: | ||
NSString *name = [proxy localizedName]; | NSString *name = [proxy localizedName]; | ||
</source> | </source> | ||
{{occlass|library=CoreServices.framework|navbox=on}} |
Latest revision as of 07:40, 4 September 2023
LSApplicationProxy is an object that provides information about App Store applications via a proxy.
Using LSApplicationProxy in your project
Add MobileCoreServices to your Makefile
Tweak_PRIVATE_FRAMEWORKS = MobileCoreServices
Header:
@interface LSApplicationProxy : NSObject
+ (id)applicationProxyForIdentifier:(id)arg1;
- (NSString *)localizedNameForContext:(id)arg1; // iOS 11+
- (NSString *)localizedName; // iOS 5-10
- (NSURL *)bundleURL;
- (NSURL *)containerURL;
- (NSString *)bundleExecutable;
- (NSString *)bundleIdentifier;
- (NSString *)vendorName;
- (NSString *)teamID;
- (NSString *)applicationType;
- (NSSet *)claimedURLSchemes;
- (BOOL)isDeletable;
@end
Creating an application proxy
LSApplicationProxy *proxy = [LSApplicationProxy applicationProxyForIdentifier:bundleIdentifier];
NSString *genre = [proxy genre];
Getting display name for an application proxy
// iOS 11+
NSString *name = [proxy localizedNameForContext:nil];
// iOS 5-10
NSString *name = [proxy localizedName];
|