Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 11 additions & 52 deletions OpenDocumentReader.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,7 @@
A11E00000000000000000016 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = A11E00000000000000000013 /* PrivacyInfo.xcprivacy */; };
A11E00000000000000000017 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = A11E00000000000000000015 /* PrivacyInfo.xcprivacy */; };
E1A78CF72C1A53DB00CD43E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E1EB6C492C1A510D003EC5A0 /* Foundation.framework */; };
E22B252F2557F0E2001D0C52 /* OpenDocumentReaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22B252E2557F0E2001D0C52 /* OpenDocumentReaderTests.swift */; };
E24110312586349500800247 /* test.odt in Resources */ = {isa = PBXBuildFile; fileRef = E24110232586349500800247 /* test.odt */; };
E26C39392250DC6E009C484A /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E26C39382250DC6E009C484A /* WebKit.framework */; };
E2A17B0400000000000000A4 /* PageTabBarTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2A17B0300000000000000A3 /* PageTabBarTests.swift */; };
E2A17B0500000000000000A5 /* DeclaredDocumentTypesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2A17B0600000000000000A6 /* DeclaredDocumentTypesTests.swift */; };
E2A17B0700000000000000A7 /* EditWorkflowTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2A17B0800000000000000A8 /* EditWorkflowTests.swift */; };
E2A17B1000000000000000B0 /* test.ods in Resources */ = {isa = PBXBuildFile; fileRef = E2A17B1200000000000000B2 /* test.ods */; };
E2A17B1100000000000000B1 /* test.odp in Resources */ = {isa = PBXBuildFile; fileRef = E2A17B1300000000000000B3 /* test.odp */; };
E2A17B1400000000000000B4 /* test.csv in Resources */ = {isa = PBXBuildFile; fileRef = E2A17B1500000000000000B5 /* test.csv */; };
E2A17B1600000000000000B6 /* test.pdf in Resources */ = {isa = PBXBuildFile; fileRef = E2A17B1700000000000000B7 /* test.pdf */; };
E2A17B1800000000000000B8 /* test-encrypted.pdf in Resources */ = {isa = PBXBuildFile; fileRef = E2A17B1900000000000000B9 /* test-encrypted.pdf */; };
E2A17B2000000000000000C0 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2A17B2200000000000000C2 /* CoreFoundation.framework */; };
E2A17B2100000000000000C1 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2A17B2300000000000000C3 /* CFNetwork.framework */; };
FB494C85E264BD924C1EA54E /* OdrCore in Frameworks */ = {isa = PBXBuildFile; productRef = E381918B979121CD165C966A /* OdrCore */; };
Expand Down Expand Up @@ -60,19 +50,8 @@
A11E00000000000000000014 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
A11E00000000000000000015 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
E1EB6C492C1A510D003EC5A0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
E22B252E2557F0E2001D0C52 /* OpenDocumentReaderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenDocumentReaderTests.swift; sourceTree = "<group>"; };
E22B25302557F0E2001D0C52 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E237952F2274844400BA7238 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; };
E24110232586349500800247 /* test.odt */ = {isa = PBXFileReference; lastKnownFileType = file; path = test.odt; sourceTree = "<group>"; };
E26C39382250DC6E009C484A /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
E2A17B0300000000000000A3 /* PageTabBarTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PageTabBarTests.swift; sourceTree = "<group>"; };
E2A17B0600000000000000A6 /* DeclaredDocumentTypesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeclaredDocumentTypesTests.swift; sourceTree = "<group>"; };
E2A17B0800000000000000A8 /* EditWorkflowTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditWorkflowTests.swift; sourceTree = "<group>"; };
E2A17B1200000000000000B2 /* test.ods */ = {isa = PBXFileReference; lastKnownFileType = file; path = test.ods; sourceTree = "<group>"; };
E2A17B1300000000000000B3 /* test.odp */ = {isa = PBXFileReference; lastKnownFileType = file; path = test.odp; sourceTree = "<group>"; };
E2A17B1500000000000000B5 /* test.csv */ = {isa = PBXFileReference; lastKnownFileType = text; path = test.csv; sourceTree = "<group>"; };
E2A17B1700000000000000B7 /* test.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = test.pdf; sourceTree = "<group>"; };
E2A17B1900000000000000B9 /* test-encrypted.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "test-encrypted.pdf"; sourceTree = "<group>"; };
E2A17B2200000000000000C2 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
E2A17B2300000000000000C3 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
Expand All @@ -93,6 +72,11 @@
path = OpenDocumentReader;
sourceTree = "<group>";
};
A11E00000000000000000022 /* OpenDocumentReaderTests */ = {
isa = PBXFileSystemSynchronizedRootGroup;
path = OpenDocumentReaderTests;
sourceTree = "<group>";
};
/* End PBXFileSystemSynchronizedRootGroup section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -164,24 +148,6 @@
path = configs;
sourceTree = "<group>";
};
E22B252D2557F0E2001D0C52 /* OpenDocumentReaderTests */ = {
isa = PBXGroup;
children = (
E24110232586349500800247 /* test.odt */,
E2A17B1200000000000000B2 /* test.ods */,
E2A17B1300000000000000B3 /* test.odp */,
E2A17B1500000000000000B5 /* test.csv */,
E2A17B1700000000000000B7 /* test.pdf */,
E2A17B1900000000000000B9 /* test-encrypted.pdf */,
E22B252E2557F0E2001D0C52 /* OpenDocumentReaderTests.swift */,
E2A17B0300000000000000A3 /* PageTabBarTests.swift */,
E2A17B0600000000000000A6 /* DeclaredDocumentTypesTests.swift */,
E2A17B0800000000000000A8 /* EditWorkflowTests.swift */,
E22B25302557F0E2001D0C52 /* Info.plist */,
);
path = OpenDocumentReaderTests;
sourceTree = "<group>";
};
E2BB4B64220EF4F20056176B /* Frameworks */ = {
isa = PBXGroup;
children = (
Expand All @@ -204,7 +170,7 @@
A11E0000000000000000000B /* OpenDocumentReader */,
A11E00000000000000000009 /* Ads */,
A11E0000000000000000000A /* NoAds */,
E22B252D2557F0E2001D0C52 /* OpenDocumentReaderTests */,
A11E00000000000000000022 /* OpenDocumentReaderTests */,
E2BB4B64220EF4F20056176B /* Frameworks */,
52A348B12A9262D100DACAB9 /* OpenDocumentReader.app */,
A11E00000000000000000008 /* OpenDocumentReader Lite.app */,
Expand Down Expand Up @@ -254,6 +220,9 @@
dependencies = (
E22B25322557F0E2001D0C52 /* PBXTargetDependency */,
);
fileSystemSynchronizedGroups = (
A11E00000000000000000022 /* OpenDocumentReaderTests */,
);
name = OpenDocumentReaderTests;
productName = OpenDocumentReaderTests;
productReference = 52A348B22A9262D100DACAB9 /* OpenDocumentReaderTests.xctest */;
Expand Down Expand Up @@ -361,12 +330,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E24110312586349500800247 /* test.odt in Resources */,
E2A17B1000000000000000B0 /* test.ods in Resources */,
E2A17B1100000000000000B1 /* test.odp in Resources */,
E2A17B1400000000000000B4 /* test.csv in Resources */,
E2A17B1600000000000000B6 /* test.pdf in Resources */,
E2A17B1800000000000000B8 /* test-encrypted.pdf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -392,10 +355,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E22B252F2557F0E2001D0C52 /* OpenDocumentReaderTests.swift in Sources */,
E2A17B0400000000000000A4 /* PageTabBarTests.swift in Sources */,
E2A17B0500000000000000A5 /* DeclaredDocumentTypesTests.swift in Sources */,
E2A17B0700000000000000A7 /* EditWorkflowTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -489,7 +448,7 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CODE_SIGN_STYLE = Automatic;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
INFOPLIST_FILE = OpenDocumentReaderTests/Info.plist;
GENERATE_INFOPLIST_FILE = YES;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -508,7 +467,7 @@
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = OpenDocumentReaderTests/Info.plist;
GENERATE_INFOPLIST_FILE = YES;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
22 changes: 0 additions & 22 deletions OpenDocumentReaderTests/Info.plist

This file was deleted.

8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ Two targets rather than two configurations of one, because a Swift package
product is linked by a target and no build setting takes it back out. Pro's
release executable is 0.5 MB against Lite's 4.4 MB.

Three folders, each a synchronized group, so adding a file is all it takes to
Four folders, each a synchronized group, so adding a file is all it takes to
add it to the build:

| folder | in |
| --- | --- |
| `OpenDocumentReader/` | both |
| `Ads/` | Lite |
| `NoAds/` | Full |
| `OpenDocumentReaderTests/` | the test bundle |

`Ads/` is the only place that names a type from an ad sdk. `AdSlot` (the banner
and the consent form) and `AdPrivacy` (the way back to that choice) have a no-op
Expand All @@ -58,7 +59,10 @@ else, so there is nothing to withhold.

`configs/full` and `configs/lite` hold each bundle's `Info.plist` and privacy
manifest, out of the synchronized folder, since anything left in there would be
copied into both apps.
copied into both apps. For the same reason `scripts/make-test-fixtures.py`, which
writes the small sample documents, sits outside the test folder: everything in
there is copied into the test bundle, and the tests want the documents, not the
script that made them.

## How a document reaches the screen

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
sample documents are, because all a test asks of them is how many pages a two
sheet spreadsheet turns into. Rerun when a fixture needs another sheet or slide:

python3 OpenDocumentReaderTests/fixtures/make-fixtures.py
python3 scripts/make-test-fixtures.py
"""

import shutil
Expand Down Expand Up @@ -169,24 +169,24 @@ def write(path: Path, mimetype: str, content_xml: str) -> None:


def main() -> None:
here = Path(__file__).resolve().parent
tests = Path(__file__).resolve().parent.parent / "OpenDocumentReaderTests"

write(
here.parent / "test.ods",
tests / "test.ods",
"application/vnd.oasis.opendocument.spreadsheet",
spreadsheet(["Alpha", "Beta", "Gamma"]),
)
write(
here.parent / "test.odp",
tests / "test.odp",
"application/vnd.oasis.opendocument.presentation",
presentation(["Intro", "Outro"]),
)

path = here.parent / "test.pdf"
path = tests / "test.pdf"
path.write_bytes(pdf(["First", "Second"]))
print(f"wrote {path}")

encrypted = here.parent / "test-encrypted.pdf"
encrypted = tests / "test-encrypted.pdf"
encrypt_pdf(path, encrypted)
print(f"wrote {encrypted}")

Expand Down