Enable Catalyst

This commit is contained in:
Shadowfacts 2022-01-14 18:55:58 -05:00
parent dbd274f57c
commit c3d0174f23
3 changed files with 24 additions and 11 deletions

View File

@ -103,6 +103,7 @@
D68B303527907D9200E8B3FA /* ExcerptGenerator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExcerptGenerator.swift; sourceTree = "<group>"; };
D68B3037279099FD00E8B3FA /* liblolhtml.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblolhtml.a; path = "lol-html/c-api/target/aarch64-apple-ios-sim/release/liblolhtml.a"; sourceTree = "<group>"; };
D68B303C2792204B00E8B3FA /* read.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = read.js; sourceTree = "<group>"; };
D68B303E27923C0000E8B3FA /* Reader.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Reader.entitlements; sourceTree = "<group>"; };
D6A8A33327766C2800CCEC72 /* PersistentContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersistentContainer.swift; sourceTree = "<group>"; };
D6C687E8272CD27600874C10 /* Reader.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Reader.app; sourceTree = BUILT_PRODUCTS_DIR; };
D6C687EB272CD27600874C10 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@ -252,6 +253,7 @@
D6C687EA272CD27600874C10 /* Reader */ = {
isa = PBXGroup;
children = (
D68B303E27923C0000E8B3FA /* Reader.entitlements */,
D68B3032278FDD1A00E8B3FA /* Reader-Bridging-Header.h */,
D6C687EB272CD27600874C10 /* AppDelegate.swift */,
D6C687ED272CD27600874C10 /* SceneDelegate.swift */,
@ -518,7 +520,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
shellScript = "pushd \"$PROJECT_DIR/lol-html/c-api/\"\n\nif [ \"$PLATFORM_NAME\" == \"iphonesimulator\" ]; then\n if [ \"$ARCHS\" == \"arm64\" ]; then\n export CARGO_TARGET=\"aarch64-apple-ios-sim\"\n elif [ \"$ARCHS\" == \"x86_64\" ]; then\n export CARGO_TARGET=\"x86_64-apple-ios\"\n else\n echo \"error: unknown value for \\$ARCHS\"\n fi\nelif [ \"$PLATFORM_NAME\" == \"iphoneos\" ]; then\n export CARGO_TARGET=\"aarch64-apple-ios\"\nfi\n\necho \"Building lol-html with CARGO_TARGET: $CARGO_TARGET\"\n\n~/.cargo/bin/cargo build --release --target $CARGO_TARGET\n";
shellScript = "pushd \"$PROJECT_DIR/lol-html/c-api/\"\n\nCARGO_TARGET=\nBUILD_STD=\n\nif [ \"$PLATFORM_NAME\" == \"iphonesimulator\" ]; then\n if [ \"$ARCHS\" == \"arm64\" ]; then\n CARGO_TARGET=\"aarch64-apple-ios-sim\"\n elif [ \"$ARCHS\" == \"x86_64\" ]; then\n CARGO_TARGET=\"x86_64-apple-ios\"\n else\n echo \"error: unknown value for \\$ARCHS\"\n exit 1\n fi\nelif [ \"$PLATFORM_NAME\" == \"iphoneos\" ]; then\n export CARGO_TARGET=\"aarch64-apple-ios\"\nelif [ \"$PLATFORM_NAME\" == \"macosx\" ]; then\n BUILD_STD=1\n \n if [ \"$ARCHS\" == \"arm64\" ]; then\n CARGO_TARGET=\"aarch64-apple-ios-macabi\"\n elif [ \"$ARCHS\" == \"x86_64\" ]; then\n CARGO_TARGET=\"x86_64-apple-ios-macabi\"\n else\n echo \"error: unknown value for \\$ARCHS\"\n exit 1\n fi\nelse\n echo \"error: unknown value for \\$PLATFORM_NAME\"\n exit 1\nfi\n\necho \"Building lol-html with CARGO_TARGET: $CARGO_TARGET\"\n\nif [ -n \"$BUILD_STD\" ]; then\n echo \"Building std enabled\"\n \n ~/.cargo/bin/cargo +nightly build -Z build-std=panic_abort,std --release --target $CARGO_TARGET\nelse\n ~/.cargo/bin/cargo build --release --target $CARGO_TARGET\nfi\n";
};
/* End PBXShellScriptBuildPhase section */
@ -742,6 +744,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Reader/Reader.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = ZPBBSK8L8B;
@ -757,21 +760,20 @@
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/lol-html/c-api/target/aarch64-apple-ios-sim/release",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
"LIBRARY_SEARCH_PATHS[sdk=iphoneos*]" = "$(PROJECT_DIR)/lol-html/c-api/target/aarch64-apple-ios/release/";
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=arm64]" = "$(PROJECT_DIR)/lol-html/c-api/target/aarch64-apple-ios-sim/release/";
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=x86_64]" = "$(PROJECT_DIR)/lol-html/c-api/target/x86_64-apple-ios/release/";
"LIBRARY_SEARCH_PATHS[sdk=macosx*][arch=arm64]" = "$(PROJECT_DIR)/lol-html/c-api/target/aarch64-apple-ios-macabi/release";
MARKETING_VERSION = 1.0;
OTHER_LDFLAGS = "-llolhtml";
PRODUCT_BUNDLE_IDENTIFIER = net.shadowfacts.Reader;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTS_MACCATALYST = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "Reader/Reader-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = "1,2,6";
};
name = Debug;
};
@ -781,6 +783,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Reader/Reader.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = ZPBBSK8L8B;
@ -796,21 +799,20 @@
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/lol-html/c-api/target/aarch64-apple-ios-sim/release",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
"LIBRARY_SEARCH_PATHS[sdk=iphoneos*]" = "$(PROJECT_DIR)/lol-html/c-api/target/aarch64-apple-ios/release/";
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=arm64]" = "$(PROJECT_DIR)/lol-html/c-api/target/aarch64-apple-ios-sim/release/";
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=x86_64]" = "$(PROJECT_DIR)/lol-html/c-api/target/x86_64-apple-ios/release/";
"LIBRARY_SEARCH_PATHS[sdk=macosx*][arch=arm64]" = "$(PROJECT_DIR)/lol-html/c-api/target/aarch64-apple-ios-macabi/release";
MARKETING_VERSION = 1.0;
OTHER_LDFLAGS = "-llolhtml";
PRODUCT_BUNDLE_IDENTIFIER = net.shadowfacts.Reader;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTS_MACCATALYST = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "Reader/Reader-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = "1,2,6";
};
name = Release;
};

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!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.security.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist>

View File

@ -54,6 +54,7 @@ class StretchyMenuInteraction: NSObject, UIInteraction {
let panRecognizer = UIPanGestureRecognizer(target: self, action: #selector(panGestureRecognized))
panRecognizer.delegate = self
panRecognizer.allowedScrollTypesMask = [.continuous]
view.addGestureRecognizer(panRecognizer)
}