diff --git a/.gitignore b/.gitignore index a12887023..b2533b5d1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,9 @@ # Xcode +# Generated with make generate-example-spm +Example-SPM/Example-SPM.xcodeproj/ + ## Build generated build/ DerivedData diff --git a/Brewfile b/Brewfile index 29d6d16d9..52a46c6c6 100644 --- a/Brewfile +++ b/Brewfile @@ -1 +1,2 @@ brew "tree" +brew "xcodegen" diff --git a/Example iOS-SwiftPM/Example/Info.plist b/Example iOS-SwiftPM/Example/Info.plist deleted file mode 100644 index 938144460..000000000 --- a/Example iOS-SwiftPM/Example/Info.plist +++ /dev/null @@ -1,41 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - TPPDF - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - - - diff --git a/Example iOS-SwiftPM/Example_iOS-SPM.xcodeproj/project.pbxproj b/Example iOS-SwiftPM/Example_iOS-SPM.xcodeproj/project.pbxproj deleted file mode 100644 index f13fcb71b..000000000 --- a/Example iOS-SwiftPM/Example_iOS-SPM.xcodeproj/project.pbxproj +++ /dev/null @@ -1,605 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; - 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; - 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; - 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; - 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; - D454C07D249A796A0001E4CC /* TPPDF in Frameworks */ = {isa = PBXBuildFile; productRef = D454C07C249A796A0001E4CC /* TPPDF */; }; - D49855392461FB0B00D54270 /* ExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49855182461FB0B00D54270 /* ExampleFactory.swift */; }; - D498553A2461FB0B00D54270 /* TimeUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49855192461FB0B00D54270 /* TimeUtils.swift */; }; - D498553B2461FB0B00D54270 /* LoremIpsum.swift in Sources */ = {isa = PBXBuildFile; fileRef = D498551A2461FB0B00D54270 /* LoremIpsum.swift */; }; - D498553D2461FB0B00D54270 /* PaginationExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D498551E2461FB0B00D54270 /* PaginationExampleFactory.swift */; }; - D498553E2461FB0B00D54270 /* TableOfContentsExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D498551F2461FB0B00D54270 /* TableOfContentsExampleFactory.swift */; }; - D498553F2461FB0B00D54270 /* TableExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49855202461FB0B00D54270 /* TableExampleFactory.swift */; }; - D49855402461FB0B00D54270 /* LineSeparatorExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49855212461FB0B00D54270 /* LineSeparatorExampleFactory.swift */; }; - D49855412461FB0B00D54270 /* TextStylesExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49855222461FB0B00D54270 /* TextStylesExampleFactory.swift */; }; - D49855422461FB0B00D54270 /* MultiSectionExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49855232461FB0B00D54270 /* MultiSectionExampleFactory.swift */; }; - D49855432461FB0B00D54270 /* GroupExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49855242461FB0B00D54270 /* GroupExampleFactory.swift */; }; - D49855442461FB0B00D54270 /* HeaderFooterExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49855252461FB0B00D54270 /* HeaderFooterExampleFactory.swift */; }; - D49855452461FB0B00D54270 /* ExternalDocumentExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49855262461FB0B00D54270 /* ExternalDocumentExampleFactory.swift */; }; - D49855462461FB0B00D54270 /* MultipleDocumentsExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49855272461FB0B00D54270 /* MultipleDocumentsExampleFactory.swift */; }; - D49855472461FB0B00D54270 /* ListExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49855282461FB0B00D54270 /* ListExampleFactory.swift */; }; - D49855482461FB0B00D54270 /* TextExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49855292461FB0B00D54270 /* TextExampleFactory.swift */; }; - D49855492461FB0B00D54270 /* ObjectAttributesExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D498552A2461FB0B00D54270 /* ObjectAttributesExampleFactory.swift */; }; - D498554A2461FB0B00D54270 /* ExperimentFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D498552B2461FB0B00D54270 /* ExperimentFactory.swift */; }; - D498554B2461FB0B00D54270 /* ImageExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D498552C2461FB0B00D54270 /* ImageExampleFactory.swift */; }; - D498554C2461FB0B00D54270 /* MetadataExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D498552D2461FB0B00D54270 /* MetadataExampleFactory.swift */; }; - D498554D2461FB0B00D54270 /* sample.pdf in Resources */ = {isa = PBXBuildFile; fileRef = D49855302461FB0B00D54270 /* sample.pdf */; }; - D498554E2461FB0B00D54270 /* Image-2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D49855322461FB0B00D54270 /* Image-2.jpg */; }; - D498554F2461FB0B00D54270 /* PortraitImage.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D49855332461FB0B00D54270 /* PortraitImage.jpg */; }; - D49855502461FB0B00D54270 /* Image.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D49855342461FB0B00D54270 /* Image.jpg */; }; - D49855512461FB0B00D54270 /* Image-3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D49855352461FB0B00D54270 /* Image-3.jpg */; }; - D49855522461FB0B00D54270 /* Image-1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D49855362461FB0B00D54270 /* Image-1.jpg */; }; - D49855532461FB0B00D54270 /* Image-4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D49855372461FB0B00D54270 /* Image-4.jpg */; }; - D49855542461FB0B00D54270 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = D49855382461FB0B00D54270 /* Icon.png */; }; - D49855562461FB9A00D54270 /* Examples.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49855552461FB9A00D54270 /* Examples.swift */; }; - D49B06082658E84C0084A0B7 /* DocumentSettingsExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49B06072658E84C0084A0B7 /* DocumentSettingsExampleFactory.swift */; }; - D4B7EB0725A1D345007D09C7 /* sample-large.pdf in Resources */ = {isa = PBXBuildFile; fileRef = D4B7EB0525A1D32F007D09C7 /* sample-large.pdf */; }; - D4D28D2323AA1A6D00028D5A /* ExamplesListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4D28D2223AA1A6D00028D5A /* ExamplesListViewController.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 607FACD01AFB9204008FA782 /* Example_iOS-SPM.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Example_iOS-SPM.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - D454C07A249A79570001E4CC /* TPPDF */ = {isa = PBXFileReference; lastKnownFileType = folder; name = TPPDF; path = ..; sourceTree = ""; }; - D49855182461FB0B00D54270 /* ExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleFactory.swift; sourceTree = ""; }; - D49855192461FB0B00D54270 /* TimeUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimeUtils.swift; sourceTree = ""; }; - D498551A2461FB0B00D54270 /* LoremIpsum.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoremIpsum.swift; sourceTree = ""; }; - D498551E2461FB0B00D54270 /* PaginationExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PaginationExampleFactory.swift; sourceTree = ""; }; - D498551F2461FB0B00D54270 /* TableOfContentsExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableOfContentsExampleFactory.swift; sourceTree = ""; }; - D49855202461FB0B00D54270 /* TableExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableExampleFactory.swift; sourceTree = ""; }; - D49855212461FB0B00D54270 /* LineSeparatorExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LineSeparatorExampleFactory.swift; sourceTree = ""; }; - D49855222461FB0B00D54270 /* TextStylesExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextStylesExampleFactory.swift; sourceTree = ""; }; - D49855232461FB0B00D54270 /* MultiSectionExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MultiSectionExampleFactory.swift; sourceTree = ""; }; - D49855242461FB0B00D54270 /* GroupExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GroupExampleFactory.swift; sourceTree = ""; }; - D49855252461FB0B00D54270 /* HeaderFooterExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeaderFooterExampleFactory.swift; sourceTree = ""; }; - D49855262461FB0B00D54270 /* ExternalDocumentExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExternalDocumentExampleFactory.swift; sourceTree = ""; }; - D49855272461FB0B00D54270 /* MultipleDocumentsExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MultipleDocumentsExampleFactory.swift; sourceTree = ""; }; - D49855282461FB0B00D54270 /* ListExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListExampleFactory.swift; sourceTree = ""; }; - D49855292461FB0B00D54270 /* TextExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextExampleFactory.swift; sourceTree = ""; }; - D498552A2461FB0B00D54270 /* ObjectAttributesExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ObjectAttributesExampleFactory.swift; sourceTree = ""; }; - D498552B2461FB0B00D54270 /* ExperimentFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExperimentFactory.swift; sourceTree = ""; }; - D498552C2461FB0B00D54270 /* ImageExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageExampleFactory.swift; sourceTree = ""; }; - D498552D2461FB0B00D54270 /* MetadataExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MetadataExampleFactory.swift; sourceTree = ""; }; - D49855302461FB0B00D54270 /* sample.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = sample.pdf; sourceTree = ""; }; - D49855322461FB0B00D54270 /* Image-2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "Image-2.jpg"; sourceTree = ""; }; - D49855332461FB0B00D54270 /* PortraitImage.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = PortraitImage.jpg; sourceTree = ""; }; - D49855342461FB0B00D54270 /* Image.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = Image.jpg; sourceTree = ""; }; - D49855352461FB0B00D54270 /* Image-3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "Image-3.jpg"; sourceTree = ""; }; - D49855362461FB0B00D54270 /* Image-1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "Image-1.jpg"; sourceTree = ""; }; - D49855372461FB0B00D54270 /* Image-4.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "Image-4.jpg"; sourceTree = ""; }; - D49855382461FB0B00D54270 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; }; - D49855552461FB9A00D54270 /* Examples.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Examples.swift; sourceTree = ""; }; - D49B06072658E84C0084A0B7 /* DocumentSettingsExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DocumentSettingsExampleFactory.swift; sourceTree = ""; }; - D4B7EB0525A1D32F007D09C7 /* sample-large.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "sample-large.pdf"; sourceTree = ""; }; - D4D28D2223AA1A6D00028D5A /* ExamplesListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExamplesListViewController.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 607FACCD1AFB9204008FA782 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - D454C07D249A796A0001E4CC /* TPPDF in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 607FACC71AFB9204008FA782 = { - isa = PBXGroup; - children = ( - D454C07A249A79570001E4CC /* TPPDF */, - 607FACD21AFB9204008FA782 /* Example */, - 607FACD11AFB9204008FA782 /* Products */, - D454C07B249A796A0001E4CC /* Frameworks */, - ); - sourceTree = ""; - }; - 607FACD11AFB9204008FA782 /* Products */ = { - isa = PBXGroup; - children = ( - 607FACD01AFB9204008FA782 /* Example_iOS-SPM.app */, - ); - name = Products; - sourceTree = ""; - }; - 607FACD21AFB9204008FA782 /* Example */ = { - isa = PBXGroup; - children = ( - D49855162461FB0B00D54270 /* Shared */, - D4D28D3923AA289500028D5A /* UI */, - D4B0D6C524629CBB00493C91 /* Assets */, - 607FACD31AFB9204008FA782 /* Supporting Files */, - ); - path = Example; - sourceTree = ""; - }; - 607FACD31AFB9204008FA782 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 607FACD41AFB9204008FA782 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - D454C07B249A796A0001E4CC /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; - D49855162461FB0B00D54270 /* Shared */ = { - isa = PBXGroup; - children = ( - D49855172461FB0B00D54270 /* Util */, - D498551D2461FB0B00D54270 /* Examples */, - D498552E2461FB0B00D54270 /* Data */, - ); - name = Shared; - path = ../../Shared; - sourceTree = ""; - }; - D49855172461FB0B00D54270 /* Util */ = { - isa = PBXGroup; - children = ( - D49855182461FB0B00D54270 /* ExampleFactory.swift */, - D49855192461FB0B00D54270 /* TimeUtils.swift */, - D498551A2461FB0B00D54270 /* LoremIpsum.swift */, - ); - path = Util; - sourceTree = ""; - }; - D498551D2461FB0B00D54270 /* Examples */ = { - isa = PBXGroup; - children = ( - D49855552461FB9A00D54270 /* Examples.swift */, - D498552B2461FB0B00D54270 /* ExperimentFactory.swift */, - D49B06072658E84C0084A0B7 /* DocumentSettingsExampleFactory.swift */, - D49855262461FB0B00D54270 /* ExternalDocumentExampleFactory.swift */, - D49855242461FB0B00D54270 /* GroupExampleFactory.swift */, - D49855252461FB0B00D54270 /* HeaderFooterExampleFactory.swift */, - D498552C2461FB0B00D54270 /* ImageExampleFactory.swift */, - D49855212461FB0B00D54270 /* LineSeparatorExampleFactory.swift */, - D49855282461FB0B00D54270 /* ListExampleFactory.swift */, - D498552D2461FB0B00D54270 /* MetadataExampleFactory.swift */, - D49855272461FB0B00D54270 /* MultipleDocumentsExampleFactory.swift */, - D49855232461FB0B00D54270 /* MultiSectionExampleFactory.swift */, - D498552A2461FB0B00D54270 /* ObjectAttributesExampleFactory.swift */, - D498551E2461FB0B00D54270 /* PaginationExampleFactory.swift */, - D49855202461FB0B00D54270 /* TableExampleFactory.swift */, - D498551F2461FB0B00D54270 /* TableOfContentsExampleFactory.swift */, - D49855292461FB0B00D54270 /* TextExampleFactory.swift */, - D49855222461FB0B00D54270 /* TextStylesExampleFactory.swift */, - ); - path = Examples; - sourceTree = ""; - }; - D498552E2461FB0B00D54270 /* Data */ = { - isa = PBXGroup; - children = ( - D498552F2461FB0B00D54270 /* Documents */, - D49855312461FB0B00D54270 /* Images */, - ); - path = Data; - sourceTree = ""; - }; - D498552F2461FB0B00D54270 /* Documents */ = { - isa = PBXGroup; - children = ( - D4B7EB0525A1D32F007D09C7 /* sample-large.pdf */, - D49855302461FB0B00D54270 /* sample.pdf */, - ); - path = Documents; - sourceTree = ""; - }; - D49855312461FB0B00D54270 /* Images */ = { - isa = PBXGroup; - children = ( - D49855322461FB0B00D54270 /* Image-2.jpg */, - D49855332461FB0B00D54270 /* PortraitImage.jpg */, - D49855342461FB0B00D54270 /* Image.jpg */, - D49855352461FB0B00D54270 /* Image-3.jpg */, - D49855362461FB0B00D54270 /* Image-1.jpg */, - D49855372461FB0B00D54270 /* Image-4.jpg */, - D49855382461FB0B00D54270 /* Icon.png */, - ); - path = Images; - sourceTree = ""; - }; - D4B0D6C524629CBB00493C91 /* Assets */ = { - isa = PBXGroup; - children = ( - 607FACD91AFB9204008FA782 /* Main.storyboard */, - 607FACDC1AFB9204008FA782 /* Images.xcassets */, - 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, - ); - name = Assets; - path = "../../Shared iOS/Assets"; - sourceTree = ""; - }; - D4D28D3923AA289500028D5A /* UI */ = { - isa = PBXGroup; - children = ( - 607FACD51AFB9204008FA782 /* AppDelegate.swift */, - 607FACD71AFB9204008FA782 /* ViewController.swift */, - D4D28D2223AA1A6D00028D5A /* ExamplesListViewController.swift */, - ); - name = UI; - path = "../../Shared iOS/UI"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 607FACCF1AFB9204008FA782 /* Example_iOS-SPM */ = { - isa = PBXNativeTarget; - buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Example_iOS-SPM" */; - buildPhases = ( - 607FACCC1AFB9204008FA782 /* Sources */, - D4E6F9A21FA732720049890F /* Swift Lint */, - 607FACCD1AFB9204008FA782 /* Frameworks */, - 607FACCE1AFB9204008FA782 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Example_iOS-SPM"; - packageProductDependencies = ( - D454C07C249A796A0001E4CC /* TPPDF */, - ); - productName = TPPDF; - productReference = 607FACD01AFB9204008FA782 /* Example_iOS-SPM.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 607FACC81AFB9204008FA782 /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - LastSwiftUpdateCheck = 1010; - LastUpgradeCheck = 1530; - ORGANIZATIONNAME = "techprimate GmbH"; - TargetAttributes = { - 607FACCF1AFB9204008FA782 = { - CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 1020; - ProvisioningStyle = Manual; - }; - }; - }; - buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Example_iOS-SPM" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 607FACC71AFB9204008FA782; - packageReferences = ( - ); - productRefGroup = 607FACD11AFB9204008FA782 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 607FACCF1AFB9204008FA782 /* Example_iOS-SPM */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 607FACCE1AFB9204008FA782 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D49855502461FB0B00D54270 /* Image.jpg in Resources */, - D498554D2461FB0B00D54270 /* sample.pdf in Resources */, - D49855532461FB0B00D54270 /* Image-4.jpg in Resources */, - 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, - 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, - 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, - D4B7EB0725A1D345007D09C7 /* sample-large.pdf in Resources */, - D49855512461FB0B00D54270 /* Image-3.jpg in Resources */, - D498554F2461FB0B00D54270 /* PortraitImage.jpg in Resources */, - D49855542461FB0B00D54270 /* Icon.png in Resources */, - D49855522461FB0B00D54270 /* Image-1.jpg in Resources */, - D498554E2461FB0B00D54270 /* Image-2.jpg in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - D4E6F9A21FA732720049890F /* Swift Lint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Swift Lint"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if [[ \"$(uname -m)\" == arm64 ]]; then\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nif which swiftlint > /dev/null; then\n if [-z \"$CI\"]; then\n echo \"Skipping SwiftLint as running on CI...\"\n else\n swiftlint --config \"$SRCROOT/../.swiftlint.yml\" --fix && swiftlint --config \"$SRCROOT/../.swiftlint.yml\"\n fi\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 607FACCC1AFB9204008FA782 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D498553E2461FB0B00D54270 /* TableOfContentsExampleFactory.swift in Sources */, - 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, - D498553A2461FB0B00D54270 /* TimeUtils.swift in Sources */, - D49855462461FB0B00D54270 /* MultipleDocumentsExampleFactory.swift in Sources */, - 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, - D49855562461FB9A00D54270 /* Examples.swift in Sources */, - D49855492461FB0B00D54270 /* ObjectAttributesExampleFactory.swift in Sources */, - D49855452461FB0B00D54270 /* ExternalDocumentExampleFactory.swift in Sources */, - D49855442461FB0B00D54270 /* HeaderFooterExampleFactory.swift in Sources */, - D4D28D2323AA1A6D00028D5A /* ExamplesListViewController.swift in Sources */, - D49855402461FB0B00D54270 /* LineSeparatorExampleFactory.swift in Sources */, - D49855432461FB0B00D54270 /* GroupExampleFactory.swift in Sources */, - D498553F2461FB0B00D54270 /* TableExampleFactory.swift in Sources */, - D498554A2461FB0B00D54270 /* ExperimentFactory.swift in Sources */, - D49855482461FB0B00D54270 /* TextExampleFactory.swift in Sources */, - D498553B2461FB0B00D54270 /* LoremIpsum.swift in Sources */, - D49855392461FB0B00D54270 /* ExampleFactory.swift in Sources */, - D498554C2461FB0B00D54270 /* MetadataExampleFactory.swift in Sources */, - D49855412461FB0B00D54270 /* TextStylesExampleFactory.swift in Sources */, - D49B06082658E84C0084A0B7 /* DocumentSettingsExampleFactory.swift in Sources */, - D49855472461FB0B00D54270 /* ListExampleFactory.swift in Sources */, - D498553D2461FB0B00D54270 /* PaginationExampleFactory.swift in Sources */, - D49855422461FB0B00D54270 /* MultiSectionExampleFactory.swift in Sources */, - D498554B2461FB0B00D54270 /* ImageExampleFactory.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 607FACD91AFB9204008FA782 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 607FACDA1AFB9204008FA782 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - 607FACDF1AFB9204008FA782 /* Base */, - ); - name = LaunchScreen.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 607FACED1AFB9204008FA782 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; - }; - name = Debug; - }; - 607FACEE1AFB9204008FA782 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.2; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 607FACF01AFB9204008FA782 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = ""; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_PARAMETER = YES; - INFOPLIST_FILE = Example/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 16; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MODULE_NAME = ExampleApp; - PRODUCT_BUNDLE_IDENTIFIER = com.techprimate.tppdf.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator"; - SUPPORTS_MACCATALYST = NO; - SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,7"; - XROS_DEPLOYMENT_TARGET = 1.0; - }; - name = Debug; - }; - 607FACF11AFB9204008FA782 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = ""; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_PARAMETER = YES; - INFOPLIST_FILE = Example/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 16; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MODULE_NAME = ExampleApp; - PRODUCT_BUNDLE_IDENTIFIER = com.techprimate.tppdf.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator"; - SUPPORTS_MACCATALYST = NO; - SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,7"; - XROS_DEPLOYMENT_TARGET = 1.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Example_iOS-SPM" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 607FACED1AFB9204008FA782 /* Debug */, - 607FACEE1AFB9204008FA782 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Example_iOS-SPM" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 607FACF01AFB9204008FA782 /* Debug */, - 607FACF11AFB9204008FA782 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - -/* Begin XCSwiftPackageProductDependency section */ - D454C07C249A796A0001E4CC /* TPPDF */ = { - isa = XCSwiftPackageProductDependency; - productName = TPPDF; - }; -/* End XCSwiftPackageProductDependency section */ - }; - rootObject = 607FACC81AFB9204008FA782 /* Project object */; -} diff --git a/Example iOS-SwiftPM/Example_iOS-SPM.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example iOS-SwiftPM/Example_iOS-SPM.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/Example iOS-SwiftPM/Example_iOS-SPM.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Example iOS-SwiftPM/Example_iOS-SPM.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example iOS-SwiftPM/Example_iOS-SPM.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Example iOS-SwiftPM/Example_iOS-SPM.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Example iOS-SwiftPM/Example_iOS-SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Example iOS-SwiftPM/Example_iOS-SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index e5921572a..000000000 --- a/Example iOS-SwiftPM/Example_iOS-SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,43 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "CwlCatchException", - "repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git", - "state": { - "branch": null, - "revision": "3ef6999c73b6938cc0da422f2c912d0158abb0a0", - "version": "2.2.0" - } - }, - { - "package": "CwlPreconditionTesting", - "repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git", - "state": { - "branch": null, - "revision": "2ef56b2caf25f55fa7eef8784c30d5a767550f54", - "version": "2.2.1" - } - }, - { - "package": "Nimble", - "repositoryURL": "https://github.com/Quick/Nimble", - "state": { - "branch": null, - "revision": "c93f16c25af5770f0d3e6af27c9634640946b068", - "version": "9.2.1" - } - }, - { - "package": "Quick", - "repositoryURL": "https://github.com/Quick/Quick", - "state": { - "branch": null, - "revision": "8cce6acd38f965f5baa3167b939f86500314022b", - "version": "3.1.2" - } - } - ] - }, - "version": 1 -} diff --git a/Example iOS-SwiftPM/Example_iOS-SPM.xcodeproj/xcshareddata/xcschemes/Example iOS (SPM).xcscheme b/Example iOS-SwiftPM/Example_iOS-SPM.xcodeproj/xcshareddata/xcschemes/Example iOS (SPM).xcscheme deleted file mode 100644 index 572c0fcf4..000000000 --- a/Example iOS-SwiftPM/Example_iOS-SPM.xcodeproj/xcshareddata/xcschemes/Example iOS (SPM).xcscheme +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example macOS-SwiftPM/Example/AppDelegate.swift b/Example macOS-SwiftPM/Example/AppDelegate.swift deleted file mode 100644 index 383f98c01..000000000 --- a/Example macOS-SwiftPM/Example/AppDelegate.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// AppDelegate.swift -// TPPDF -// -// Created by Philip Niedertscheider on 23.06.2020. -// Copyright © 2016-2026 techprimate GmbH. All rights reserved. -// - -import Cocoa -import SwiftUI - -@NSApplicationMain -class AppDelegate: NSObject, NSApplicationDelegate { - var window: NSWindow! - - func applicationDidFinishLaunching(_: Notification) { - let contentView = ContentView() - - window = NSWindow( - contentRect: NSRect(x: 0, y: 0, width: 800, height: 600), - styleMask: [.titled, .closable, .miniaturizable, .resizable, .fullSizeContentView], - backing: .buffered, - defer: false - ) - window.title = "TPPDF Examples" - window.center() - window.setFrameAutosaveName("Main Window") - window.contentView = NSHostingView(rootView: contentView) - window.makeKeyAndOrderFront(nil) - window.setFrameAutosaveName("main") - } - - func applicationShouldTerminateAfterLastWindowClosed(_: NSApplication) -> Bool { - true - } -} diff --git a/Example macOS-SwiftPM/Example/Base.lproj/Main.storyboard b/Example macOS-SwiftPM/Example/Base.lproj/Main.storyboard deleted file mode 100644 index 5c973d6af..000000000 --- a/Example macOS-SwiftPM/Example/Base.lproj/Main.storyboard +++ /dev/null @@ -1,683 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example macOS-SwiftPM/Example/Example.entitlements b/Example macOS-SwiftPM/Example/Example.entitlements deleted file mode 100644 index 0c67376eb..000000000 --- a/Example macOS-SwiftPM/Example/Example.entitlements +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/Example macOS-SwiftPM/Example/Info.plist b/Example macOS-SwiftPM/Example/Info.plist deleted file mode 100644 index 846a2be58..000000000 --- a/Example macOS-SwiftPM/Example/Info.plist +++ /dev/null @@ -1,36 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - NSHumanReadableCopyright - Copyright © 2016-2026 techprimate GmbH. All rights reserved. - NSMainStoryboardFile - Main - NSPrincipalClass - NSApplication - NSSupportsAutomaticTermination - - NSSupportsSuddenTermination - - - diff --git a/Example macOS-SwiftPM/Example/UI/ContentView.swift b/Example macOS-SwiftPM/Example/UI/ContentView.swift deleted file mode 100644 index 2f418b5af..000000000 --- a/Example macOS-SwiftPM/Example/UI/ContentView.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// ContentView.swift -// TPPDF -// -// Created by Philip Niedertscheider on 23.06.2020. -// Copyright © 2016-2026 techprimate GmbH. All rights reserved. -// - -import Combine -import SwiftUI -import TPPDF - -class ContentViewModel: ObservableObject { - @Published var url: URL? - @State var selectedFactory = Examples.defaultFactory -} - -struct ContentView: View { - @ObservedObject var viewModel = ContentViewModel() - - var body: some View { - NavigationView { - List { - ForEach(Examples.factories, id: \.header) { section in - Section(header: Text(section.header)) { - ForEach(section.examples, id: \.name) { example in - NavigationLink(example.name, destination: DetailView(example: example)) - } - } - } - } - .frame(minWidth: 100, idealWidth: 200, maxWidth: 300, - minHeight: 0, maxHeight: .infinity, - alignment: .topLeading) - .listStyle(SidebarListStyle()) - - DetailView(example: viewModel.selectedFactory) - .frame(minWidth: 0, maxWidth: .infinity, - minHeight: 0, maxHeight: .infinity, - alignment: .topLeading) - } - .frame(maxWidth: .infinity, maxHeight: .infinity) - } -} - -struct ContentView_Previews: PreviewProvider { - static var previews: some View { - ContentView() - } -} diff --git a/Example macOS-SwiftPM/Example/UI/DetailView.swift b/Example macOS-SwiftPM/Example/UI/DetailView.swift deleted file mode 100644 index 820f57bc5..000000000 --- a/Example macOS-SwiftPM/Example/UI/DetailView.swift +++ /dev/null @@ -1,79 +0,0 @@ -// -// DetailView.swift -// TPPDF -// -// Created by Philip Niedertscheider on 24.06.2020. -// Copyright © 2016-2026 techprimate GmbH. All rights reserved. -// - -import SwiftUI -import TPPDF - -struct DetailView: View { - @State var example: Example - @State var generator: PDFGeneratorProtocol! - @State var isGenerated = false - @State var url: URL? - - @State var observer: NSObjectProtocol! = nil - @State var progressValue: Double = 0.5 - - @State var debug = false - - var body: some View { - VStack(alignment: .leading, spacing: 0) { - HStack { - Text("\(example.name)") - .font(.headline) - Toggle(isOn: $debug) { - Text("Debug Mode") - } - .onChange(of: debug) { debug in - self.generatePDF(force: true, debug: debug) - } - Spacer() - Button(action: { - self.generatePDF(force: true, debug: debug) - }, label: { - Text("Refresh") - }) - ProgressBar(value: $progressValue) - .frame(width: 100, height: 20) - .fixedSize(horizontal: true, vertical: true) - }.padding(10) - - PDFKitRepresentedView(url: url) - .onAppear { - self.generatePDF(force: false, debug: debug) - } - } - } - - func generatePDF(force: Bool, debug: Bool) { - if url != nil && !force { - return - } - let docs = example.factory.generateDocument() - if docs.count == 1 { - generator = PDFGenerator(document: docs[0]) - } else { - generator = PDFMultiDocumentGenerator(documents: docs) - } - generator.debug = debug - - observer = generator.progress.observe(\.completedUnitCount) { progress, _ in - self.progressValue = progress.fractionCompleted - } - - DispatchQueue.global(qos: .background).async { - do { - let url = try self.generator.generateURL(filename: "output-\(UUID().uuidString).pdf") - DispatchQueue.main.async { - self.url = url - } - } catch { - print("Error while generating PDF: " + error.localizedDescription) - } - } - } -} diff --git a/Example macOS-SwiftPM/Example/UI/PDFView+SwiftUI.swift b/Example macOS-SwiftPM/Example/UI/PDFView+SwiftUI.swift deleted file mode 100644 index 6a07c5733..000000000 --- a/Example macOS-SwiftPM/Example/UI/PDFView+SwiftUI.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// PDFView+SwiftUI.swift -// TPPDF -// -// Created by Philip Niedertscheider on 23.06.2020. -// Copyright © 2016-2026 techprimate GmbH. All rights reserved. -// - -import PDFKit -import SwiftUI - -#if os(iOS) -import UIKit - -struct PDFKitRepresentedView: UIViewRepresentable { - let url: URL - - init(_ url: URL) { - self.url = url - } - - func makeUIView(context _: UIViewRepresentableContext) -> PDFKitRepresentedView.UIViewType { - // Create a `PDFView` and set its `PDFDocument`. - let pdfView = PDFView() - pdfView.document = PDFDocument(url: url) - return pdfView - } - - func updateUIView(_: UIView, context _: UIViewRepresentableContext) {} -} -#else -import AppKit - -struct PDFKitRepresentedView: NSViewRepresentable { - var url: URL? - - func makeNSView(context _: NSViewRepresentableContext) -> PDFKitRepresentedView.NSViewType { - let pdfView = PDFView() - if let url = url { - pdfView.document = PDFDocument(url: url) - } else { - pdfView.document = nil - } - return pdfView - } - - func updateNSView(_ nsView: NSView, context _: NSViewRepresentableContext) { - guard let pdfView = nsView as? PDFView else { - return - } - if let url = url { - pdfView.document = PDFDocument(url: url) - } else { - pdfView.document = nil - } - } -} -#endif diff --git a/Example macOS-SwiftPM/Example/UI/ProgressBar.swift b/Example macOS-SwiftPM/Example/UI/ProgressBar.swift deleted file mode 100644 index 6ffaf2c1e..000000000 --- a/Example macOS-SwiftPM/Example/UI/ProgressBar.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// ProgressBar.swift -// TPPDF -// -// Created by Philip Niedertscheider on 24.06.2020. -// Copyright © 2016-2026 techprimate GmbH. All rights reserved. -// - -import SwiftUI - -struct ProgressBar: View { - @Binding var value: Double - - var body: some View { - GeometryReader { geometry in - ZStack(alignment: .leading) { - Rectangle() - .frame(width: geometry.size.width, height: geometry.size.height) - .opacity(0.3) - .foregroundColor(Color(.systemTeal)) - - Rectangle() - .frame(width: min(CGFloat(self.value) * geometry.size.width, geometry.size.width), - height: geometry.size.height) - .foregroundColor(Color(.systemBlue)) - .animation(.linear) - }.cornerRadius(min(geometry.size.height, geometry.size.width) / 2) - } - } -} diff --git a/Example macOS-SwiftPM/Example_macOS-SPM.xcodeproj/project.pbxproj b/Example macOS-SwiftPM/Example_macOS-SPM.xcodeproj/project.pbxproj deleted file mode 100644 index efe7b4843..000000000 --- a/Example macOS-SwiftPM/Example_macOS-SPM.xcodeproj/project.pbxproj +++ /dev/null @@ -1,604 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - D45C42ED24A3C1970040FE37 /* ProgressBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = D45C42EC24A3C1970040FE37 /* ProgressBar.swift */; }; - D45C42EF24A3C1B80040FE37 /* DetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D45C42EE24A3C1B80040FE37 /* DetailView.swift */; }; - D48C538924A269F400D7A3DD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C538824A269F400D7A3DD /* AppDelegate.swift */; }; - D48C538B24A269F400D7A3DD /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C538A24A269F400D7A3DD /* ContentView.swift */; }; - D48C538D24A269F500D7A3DD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D48C538C24A269F500D7A3DD /* Assets.xcassets */; }; - D48C539024A269F500D7A3DD /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D48C538F24A269F500D7A3DD /* Preview Assets.xcassets */; }; - D48C539324A269F500D7A3DD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D48C539124A269F500D7A3DD /* Main.storyboard */; }; - D48C53BE24A26C0000D7A3DD /* ExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C539E24A26C0000D7A3DD /* ExampleFactory.swift */; }; - D48C53BF24A26C0000D7A3DD /* TimeUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C539F24A26C0000D7A3DD /* TimeUtils.swift */; }; - D48C53C024A26C0000D7A3DD /* LoremIpsum.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53A024A26C0000D7A3DD /* LoremIpsum.swift */; }; - D48C53C124A26C0000D7A3DD /* PaginationExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53A224A26C0000D7A3DD /* PaginationExampleFactory.swift */; }; - D48C53C224A26C0000D7A3DD /* TableOfContentsExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53A324A26C0000D7A3DD /* TableOfContentsExampleFactory.swift */; }; - D48C53C324A26C0000D7A3DD /* TableExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53A424A26C0000D7A3DD /* TableExampleFactory.swift */; }; - D48C53C424A26C0000D7A3DD /* LineSeparatorExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53A524A26C0000D7A3DD /* LineSeparatorExampleFactory.swift */; }; - D48C53C524A26C0000D7A3DD /* TextStylesExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53A624A26C0000D7A3DD /* TextStylesExampleFactory.swift */; }; - D48C53C624A26C0000D7A3DD /* MultiSectionExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53A724A26C0000D7A3DD /* MultiSectionExampleFactory.swift */; }; - D48C53C724A26C0000D7A3DD /* GroupExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53A824A26C0000D7A3DD /* GroupExampleFactory.swift */; }; - D48C53C824A26C0000D7A3DD /* HeaderFooterExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53A924A26C0000D7A3DD /* HeaderFooterExampleFactory.swift */; }; - D48C53C924A26C0000D7A3DD /* ExternalDocumentExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53AA24A26C0000D7A3DD /* ExternalDocumentExampleFactory.swift */; }; - D48C53CA24A26C0000D7A3DD /* MultipleDocumentsExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53AB24A26C0000D7A3DD /* MultipleDocumentsExampleFactory.swift */; }; - D48C53CB24A26C0000D7A3DD /* ListExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53AC24A26C0000D7A3DD /* ListExampleFactory.swift */; }; - D48C53CC24A26C0000D7A3DD /* TextExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53AD24A26C0000D7A3DD /* TextExampleFactory.swift */; }; - D48C53CD24A26C0000D7A3DD /* ObjectAttributesExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53AE24A26C0000D7A3DD /* ObjectAttributesExampleFactory.swift */; }; - D48C53CE24A26C0000D7A3DD /* ExperimentFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53AF24A26C0000D7A3DD /* ExperimentFactory.swift */; }; - D48C53CF24A26C0000D7A3DD /* ImageExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53B024A26C0000D7A3DD /* ImageExampleFactory.swift */; }; - D48C53D024A26C0000D7A3DD /* MetadataExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53B124A26C0000D7A3DD /* MetadataExampleFactory.swift */; }; - D48C53D124A26C0000D7A3DD /* Examples.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53B224A26C0000D7A3DD /* Examples.swift */; }; - D48C53D224A26C0000D7A3DD /* sample.pdf in Resources */ = {isa = PBXBuildFile; fileRef = D48C53B524A26C0000D7A3DD /* sample.pdf */; }; - D48C53D324A26C0000D7A3DD /* Image-2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D48C53B724A26C0000D7A3DD /* Image-2.jpg */; }; - D48C53D424A26C0000D7A3DD /* PortraitImage.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D48C53B824A26C0000D7A3DD /* PortraitImage.jpg */; }; - D48C53D524A26C0000D7A3DD /* Image.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D48C53B924A26C0000D7A3DD /* Image.jpg */; }; - D48C53D624A26C0000D7A3DD /* Image-3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D48C53BA24A26C0000D7A3DD /* Image-3.jpg */; }; - D48C53D724A26C0000D7A3DD /* Image-1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D48C53BB24A26C0000D7A3DD /* Image-1.jpg */; }; - D48C53D824A26C0000D7A3DD /* Image-4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D48C53BC24A26C0000D7A3DD /* Image-4.jpg */; }; - D48C53D924A26C0000D7A3DD /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = D48C53BD24A26C0000D7A3DD /* Icon.png */; }; - D48C53DC24A26E5400D7A3DD /* TPPDF in Frameworks */ = {isa = PBXBuildFile; productRef = D48C53DB24A26E5400D7A3DD /* TPPDF */; }; - D48C53DE24A27A0100D7A3DD /* PDFView+SwiftUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48C53DD24A27A0100D7A3DD /* PDFView+SwiftUI.swift */; }; - D49B05FC2658E7A60084A0B7 /* DocumentSettingsExampleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49B05FB2658E7A60084A0B7 /* DocumentSettingsExampleFactory.swift */; }; - D4B7EB0B25A1DAD2007D09C7 /* sample-large.pdf in Resources */ = {isa = PBXBuildFile; fileRef = D4B7EB0A25A1DACE007D09C7 /* sample-large.pdf */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - D45C42EC24A3C1970040FE37 /* ProgressBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressBar.swift; sourceTree = ""; }; - D45C42EE24A3C1B80040FE37 /* DetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailView.swift; sourceTree = ""; }; - D48C538524A269F400D7A3DD /* Example_macOS-SPM.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Example_macOS-SPM.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - D48C538824A269F400D7A3DD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - D48C538A24A269F400D7A3DD /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; - D48C538C24A269F500D7A3DD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - D48C538F24A269F500D7A3DD /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - D48C539224A269F500D7A3DD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - D48C539424A269F500D7A3DD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D48C539524A269F500D7A3DD /* Example.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Example.entitlements; sourceTree = ""; }; - D48C539B24A26A1000D7A3DD /* TPPDF */ = {isa = PBXFileReference; lastKnownFileType = folder; name = TPPDF; path = ..; sourceTree = ""; }; - D48C539E24A26C0000D7A3DD /* ExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleFactory.swift; sourceTree = ""; }; - D48C539F24A26C0000D7A3DD /* TimeUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimeUtils.swift; sourceTree = ""; }; - D48C53A024A26C0000D7A3DD /* LoremIpsum.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoremIpsum.swift; sourceTree = ""; }; - D48C53A224A26C0000D7A3DD /* PaginationExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PaginationExampleFactory.swift; sourceTree = ""; }; - D48C53A324A26C0000D7A3DD /* TableOfContentsExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableOfContentsExampleFactory.swift; sourceTree = ""; }; - D48C53A424A26C0000D7A3DD /* TableExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableExampleFactory.swift; sourceTree = ""; }; - D48C53A524A26C0000D7A3DD /* LineSeparatorExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LineSeparatorExampleFactory.swift; sourceTree = ""; }; - D48C53A624A26C0000D7A3DD /* TextStylesExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextStylesExampleFactory.swift; sourceTree = ""; }; - D48C53A724A26C0000D7A3DD /* MultiSectionExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MultiSectionExampleFactory.swift; sourceTree = ""; }; - D48C53A824A26C0000D7A3DD /* GroupExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GroupExampleFactory.swift; sourceTree = ""; }; - D48C53A924A26C0000D7A3DD /* HeaderFooterExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeaderFooterExampleFactory.swift; sourceTree = ""; }; - D48C53AA24A26C0000D7A3DD /* ExternalDocumentExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExternalDocumentExampleFactory.swift; sourceTree = ""; }; - D48C53AB24A26C0000D7A3DD /* MultipleDocumentsExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MultipleDocumentsExampleFactory.swift; sourceTree = ""; }; - D48C53AC24A26C0000D7A3DD /* ListExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListExampleFactory.swift; sourceTree = ""; }; - D48C53AD24A26C0000D7A3DD /* TextExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextExampleFactory.swift; sourceTree = ""; }; - D48C53AE24A26C0000D7A3DD /* ObjectAttributesExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ObjectAttributesExampleFactory.swift; sourceTree = ""; }; - D48C53AF24A26C0000D7A3DD /* ExperimentFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExperimentFactory.swift; sourceTree = ""; }; - D48C53B024A26C0000D7A3DD /* ImageExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageExampleFactory.swift; sourceTree = ""; }; - D48C53B124A26C0000D7A3DD /* MetadataExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MetadataExampleFactory.swift; sourceTree = ""; }; - D48C53B224A26C0000D7A3DD /* Examples.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Examples.swift; sourceTree = ""; }; - D48C53B524A26C0000D7A3DD /* sample.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = sample.pdf; sourceTree = ""; }; - D48C53B724A26C0000D7A3DD /* Image-2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "Image-2.jpg"; sourceTree = ""; }; - D48C53B824A26C0000D7A3DD /* PortraitImage.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = PortraitImage.jpg; sourceTree = ""; }; - D48C53B924A26C0000D7A3DD /* Image.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = Image.jpg; sourceTree = ""; }; - D48C53BA24A26C0000D7A3DD /* Image-3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "Image-3.jpg"; sourceTree = ""; }; - D48C53BB24A26C0000D7A3DD /* Image-1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "Image-1.jpg"; sourceTree = ""; }; - D48C53BC24A26C0000D7A3DD /* Image-4.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "Image-4.jpg"; sourceTree = ""; }; - D48C53BD24A26C0000D7A3DD /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; }; - D48C53DD24A27A0100D7A3DD /* PDFView+SwiftUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PDFView+SwiftUI.swift"; sourceTree = ""; }; - D49B05FB2658E7A60084A0B7 /* DocumentSettingsExampleFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DocumentSettingsExampleFactory.swift; sourceTree = ""; }; - D4B7EB0A25A1DACE007D09C7 /* sample-large.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "sample-large.pdf"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D48C538224A269F400D7A3DD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - D48C53DC24A26E5400D7A3DD /* TPPDF in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - D45C42EB24A3C18B0040FE37 /* UI */ = { - isa = PBXGroup; - children = ( - D48C538A24A269F400D7A3DD /* ContentView.swift */, - D45C42EC24A3C1970040FE37 /* ProgressBar.swift */, - D48C53DD24A27A0100D7A3DD /* PDFView+SwiftUI.swift */, - D45C42EE24A3C1B80040FE37 /* DetailView.swift */, - ); - path = UI; - sourceTree = ""; - }; - D48C537C24A269F400D7A3DD = { - isa = PBXGroup; - children = ( - D48C539B24A26A1000D7A3DD /* TPPDF */, - D48C538724A269F400D7A3DD /* Example */, - D48C538624A269F400D7A3DD /* Products */, - D48C53DA24A26E5400D7A3DD /* Frameworks */, - ); - sourceTree = ""; - }; - D48C538624A269F400D7A3DD /* Products */ = { - isa = PBXGroup; - children = ( - D48C538524A269F400D7A3DD /* Example_macOS-SPM.app */, - ); - name = Products; - sourceTree = ""; - }; - D48C538724A269F400D7A3DD /* Example */ = { - isa = PBXGroup; - children = ( - D48C539C24A26C0000D7A3DD /* Shared */, - D48C538824A269F400D7A3DD /* AppDelegate.swift */, - D45C42EB24A3C18B0040FE37 /* UI */, - D48C538C24A269F500D7A3DD /* Assets.xcassets */, - D48C539124A269F500D7A3DD /* Main.storyboard */, - D48C539424A269F500D7A3DD /* Info.plist */, - D48C539524A269F500D7A3DD /* Example.entitlements */, - D48C538E24A269F500D7A3DD /* Preview Content */, - ); - path = Example; - sourceTree = ""; - }; - D48C538E24A269F500D7A3DD /* Preview Content */ = { - isa = PBXGroup; - children = ( - D48C538F24A269F500D7A3DD /* Preview Assets.xcassets */, - ); - path = "Preview Content"; - sourceTree = ""; - }; - D48C539C24A26C0000D7A3DD /* Shared */ = { - isa = PBXGroup; - children = ( - D48C539D24A26C0000D7A3DD /* Util */, - D48C53A124A26C0000D7A3DD /* Examples */, - D48C53B324A26C0000D7A3DD /* Data */, - ); - name = Shared; - path = ../../Shared; - sourceTree = ""; - }; - D48C539D24A26C0000D7A3DD /* Util */ = { - isa = PBXGroup; - children = ( - D48C539E24A26C0000D7A3DD /* ExampleFactory.swift */, - D48C539F24A26C0000D7A3DD /* TimeUtils.swift */, - D48C53A024A26C0000D7A3DD /* LoremIpsum.swift */, - ); - path = Util; - sourceTree = ""; - }; - D48C53A124A26C0000D7A3DD /* Examples */ = { - isa = PBXGroup; - children = ( - D48C53B224A26C0000D7A3DD /* Examples.swift */, - D49B05FB2658E7A60084A0B7 /* DocumentSettingsExampleFactory.swift */, - D48C53AF24A26C0000D7A3DD /* ExperimentFactory.swift */, - D48C53AA24A26C0000D7A3DD /* ExternalDocumentExampleFactory.swift */, - D48C53A824A26C0000D7A3DD /* GroupExampleFactory.swift */, - D48C53A924A26C0000D7A3DD /* HeaderFooterExampleFactory.swift */, - D48C53B024A26C0000D7A3DD /* ImageExampleFactory.swift */, - D48C53A524A26C0000D7A3DD /* LineSeparatorExampleFactory.swift */, - D48C53AC24A26C0000D7A3DD /* ListExampleFactory.swift */, - D48C53B124A26C0000D7A3DD /* MetadataExampleFactory.swift */, - D48C53AB24A26C0000D7A3DD /* MultipleDocumentsExampleFactory.swift */, - D48C53A724A26C0000D7A3DD /* MultiSectionExampleFactory.swift */, - D48C53AE24A26C0000D7A3DD /* ObjectAttributesExampleFactory.swift */, - D48C53A224A26C0000D7A3DD /* PaginationExampleFactory.swift */, - D48C53A424A26C0000D7A3DD /* TableExampleFactory.swift */, - D48C53A324A26C0000D7A3DD /* TableOfContentsExampleFactory.swift */, - D48C53AD24A26C0000D7A3DD /* TextExampleFactory.swift */, - D48C53A624A26C0000D7A3DD /* TextStylesExampleFactory.swift */, - ); - path = Examples; - sourceTree = ""; - }; - D48C53B324A26C0000D7A3DD /* Data */ = { - isa = PBXGroup; - children = ( - D48C53B424A26C0000D7A3DD /* Documents */, - D48C53B624A26C0000D7A3DD /* Images */, - ); - path = Data; - sourceTree = ""; - }; - D48C53B424A26C0000D7A3DD /* Documents */ = { - isa = PBXGroup; - children = ( - D4B7EB0A25A1DACE007D09C7 /* sample-large.pdf */, - D48C53B524A26C0000D7A3DD /* sample.pdf */, - ); - path = Documents; - sourceTree = ""; - }; - D48C53B624A26C0000D7A3DD /* Images */ = { - isa = PBXGroup; - children = ( - D48C53B724A26C0000D7A3DD /* Image-2.jpg */, - D48C53B824A26C0000D7A3DD /* PortraitImage.jpg */, - D48C53B924A26C0000D7A3DD /* Image.jpg */, - D48C53BA24A26C0000D7A3DD /* Image-3.jpg */, - D48C53BB24A26C0000D7A3DD /* Image-1.jpg */, - D48C53BC24A26C0000D7A3DD /* Image-4.jpg */, - D48C53BD24A26C0000D7A3DD /* Icon.png */, - ); - path = Images; - sourceTree = ""; - }; - D48C53DA24A26E5400D7A3DD /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - D48C538424A269F400D7A3DD /* Example_macOS-SPM */ = { - isa = PBXNativeTarget; - buildConfigurationList = D48C539824A269F500D7A3DD /* Build configuration list for PBXNativeTarget "Example_macOS-SPM" */; - buildPhases = ( - D4E30B4D2BD7044F00BB7AC4 /* SwiftLint */, - D48C538124A269F400D7A3DD /* Sources */, - D48C538224A269F400D7A3DD /* Frameworks */, - D48C538324A269F400D7A3DD /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Example_macOS-SPM"; - packageProductDependencies = ( - D48C53DB24A26E5400D7A3DD /* TPPDF */, - ); - productName = Example; - productReference = D48C538524A269F400D7A3DD /* Example_macOS-SPM.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - D48C537D24A269F400D7A3DD /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - LastSwiftUpdateCheck = 1150; - LastUpgradeCheck = 2620; - ORGANIZATIONNAME = "techprimate GmbH"; - TargetAttributes = { - D48C538424A269F400D7A3DD = { - CreatedOnToolsVersion = 11.5; - }; - }; - }; - buildConfigurationList = D48C538024A269F400D7A3DD /* Build configuration list for PBXProject "Example_macOS-SPM" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = D48C537C24A269F400D7A3DD; - productRefGroup = D48C538624A269F400D7A3DD /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - D48C538424A269F400D7A3DD /* Example_macOS-SPM */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - D48C538324A269F400D7A3DD /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D48C53D524A26C0000D7A3DD /* Image.jpg in Resources */, - D48C53D224A26C0000D7A3DD /* sample.pdf in Resources */, - D48C53D824A26C0000D7A3DD /* Image-4.jpg in Resources */, - D48C539324A269F500D7A3DD /* Main.storyboard in Resources */, - D48C539024A269F500D7A3DD /* Preview Assets.xcassets in Resources */, - D48C538D24A269F500D7A3DD /* Assets.xcassets in Resources */, - D4B7EB0B25A1DAD2007D09C7 /* sample-large.pdf in Resources */, - D48C53D624A26C0000D7A3DD /* Image-3.jpg in Resources */, - D48C53D424A26C0000D7A3DD /* PortraitImage.jpg in Resources */, - D48C53D924A26C0000D7A3DD /* Icon.png in Resources */, - D48C53D724A26C0000D7A3DD /* Image-1.jpg in Resources */, - D48C53D324A26C0000D7A3DD /* Image-2.jpg in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - D4E30B4D2BD7044F00BB7AC4 /* SwiftLint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = SwiftLint; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if [[ \"$(uname -m)\" == arm64 ]]; then\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nif which swiftlint > /dev/null; then\n if [-z \"$CI\"]; then\n echo \"Skipping SwiftLint as running on CI...\"\n else\n swiftlint --config \"$SRCROOT/../.swiftlint.yml\" --fix && swiftlint --config \"$SRCROOT/../.swiftlint.yml\"\n fi\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - D48C538124A269F400D7A3DD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D48C53DE24A27A0100D7A3DD /* PDFView+SwiftUI.swift in Sources */, - D48C53C324A26C0000D7A3DD /* TableExampleFactory.swift in Sources */, - D48C53CD24A26C0000D7A3DD /* ObjectAttributesExampleFactory.swift in Sources */, - D48C53C224A26C0000D7A3DD /* TableOfContentsExampleFactory.swift in Sources */, - D48C53C024A26C0000D7A3DD /* LoremIpsum.swift in Sources */, - D48C53CB24A26C0000D7A3DD /* ListExampleFactory.swift in Sources */, - D48C53BE24A26C0000D7A3DD /* ExampleFactory.swift in Sources */, - D48C53C424A26C0000D7A3DD /* LineSeparatorExampleFactory.swift in Sources */, - D45C42EF24A3C1B80040FE37 /* DetailView.swift in Sources */, - D48C53C624A26C0000D7A3DD /* MultiSectionExampleFactory.swift in Sources */, - D48C53C824A26C0000D7A3DD /* HeaderFooterExampleFactory.swift in Sources */, - D48C538B24A269F400D7A3DD /* ContentView.swift in Sources */, - D48C53C524A26C0000D7A3DD /* TextStylesExampleFactory.swift in Sources */, - D48C53CF24A26C0000D7A3DD /* ImageExampleFactory.swift in Sources */, - D48C53C924A26C0000D7A3DD /* ExternalDocumentExampleFactory.swift in Sources */, - D48C53D024A26C0000D7A3DD /* MetadataExampleFactory.swift in Sources */, - D48C53BF24A26C0000D7A3DD /* TimeUtils.swift in Sources */, - D48C53C724A26C0000D7A3DD /* GroupExampleFactory.swift in Sources */, - D48C53CC24A26C0000D7A3DD /* TextExampleFactory.swift in Sources */, - D48C538924A269F400D7A3DD /* AppDelegate.swift in Sources */, - D48C53D124A26C0000D7A3DD /* Examples.swift in Sources */, - D48C53CE24A26C0000D7A3DD /* ExperimentFactory.swift in Sources */, - D48C53C124A26C0000D7A3DD /* PaginationExampleFactory.swift in Sources */, - D49B05FC2658E7A60084A0B7 /* DocumentSettingsExampleFactory.swift in Sources */, - D45C42ED24A3C1970040FE37 /* ProgressBar.swift in Sources */, - D48C53CA24A26C0000D7A3DD /* MultipleDocumentsExampleFactory.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - D48C539124A269F500D7A3DD /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - D48C539224A269F500D7A3DD /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - D48C539624A269F500D7A3DD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - STRING_CATALOG_GENERATE_SYMBOLS = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - D48C539724A269F500D7A3DD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = macosx; - STRING_CATALOG_GENERATE_SYMBOLS = YES; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Release; - }; - D48C539924A269F500D7A3DD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = Example/Example.entitlements; - CODE_SIGN_IDENTITY = "-"; - CODE_SIGN_STYLE = Manual; - COMBINE_HIDPI_IMAGES = YES; - DEAD_CODE_STRIPPING = YES; - DEVELOPMENT_ASSET_PATHS = "\"Example/Preview Content\""; - DEVELOPMENT_TEAM = ""; - ENABLE_APP_SANDBOX = YES; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_PREVIEWS = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - ENABLE_USER_SELECTED_FILES = readonly; - INFOPLIST_FILE = Example/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.5; - PRODUCT_BUNDLE_IDENTIFIER = com.techprimate.TPPDF.Example; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - D48C539A24A269F500D7A3DD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = Example/Example.entitlements; - CODE_SIGN_IDENTITY = "-"; - CODE_SIGN_STYLE = Manual; - COMBINE_HIDPI_IMAGES = YES; - DEAD_CODE_STRIPPING = YES; - DEVELOPMENT_ASSET_PATHS = "\"Example/Preview Content\""; - DEVELOPMENT_TEAM = ""; - ENABLE_APP_SANDBOX = YES; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_PREVIEWS = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - ENABLE_USER_SELECTED_FILES = readonly; - INFOPLIST_FILE = Example/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.5; - PRODUCT_BUNDLE_IDENTIFIER = com.techprimate.TPPDF.Example; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - D48C538024A269F400D7A3DD /* Build configuration list for PBXProject "Example_macOS-SPM" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D48C539624A269F500D7A3DD /* Debug */, - D48C539724A269F500D7A3DD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D48C539824A269F500D7A3DD /* Build configuration list for PBXNativeTarget "Example_macOS-SPM" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D48C539924A269F500D7A3DD /* Debug */, - D48C539A24A269F500D7A3DD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - -/* Begin XCSwiftPackageProductDependency section */ - D48C53DB24A26E5400D7A3DD /* TPPDF */ = { - isa = XCSwiftPackageProductDependency; - productName = TPPDF; - }; -/* End XCSwiftPackageProductDependency section */ - }; - rootObject = D48C537D24A269F400D7A3DD /* Project object */; -} diff --git a/Example macOS-SwiftPM/Example_macOS-SPM.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example macOS-SwiftPM/Example_macOS-SPM.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/Example macOS-SwiftPM/Example_macOS-SPM.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Example macOS-SwiftPM/Example_macOS-SPM.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example macOS-SwiftPM/Example_macOS-SPM.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Example macOS-SwiftPM/Example_macOS-SPM.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Example macOS-SwiftPM/Example_macOS-SPM.xcodeproj/xcshareddata/xcschemes/Example macOS (SPM).xcscheme b/Example macOS-SwiftPM/Example_macOS-SPM.xcodeproj/xcshareddata/xcschemes/Example macOS (SPM).xcscheme deleted file mode 100644 index 42277a90a..000000000 --- a/Example macOS-SwiftPM/Example_macOS-SPM.xcodeproj/xcshareddata/xcschemes/Example macOS (SPM).xcscheme +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example-SPM/Example-SPM.yml b/Example-SPM/Example-SPM.yml new file mode 100644 index 000000000..4555b81cc --- /dev/null +++ b/Example-SPM/Example-SPM.yml @@ -0,0 +1,73 @@ +name: Example-SPM +options: + bundleIdPrefix: com.techprimate.TPPDF + deploymentTarget: + iOS: "16.0" + macOS: "12.0" + tvOS: "16.0" + watchOS: "9.0" + visionOS: "1.0" +fileGroups: + - Example-SPM.yml +configs: + Debug: debug + Release: release +packages: + TPPDF: + path: .. +targets: + Example-SPM: + type: application + platform: auto + sources: + - path: Example + - path: ../Shared/Examples + - path: ../Shared/Util + - path: ../Shared/Data + buildPhase: resources + dependencies: + - package: TPPDF + product: TPPDF + settings: + base: + SDKROOT: auto + SUPPORTED_PLATFORMS: "iphoneos iphonesimulator macosx appletvos appletvsimulator watchos watchsimulator xros xrsimulator" + SUPPORTS_MACCATALYST: YES + DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER: YES + TARGETED_DEVICE_FAMILY: "1,2" + "TARGETED_DEVICE_FAMILY[sdk=appletv*]": "3" + "TARGETED_DEVICE_FAMILY[sdk=watch*]": "4" + "TARGETED_DEVICE_FAMILY[sdk=xr*]": "7" + IPHONEOS_DEPLOYMENT_TARGET: "16.0" + MACOSX_DEPLOYMENT_TARGET: "12.0" + TVOS_DEPLOYMENT_TARGET: "16.0" + WATCHOS_DEPLOYMENT_TARGET: "9.0" + XROS_DEPLOYMENT_TARGET: "1.0" + SWIFT_VERSION: "5.0" + PRODUCT_BUNDLE_IDENTIFIER: com.techprimate.TPPDF.Example + GENERATE_INFOPLIST_FILE: YES + INFOPLIST_KEY_CFBundleDisplayName: TPPDF Examples + INFOPLIST_KEY_UILaunchScreen_Generation: YES + INFOPLIST_KEY_UIApplicationSceneManifest_Generation: YES + "INFOPLIST_KEY_WKApplication[sdk=watch*]": YES + "INFOPLIST_KEY_WKWatchOnly[sdk=watch*]": YES + MARKETING_VERSION: "1.0" + CURRENT_PROJECT_VERSION: "1" + CODE_SIGN_STYLE: Automatic + "CODE_SIGN_IDENTITY[sdk=macosx*]": "-" + ENABLE_APP_SANDBOX: YES + ENABLE_HARDENED_RUNTIME: YES + ENABLE_USER_SELECTED_FILES: readonly + ENABLE_PREVIEWS: YES + ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon +schemes: + Example-SPM: + build: + targets: + Example-SPM: all + run: + config: Debug + profile: + config: Release + archive: + config: Release diff --git a/Example macOS-SwiftPM/Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example-SPM/Example/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Example macOS-SwiftPM/Example/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Example-SPM/Example/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/Example macOS-SwiftPM/Example/Assets.xcassets/Contents.json b/Example-SPM/Example/Assets.xcassets/Contents.json similarity index 100% rename from Example macOS-SwiftPM/Example/Assets.xcassets/Contents.json rename to Example-SPM/Example/Assets.xcassets/Contents.json diff --git a/Example-SPM/Example/ExampleApp.swift b/Example-SPM/Example/ExampleApp.swift new file mode 100644 index 000000000..7f8a6c677 --- /dev/null +++ b/Example-SPM/Example/ExampleApp.swift @@ -0,0 +1,18 @@ +// +// ExampleApp.swift +// TPPDF +// +// Created by Philip Niedertscheider on 23.06.2020. +// Copyright © 2016-2026 techprimate GmbH. All rights reserved. +// + +import SwiftUI + +@main +struct ExampleApp: App { + var body: some Scene { + WindowGroup("TPPDF Examples") { + ContentView() + } + } +} diff --git a/Example macOS-SwiftPM/Example/Preview Content/Preview Assets.xcassets/Contents.json b/Example-SPM/Example/Preview Content/Preview Assets.xcassets/Contents.json similarity index 100% rename from Example macOS-SwiftPM/Example/Preview Content/Preview Assets.xcassets/Contents.json rename to Example-SPM/Example/Preview Content/Preview Assets.xcassets/Contents.json diff --git a/Example-SPM/Example/UI/ContentView.swift b/Example-SPM/Example/UI/ContentView.swift new file mode 100644 index 000000000..5887c7ab7 --- /dev/null +++ b/Example-SPM/Example/UI/ContentView.swift @@ -0,0 +1,53 @@ +// +// ContentView.swift +// TPPDF +// +// Created by Philip Niedertscheider on 23.06.2020. +// Copyright © 2016-2026 techprimate GmbH. All rights reserved. +// + +import SwiftUI +import TPPDF + +struct ContentView: View { + var body: some View { + #if os(watchOS) || os(tvOS) + NavigationStack { + examplesList + } + #else + NavigationView { + examplesList + #if os(macOS) + .frame(minWidth: 200, idealWidth: 250, maxWidth: 300) + .listStyle(SidebarListStyle()) + #endif + + DetailView(example: Examples.defaultFactory) + .frame(minWidth: 0, maxWidth: .infinity, + minHeight: 0, maxHeight: .infinity, + alignment: .topLeading) + } + .frame(maxWidth: .infinity, maxHeight: .infinity) + #endif + } + + private var examplesList: some View { + List { + ForEach(Examples.factories, id: \.header) { section in + Section(header: Text(section.header)) { + ForEach(section.examples, id: \.name) { example in + NavigationLink(example.name, destination: DetailView(example: example)) + } + } + } + } + .navigationTitle("Examples") + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/Example-SPM/Example/UI/DetailView.swift b/Example-SPM/Example/UI/DetailView.swift new file mode 100644 index 000000000..7b5a331dc --- /dev/null +++ b/Example-SPM/Example/UI/DetailView.swift @@ -0,0 +1,128 @@ +// +// DetailView.swift +// TPPDF +// +// Created by Philip Niedertscheider on 24.06.2020. +// Copyright © 2016-2026 techprimate GmbH. All rights reserved. +// + +import SwiftUI +import TPPDF + +struct DetailView: View { + let example: Example + @State private var url: URL? + @State private var observer: NSKeyValueObservation? + @State private var progressValue: Double = 0 + @State private var isGenerating = false + @State private var errorMessage: String? + @State private var debug = false + + var body: some View { + #if os(watchOS) + ScrollView { + detailContent + } + #else + detailContent + #endif + } + + private var detailContent: some View { + VStack(alignment: .leading, spacing: 10) { + Text(example.name) + .font(.headline) + + #if os(watchOS) + VStack { + generationControls + } + #else + HStack { + generationControls + } + #endif + + if let errorMessage = errorMessage { + Text("Generation failed: \(errorMessage)") + .foregroundColor(.red) + } + + #if os(watchOS) + if let url = url { + Text("PDF generated") + Text(url.lastPathComponent) + .font(.caption) + .lineLimit(2) + } else if isGenerating { + Text("Generating PDF…") + } + #else + PDFKitRepresentedView(url: url) + #endif + } + .padding(10) + .onAppear { + generatePDF(force: false, debug: debug) + } + } + + @ViewBuilder + private var generationControls: some View { + Toggle("Debug Mode", isOn: Binding( + get: { debug }, + set: { value in + debug = value + generatePDF(force: true, debug: value) + } + )) + .disabled(isGenerating) + Button("Refresh") { + generatePDF(force: true, debug: debug) + } + .disabled(isGenerating) + ProgressView(value: progressValue) + } + + private func generatePDF(force: Bool, debug: Bool) { + guard !isGenerating, url == nil || force else { + return + } + isGenerating = true + errorMessage = nil + progressValue = 0 + + let documents = example.factory.generateDocument() + var generator: PDFGeneratorProtocol + if documents.count == 1 { + generator = PDFGenerator(document: documents[0]) + } else { + generator = PDFMultiDocumentGenerator(documents: documents) + } + generator.debug = debug + + observer = generator.progress.observe(\.completedUnitCount) { progress, _ in + let value = progress.fractionCompleted + DispatchQueue.main.async { + progressValue = value + } + } + + DispatchQueue.global(qos: .background).async { + do { + let generatedURL = try generator.generateURL(filename: "output-\(UUID().uuidString).pdf") + DispatchQueue.main.async { + url = generatedURL + progressValue = 1 + isGenerating = false + } + } catch { + let message = error.localizedDescription + DispatchQueue.main.async { + errorMessage = message + isGenerating = false + } + } + } + } +} diff --git a/Example-SPM/Example/UI/PDFView+SwiftUI.swift b/Example-SPM/Example/UI/PDFView+SwiftUI.swift new file mode 100644 index 000000000..4b83f4d76 --- /dev/null +++ b/Example-SPM/Example/UI/PDFView+SwiftUI.swift @@ -0,0 +1,42 @@ +// +// PDFView+SwiftUI.swift +// TPPDF +// +// Created by Philip Niedertscheider on 23.06.2020. +// Copyright © 2016-2026 techprimate GmbH. All rights reserved. +// + +#if !os(watchOS) +import PDFKit +import SwiftUI + +#if os(iOS) || os(tvOS) || os(visionOS) +struct PDFKitRepresentedView: UIViewRepresentable { + var url: URL? + + func makeUIView(context _: Context) -> PDFView { + let pdfView = PDFView() + pdfView.autoScales = true + return pdfView + } + + func updateUIView(_ pdfView: PDFView, context _: Context) { + pdfView.document = url.flatMap { PDFDocument(url: $0) } + } +} +#elseif os(macOS) +struct PDFKitRepresentedView: NSViewRepresentable { + var url: URL? + + func makeNSView(context _: Context) -> PDFView { + let pdfView = PDFView() + pdfView.autoScales = true + return pdfView + } + + func updateNSView(_ pdfView: PDFView, context _: Context) { + pdfView.document = url.flatMap { PDFDocument(url: $0) } + } +} +#endif +#endif diff --git a/Makefile b/Makefile index 12e66bd98..7b06f3918 100644 --- a/Makefile +++ b/Makefile @@ -88,6 +88,19 @@ install-bundler: install-ci: @$(MAKE) --no-print-directory install-dependencies +## Generate all example projects +# +# Invokes all individual generate targets to ensure all example projects are up-to-date. +.PHONY: generate +generate: generate-example-spm + +## Generate the shared Swift Package Manager example project +# +# Regenerates Example-SPM.xcodeproj from its XcodeGen specification. +.PHONY: generate-example-spm +generate-example-spm: + xcodegen generate --spec Example-SPM/Example-SPM.yml + # ============================================================================ # BUILDING # ============================================================================ @@ -173,6 +186,82 @@ build-watchos: build-xcframework: ./scripts/create-xcframework.sh +# ============================================================================ +# EXAMPLES +# ============================================================================ + +## Build the Swift Package Manager example for macOS +# +# Builds the shared example app without requiring signing credentials. +.PHONY: build-example-spm-macos +build-example-spm-macos: generate-example-spm + set -o pipefail && xcrun xcodebuild \ + -project Example-SPM/Example-SPM.xcodeproj \ + -scheme Example-SPM \ + -destination 'platform=macOS' \ + -derivedDataPath build/Example-SPM \ + CODE_SIGNING_ALLOWED=NO build | xcbeautify --preserve-unbeautified + +## Build the Swift Package Manager example for iOS Simulator +# +# Builds the shared example app for any available iOS Simulator SDK. +.PHONY: build-example-spm-ios +build-example-spm-ios: generate-example-spm + set -o pipefail && xcrun xcodebuild \ + -project Example-SPM/Example-SPM.xcodeproj \ + -scheme Example-SPM \ + -destination 'generic/platform=iOS Simulator' \ + -derivedDataPath build/Example-SPM \ + CODE_SIGNING_ALLOWED=NO build | xcbeautify --preserve-unbeautified + +## Build the Swift Package Manager example for Mac Catalyst +# +# Builds the shared example app without requiring signing credentials. +.PHONY: build-example-spm-maccatalyst +build-example-spm-maccatalyst: generate-example-spm + set -o pipefail && xcrun xcodebuild \ + -project Example-SPM/Example-SPM.xcodeproj \ + -scheme Example-SPM \ + -destination 'generic/platform=macOS,variant=Mac Catalyst' \ + -derivedDataPath build/Example-SPM-maccatalyst \ + CODE_SIGNING_ALLOWED=NO build | xcbeautify --preserve-unbeautified + +## Build the Swift Package Manager example for tvOS Simulator +# +# Builds the shared example app without requiring signing credentials. +.PHONY: build-example-spm-tvos +build-example-spm-tvos: generate-example-spm + set -o pipefail && xcrun xcodebuild \ + -project Example-SPM/Example-SPM.xcodeproj \ + -scheme Example-SPM \ + -destination 'generic/platform=tvOS Simulator' \ + -derivedDataPath build/Example-SPM-tvos \ + CODE_SIGNING_ALLOWED=NO build | xcbeautify --preserve-unbeautified + +## Build the Swift Package Manager example for watchOS Simulator +# +# Builds the shared example app without requiring signing credentials. +.PHONY: build-example-spm-watchos +build-example-spm-watchos: generate-example-spm + set -o pipefail && xcrun xcodebuild \ + -project Example-SPM/Example-SPM.xcodeproj \ + -scheme Example-SPM \ + -destination 'generic/platform=watchOS Simulator' \ + -derivedDataPath build/Example-SPM-watchos \ + CODE_SIGNING_ALLOWED=NO build | xcbeautify --preserve-unbeautified + +## Build the Swift Package Manager example for visionOS Simulator +# +# Builds the shared example app without requiring signing credentials. +.PHONY: build-example-spm-visionos +build-example-spm-visionos: generate-example-spm + set -o pipefail && xcrun xcodebuild \ + -project Example-SPM/Example-SPM.xcodeproj \ + -scheme Example-SPM \ + -destination 'generic/platform=visionOS Simulator' \ + -derivedDataPath build/Example-SPM-visionos \ + CODE_SIGNING_ALLOWED=NO build | xcbeautify --preserve-unbeautified + # ============================================================================ # TESTING # ============================================================================ diff --git a/README.md b/README.md index 5a426aaba..ef071fae0 100644 --- a/README.md +++ b/README.md @@ -114,8 +114,12 @@ For everything else, please see [Communication](#communication) and [this messag Take a look at the [Getting Started Guide](https://github.com/techprimate/TPPDF/blob/main/Documentation/Usage.md#getting-started) or checkout the Examples (using of one of the following): -- Clone the repository and open the `Examples.xcworkspace` -- Run the `Example macOS (SPM)` or `Example macOS (iOS)` +- Clone the repository and install XcodeGen with `brew bundle`. +- Run `make generate-example-spm`, then open `Example-SPM/Example-SPM.xcodeproj`. +- Run the `Example-SPM` scheme on iOS 16+, macOS 12+, Mac Catalyst, tvOS 16+, visionOS 1+, or watchOS 9+. +- iOS, macOS, Mac Catalyst, tvOS, and visionOS display generated PDFs. watchOS reports generation success or errors without a PDF viewer. +- Edit `Example-SPM/Example-SPM.yml` to change project configuration, then regenerate it. The generated Xcode project is not committed. +- Build from the command line with `make build-example-spm-`, where `` is `ios`, `macos`, `maccatalyst`, `tvos`, `watchos`, or `visionos`. ## Apps using TPPDF