diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/Mailchimp-SDK-iOS.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/Mailchimp-SDK-iOS.xcscheme new file mode 100644 index 0000000..ef4b1f2 --- /dev/null +++ b/.swiftpm/xcode/xcshareddata/xcschemes/Mailchimp-SDK-iOS.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Changelog.md b/Changelog.md index 931582b..5dcf092 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.2] - 2020-11-19 +### Added +- Swift Package Support + ## [2.0.1] - 2020-11-17 ### Removed - Fixed module/class name collision which caused Failed to load module 'MailchimpSDK' error when integrating. (#16) diff --git a/MailchimpSDK.podspec b/MailchimpSDK.podspec index daea0e0..e8acbc1 100644 --- a/MailchimpSDK.podspec +++ b/MailchimpSDK.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'MailchimpSDK' - s.version = '2.0.1' + s.version = '2.0.2' s.summary = 'Mailchimp SDK for iOS' s.description = <<-DESC @@ -24,7 +24,7 @@ Pod::Spec.new do |s| s.platform = :ios, '12.0' s.source = { :git => 'https://github.com/mailchimp/Mailchimp-SDK-iOS.git', :tag => 'v' + s.version.to_s } - s.source_files = 'MailchimpSDK/MailchimpSDK/*.{swift,h,m}' + s.source_files = 'Sources/MailchimpSDK/MailchimpSDK/*.{swift,h,m}' s.vendored_frameworks = 'build/MailchimpSDK.xcframework' end diff --git a/MailchimpSDK.xcworkspace/contents.xcworkspacedata b/MailchimpSDK.xcworkspace/contents.xcworkspacedata index 4669b9f..a395b63 100644 --- a/MailchimpSDK.xcworkspace/contents.xcworkspacedata +++ b/MailchimpSDK.xcworkspace/contents.xcworkspacedata @@ -2,7 +2,7 @@ + location = "group:Sources/MailchimpSDK/MailchimpSDK.xcodeproj"> diff --git a/MailchimpSDK/Gemfile b/MailchimpSDK/Gemfile deleted file mode 100644 index 7a118b4..0000000 --- a/MailchimpSDK/Gemfile +++ /dev/null @@ -1,3 +0,0 @@ -source "https://rubygems.org" - -gem "fastlane" diff --git a/MailchimpSDK/Gemfile.lock b/MailchimpSDK/Gemfile.lock deleted file mode 100644 index fcae4fa..0000000 --- a/MailchimpSDK/Gemfile.lock +++ /dev/null @@ -1,179 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - CFPropertyList (3.0.2) - addressable (2.7.0) - public_suffix (>= 2.0.2, < 5.0) - atomos (0.1.3) - aws-eventstream (1.0.3) - aws-partitions (1.289.0) - aws-sdk-core (3.92.0) - aws-eventstream (~> 1.0, >= 1.0.2) - aws-partitions (~> 1, >= 1.239.0) - aws-sigv4 (~> 1.1) - jmespath (~> 1.0) - aws-sdk-kms (1.30.0) - aws-sdk-core (~> 3, >= 3.71.0) - aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.61.1) - aws-sdk-core (~> 3, >= 3.83.0) - aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.1) - aws-sigv4 (1.1.1) - aws-eventstream (~> 1.0, >= 1.0.2) - babosa (1.0.3) - claide (1.0.3) - colored (1.2) - colored2 (3.1.2) - commander-fastlane (4.4.6) - highline (~> 1.7.2) - declarative (0.0.10) - declarative-option (0.1.0) - digest-crc (0.5.1) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) - dotenv (2.7.5) - emoji_regex (1.0.1) - excon (0.73.0) - faraday (0.17.3) - multipart-post (>= 1.2, < 3) - faraday-cookie_jar (0.0.6) - faraday (>= 0.7.4) - http-cookie (~> 1.0.0) - faraday_middleware (0.13.1) - faraday (>= 0.7.4, < 1.0) - fastimage (2.1.7) - fastlane (2.144.0) - CFPropertyList (>= 2.3, < 4.0.0) - addressable (>= 2.3, < 3.0.0) - aws-sdk-s3 (~> 1.0) - babosa (>= 1.0.2, < 2.0.0) - bundler (>= 1.12.0, < 3.0.0) - colored - commander-fastlane (>= 4.4.6, < 5.0.0) - dotenv (>= 2.1.1, < 3.0.0) - emoji_regex (>= 0.1, < 2.0) - excon (>= 0.71.0, < 1.0.0) - faraday (~> 0.17) - faraday-cookie_jar (~> 0.0.6) - faraday_middleware (~> 0.13.1) - fastimage (>= 2.1.0, < 3.0.0) - gh_inspector (>= 1.1.2, < 2.0.0) - google-api-client (>= 0.29.2, < 0.37.0) - google-cloud-storage (>= 1.15.0, < 2.0.0) - highline (>= 1.7.2, < 2.0.0) - json (< 3.0.0) - jwt (~> 2.1.0) - mini_magick (>= 4.9.4, < 5.0.0) - multi_xml (~> 0.5) - multipart-post (~> 2.0.0) - plist (>= 3.1.0, < 4.0.0) - public_suffix (~> 2.0.0) - rubyzip (>= 1.3.0, < 2.0.0) - security (= 0.1.3) - simctl (~> 1.6.3) - slack-notifier (>= 2.0.0, < 3.0.0) - terminal-notifier (>= 2.0.0, < 3.0.0) - terminal-table (>= 1.4.5, < 2.0.0) - tty-screen (>= 0.6.3, < 1.0.0) - tty-spinner (>= 0.8.0, < 1.0.0) - word_wrap (~> 1.0.0) - xcodeproj (>= 1.13.0, < 2.0.0) - xcpretty (~> 0.3.0) - xcpretty-travis-formatter (>= 0.0.3) - gh_inspector (1.1.3) - google-api-client (0.36.4) - addressable (~> 2.5, >= 2.5.1) - googleauth (~> 0.9) - httpclient (>= 2.8.1, < 3.0) - mini_mime (~> 1.0) - representable (~> 3.0) - retriable (>= 2.0, < 4.0) - signet (~> 0.12) - google-cloud-core (1.5.0) - google-cloud-env (~> 1.0) - google-cloud-errors (~> 1.0) - google-cloud-env (1.3.1) - faraday (>= 0.17.3, < 2.0) - google-cloud-errors (1.0.0) - google-cloud-storage (1.25.1) - addressable (~> 2.5) - digest-crc (~> 0.4) - google-api-client (~> 0.33) - google-cloud-core (~> 1.2) - googleauth (~> 0.9) - mini_mime (~> 1.0) - googleauth (0.11.0) - faraday (>= 0.17.3, < 2.0) - jwt (>= 1.4, < 3.0) - memoist (~> 0.16) - multi_json (~> 1.11) - os (>= 0.9, < 2.0) - signet (~> 0.12) - highline (1.7.10) - http-cookie (1.0.3) - domain_name (~> 0.5) - httpclient (2.8.3) - jmespath (1.4.0) - json (2.3.0) - jwt (2.1.0) - memoist (0.16.2) - mini_magick (4.10.1) - mini_mime (1.0.2) - multi_json (1.14.1) - multi_xml (0.6.0) - multipart-post (2.0.0) - nanaimo (0.2.6) - naturally (2.2.0) - os (1.0.1) - plist (3.5.0) - public_suffix (2.0.5) - representable (3.0.4) - declarative (< 0.1.0) - declarative-option (< 0.2.0) - uber (< 0.2.0) - retriable (3.1.2) - rouge (2.0.7) - rubyzip (1.3.0) - security (0.1.3) - signet (0.13.2) - addressable (~> 2.3) - faraday (>= 0.17.3, < 2.0) - jwt (>= 1.5, < 3.0) - multi_json (~> 1.10) - simctl (1.6.8) - CFPropertyList - naturally - slack-notifier (2.3.2) - terminal-notifier (2.0.0) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) - tty-cursor (0.7.1) - tty-screen (0.7.1) - tty-spinner (0.9.3) - tty-cursor (~> 0.7) - uber (0.1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.6) - unicode-display_width (1.7.0) - word_wrap (1.0.0) - xcodeproj (1.15.0) - CFPropertyList (>= 2.3.3, < 4.0) - atomos (~> 0.1.3) - claide (>= 1.0.2, < 2.0) - colored2 (~> 3.1) - nanaimo (~> 0.2.6) - xcpretty (0.3.0) - rouge (~> 2.0.7) - xcpretty-travis-formatter (1.0.0) - xcpretty (~> 0.2, >= 0.0.7) - -PLATFORMS - ruby - -DEPENDENCIES - fastlane - -BUNDLED WITH - 2.1.4 diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..10a4f23 --- /dev/null +++ b/Package.swift @@ -0,0 +1,19 @@ +// swift-tools-version:5.3 +import PackageDescription +let package = Package( + name: "MailchimpSDK", + products: [ + .library( + name: "MailchimpSDK", + targets: ["MailchimpSDK"]), + ], + targets: [ + .target( + name: "MailchimpSDK", + exclude: ["MailchimpSDK/Info.plist"]), + .testTarget( + name: "MailchimpSDKTests", + dependencies: ["MailchimpSDK"], + exclude: ["../../Tests/MailchimpSDKTests/Info.plist"]), + ] +) diff --git a/MailchimpSDK/MailchimpSDK.xcodeproj/project.pbxproj b/Sources/MailchimpSDK/MailchimpSDK.xcodeproj/project.pbxproj similarity index 90% rename from MailchimpSDK/MailchimpSDK.xcodeproj/project.pbxproj rename to Sources/MailchimpSDK/MailchimpSDK.xcodeproj/project.pbxproj index c0b9beb..770a127 100644 --- a/MailchimpSDK/MailchimpSDK.xcodeproj/project.pbxproj +++ b/Sources/MailchimpSDK/MailchimpSDK.xcodeproj/project.pbxproj @@ -7,8 +7,11 @@ objects = { /* Begin PBXBuildFile section */ + 8D3BCA6B2566E66200F9C268 /* MailchimpSDKTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D3BCA642566E66200F9C268 /* MailchimpSDKTests.swift */; }; + 8D3BCA6C2566E66200F9C268 /* EventTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D3BCA662566E66200F9C268 /* EventTests.swift */; }; + 8D3BCA6D2566E66200F9C268 /* MergeFieldTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D3BCA682566E66200F9C268 /* MergeFieldTests.swift */; }; + 8D3BCA6E2566E66200F9C268 /* ContactTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D3BCA692566E66200F9C268 /* ContactTests.swift */; }; B95896A122774C0C00F7509B /* MailchimpSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B958969722774C0C00F7509B /* MailchimpSDK.framework */; }; - B95896A622774C0C00F7509B /* MailchimpSDKTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B95896A522774C0C00F7509B /* MailchimpSDKTests.swift */; }; B95896A822774C0C00F7509B /* MailchimpSDK.h in Headers */ = {isa = PBXBuildFile; fileRef = B958969A22774C0C00F7509B /* MailchimpSDK.h */; settings = {ATTRIBUTES = (Public, ); }; }; B95896B82277689F00F7509B /* URLRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B95896B72277689F00F7509B /* URLRequest.swift */; }; B95896BD227768AB00F7509B /* APIRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B95896B9227768AB00F7509B /* APIRequest.swift */; }; @@ -20,14 +23,11 @@ B95896CC2280BAA700F7509B /* Contact.swift in Sources */ = {isa = PBXBuildFile; fileRef = B95896CB2280BAA700F7509B /* Contact.swift */; }; B95896D02281FD2D00F7509B /* PostBody.swift in Sources */ = {isa = PBXBuildFile; fileRef = B95896CF2281FD2D00F7509B /* PostBody.swift */; }; BF6D325623721B5B003F4A19 /* EventOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF6D325523721B5B003F4A19 /* EventOperation.swift */; }; - BFCF7A1F236B3503004BFC2B /* EventTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFCF7A1E236B3503004BFC2B /* EventTests.swift */; }; BFD503FB2369DA4500939748 /* EventRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFD503FA2369DA4500939748 /* EventRequest.swift */; }; BFD503FD2369DAB100939748 /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFD503FC2369DAB100939748 /* Event.swift */; }; BFF30D7F2371FB3D005FAABC /* ContactOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFF30D7E2371FB3D005FAABC /* ContactOperation.swift */; }; F239C3FD229F2DDF00FB85C3 /* CountryCode.swift in Sources */ = {isa = PBXBuildFile; fileRef = F239C3FC229F2DDF00FB85C3 /* CountryCode.swift */; }; - F26745E522F89DAC00AD1E93 /* ContactTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F26745E422F89DAC00AD1E93 /* ContactTests.swift */; }; F288D79E2289BBD7004CB563 /* Mailchimp.swift in Sources */ = {isa = PBXBuildFile; fileRef = F288D79D2289BBD7004CB563 /* Mailchimp.swift */; }; - F2A2203122984C7600F57058 /* MergeFieldTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2A2203022984C7600F57058 /* MergeFieldTests.swift */; }; F2AFC4D022947FFB006C742B /* MergeField.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2AFC4CF22947FFB006C742B /* MergeField.swift */; }; /* End PBXBuildFile section */ @@ -42,12 +42,15 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 8D3BCA642566E66200F9C268 /* MailchimpSDKTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MailchimpSDKTests.swift; sourceTree = ""; }; + 8D3BCA662566E66200F9C268 /* EventTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventTests.swift; sourceTree = ""; }; + 8D3BCA682566E66200F9C268 /* MergeFieldTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MergeFieldTests.swift; sourceTree = ""; }; + 8D3BCA692566E66200F9C268 /* ContactTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactTests.swift; sourceTree = ""; }; + 8D3BCA6A2566E66200F9C268 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; B958969722774C0C00F7509B /* MailchimpSDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MailchimpSDK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; B958969A22774C0C00F7509B /* MailchimpSDK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MailchimpSDK.h; sourceTree = ""; }; B958969B22774C0C00F7509B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; B95896A022774C0C00F7509B /* MailchimpSDKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MailchimpSDKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - B95896A522774C0C00F7509B /* MailchimpSDKTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MailchimpSDKTests.swift; sourceTree = ""; }; - B95896A722774C0C00F7509B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; B95896B72277689F00F7509B /* URLRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = URLRequest.swift; sourceTree = ""; }; B95896B9227768AB00F7509B /* APIRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APIRequest.swift; sourceTree = ""; }; B95896BA227768AB00F7509B /* AnzeeAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnzeeAPI.swift; sourceTree = ""; }; @@ -58,14 +61,11 @@ B95896CB2280BAA700F7509B /* Contact.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Contact.swift; sourceTree = ""; }; B95896CF2281FD2D00F7509B /* PostBody.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostBody.swift; sourceTree = ""; }; BF6D325523721B5B003F4A19 /* EventOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventOperation.swift; sourceTree = ""; }; - BFCF7A1E236B3503004BFC2B /* EventTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventTests.swift; sourceTree = ""; }; BFD503FA2369DA4500939748 /* EventRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventRequest.swift; sourceTree = ""; }; BFD503FC2369DAB100939748 /* Event.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Event.swift; sourceTree = ""; }; BFF30D7E2371FB3D005FAABC /* ContactOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactOperation.swift; sourceTree = ""; }; F239C3FC229F2DDF00FB85C3 /* CountryCode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CountryCode.swift; sourceTree = ""; }; - F26745E422F89DAC00AD1E93 /* ContactTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactTests.swift; sourceTree = ""; }; F288D79D2289BBD7004CB563 /* Mailchimp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Mailchimp.swift; path = SDK/Mailchimp.swift; sourceTree = ""; }; - F2A2203022984C7600F57058 /* MergeFieldTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MergeFieldTests.swift; sourceTree = ""; }; F2AFC4CF22947FFB006C742B /* MergeField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MergeField.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -88,11 +88,40 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 8D3BCA632566E66200F9C268 /* MailchimpSDKTests */ = { + isa = PBXGroup; + children = ( + 8D3BCA642566E66200F9C268 /* MailchimpSDKTests.swift */, + 8D3BCA652566E66200F9C268 /* Events */, + 8D3BCA672566E66200F9C268 /* Audience */, + 8D3BCA6A2566E66200F9C268 /* Info.plist */, + ); + name = MailchimpSDKTests; + path = ../../Tests/MailchimpSDKTests; + sourceTree = ""; + }; + 8D3BCA652566E66200F9C268 /* Events */ = { + isa = PBXGroup; + children = ( + 8D3BCA662566E66200F9C268 /* EventTests.swift */, + ); + path = Events; + sourceTree = ""; + }; + 8D3BCA672566E66200F9C268 /* Audience */ = { + isa = PBXGroup; + children = ( + 8D3BCA682566E66200F9C268 /* MergeFieldTests.swift */, + 8D3BCA692566E66200F9C268 /* ContactTests.swift */, + ); + path = Audience; + sourceTree = ""; + }; B958968D22774C0C00F7509B = { isa = PBXGroup; children = ( B958969922774C0C00F7509B /* MailchimpSDK */, - B95896A422774C0C00F7509B /* MailchimpSDKTests */, + 8D3BCA632566E66200F9C268 /* MailchimpSDKTests */, B958969822774C0C00F7509B /* Products */, ); sourceTree = ""; @@ -118,17 +147,6 @@ path = MailchimpSDK; sourceTree = ""; }; - B95896A422774C0C00F7509B /* MailchimpSDKTests */ = { - isa = PBXGroup; - children = ( - F2A2202F22984C4500F57058 /* Audience */, - BFCF7A1D236B34F3004BFC2B /* Events */, - B95896A522774C0C00F7509B /* MailchimpSDKTests.swift */, - B95896A722774C0C00F7509B /* Info.plist */, - ); - path = MailchimpSDKTests; - sourceTree = ""; - }; B95896B122774C9A00F7509B /* SDK */ = { isa = PBXGroup; children = ( @@ -189,14 +207,6 @@ path = Models; sourceTree = ""; }; - BFCF7A1D236B34F3004BFC2B /* Events */ = { - isa = PBXGroup; - children = ( - BFCF7A1E236B3503004BFC2B /* EventTests.swift */, - ); - path = Events; - sourceTree = ""; - }; BFF30D7D2371FB3D005FAABC /* Operations */ = { isa = PBXGroup; children = ( @@ -206,15 +216,6 @@ path = Operations; sourceTree = ""; }; - F2A2202F22984C4500F57058 /* Audience */ = { - isa = PBXGroup; - children = ( - F2A2203022984C7600F57058 /* MergeFieldTests.swift */, - F26745E422F89DAC00AD1E93 /* ContactTests.swift */, - ); - path = Audience; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -348,10 +349,10 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - BFCF7A1F236B3503004BFC2B /* EventTests.swift in Sources */, - B95896A622774C0C00F7509B /* MailchimpSDKTests.swift in Sources */, - F2A2203122984C7600F57058 /* MergeFieldTests.swift in Sources */, - F26745E522F89DAC00AD1E93 /* ContactTests.swift in Sources */, + 8D3BCA6E2566E66200F9C268 /* ContactTests.swift in Sources */, + 8D3BCA6D2566E66200F9C268 /* MergeFieldTests.swift in Sources */, + 8D3BCA6C2566E66200F9C268 /* EventTests.swift in Sources */, + 8D3BCA6B2566E66200F9C268 /* MailchimpSDKTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -511,7 +512,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.0.1; + MARKETING_VERSION = 2.0.2; PRODUCT_BUNDLE_IDENTIFIER = com.theRocketScienceGroup.MailchimpSDK; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -540,7 +541,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.0.1; + MARKETING_VERSION = 2.0.2; PRODUCT_BUNDLE_IDENTIFIER = com.theRocketScienceGroup.MailchimpSDK; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -554,13 +555,13 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = X34GKSR943; - INFOPLIST_FILE = MailchimpSDKTests/Info.plist; + INFOPLIST_FILE = ../../Tests/MailchimpSDKTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.0.1; + MARKETING_VERSION = 2.0.2; PRODUCT_BUNDLE_IDENTIFIER = "com.theRocketScienceGroup.Mailchimp-SDKTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; @@ -573,13 +574,13 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = X34GKSR943; - INFOPLIST_FILE = MailchimpSDKTests/Info.plist; + INFOPLIST_FILE = ../../Tests/MailchimpSDKTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.0.1; + MARKETING_VERSION = 2.0.2; PRODUCT_BUNDLE_IDENTIFIER = "com.theRocketScienceGroup.Mailchimp-SDKTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; diff --git a/MailchimpSDK/MailchimpSDK.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Sources/MailchimpSDK/MailchimpSDK.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from MailchimpSDK/MailchimpSDK.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Sources/MailchimpSDK/MailchimpSDK.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/MailchimpSDK/MailchimpSDK.xcodeproj/xcshareddata/xcschemes/MailchimpSDK.xcscheme b/Sources/MailchimpSDK/MailchimpSDK.xcodeproj/xcshareddata/xcschemes/MailchimpSDK.xcscheme similarity index 100% rename from MailchimpSDK/MailchimpSDK.xcodeproj/xcshareddata/xcschemes/MailchimpSDK.xcscheme rename to Sources/MailchimpSDK/MailchimpSDK.xcodeproj/xcshareddata/xcschemes/MailchimpSDK.xcscheme diff --git a/Sources/MailchimpSDK/MailchimpSDK.xcodeproj/xcshareddata/xcschemes/MailchimpSDKTests.xcscheme b/Sources/MailchimpSDK/MailchimpSDK.xcodeproj/xcshareddata/xcschemes/MailchimpSDKTests.xcscheme new file mode 100644 index 0000000..98ec60b --- /dev/null +++ b/Sources/MailchimpSDK/MailchimpSDK.xcodeproj/xcshareddata/xcschemes/MailchimpSDKTests.xcscheme @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/MailchimpSDK/MailchimpSDK/Core/Extensions/Result.swift b/Sources/MailchimpSDK/MailchimpSDK/Core/Extensions/Result.swift similarity index 98% rename from MailchimpSDK/MailchimpSDK/Core/Extensions/Result.swift rename to Sources/MailchimpSDK/MailchimpSDK/Core/Extensions/Result.swift index 671abf0..f3af2a7 100644 --- a/MailchimpSDK/MailchimpSDK/Core/Extensions/Result.swift +++ b/Sources/MailchimpSDK/MailchimpSDK/Core/Extensions/Result.swift @@ -14,6 +14,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // +import Foundation extension Result where Success == Data, Failure == APIError { func decoded(using decoder: JSONDecoder = .init()) throws -> T { diff --git a/MailchimpSDK/MailchimpSDK/Core/Extensions/URLRequest.swift b/Sources/MailchimpSDK/MailchimpSDK/Core/Extensions/URLRequest.swift similarity index 100% rename from MailchimpSDK/MailchimpSDK/Core/Extensions/URLRequest.swift rename to Sources/MailchimpSDK/MailchimpSDK/Core/Extensions/URLRequest.swift diff --git a/MailchimpSDK/MailchimpSDK/Core/Networking/APIErrorResponse.swift b/Sources/MailchimpSDK/MailchimpSDK/Core/Networking/APIErrorResponse.swift similarity index 100% rename from MailchimpSDK/MailchimpSDK/Core/Networking/APIErrorResponse.swift rename to Sources/MailchimpSDK/MailchimpSDK/Core/Networking/APIErrorResponse.swift diff --git a/MailchimpSDK/MailchimpSDK/Core/Networking/APIRequest.swift b/Sources/MailchimpSDK/MailchimpSDK/Core/Networking/APIRequest.swift similarity index 100% rename from MailchimpSDK/MailchimpSDK/Core/Networking/APIRequest.swift rename to Sources/MailchimpSDK/MailchimpSDK/Core/Networking/APIRequest.swift diff --git a/MailchimpSDK/MailchimpSDK/Core/Networking/AnzeeAPI.swift b/Sources/MailchimpSDK/MailchimpSDK/Core/Networking/AnzeeAPI.swift similarity index 100% rename from MailchimpSDK/MailchimpSDK/Core/Networking/AnzeeAPI.swift rename to Sources/MailchimpSDK/MailchimpSDK/Core/Networking/AnzeeAPI.swift diff --git a/MailchimpSDK/MailchimpSDK/Core/Networking/AnzeeConstants.swift b/Sources/MailchimpSDK/MailchimpSDK/Core/Networking/AnzeeConstants.swift similarity index 100% rename from MailchimpSDK/MailchimpSDK/Core/Networking/AnzeeConstants.swift rename to Sources/MailchimpSDK/MailchimpSDK/Core/Networking/AnzeeConstants.swift diff --git a/MailchimpSDK/MailchimpSDK/Core/Networking/PostBody.swift b/Sources/MailchimpSDK/MailchimpSDK/Core/Networking/PostBody.swift similarity index 100% rename from MailchimpSDK/MailchimpSDK/Core/Networking/PostBody.swift rename to Sources/MailchimpSDK/MailchimpSDK/Core/Networking/PostBody.swift diff --git a/MailchimpSDK/MailchimpSDK/Info.plist b/Sources/MailchimpSDK/MailchimpSDK/Info.plist similarity index 100% rename from MailchimpSDK/MailchimpSDK/Info.plist rename to Sources/MailchimpSDK/MailchimpSDK/Info.plist diff --git a/MailchimpSDK/MailchimpSDK/MailchimpSDK.h b/Sources/MailchimpSDK/MailchimpSDK/MailchimpSDK.h similarity index 100% rename from MailchimpSDK/MailchimpSDK/MailchimpSDK.h rename to Sources/MailchimpSDK/MailchimpSDK/MailchimpSDK.h diff --git a/MailchimpSDK/MailchimpSDK/SDK/Audience.h b/Sources/MailchimpSDK/MailchimpSDK/SDK/Audience.h similarity index 100% rename from MailchimpSDK/MailchimpSDK/SDK/Audience.h rename to Sources/MailchimpSDK/MailchimpSDK/SDK/Audience.h diff --git a/MailchimpSDK/MailchimpSDK/SDK/Mailchimp.swift b/Sources/MailchimpSDK/MailchimpSDK/SDK/Mailchimp.swift similarity index 99% rename from MailchimpSDK/MailchimpSDK/SDK/Mailchimp.swift rename to Sources/MailchimpSDK/MailchimpSDK/SDK/Mailchimp.swift index 9eababb..81690a8 100644 --- a/MailchimpSDK/MailchimpSDK/SDK/Mailchimp.swift +++ b/Sources/MailchimpSDK/MailchimpSDK/SDK/Mailchimp.swift @@ -15,7 +15,7 @@ // limitations under the License. // -import Foundation +import UIKit /// Provides an interface for storing user behavior in Mailchimp public class Mailchimp: NSObject { @@ -28,7 +28,7 @@ public class Mailchimp: NSObject { public static var debugMode: Bool = false /// Version of this SDK. - public static let version: String = "2.0.1" + public static let version: String = "2.0.2" /// The API protocol conforming object that processes requests for this class. static var api: API? diff --git a/MailchimpSDK/MailchimpSDK/SDK/Models/Contact.swift b/Sources/MailchimpSDK/MailchimpSDK/SDK/Models/Contact.swift similarity index 100% rename from MailchimpSDK/MailchimpSDK/SDK/Models/Contact.swift rename to Sources/MailchimpSDK/MailchimpSDK/SDK/Models/Contact.swift diff --git a/MailchimpSDK/MailchimpSDK/SDK/Models/CountryCode.swift b/Sources/MailchimpSDK/MailchimpSDK/SDK/Models/CountryCode.swift similarity index 100% rename from MailchimpSDK/MailchimpSDK/SDK/Models/CountryCode.swift rename to Sources/MailchimpSDK/MailchimpSDK/SDK/Models/CountryCode.swift diff --git a/MailchimpSDK/MailchimpSDK/SDK/Models/Event.swift b/Sources/MailchimpSDK/MailchimpSDK/SDK/Models/Event.swift similarity index 100% rename from MailchimpSDK/MailchimpSDK/SDK/Models/Event.swift rename to Sources/MailchimpSDK/MailchimpSDK/SDK/Models/Event.swift diff --git a/MailchimpSDK/MailchimpSDK/SDK/Models/MergeField.swift b/Sources/MailchimpSDK/MailchimpSDK/SDK/Models/MergeField.swift similarity index 100% rename from MailchimpSDK/MailchimpSDK/SDK/Models/MergeField.swift rename to Sources/MailchimpSDK/MailchimpSDK/SDK/Models/MergeField.swift diff --git a/MailchimpSDK/MailchimpSDK/SDK/Operations/ContactOperation.swift b/Sources/MailchimpSDK/MailchimpSDK/SDK/Operations/ContactOperation.swift similarity index 100% rename from MailchimpSDK/MailchimpSDK/SDK/Operations/ContactOperation.swift rename to Sources/MailchimpSDK/MailchimpSDK/SDK/Operations/ContactOperation.swift diff --git a/MailchimpSDK/MailchimpSDK/SDK/Operations/EventOperation.swift b/Sources/MailchimpSDK/MailchimpSDK/SDK/Operations/EventOperation.swift similarity index 100% rename from MailchimpSDK/MailchimpSDK/SDK/Operations/EventOperation.swift rename to Sources/MailchimpSDK/MailchimpSDK/SDK/Operations/EventOperation.swift diff --git a/MailchimpSDK/MailchimpSDK/SDK/Requests/ContactRequest.swift b/Sources/MailchimpSDK/MailchimpSDK/SDK/Requests/ContactRequest.swift similarity index 100% rename from MailchimpSDK/MailchimpSDK/SDK/Requests/ContactRequest.swift rename to Sources/MailchimpSDK/MailchimpSDK/SDK/Requests/ContactRequest.swift diff --git a/MailchimpSDK/MailchimpSDK/SDK/Requests/EventRequest.swift b/Sources/MailchimpSDK/MailchimpSDK/SDK/Requests/EventRequest.swift similarity index 100% rename from MailchimpSDK/MailchimpSDK/SDK/Requests/EventRequest.swift rename to Sources/MailchimpSDK/MailchimpSDK/SDK/Requests/EventRequest.swift diff --git a/MailchimpSDK/MailchimpSDKTests/Audience/ContactTests.swift b/Tests/MailchimpSDKTests/Audience/ContactTests.swift similarity index 100% rename from MailchimpSDK/MailchimpSDKTests/Audience/ContactTests.swift rename to Tests/MailchimpSDKTests/Audience/ContactTests.swift diff --git a/MailchimpSDK/MailchimpSDKTests/Audience/MergeFieldTests.swift b/Tests/MailchimpSDKTests/Audience/MergeFieldTests.swift similarity index 100% rename from MailchimpSDK/MailchimpSDKTests/Audience/MergeFieldTests.swift rename to Tests/MailchimpSDKTests/Audience/MergeFieldTests.swift diff --git a/MailchimpSDK/MailchimpSDKTests/Events/EventTests.swift b/Tests/MailchimpSDKTests/Events/EventTests.swift similarity index 100% rename from MailchimpSDK/MailchimpSDKTests/Events/EventTests.swift rename to Tests/MailchimpSDKTests/Events/EventTests.swift diff --git a/MailchimpSDK/MailchimpSDKTests/Info.plist b/Tests/MailchimpSDKTests/Info.plist similarity index 100% rename from MailchimpSDK/MailchimpSDKTests/Info.plist rename to Tests/MailchimpSDKTests/Info.plist diff --git a/MailchimpSDK/MailchimpSDKTests/MailchimpSDKTests.swift b/Tests/MailchimpSDKTests/MailchimpSDKTests.swift similarity index 100% rename from MailchimpSDK/MailchimpSDKTests/MailchimpSDKTests.swift rename to Tests/MailchimpSDKTests/MailchimpSDKTests.swift diff --git a/fastlane/Fastfile b/fastlane/Fastfile index c880b71..736a163 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -20,7 +20,7 @@ default_platform(:ios) project_name = "MailchimpSDK" workspace_name = "#{project_name}.xcworkspace" sdk_scheme_name = project_name -project_file_path = "#{project_name}/#{project_name}.xcodeproj/" +project_file_path = "Sources/#{project_name}/#{project_name}.xcodeproj/" podspec_path = "#{project_name}.podspec" build_path = "../build" deploy_path = "../deploy"