LaunchServicesSPI.h [plain text]
#pragma once
#import <Foundation/Foundation.h>
#if USE(APPLE_INTERNAL_SDK)
#if PLATFORM(MAC)
#import <LaunchServices/LaunchServicesPriv.h>
#elif PLATFORM(IOS)
#import <MobileCoreServices/LSAppLinkPriv.h>
#endif
#endif
#if HAVE(APP_LINKS)
@class LSAppLink;
typedef void (^LSAppLinkCompletionHandler)(LSAppLink *appLink, NSError *error);
typedef void (^LSAppLinkOpenCompletionHandler)(BOOL success, NSError *error);
#endif
#if !USE(APPLE_INTERNAL_SDK)
@interface LSResourceProxy : NSObject <NSCopying, NSSecureCoding>
@end
@interface LSBundleProxy : LSResourceProxy <NSSecureCoding>
@end
#if HAVE(APP_LINKS)
@interface LSApplicationProxy : LSBundleProxy <NSSecureCoding>
- (NSString *)localizedNameForContext:(NSString *)context;
@end
@interface LSAppLink : NSObject <NSSecureCoding>
@end
@interface LSAppLink ()
+ (void)getAppLinkWithURL:(NSURL *)aURL completionHandler:(LSAppLinkCompletionHandler)completionHandler;
+ (void)openWithURL:(NSURL *)aURL completionHandler:(LSAppLinkOpenCompletionHandler)completionHandler;
- (void)openInWebBrowser:(BOOL)inWebBrowser setAppropriateOpenStrategyAndWebBrowserState:(NSDictionary<NSString *, id> *)state completionHandler:(LSAppLinkOpenCompletionHandler)completionHandler;
@property (readonly, strong) LSApplicationProxy *targetApplicationProxy;
@end
#endif
#if PLATFORM(MAC)
enum LSSessionID {
kLSDefaultSessionID = -2,
};
#endif
#endif // !USE(APPLE_INTERNAL_SDK)
#if PLATFORM(MAC)
typedef const struct CF_BRIDGED_TYPE(id) __LSASN* LSASNRef;
typedef enum LSSessionID LSSessionID;
WTF_EXTERN_C_BEGIN
extern const CFStringRef _kLSDisplayNameKey;
LSASNRef _LSGetCurrentApplicationASN();
OSStatus _LSSetApplicationInformationItem(LSSessionID, LSASNRef, CFStringRef keyToSetRef, CFTypeRef valueToSetRef, CFDictionaryRef* newInformationDictRef);
WTF_EXTERN_C_END
#endif // PLATFORM(MAC)