From 53ba0a80cf4b3d98fe6131cd1e7b546913bc21a7 Mon Sep 17 00:00:00 2001 From: Daniel Jilg Date: Wed, 10 Jan 2024 16:23:57 +0100 Subject: [PATCH 01/10] Add a podspec file --- SwiftClient.podspec | 151 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 SwiftClient.podspec diff --git a/SwiftClient.podspec b/SwiftClient.podspec new file mode 100644 index 0000000..390dc83 --- /dev/null +++ b/SwiftClient.podspec @@ -0,0 +1,151 @@ +# +# Be sure to run `pod spec lint SwiftClient.podspec' to ensure this is a +# valid spec and to remove all comments including this before submitting the spec. +# +# To learn more about Podspec attributes see https://guides.cocoapods.org/syntax/podspec.html +# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ +# + +Pod::Spec.new do |spec| + + # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # These will help people to find your library, and whilst it + # can feel like a chore to fill in it's definitely to your advantage. The + # summary should be tweet-length, and the description more in depth. + # + + spec.name = "SwiftClient" + spec.version = "1.5.0" + spec.summary = "Swift SDK for TelemetryDeck, a privacy-first analytics service for apps." + + # This description is used to generate tags and improve search results. + # * Think: What does it do? Why did you write it? What is the focus? + # * Try to keep it short, snappy and to the point. + # * Write the description between the DESC delimiters below. + # * Finally, don't worry about the indent, CocoaPods strips it! + spec.description = <<-DESC + Build better products with live usage data. + Capture and analyize users moving through your app + and get help deciding how to grow, all without + compromising privacy! + + Setting up TelemetryDeck takes less than 10 minutes. + Immediately after publishing your app, TelemetryDeck + can show you a lot of base level information: + + How many users are new to your app? + How many users are active? + Which versions of your app are people running, and + on which operating system and device type are they? + DESC + + spec.homepage = "https://telemetrydeck.com/?source=cocoapods" + # spec.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" + + + # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Licensing your code is important. See https://choosealicense.com for more info. + # CocoaPods will detect a license file if there is a named LICENSE* + # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. + # + + spec.license = "MIT" + # spec.license = { :type => "MIT", :file => "FILE_LICENSE" } + + + # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Specify the authors of the library, with email addresses. Email addresses + # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also + # accepts just a name if you'd rather not provide an email address. + # + # Specify a social_media_url where others can refer to, for example a twitter + # profile URL. + # + + spec.author = { "TelemetryDeck" => "info@telemetrydeck.com" } + # Or just: spec.author = "TelemetryDeck" + # spec.authors = { "TelemetryDeck" => "info@telemetrydeck.com" } + # spec.social_media_url = "https://twitter.com/TelemetryDeck" + + # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # If this Pod runs only on iOS or OS X, then specify the platform and + # the deployment target. You can optionally include the target after the platform. + # + + # spec.platform = :ios + # spec.platform = :ios, "5.0" + + # When using multiple platforms + # spec.ios.deployment_target = "5.0" + # spec.osx.deployment_target = "10.7" + # spec.watchos.deployment_target = "2.0" + # spec.tvos.deployment_target = "9.0" + # spec.visionos.deployment_target = "1.0" + + + # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Specify the location from where the source should be retrieved. + # Supports git, hg, bzr, svn and HTTP. + # + + spec.source = { :git => "https://github.com/TelemetryDeck/SwiftClient.git", :tag => "#{spec.version}" } + + + # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # CocoaPods is smart about how it includes source code. For source files + # giving a folder will include any swift, h, m, mm, c & cpp files. + # For header files it will include any header in the folder. + # Not including the public_header_files will make all headers public. + # + + spec.source_files = "Classes", "Classes/**/*.{h,m}" + spec.exclude_files = "Classes/Exclude" + + # spec.public_header_files = "Classes/**/*.h" + + + # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # A list of resources included with the Pod. These are copied into the + # target bundle with a build phase script. Anything else will be cleaned. + # You can preserve files from being cleaned, please don't preserve + # non-essential files like tests, examples and documentation. + # + + # spec.resource = "icon.png" + # spec.resources = "Resources/*.png" + + # spec.preserve_paths = "FilesToSave", "MoreFilesToSave" + + + # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Link your library with frameworks, or libraries. Libraries do not include + # the lib prefix of their name. + # + + # spec.framework = "SomeFramework" + # spec.frameworks = "SomeFramework", "AnotherFramework" + + # spec.library = "iconv" + # spec.libraries = "iconv", "xml2" + + + # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # If your library depends on compiler flags you can set them in the xcconfig hash + # where they will only apply to your library. If you depend on other Podspecs + # you can include multiple dependencies to ensure it works. + + # spec.requires_arc = true + + # spec.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } + # spec.dependency "JSONKit", "~> 1.4" + +end From b151a401274d28d86e5d761ac0c922a90c962cb1 Mon Sep 17 00:00:00 2001 From: Daniel Jilg Date: Wed, 10 Jan 2024 16:29:30 +0100 Subject: [PATCH 02/10] Update existing podspec file instead of creating a new one --- SwiftClient.podspec | 151 ---------------------------------------- TelemetryClient.podspec | 25 +++++-- 2 files changed, 20 insertions(+), 156 deletions(-) delete mode 100644 SwiftClient.podspec diff --git a/SwiftClient.podspec b/SwiftClient.podspec deleted file mode 100644 index 390dc83..0000000 --- a/SwiftClient.podspec +++ /dev/null @@ -1,151 +0,0 @@ -# -# Be sure to run `pod spec lint SwiftClient.podspec' to ensure this is a -# valid spec and to remove all comments including this before submitting the spec. -# -# To learn more about Podspec attributes see https://guides.cocoapods.org/syntax/podspec.html -# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ -# - -Pod::Spec.new do |spec| - - # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # - # - # These will help people to find your library, and whilst it - # can feel like a chore to fill in it's definitely to your advantage. The - # summary should be tweet-length, and the description more in depth. - # - - spec.name = "SwiftClient" - spec.version = "1.5.0" - spec.summary = "Swift SDK for TelemetryDeck, a privacy-first analytics service for apps." - - # This description is used to generate tags and improve search results. - # * Think: What does it do? Why did you write it? What is the focus? - # * Try to keep it short, snappy and to the point. - # * Write the description between the DESC delimiters below. - # * Finally, don't worry about the indent, CocoaPods strips it! - spec.description = <<-DESC - Build better products with live usage data. - Capture and analyize users moving through your app - and get help deciding how to grow, all without - compromising privacy! - - Setting up TelemetryDeck takes less than 10 minutes. - Immediately after publishing your app, TelemetryDeck - can show you a lot of base level information: - - How many users are new to your app? - How many users are active? - Which versions of your app are people running, and - on which operating system and device type are they? - DESC - - spec.homepage = "https://telemetrydeck.com/?source=cocoapods" - # spec.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" - - - # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # - # - # Licensing your code is important. See https://choosealicense.com for more info. - # CocoaPods will detect a license file if there is a named LICENSE* - # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. - # - - spec.license = "MIT" - # spec.license = { :type => "MIT", :file => "FILE_LICENSE" } - - - # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # - # - # Specify the authors of the library, with email addresses. Email addresses - # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also - # accepts just a name if you'd rather not provide an email address. - # - # Specify a social_media_url where others can refer to, for example a twitter - # profile URL. - # - - spec.author = { "TelemetryDeck" => "info@telemetrydeck.com" } - # Or just: spec.author = "TelemetryDeck" - # spec.authors = { "TelemetryDeck" => "info@telemetrydeck.com" } - # spec.social_media_url = "https://twitter.com/TelemetryDeck" - - # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # - # - # If this Pod runs only on iOS or OS X, then specify the platform and - # the deployment target. You can optionally include the target after the platform. - # - - # spec.platform = :ios - # spec.platform = :ios, "5.0" - - # When using multiple platforms - # spec.ios.deployment_target = "5.0" - # spec.osx.deployment_target = "10.7" - # spec.watchos.deployment_target = "2.0" - # spec.tvos.deployment_target = "9.0" - # spec.visionos.deployment_target = "1.0" - - - # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # - # - # Specify the location from where the source should be retrieved. - # Supports git, hg, bzr, svn and HTTP. - # - - spec.source = { :git => "https://github.com/TelemetryDeck/SwiftClient.git", :tag => "#{spec.version}" } - - - # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # - # - # CocoaPods is smart about how it includes source code. For source files - # giving a folder will include any swift, h, m, mm, c & cpp files. - # For header files it will include any header in the folder. - # Not including the public_header_files will make all headers public. - # - - spec.source_files = "Classes", "Classes/**/*.{h,m}" - spec.exclude_files = "Classes/Exclude" - - # spec.public_header_files = "Classes/**/*.h" - - - # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # - # - # A list of resources included with the Pod. These are copied into the - # target bundle with a build phase script. Anything else will be cleaned. - # You can preserve files from being cleaned, please don't preserve - # non-essential files like tests, examples and documentation. - # - - # spec.resource = "icon.png" - # spec.resources = "Resources/*.png" - - # spec.preserve_paths = "FilesToSave", "MoreFilesToSave" - - - # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # - # - # Link your library with frameworks, or libraries. Libraries do not include - # the lib prefix of their name. - # - - # spec.framework = "SomeFramework" - # spec.frameworks = "SomeFramework", "AnotherFramework" - - # spec.library = "iconv" - # spec.libraries = "iconv", "xml2" - - - # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # - # - # If your library depends on compiler flags you can set them in the xcconfig hash - # where they will only apply to your library. If you depend on other Podspecs - # you can include multiple dependencies to ensure it works. - - # spec.requires_arc = true - - # spec.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } - # spec.dependency "JSONKit", "~> 1.4" - -end diff --git a/TelemetryClient.podspec b/TelemetryClient.podspec index 7a46d9e..e940e38 100644 --- a/TelemetryClient.podspec +++ b/TelemetryClient.podspec @@ -1,10 +1,25 @@ Pod::Spec.new do |spec| - spec.name = "TelemetryClient" - spec.version = "1.4.2" + spec.name = "TelemetryDeck SDK" + spec.version = "1.5.0" spec.summary = "Client SDK for TelemetryDeck" - spec.swift_versions = "5.2" - spec.description = "This package allows you to send signals to TelemetryDeck from your Swift code. Sign up for a free account at telemetrydeck.com." - spec.homepage = "https://github.com/TelemetryDeck/SwiftClient" + spec.swift_versions = "5.6" + spec.summary = "Swift SDK for TelemetryDeck, a privacy-first analytics service for apps. Sign up for a free account at telemetrydeck.com." + spec.description = <<-DESC + Build better products with live usage data. + Capture and analyize users moving through your app + and get help deciding how to grow, all without + compromising privacy! + + Setting up TelemetryDeck takes less than 10 minutes. + Immediately after publishing your app, TelemetryDeck + can show you a lot of base level information: + + How many users are new to your app? + How many users are active? + Which versions of your app are people running, and + on which operating system and device type are they? + DESC + spec.homepage = "https://telemetrydeck.com/?source=cocoapods" spec.license = { :type => "MIT", :file => "LICENSE" } spec.author = { "Daniel Jilg" => "daniel@telemetrydeck.com" } spec.ios.deployment_target = "12.0" From 965ac734034712a4e31fca9284ee14af3eebe353 Mon Sep 17 00:00:00 2001 From: Daniel Jilg Date: Wed, 10 Jan 2024 16:30:30 +0100 Subject: [PATCH 03/10] Update Swift Version --- TelemetryClient.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TelemetryClient.podspec b/TelemetryClient.podspec index e940e38..c27c55d 100644 --- a/TelemetryClient.podspec +++ b/TelemetryClient.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |spec| spec.name = "TelemetryDeck SDK" spec.version = "1.5.0" spec.summary = "Client SDK for TelemetryDeck" - spec.swift_versions = "5.6" + spec.swift_versions = "5.2" spec.summary = "Swift SDK for TelemetryDeck, a privacy-first analytics service for apps. Sign up for a free account at telemetrydeck.com." spec.description = <<-DESC Build better products with live usage data. From 93f16ad0e8dc3df74047234ac09f752cff866ee9 Mon Sep 17 00:00:00 2001 From: Daniel Jilg Date: Thu, 11 Jan 2024 09:53:00 +0100 Subject: [PATCH 04/10] rename podspec name --- TelemetryClient.podspec => TelemetryDeckSDK.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename TelemetryClient.podspec => TelemetryDeckSDK.podspec (97%) diff --git a/TelemetryClient.podspec b/TelemetryDeckSDK.podspec similarity index 97% rename from TelemetryClient.podspec rename to TelemetryDeckSDK.podspec index c27c55d..4fa2c81 100644 --- a/TelemetryClient.podspec +++ b/TelemetryDeckSDK.podspec @@ -1,5 +1,5 @@ Pod::Spec.new do |spec| - spec.name = "TelemetryDeck SDK" + spec.name = "TelemetryDeckSDK" spec.version = "1.5.0" spec.summary = "Client SDK for TelemetryDeck" spec.swift_versions = "5.2" From 9e70726848ec07979fbb74b3ed1823b1b680ecb9 Mon Sep 17 00:00:00 2001 From: Daniel Jilg Date: Thu, 11 Jan 2024 10:18:11 +0100 Subject: [PATCH 05/10] Add GH Action --- .github/workflows/cocoapods.yaml | 25 +++++++++++++++++++++++++ TelemetryDeckSDK.podspec | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cocoapods.yaml diff --git a/.github/workflows/cocoapods.yaml b/.github/workflows/cocoapods.yaml new file mode 100644 index 0000000..cccb3df --- /dev/null +++ b/.github/workflows/cocoapods.yaml @@ -0,0 +1,25 @@ +name: deploy_to_cocoapods + +on: + push: + tags: + - "*" + +jobs: + build: + runs-on: macOS-latest + + steps: + - uses: actions/checkout@v1 + + - name: Install Cocoapods + run: gem install cocoapods + + - name: Deploy to Cocoapods + run: | + set -eo pipefail + export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`) + pod lib lint --allow-warnings + pod trunk push --allow-warnings + env: + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} diff --git a/TelemetryDeckSDK.podspec b/TelemetryDeckSDK.podspec index 4fa2c81..8705ca0 100644 --- a/TelemetryDeckSDK.podspec +++ b/TelemetryDeckSDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "TelemetryDeckSDK" - spec.version = "1.5.0" + spec.version = ENV['LIB_VERSION'] || '1.5.0' #fallback to major version spec.summary = "Client SDK for TelemetryDeck" spec.swift_versions = "5.2" spec.summary = "Swift SDK for TelemetryDeck, a privacy-first analytics service for apps. Sign up for a free account at telemetrydeck.com." From 76336e1e31bc9aa963ab3c973b53869dbc6ddfbc Mon Sep 17 00:00:00 2001 From: Daniel Jilg Date: Thu, 11 Jan 2024 10:19:57 +0100 Subject: [PATCH 06/10] Run cocoapods action on PR (just to test it out) --- .github/workflows/cocoapods.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cocoapods.yaml b/.github/workflows/cocoapods.yaml index cccb3df..508e8ef 100644 --- a/.github/workflows/cocoapods.yaml +++ b/.github/workflows/cocoapods.yaml @@ -4,6 +4,9 @@ on: push: tags: - "*" + pull_request: + branches: + - "*" jobs: build: From efb33cd9962cf656e92aab959620472ba3cbdf44 Mon Sep 17 00:00:00 2001 From: Daniel Jilg Date: Thu, 11 Jan 2024 11:15:47 +0100 Subject: [PATCH 07/10] Remove an erroneous .h file --- Sources/TelemetryClient/TelemetryClient.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/TelemetryClient/TelemetryClient.h b/Sources/TelemetryClient/TelemetryClient.h index 175da12..4006053 100644 --- a/Sources/TelemetryClient/TelemetryClient.h +++ b/Sources/TelemetryClient/TelemetryClient.h @@ -7,5 +7,5 @@ FOUNDATION_EXPORT double TelemetryClientVersionNumber; FOUNDATION_EXPORT const unsigned char TelemetryClientVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import -#import +//#import From 4d56fbeaacc8fbc31c53abf5aea0dbbde18d6dcd Mon Sep 17 00:00:00 2001 From: Daniel Jilg Date: Thu, 11 Jan 2024 11:20:29 +0100 Subject: [PATCH 08/10] Completely remove reference to TelemetryClient/TelemetryClient.h --- Sources/TelemetryClient/TelemetryClient.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Sources/TelemetryClient/TelemetryClient.h b/Sources/TelemetryClient/TelemetryClient.h index 4006053..df1fd84 100644 --- a/Sources/TelemetryClient/TelemetryClient.h +++ b/Sources/TelemetryClient/TelemetryClient.h @@ -7,5 +7,4 @@ FOUNDATION_EXPORT double TelemetryClientVersionNumber; FOUNDATION_EXPORT const unsigned char TelemetryClientVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import -//#import From af8a59338c2876f7f0ae3f422031aafb6c2d9bc2 Mon Sep 17 00:00:00 2001 From: Daniel Jilg Date: Thu, 11 Jan 2024 11:47:17 +0100 Subject: [PATCH 09/10] Completely remove line --- Sources/TelemetryClient/TelemetryClient.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/TelemetryClient/TelemetryClient.h b/Sources/TelemetryClient/TelemetryClient.h index df1fd84..8f6133e 100644 --- a/Sources/TelemetryClient/TelemetryClient.h +++ b/Sources/TelemetryClient/TelemetryClient.h @@ -7,4 +7,4 @@ FOUNDATION_EXPORT double TelemetryClientVersionNumber; FOUNDATION_EXPORT const unsigned char TelemetryClientVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import - +// #import From 08918f0e0477d0f30ad613eccf1dd856c47fffed Mon Sep 17 00:00:00 2001 From: Daniel Jilg Date: Thu, 11 Jan 2024 12:15:39 +0100 Subject: [PATCH 10/10] Use correct podspec name --- .github/workflows/cocoapods.yaml | 3 --- Sources/TelemetryClient/TelemetryClient.h | 2 +- TelemetryDeckSDK.podspec => TelemetryClient.podspec | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) rename TelemetryDeckSDK.podspec => TelemetryClient.podspec (97%) diff --git a/.github/workflows/cocoapods.yaml b/.github/workflows/cocoapods.yaml index 508e8ef..cccb3df 100644 --- a/.github/workflows/cocoapods.yaml +++ b/.github/workflows/cocoapods.yaml @@ -4,9 +4,6 @@ on: push: tags: - "*" - pull_request: - branches: - - "*" jobs: build: diff --git a/Sources/TelemetryClient/TelemetryClient.h b/Sources/TelemetryClient/TelemetryClient.h index 8f6133e..5bbffaf 100644 --- a/Sources/TelemetryClient/TelemetryClient.h +++ b/Sources/TelemetryClient/TelemetryClient.h @@ -7,4 +7,4 @@ FOUNDATION_EXPORT double TelemetryClientVersionNumber; FOUNDATION_EXPORT const unsigned char TelemetryClientVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import -// #import +#import diff --git a/TelemetryDeckSDK.podspec b/TelemetryClient.podspec similarity index 97% rename from TelemetryDeckSDK.podspec rename to TelemetryClient.podspec index 8705ca0..2704c92 100644 --- a/TelemetryDeckSDK.podspec +++ b/TelemetryClient.podspec @@ -1,5 +1,5 @@ Pod::Spec.new do |spec| - spec.name = "TelemetryDeckSDK" + spec.name = "TelemetryClient" spec.version = ENV['LIB_VERSION'] || '1.5.0' #fallback to major version spec.summary = "Client SDK for TelemetryDeck" spec.swift_versions = "5.2"