From 4571ad06b9fd12af61b7997f8fe55df1881fa1db Mon Sep 17 00:00:00 2001 From: MARTIN Denis Date: Thu, 25 Nov 2021 12:19:38 +0100 Subject: [PATCH] Demos update --- Demo-cocoapods/Demo/ViewController.swift | 8 ++ Demo-cocoapods/Podfile | 2 +- Demo-spm/Demo.xcodeproj/project.pbxproj | 20 ++-- .../xcshareddata/swiftpm/Package.resolved | 25 ----- .../xcshareddata/xcschemes/Demo.xcscheme | 98 +++++++++++++++++++ Demo-spm/Demo/ViewController.swift | 8 ++ Demo/Demo.xcodeproj/project.pbxproj | 14 +-- Demo/Demo/ViewController.swift | 8 ++ XlsxReaderWriter.xcodeproj/project.pbxproj | 2 - 9 files changed, 135 insertions(+), 50 deletions(-) delete mode 100644 Demo-spm/Demo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 Demo-spm/Demo.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme diff --git a/Demo-cocoapods/Demo/ViewController.swift b/Demo-cocoapods/Demo/ViewController.swift index 9e5bfeb..580644e 100644 --- a/Demo-cocoapods/Demo/ViewController.swift +++ b/Demo-cocoapods/Demo/ViewController.swift @@ -35,6 +35,14 @@ class ViewController: UIViewController { third.text = worksheet.cell(forCellReference: "B4").stringValue() + let paths: Array = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true) as Array + + let fullPath: String = paths[0] + "/testSwiftOpenClose.xlsx" + try? FileManager.default.removeItem(at: URL(fileURLWithPath: fullPath)) + odp.save(as: fullPath) + + print(fullPath) + } diff --git a/Demo-cocoapods/Podfile b/Demo-cocoapods/Podfile index dc4e573..9e02597 100644 --- a/Demo-cocoapods/Podfile +++ b/Demo-cocoapods/Podfile @@ -2,7 +2,7 @@ target 'Demo' do platform :ios, '10.2' - pod 'XlsxReaderWriter', path: '../XlsxReaderWriter.podspec' + pod 'XlsxReaderWriter', '~> 2.5', :source => 'https://github.com/charlymr/XlsxReaderWriter-Podspecs.git' use_frameworks! diff --git a/Demo-spm/Demo.xcodeproj/project.pbxproj b/Demo-spm/Demo.xcodeproj/project.pbxproj index ec8fe79..91c54fb 100644 --- a/Demo-spm/Demo.xcodeproj/project.pbxproj +++ b/Demo-spm/Demo.xcodeproj/project.pbxproj @@ -7,13 +7,13 @@ objects = { /* Begin PBXBuildFile section */ + 61AF3BE4274FA8770099176F /* XlsxReaderWriter in Frameworks */ = {isa = PBXBuildFile; productRef = 61AF3BE3274FA8770099176F /* XlsxReaderWriter */; }; 826068722049437A00116455 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 826068712049437A00116455 /* AppDelegate.swift */; }; 826068742049437A00116455 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 826068732049437A00116455 /* ViewController.swift */; }; 826068772049437A00116455 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 826068752049437A00116455 /* Main.storyboard */; }; 826068792049437B00116455 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 826068782049437A00116455 /* Assets.xcassets */; }; 8260687C2049437B00116455 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8260687A2049437B00116455 /* LaunchScreen.storyboard */; }; 82904D432049483500760D35 /* testWorkbook.xlsx in Resources */ = {isa = PBXBuildFile; fileRef = 82904D422049483500760D35 /* testWorkbook.xlsx */; }; - 82D7BB7726B7EAF1006F5077 /* XlsxReaderWriter in Frameworks */ = {isa = PBXBuildFile; productRef = 82D7BB7626B7EAF1006F5077 /* XlsxReaderWriter */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -45,7 +45,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 82D7BB7726B7EAF1006F5077 /* XlsxReaderWriter in Frameworks */, + 61AF3BE4274FA8770099176F /* XlsxReaderWriter in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -109,7 +109,7 @@ ); name = Demo; packageProductDependencies = ( - 82D7BB7626B7EAF1006F5077 /* XlsxReaderWriter */, + 61AF3BE3274FA8770099176F /* XlsxReaderWriter */, ); productName = Demo; productReference = 8260686E2049437A00116455 /* Demo.app */; @@ -142,7 +142,7 @@ ); mainGroup = 826068652049437A00116455; packageReferences = ( - 82D7BB7526B7EAF1006F5077 /* XCRemoteSwiftPackageReference "XlsxReaderWriter" */, + 61AF3BE2274FA8770099176F /* XCRemoteSwiftPackageReference "XlsxReaderWriter" */, ); productRefGroup = 8260686F2049437A00116455 /* Products */; projectDirPath = ""; @@ -384,24 +384,24 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - 82D7BB7526B7EAF1006F5077 /* XCRemoteSwiftPackageReference "XlsxReaderWriter" */ = { + 61AF3BE2274FA8770099176F /* XCRemoteSwiftPackageReference "XlsxReaderWriter" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/charlymr/XlsxReaderWriter.git"; + repositoryURL = "https://github.com/charlymr/XlsxReaderWriter"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 2.4.3; + minimumVersion = 2.5.0; }; }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - 8201DE4126B52FE800ABA5EF /* XlsxReaderWriter */ = { + 61AF3BE3274FA8770099176F /* XlsxReaderWriter */ = { isa = XCSwiftPackageProductDependency; + package = 61AF3BE2274FA8770099176F /* XCRemoteSwiftPackageReference "XlsxReaderWriter" */; productName = XlsxReaderWriter; }; - 82D7BB7626B7EAF1006F5077 /* XlsxReaderWriter */ = { + 8201DE4126B52FE800ABA5EF /* XlsxReaderWriter */ = { isa = XCSwiftPackageProductDependency; - package = 82D7BB7526B7EAF1006F5077 /* XCRemoteSwiftPackageReference "XlsxReaderWriter" */; productName = XlsxReaderWriter; }; /* End XCSwiftPackageProductDependency section */ diff --git a/Demo-spm/Demo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Demo-spm/Demo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 7b6cbed..0000000 --- a/Demo-spm/Demo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,25 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "XlsxReaderWriter", - "repositoryURL": "https://github.com/charlymr/XlsxReaderWriter.git", - "state": { - "branch": null, - "revision": "d4a1f74d7c28d40113ebe2397adfdc9304f91a5f", - "version": "2.4.2" - } - }, - { - "package": "ZipArchive", - "repositoryURL": "https://github.com/ZipArchive/ZipArchive", - "state": { - "branch": null, - "revision": "a6f9d8ffa18c6d562554d0b305696d4de1a0d161", - "version": "2.3.0" - } - } - ] - }, - "version": 1 -} diff --git a/Demo-spm/Demo.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme b/Demo-spm/Demo.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme new file mode 100644 index 0000000..5d3d329 --- /dev/null +++ b/Demo-spm/Demo.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Demo-spm/Demo/ViewController.swift b/Demo-spm/Demo/ViewController.swift index 9e5bfeb..36a414b 100644 --- a/Demo-spm/Demo/ViewController.swift +++ b/Demo-spm/Demo/ViewController.swift @@ -35,7 +35,15 @@ class ViewController: UIViewController { third.text = worksheet.cell(forCellReference: "B4").stringValue() + let paths: Array = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true) as Array + let fullPath: String = paths[0] + "/testSwiftOpenClose.xlsx" + try? FileManager.default.removeItem(at: URL(fileURLWithPath: fullPath)) + odp.save(as: fullPath) + + print(fullPath) + + } diff --git a/Demo/Demo.xcodeproj/project.pbxproj b/Demo/Demo.xcodeproj/project.pbxproj index 4b311be..46486a0 100644 --- a/Demo/Demo.xcodeproj/project.pbxproj +++ b/Demo/Demo.xcodeproj/project.pbxproj @@ -8,7 +8,6 @@ /* Begin PBXBuildFile section */ 6119EC0A26F50831002A9B4A /* XlsxReaderWriter.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6119EC0826F50831002A9B4A /* XlsxReaderWriter.xcframework */; }; - 6119EC0B26F50831002A9B4A /* ZipArchive.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6119EC0926F50831002A9B4A /* ZipArchive.xcframework */; }; 826068722049437A00116455 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 826068712049437A00116455 /* AppDelegate.swift */; }; 826068742049437A00116455 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 826068732049437A00116455 /* ViewController.swift */; }; 826068772049437A00116455 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 826068752049437A00116455 /* Main.storyboard */; }; @@ -32,7 +31,6 @@ /* Begin PBXFileReference section */ 6119EC0826F50831002A9B4A /* XlsxReaderWriter.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = XlsxReaderWriter.xcframework; path = Carthage/Build/XlsxReaderWriter.xcframework; sourceTree = ""; }; - 6119EC0926F50831002A9B4A /* ZipArchive.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = ZipArchive.xcframework; path = Carthage/Build/ZipArchive.xcframework; sourceTree = ""; }; 8260686E2049437A00116455 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 826068712049437A00116455 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 826068732049437A00116455 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -48,7 +46,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 6119EC0B26F50831002A9B4A /* ZipArchive.xcframework in Frameworks */, 6119EC0A26F50831002A9B4A /* XlsxReaderWriter.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -61,7 +58,6 @@ children = ( 82904D422049483500760D35 /* testWorkbook.xlsx */, 6119EC0826F50831002A9B4A /* XlsxReaderWriter.xcframework */, - 6119EC0926F50831002A9B4A /* ZipArchive.xcframework */, 826068702049437A00116455 /* Demo */, 8260686F2049437A00116455 /* Products */, ); @@ -311,10 +307,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = Demo/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -333,10 +326,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = Demo/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/Demo/Demo/ViewController.swift b/Demo/Demo/ViewController.swift index 9e5bfeb..36a414b 100644 --- a/Demo/Demo/ViewController.swift +++ b/Demo/Demo/ViewController.swift @@ -35,7 +35,15 @@ class ViewController: UIViewController { third.text = worksheet.cell(forCellReference: "B4").stringValue() + let paths: Array = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true) as Array + let fullPath: String = paths[0] + "/testSwiftOpenClose.xlsx" + try? FileManager.default.removeItem(at: URL(fileURLWithPath: fullPath)) + odp.save(as: fullPath) + + print(fullPath) + + } diff --git a/XlsxReaderWriter.xcodeproj/project.pbxproj b/XlsxReaderWriter.xcodeproj/project.pbxproj index 895268e..e3f4303 100644 --- a/XlsxReaderWriter.xcodeproj/project.pbxproj +++ b/XlsxReaderWriter.xcodeproj/project.pbxproj @@ -678,7 +678,6 @@ 8265BC302041C4BE004A2A7D /* XlsxReaderXMLDictionary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XlsxReaderXMLDictionary.m; sourceTree = ""; }; 827A14DE26B7BC03008EB8C2 /* BRAHyperlink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BRAHyperlink.m; sourceTree = ""; }; 827A14E326B7BC1F008EB8C2 /* BRAHyperlink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BRAHyperlink.h; sourceTree = ""; }; - 8289AA5C2041CD4A00E00603 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = SOURCE_ROOT; }; 8289AA5D2041D98C00E00603 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; 8289AA632041D9F900E00603 /* XlsxReaderWriter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = XlsxReaderWriter.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8289AAD620420FFC00E00603 /* XlsxReaderWriter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = XlsxReaderWriter.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -751,7 +750,6 @@ isa = PBXGroup; children = ( 455542A31C48DE4D00EAB8FE /* XlsxReaderWriter.podspec */, - 8289AA5C2041CD4A00E00603 /* Cartfile */, 455542A21C48DE4D00EAB8FE /* README.md */, 8289AA5D2041D98C00E00603 /* CHANGELOG.md */, 8287359926B5214B00C4DC60 /* Sources */,