You've already forked hotpocket
BTHLABS-58: Share Extension in Apple Apps
This commit is contained in:
30
services/apple/Shared (App)/NSURL+HotPocketExtensions.m
Normal file
30
services/apple/Shared (App)/NSURL+HotPocketExtensions.m
Normal file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// NSURL+HotPocketExtensions.m
|
||||
// HotPocket (macOS)
|
||||
//
|
||||
// Created by Tomek Wójcik on 30/09/2025.
|
||||
//
|
||||
|
||||
#import "NSURL+HotPocketExtensions.h"
|
||||
|
||||
@implementation NSURL (HotPocketExtensions)
|
||||
|
||||
-(BOOL)isUsableInHotPocket {
|
||||
static NSArray *supportedSchemes = @[@"http", @"https"];
|
||||
|
||||
if (self.baseURL != nil) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (self.scheme == nil || [supportedSchemes containsObject:self.scheme] == NO) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (self.host == nil || [@"" isEqualToString:self.host] == YES) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user