diff --git a/.gitignore b/.gitignore index 90c25a5..7a43b81 100644 --- a/.gitignore +++ b/.gitignore @@ -76,6 +76,12 @@ Examples/ObjectiveC/Demo/xcodebuild.log Examples/ObjectiveC/build Examples/ObjectiveC/Pods/* +Examples/MacOS/SampleMacSwift/SampleMacSwift.xcworkspace/* +Examples/MacOS/SampleMacSwift/xcuserdata +Examples/MacOS/SampleMacSwift/xcodebuild.log +Examples/MacOS/SampleMacSwift/build +Examples/MacOS/SampleMacSwift/Pods/* + Examples/CarthageExport/Carthage/* *.lock diff --git a/Examples/MacOS/SampleMacSwift/Podfile b/Examples/MacOS/SampleMacSwift/Podfile new file mode 100644 index 0000000..9530c42 --- /dev/null +++ b/Examples/MacOS/SampleMacSwift/Podfile @@ -0,0 +1,24 @@ +# Uncomment this line to define a global platform for your project + +target 'SampleMacSwift' do + # Comment this line if you're not using Swift and don't want to use dynamic frameworks + use_frameworks! + + pod 'SwiftLoggly’ + # pod 'SwiftCSVExport' + + pod 'SwiftCSVExport', :git => 'https://github.com/vigneshuvi/SwiftCSVExport.git', :tag => '2.1.0' + + # Pods for SampleMacSwift + + target 'SampleMacSwiftTests' do + inherit! :search_paths + # Pods for testing + end + + target 'SampleMacSwiftUITests' do + inherit! :search_paths + # Pods for testing + end + +end diff --git a/Examples/MacOS/SampleMacSwift/SampleMacSwift.xcodeproj/project.pbxproj b/Examples/MacOS/SampleMacSwift/SampleMacSwift.xcodeproj/project.pbxproj new file mode 100644 index 0000000..188e126 --- /dev/null +++ b/Examples/MacOS/SampleMacSwift/SampleMacSwift.xcodeproj/project.pbxproj @@ -0,0 +1,728 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 034E8C95AA2F460DCD6A9D3F /* Pods_SampleMacSwiftTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 658C5B332D6733E699EE18CA /* Pods_SampleMacSwiftTests.framework */; }; + D00667F024FC3783AE93BF69 /* Pods_SampleMacSwiftUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F4D0029A76F6E44EF9E917AF /* Pods_SampleMacSwiftUITests.framework */; }; + DB1153A4241912F700AD75AC /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB1153A3241912F700AD75AC /* WebKit.framework */; }; + DBC18DDB24190459009D8047 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBC18DDA24190459009D8047 /* AppDelegate.swift */; }; + DBC18DDD24190459009D8047 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBC18DDC24190459009D8047 /* ViewController.swift */; }; + DBC18DDF2419045A009D8047 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DBC18DDE2419045A009D8047 /* Assets.xcassets */; }; + DBC18DE22419045A009D8047 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DBC18DE02419045A009D8047 /* Main.storyboard */; }; + DBC18DEE2419045B009D8047 /* SampleMacSwiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBC18DED2419045B009D8047 /* SampleMacSwiftTests.swift */; }; + DBC18DF92419045B009D8047 /* SampleMacSwiftUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBC18DF82419045B009D8047 /* SampleMacSwiftUITests.swift */; }; + DBC18E082419080C009D8047 /* test.json in Resources */ = {isa = PBXBuildFile; fileRef = DBC18E072419080C009D8047 /* test.json */; }; + E4DE14D03144330BF0330DB9 /* Pods_SampleMacSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 409FCE6C010398FF77301226 /* Pods_SampleMacSwift.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + DBC18DEA2419045B009D8047 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = DBC18DCF24190459009D8047 /* Project object */; + proxyType = 1; + remoteGlobalIDString = DBC18DD624190459009D8047; + remoteInfo = SampleMacSwift; + }; + DBC18DF52419045B009D8047 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = DBC18DCF24190459009D8047 /* Project object */; + proxyType = 1; + remoteGlobalIDString = DBC18DD624190459009D8047; + remoteInfo = SampleMacSwift; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 2992B6915BCB9FDD715246B7 /* Pods-SampleMacSwiftTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SampleMacSwiftTests.release.xcconfig"; path = "Target Support Files/Pods-SampleMacSwiftTests/Pods-SampleMacSwiftTests.release.xcconfig"; sourceTree = ""; }; + 3452C57AAC3533A508950166 /* Pods-SampleMacSwiftUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SampleMacSwiftUITests.release.xcconfig"; path = "Target Support Files/Pods-SampleMacSwiftUITests/Pods-SampleMacSwiftUITests.release.xcconfig"; sourceTree = ""; }; + 409FCE6C010398FF77301226 /* Pods_SampleMacSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SampleMacSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 658C5B332D6733E699EE18CA /* Pods_SampleMacSwiftTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SampleMacSwiftTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8C8720DF9FD6619106973064 /* Pods-SampleMacSwiftTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SampleMacSwiftTests.debug.xcconfig"; path = "Target Support Files/Pods-SampleMacSwiftTests/Pods-SampleMacSwiftTests.debug.xcconfig"; sourceTree = ""; }; + DB1153A3241912F700AD75AC /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; + DBC18DD724190459009D8047 /* SampleMacSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SampleMacSwift.app; sourceTree = BUILT_PRODUCTS_DIR; }; + DBC18DDA24190459009D8047 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + DBC18DDC24190459009D8047 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + DBC18DDE2419045A009D8047 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + DBC18DE12419045A009D8047 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + DBC18DE32419045A009D8047 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DBC18DE42419045A009D8047 /* SampleMacSwift.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SampleMacSwift.entitlements; sourceTree = ""; }; + DBC18DE92419045B009D8047 /* SampleMacSwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SampleMacSwiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + DBC18DED2419045B009D8047 /* SampleMacSwiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleMacSwiftTests.swift; sourceTree = ""; }; + DBC18DEF2419045B009D8047 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DBC18DF42419045B009D8047 /* SampleMacSwiftUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SampleMacSwiftUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + DBC18DF82419045B009D8047 /* SampleMacSwiftUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleMacSwiftUITests.swift; sourceTree = ""; }; + DBC18DFA2419045B009D8047 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DBC18E072419080C009D8047 /* test.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = test.json; path = SampleMacSwift/Resource/test.json; sourceTree = SOURCE_ROOT; }; + E68BAC9A266A7EBF50C34B60 /* Pods-SampleMacSwift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SampleMacSwift.debug.xcconfig"; path = "Target Support Files/Pods-SampleMacSwift/Pods-SampleMacSwift.debug.xcconfig"; sourceTree = ""; }; + EE26BAD177C8C9F5AE7C57EB /* Pods-SampleMacSwift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SampleMacSwift.release.xcconfig"; path = "Target Support Files/Pods-SampleMacSwift/Pods-SampleMacSwift.release.xcconfig"; sourceTree = ""; }; + F4D0029A76F6E44EF9E917AF /* Pods_SampleMacSwiftUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SampleMacSwiftUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F8F5F6C1E9384FDD37A0CCA1 /* Pods-SampleMacSwiftUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SampleMacSwiftUITests.debug.xcconfig"; path = "Target Support Files/Pods-SampleMacSwiftUITests/Pods-SampleMacSwiftUITests.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + DBC18DD424190459009D8047 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DB1153A4241912F700AD75AC /* WebKit.framework in Frameworks */, + E4DE14D03144330BF0330DB9 /* Pods_SampleMacSwift.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DBC18DE62419045B009D8047 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 034E8C95AA2F460DCD6A9D3F /* Pods_SampleMacSwiftTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DBC18DF12419045B009D8047 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D00667F024FC3783AE93BF69 /* Pods_SampleMacSwiftUITests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 876D3991274EDBA8F18BF147 /* Pods */ = { + isa = PBXGroup; + children = ( + E68BAC9A266A7EBF50C34B60 /* Pods-SampleMacSwift.debug.xcconfig */, + EE26BAD177C8C9F5AE7C57EB /* Pods-SampleMacSwift.release.xcconfig */, + 8C8720DF9FD6619106973064 /* Pods-SampleMacSwiftTests.debug.xcconfig */, + 2992B6915BCB9FDD715246B7 /* Pods-SampleMacSwiftTests.release.xcconfig */, + F8F5F6C1E9384FDD37A0CCA1 /* Pods-SampleMacSwiftUITests.debug.xcconfig */, + 3452C57AAC3533A508950166 /* Pods-SampleMacSwiftUITests.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 9EC5F41F5F9617AA2CEA01C6 /* Frameworks */ = { + isa = PBXGroup; + children = ( + DB1153A3241912F700AD75AC /* WebKit.framework */, + 409FCE6C010398FF77301226 /* Pods_SampleMacSwift.framework */, + 658C5B332D6733E699EE18CA /* Pods_SampleMacSwiftTests.framework */, + F4D0029A76F6E44EF9E917AF /* Pods_SampleMacSwiftUITests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + DBC18DCE24190459009D8047 = { + isa = PBXGroup; + children = ( + DBC18DD924190459009D8047 /* SampleMacSwift */, + DBC18DEC2419045B009D8047 /* SampleMacSwiftTests */, + DBC18DF72419045B009D8047 /* SampleMacSwiftUITests */, + DBC18DD824190459009D8047 /* Products */, + 876D3991274EDBA8F18BF147 /* Pods */, + 9EC5F41F5F9617AA2CEA01C6 /* Frameworks */, + ); + sourceTree = ""; + }; + DBC18DD824190459009D8047 /* Products */ = { + isa = PBXGroup; + children = ( + DBC18DD724190459009D8047 /* SampleMacSwift.app */, + DBC18DE92419045B009D8047 /* SampleMacSwiftTests.xctest */, + DBC18DF42419045B009D8047 /* SampleMacSwiftUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + DBC18DD924190459009D8047 /* SampleMacSwift */ = { + isa = PBXGroup; + children = ( + DBC18E092419081E009D8047 /* Resource */, + DBC18DDA24190459009D8047 /* AppDelegate.swift */, + DBC18DDC24190459009D8047 /* ViewController.swift */, + DBC18DDE2419045A009D8047 /* Assets.xcassets */, + DBC18DE02419045A009D8047 /* Main.storyboard */, + DBC18DE32419045A009D8047 /* Info.plist */, + DBC18DE42419045A009D8047 /* SampleMacSwift.entitlements */, + ); + path = SampleMacSwift; + sourceTree = ""; + }; + DBC18DEC2419045B009D8047 /* SampleMacSwiftTests */ = { + isa = PBXGroup; + children = ( + DBC18DED2419045B009D8047 /* SampleMacSwiftTests.swift */, + DBC18DEF2419045B009D8047 /* Info.plist */, + ); + path = SampleMacSwiftTests; + sourceTree = ""; + }; + DBC18DF72419045B009D8047 /* SampleMacSwiftUITests */ = { + isa = PBXGroup; + children = ( + DBC18DF82419045B009D8047 /* SampleMacSwiftUITests.swift */, + DBC18DFA2419045B009D8047 /* Info.plist */, + ); + path = SampleMacSwiftUITests; + sourceTree = ""; + }; + DBC18E092419081E009D8047 /* Resource */ = { + isa = PBXGroup; + children = ( + DBC18E072419080C009D8047 /* test.json */, + ); + path = Resource; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + DBC18DD624190459009D8047 /* SampleMacSwift */ = { + isa = PBXNativeTarget; + buildConfigurationList = DBC18DFD2419045B009D8047 /* Build configuration list for PBXNativeTarget "SampleMacSwift" */; + buildPhases = ( + A17BF1D2C44F07BF2041BF2D /* [CP] Check Pods Manifest.lock */, + DBC18DD324190459009D8047 /* Sources */, + DBC18DD424190459009D8047 /* Frameworks */, + DBC18DD524190459009D8047 /* Resources */, + 9BBCEFF13D4EA89D3C0E3B11 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SampleMacSwift; + productName = SampleMacSwift; + productReference = DBC18DD724190459009D8047 /* SampleMacSwift.app */; + productType = "com.apple.product-type.application"; + }; + DBC18DE82419045B009D8047 /* SampleMacSwiftTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = DBC18E002419045B009D8047 /* Build configuration list for PBXNativeTarget "SampleMacSwiftTests" */; + buildPhases = ( + 755411BBC85500B3A948FB40 /* [CP] Check Pods Manifest.lock */, + DBC18DE52419045B009D8047 /* Sources */, + DBC18DE62419045B009D8047 /* Frameworks */, + DBC18DE72419045B009D8047 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + DBC18DEB2419045B009D8047 /* PBXTargetDependency */, + ); + name = SampleMacSwiftTests; + productName = SampleMacSwiftTests; + productReference = DBC18DE92419045B009D8047 /* SampleMacSwiftTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + DBC18DF32419045B009D8047 /* SampleMacSwiftUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = DBC18E032419045B009D8047 /* Build configuration list for PBXNativeTarget "SampleMacSwiftUITests" */; + buildPhases = ( + 6B561A555937D58B92A7BBAD /* [CP] Check Pods Manifest.lock */, + DBC18DF02419045B009D8047 /* Sources */, + DBC18DF12419045B009D8047 /* Frameworks */, + DBC18DF22419045B009D8047 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + DBC18DF62419045B009D8047 /* PBXTargetDependency */, + ); + name = SampleMacSwiftUITests; + productName = SampleMacSwiftUITests; + productReference = DBC18DF42419045B009D8047 /* SampleMacSwiftUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + DBC18DCF24190459009D8047 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1130; + LastUpgradeCheck = 1130; + ORGANIZATIONNAME = "Vignesh, Kumar (623-Extern)"; + TargetAttributes = { + DBC18DD624190459009D8047 = { + CreatedOnToolsVersion = 11.3.1; + }; + DBC18DE82419045B009D8047 = { + CreatedOnToolsVersion = 11.3.1; + TestTargetID = DBC18DD624190459009D8047; + }; + DBC18DF32419045B009D8047 = { + CreatedOnToolsVersion = 11.3.1; + TestTargetID = DBC18DD624190459009D8047; + }; + }; + }; + buildConfigurationList = DBC18DD224190459009D8047 /* Build configuration list for PBXProject "SampleMacSwift" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = DBC18DCE24190459009D8047; + productRefGroup = DBC18DD824190459009D8047 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + DBC18DD624190459009D8047 /* SampleMacSwift */, + DBC18DE82419045B009D8047 /* SampleMacSwiftTests */, + DBC18DF32419045B009D8047 /* SampleMacSwiftUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + DBC18DD524190459009D8047 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DBC18DDF2419045A009D8047 /* Assets.xcassets in Resources */, + DBC18DE22419045A009D8047 /* Main.storyboard in Resources */, + DBC18E082419080C009D8047 /* test.json in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DBC18DE72419045B009D8047 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DBC18DF22419045B009D8047 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 6B561A555937D58B92A7BBAD /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SampleMacSwiftUITests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 755411BBC85500B3A948FB40 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SampleMacSwiftTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 9BBCEFF13D4EA89D3C0E3B11 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SampleMacSwift/Pods-SampleMacSwift-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SampleMacSwift/Pods-SampleMacSwift-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SampleMacSwift/Pods-SampleMacSwift-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + A17BF1D2C44F07BF2041BF2D /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SampleMacSwift-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + DBC18DD324190459009D8047 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DBC18DDD24190459009D8047 /* ViewController.swift in Sources */, + DBC18DDB24190459009D8047 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DBC18DE52419045B009D8047 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DBC18DEE2419045B009D8047 /* SampleMacSwiftTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DBC18DF02419045B009D8047 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DBC18DF92419045B009D8047 /* SampleMacSwiftUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + DBC18DEB2419045B009D8047 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DBC18DD624190459009D8047 /* SampleMacSwift */; + targetProxy = DBC18DEA2419045B009D8047 /* PBXContainerItemProxy */; + }; + DBC18DF62419045B009D8047 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DBC18DD624190459009D8047 /* SampleMacSwift */; + targetProxy = DBC18DF52419045B009D8047 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + DBC18DE02419045A009D8047 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + DBC18DE12419045A009D8047 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + DBC18DFB2419045B009D8047 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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_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; + 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; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + DBC18DFC2419045B009D8047 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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_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; + 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; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + DBC18DFE2419045B009D8047 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E68BAC9A266A7EBF50C34B60 /* Pods-SampleMacSwift.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = SampleMacSwift/SampleMacSwift.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = SampleMacSwift/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.vigneshuvi.SampleMacSwift.SampleMacSwift; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + DBC18DFF2419045B009D8047 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = EE26BAD177C8C9F5AE7C57EB /* Pods-SampleMacSwift.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = SampleMacSwift/SampleMacSwift.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = SampleMacSwift/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.vigneshuvi.SampleMacSwift.SampleMacSwift; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + DBC18E012419045B009D8047 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8C8720DF9FD6619106973064 /* Pods-SampleMacSwiftTests.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = SampleMacSwiftTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.15; + PRODUCT_BUNDLE_IDENTIFIER = com.vigneshuvi.SampleMacSwift.SampleMacSwiftTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SampleMacSwift.app/Contents/MacOS/SampleMacSwift"; + }; + name = Debug; + }; + DBC18E022419045B009D8047 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2992B6915BCB9FDD715246B7 /* Pods-SampleMacSwiftTests.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = SampleMacSwiftTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.15; + PRODUCT_BUNDLE_IDENTIFIER = com.vigneshuvi.SampleMacSwift.SampleMacSwiftTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SampleMacSwift.app/Contents/MacOS/SampleMacSwift"; + }; + name = Release; + }; + DBC18E042419045B009D8047 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F8F5F6C1E9384FDD37A0CCA1 /* Pods-SampleMacSwiftUITests.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = SampleMacSwiftUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.vigneshuvi.SampleMacSwift.SampleMacSwiftUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_TARGET_NAME = SampleMacSwift; + }; + name = Debug; + }; + DBC18E052419045B009D8047 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3452C57AAC3533A508950166 /* Pods-SampleMacSwiftUITests.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = SampleMacSwiftUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.vigneshuvi.SampleMacSwift.SampleMacSwiftUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_TARGET_NAME = SampleMacSwift; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + DBC18DD224190459009D8047 /* Build configuration list for PBXProject "SampleMacSwift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DBC18DFB2419045B009D8047 /* Debug */, + DBC18DFC2419045B009D8047 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DBC18DFD2419045B009D8047 /* Build configuration list for PBXNativeTarget "SampleMacSwift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DBC18DFE2419045B009D8047 /* Debug */, + DBC18DFF2419045B009D8047 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DBC18E002419045B009D8047 /* Build configuration list for PBXNativeTarget "SampleMacSwiftTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DBC18E012419045B009D8047 /* Debug */, + DBC18E022419045B009D8047 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DBC18E032419045B009D8047 /* Build configuration list for PBXNativeTarget "SampleMacSwiftUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DBC18E042419045B009D8047 /* Debug */, + DBC18E052419045B009D8047 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = DBC18DCF24190459009D8047 /* Project object */; +} diff --git a/Examples/MacOS/SampleMacSwift/SampleMacSwift/AppDelegate.swift b/Examples/MacOS/SampleMacSwift/SampleMacSwift/AppDelegate.swift new file mode 100644 index 0000000..9c19432 --- /dev/null +++ b/Examples/MacOS/SampleMacSwift/SampleMacSwift/AppDelegate.swift @@ -0,0 +1,26 @@ +// +// AppDelegate.swift +// SampleMacSwift +// +// Created by Vignesh, Kumar (623-Extern) on 11/03/20. +// Copyright © 2020 Vignesh, Kumar (623-Extern). All rights reserved. +// + +import Cocoa + +@NSApplicationMain +class AppDelegate: NSObject, NSApplicationDelegate { + + + + func applicationDidFinishLaunching(_ aNotification: Notification) { + // Insert code here to initialize your application + } + + func applicationWillTerminate(_ aNotification: Notification) { + // Insert code here to tear down your application + } + + +} + diff --git a/Examples/MacOS/SampleMacSwift/SampleMacSwift/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/MacOS/SampleMacSwift/SampleMacSwift/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2db2b1c --- /dev/null +++ b/Examples/MacOS/SampleMacSwift/SampleMacSwift/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Examples/MacOS/SampleMacSwift/SampleMacSwift/Assets.xcassets/Contents.json b/Examples/MacOS/SampleMacSwift/SampleMacSwift/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Examples/MacOS/SampleMacSwift/SampleMacSwift/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Examples/MacOS/SampleMacSwift/SampleMacSwift/Base.lproj/Main.storyboard b/Examples/MacOS/SampleMacSwift/SampleMacSwift/Base.lproj/Main.storyboard new file mode 100644 index 0000000..bd56d4f --- /dev/null +++ b/Examples/MacOS/SampleMacSwift/SampleMacSwift/Base.lproj/Main.storyboard @@ -0,0 +1,737 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/MacOS/SampleMacSwift/SampleMacSwift/Info.plist b/Examples/MacOS/SampleMacSwift/SampleMacSwift/Info.plist new file mode 100644 index 0000000..49c09f6 --- /dev/null +++ b/Examples/MacOS/SampleMacSwift/SampleMacSwift/Info.plist @@ -0,0 +1,36 @@ + + + + + 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 © 2020 Vignesh, Kumar (623-Extern). All rights reserved. + NSMainStoryboardFile + Main + NSPrincipalClass + NSApplication + NSSupportsAutomaticTermination + + NSSupportsSuddenTermination + + + diff --git a/Examples/MacOS/SampleMacSwift/SampleMacSwift/Resource/test.json b/Examples/MacOS/SampleMacSwift/SampleMacSwift/Resource/test.json new file mode 100644 index 0000000..1089771 --- /dev/null +++ b/Examples/MacOS/SampleMacSwift/SampleMacSwift/Resource/test.json @@ -0,0 +1,3 @@ +col1,col2,col3 +a,b,c +col1,col2,col3 diff --git a/Examples/MacOS/SampleMacSwift/SampleMacSwift/SampleMacSwift.entitlements b/Examples/MacOS/SampleMacSwift/SampleMacSwift/SampleMacSwift.entitlements new file mode 100644 index 0000000..8fa9cdb --- /dev/null +++ b/Examples/MacOS/SampleMacSwift/SampleMacSwift/SampleMacSwift.entitlements @@ -0,0 +1,14 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.downloads.read-write + + com.apple.security.files.user-selected.read-write + + com.apple.security.network.client + + + diff --git a/Examples/MacOS/SampleMacSwift/SampleMacSwift/ViewController.swift b/Examples/MacOS/SampleMacSwift/SampleMacSwift/ViewController.swift new file mode 100644 index 0000000..b21f10f --- /dev/null +++ b/Examples/MacOS/SampleMacSwift/SampleMacSwift/ViewController.swift @@ -0,0 +1,131 @@ +// +// ViewController.swift +// SampleMacSwift +// +// Created by Vignesh, Kumar (623-Extern) on 11/03/20. +// Copyright © 2020 Vignesh, Kumar (623-Extern). All rights reserved. +// + +import Cocoa +import Foundation +import WebKit +import SwiftCSVExport + +class User { + var userid:Int = 0 + var name:String = "" + var email:String = "" + var isValidUser:Bool = false + var message:String = "" + var balance:Double = 0.0 +} + + +class ViewController: NSViewController { + + @IBOutlet var webview: WKWebView! + override func viewDidLoad() { + super.viewDidLoad() + + // Generate CSV file + let user1:NSMutableDictionary = NSMutableDictionary() + user1.setObject(107, forKey: "userid" as NSCopying); + user1.setObject("vignesh", forKey: "name" as NSCopying); + user1.setObject("vigneshuvi@gmail.com", forKey: "email" as NSCopying); + user1.setObject(true, forKey:"isValidUser" as NSCopying) + user1.setObject("Hi 'Vignesh!', \nhow are you? \t Shall we meet tomorrow? \r Thanks ", forKey: "message" as NSCopying); + user1.setObject(571.05, forKey: "balance" as NSCopying); + + let user2:NSMutableDictionary = NSMutableDictionary() + user2.setObject(108, forKey: "userid" as NSCopying); + user2.setObject("vinoth", forKey: "name" as NSCopying); + user2.setObject(false, forKey:"isValidUser" as NSCopying) + user2.setObject("vinoth@gmail.com", forKey: "email" as NSCopying); + user2.setObject("Hi Vinoth", forKey: "message" as NSCopying); + user2.setObject(567.50, forKey: "balance" as NSCopying); + + let data:NSMutableArray = NSMutableArray() + data.add(user1); + data.add(user2); + + let user3 = User() + user3.userid = 109 + user3.name = "John" + user3.email = "John@gmail.com" + user3.isValidUser = true + user3.message = "Hi Vignesh" + user3.balance = 105.41; + data.add(listPropertiesWithValues(user3)) // Able to convert Class object into NSMutableDictionary + + let header = ["userid", "name", "email", "message", "isValidUser","balance"] + // Create a object for write CSV + let writeCSVObj = CSV() + writeCSVObj.rows = data + writeCSVObj.delimiter = DividerType.comma.rawValue + writeCSVObj.fields = header as NSArray + writeCSVObj.name = "userlist2" + + // Write File using CSV class object + let output = CSVExport.export(writeCSVObj); + if output.result.isSuccess { + guard let filePath = output.filePath else { + print("Export Error: \(String(describing: output.message))") + return + } + + print("File Path: \(filePath)") + self.readCSVPath(filePath) + } else { + print("Export Error: \(String(describing: output.message))") + } + + let fileManager = FileManager.default + if let fileURL = Bundle.main.url(forResource: "test", withExtension: "json") { + print(fileURL) + + let filePath = fileURL.path + // Check if file exists + if fileManager.fileExists(atPath: filePath) { + print("File exists") + //self.readCSVPath(filePath, Bundle.main.bundleURL) + } else { + print("File does not exist") + } + } + + } + + func readCSVPath(_ filePath: String, _ basePath: URL) { + + let requestURL = URL(fileURLWithPath: filePath) + webview.loadFileURL(requestURL, allowingReadAccessTo: basePath) + + // Read File and convert as CSV class object + _ = CSVExport.readCSVObject(filePath); + + // Use 'SwiftLoggly' pod framework to print the Dictionary + // loggly(LogType.Info, text: readCSVObj.name) + // loggly(LogType.Info, text: readCSVObj.delimiter) + } + + func readCSVPath(_ filePath: String) { + + let requestURL = URL(fileURLWithPath: filePath) + webview.loadFileURL(requestURL, allowingReadAccessTo: requestURL.deletingLastPathComponent()) + + // Read File and convert as CSV class object + _ = CSVExport.readCSVObject(filePath); + + + + + + // Use 'SwiftLoggly' pod framework to print the Dictionary +// loggly(LogType.Info, text: readCSVObj.name) +// loggly(LogType.Info, text: readCSVObj.delimiter) + } + + + +} + diff --git a/Examples/MacOS/SampleMacSwift/SampleMacSwiftTests/Info.plist b/Examples/MacOS/SampleMacSwift/SampleMacSwiftTests/Info.plist new file mode 100644 index 0000000..64d65ca --- /dev/null +++ b/Examples/MacOS/SampleMacSwift/SampleMacSwiftTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Examples/MacOS/SampleMacSwift/SampleMacSwiftTests/SampleMacSwiftTests.swift b/Examples/MacOS/SampleMacSwift/SampleMacSwiftTests/SampleMacSwiftTests.swift new file mode 100644 index 0000000..9380574 --- /dev/null +++ b/Examples/MacOS/SampleMacSwift/SampleMacSwiftTests/SampleMacSwiftTests.swift @@ -0,0 +1,34 @@ +// +// SampleMacSwiftTests.swift +// SampleMacSwiftTests +// +// Created by Vignesh, Kumar (623-Extern) on 11/03/20. +// Copyright © 2020 Vignesh, Kumar (623-Extern). All rights reserved. +// + +import XCTest +@testable import SampleMacSwift + +class SampleMacSwiftTests: XCTestCase { + + override func setUp() { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/Examples/MacOS/SampleMacSwift/SampleMacSwiftUITests/Info.plist b/Examples/MacOS/SampleMacSwift/SampleMacSwiftUITests/Info.plist new file mode 100644 index 0000000..64d65ca --- /dev/null +++ b/Examples/MacOS/SampleMacSwift/SampleMacSwiftUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Examples/MacOS/SampleMacSwift/SampleMacSwiftUITests/SampleMacSwiftUITests.swift b/Examples/MacOS/SampleMacSwift/SampleMacSwiftUITests/SampleMacSwiftUITests.swift new file mode 100644 index 0000000..73b695a --- /dev/null +++ b/Examples/MacOS/SampleMacSwift/SampleMacSwiftUITests/SampleMacSwiftUITests.swift @@ -0,0 +1,43 @@ +// +// SampleMacSwiftUITests.swift +// SampleMacSwiftUITests +// +// Created by Vignesh, Kumar (623-Extern) on 11/03/20. +// Copyright © 2020 Vignesh, Kumar (623-Extern). All rights reserved. +// + +import XCTest + +class SampleMacSwiftUITests: XCTestCase { + + override func setUp() { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testLaunchPerformance() { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) { + XCUIApplication().launch() + } + } + } +} diff --git a/Examples/SampleSwift/SampleSwift/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/SampleSwift/SampleSwift/Assets.xcassets/AppIcon.appiconset/Contents.json index 36d2c80..d8db8d6 100644 --- a/Examples/SampleSwift/SampleSwift/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Examples/SampleSwift/SampleSwift/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "29x29", @@ -30,6 +40,16 @@ "size" : "60x60", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "idiom" : "ipad", "size" : "29x29", @@ -59,6 +79,16 @@ "idiom" : "ipad", "size" : "76x76", "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" } ], "info" : { diff --git a/README.md b/README.md index 44082f6..d663257 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Supported swift 4, 4.2 and 5 and latest Xcode pod 'SwiftCSVExport' , '= 2.0.2' // Swift 4 pod 'SwiftCSVExport' , '= 2.0.3' // Swift 4.2 -pod 'SwiftCSVExport' , '= 2.1.0' // Swift 5 +pod 'SwiftCSVExport' , '= 2.2.0' // Swift 5 ``` @@ -38,6 +38,10 @@ pod 'SwiftCSVExport' , '= 2.1.0' // Swift 5 First thing is to import the framework. See the Installation instructions on how to add the framework to your project. +Refer iOS Examples:[Here](https://github.com/vigneshuvi/SwiftCSVExport/tree/master/Examples). +Refer Mac Examples:[Here](https://github.com/vigneshuvi/SwiftCSVExport/tree/master/Examples/MacOS). + + ```swift //iOS - Objective-C @@ -46,8 +50,11 @@ First thing is to import the framework. See the Installation instructions on how //iOS - Swift import SwiftCSVExport -//macOS -import SwiftCSVExportOSX +//macOS - Old swift version < 4 +import SwiftCSVExportOSX + +//macOS - New swift version > 4 +import SwiftCSVExport ``` diff --git a/Sources/CSVConstants.swift b/Sources/CSVConstants.swift index baf9509..2f4b033 100644 --- a/Sources/CSVConstants.swift +++ b/Sources/CSVConstants.swift @@ -106,9 +106,9 @@ extension String { if let string = value as? String { // Wrap around double quotes let fString = "\(string)" - return self.length == 0 ? fString : "\(self)\(div) \(fString)" + return self.length == 0 ? fString : "\(self)\(div)\(fString)" } else { - return self.length == 0 ? "\(value)" : "\(self)\(div) \(value)" + return self.length == 0 ? "\(value)" : "\(self)\(div)\(value)" } } diff --git a/SwiftCSVExport.podspec b/SwiftCSVExport.podspec index f7d180f..7e9bbcc 100644 --- a/SwiftCSVExport.podspec +++ b/SwiftCSVExport.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "SwiftCSVExport" - s.version = "2.1.0" + s.version = "2.2.0" s.summary = "Simple way to export csv file with rich feature framework and written in Swift 4, 4.2 and 5" # This description is used to generate tags and improve search results. diff --git a/SwiftCSVExport/Sources/CSVConstants.swift b/SwiftCSVExport/Sources/CSVConstants.swift index c07eb18..af55a26 100644 --- a/SwiftCSVExport/Sources/CSVConstants.swift +++ b/SwiftCSVExport/Sources/CSVConstants.swift @@ -106,9 +106,9 @@ extension String { if let string = value as? String { // Wrap around double quotes let fString = "\(string)" - return self.length == 0 ? fString : "\(self)\(div) \(fString)" + return self.length == 0 ? fString : "\(self)\(div)\(fString)" } else { - return self.length == 0 ? "\(value)" : "\(self)\(div) \(value)" + return self.length == 0 ? "\(value)" : "\(self)\(div)\(value)" } }