diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..5ace4600 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 7284e04d..8bab2851 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,15 +1,3 @@ -## Type of change -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) -## Checklist: -- [ ] Version updated in `README` -- [ ] Version updated in `RSConstants.m`(v1)/`RSConstant.swift`(v2) -- [ ] Version updated in `Rudder.xcodeproj` -- [ ] Version updated in `Rudder.podspec` -- [ ] `CHANGELOG` Updated -- [ ] I have performed a self-review of my own code -- [ ] I have commented my code, particularly in hard-to-understand areas -- [ ] I have added unit tests for the code -- [ ] I have made corresponding changes to the documentation -- [ ] Passed `pod lib lint --no-clean --allow-warnings` +# Description + +< Replace with adequate description for this PR> diff --git a/.github/workflows/build-and-quality-checks.yml b/.github/workflows/build-and-quality-checks.yml new file mode 100644 index 00000000..422624fb --- /dev/null +++ b/.github/workflows/build-and-quality-checks.yml @@ -0,0 +1,35 @@ +name: Code Quality Checks +on: + pull_request: + branches: ['master', 'develop'] + types: ['opened', 'reopened', 'synchronize'] + +jobs: + build: + name: Code Quality Checks + runs-on: macOS-latest + + steps: + - name: Checkout source branch + uses: actions/checkout@v3 + + - name: Install xcpretty + run: gem install xcpretty + + - name: Build SDK(iOS) + run: | + xcodebuild build -scheme RudderSDK-iOS -workspace Rudder.xcworkspace -destination 'platform=iOS Simulator,name=iPhone 13' | xcpretty + + - name: Build SDK(watchOS) + run: | + xcodebuild build -scheme RudderSDK-iOS -workspace Rudder.xcworkspace -destination 'platform=watchOS Simulator,name=Apple Watch Series 7 - 45mm' | xcpretty + + - name: Build SDK(tvOS) + run: | + xcodebuild build -scheme RudderSDK-iOS -workspace Rudder.xcworkspace -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty + + - name: Install Cocoapods + run: gem install cocoapods + + - name: Execute pod lint + run: pod lib lint --no-clean --allow-warnings diff --git a/.github/workflows/check-pr-title.yml b/.github/workflows/check-pr-title.yml new file mode 100644 index 00000000..a5c1188e --- /dev/null +++ b/.github/workflows/check-pr-title.yml @@ -0,0 +1,16 @@ +name: Check PR title +on: + pull_request: + branches: ['master', 'develop'] + types: ['opened', 'reopened', 'edited', 'synchronize'] + +jobs: + check_pr_title: + name: Check PR title + runs-on: ubuntu-latest + steps: + - name: Checkout source branch + uses: actions/checkout@v3 + + - name: Check PR title + uses: rudderlabs/github-action-check-pr-title@v1.0.7 diff --git a/.github/workflows/create-hotfix-branch.yml b/.github/workflows/create-hotfix-branch.yml new file mode 100644 index 00000000..40e3f767 --- /dev/null +++ b/.github/workflows/create-hotfix-branch.yml @@ -0,0 +1,21 @@ +name: Create new hotfix branch + +on: + workflow_dispatch: + inputs: + hotfix_name: + description: Hotfix branch name + required: true + +jobs: + create-branch: + name: Create new branch + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/master' + steps: + - name: Create branch + uses: peterjgrainger/action-create-branch@v2.2.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + branch: 'hotfix/${{ github.event.inputs.hotfix_name }}' diff --git a/.github/workflows/deploy-cocoapods.yml b/.github/workflows/deploy-cocoapods.yml new file mode 100644 index 00000000..6fc38ed0 --- /dev/null +++ b/.github/workflows/deploy-cocoapods.yml @@ -0,0 +1,22 @@ +name: Deploy to Cocoapods + +on: + release: + types: [created] + +jobs: + build: + name: Deploy to Cocoapods + runs-on: macOS-latest + steps: + - name: Checkout source branch + uses: actions/checkout@v3 + + - name: Install Cocoapods + run: gem install cocoapods + + - name: Publish to CocoaPod + env: + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} + run: | + pod trunk push --allow-warnings diff --git a/.github/workflows/draft-new-release.yml b/.github/workflows/draft-new-release.yml new file mode 100644 index 00000000..1744a78c --- /dev/null +++ b/.github/workflows/draft-new-release.yml @@ -0,0 +1,90 @@ +name: Draft new release + +on: + workflow_dispatch + +jobs: + draft-new-release: + name: Draft a new release + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/heads/develop') || startsWith(github.ref, 'refs/heads/hotfix/') + steps: + - name: Checkout source branch + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set Node 16 + uses: actions/setup-node@v3 + with: + node-version: 16 + + # In order to make a commit, we need to initialize a user. + # You may choose to write something less generic here if you want, it doesn't matter functionality wise. + - name: Initialize mandatory git config + run: | + git config user.name "GitHub actions" + git config user.email noreply@github.com + + # Calculate the next release version based on conventional semantic release + - name: Create release branch + id: create-release + env: + HUSKY: 0 + run: | + source_branch_name=${GITHUB_REF##*/} + release_type=release + grep -q "hotfix/" <<< "${GITHUB_REF}" && release_type=hotfix-release + git fetch origin master --depth=1 + git merge origin/master + current_version=$(jq -r .version package.json) + + npx standard-version --skip.commit --skip.tag --skip.changelog + new_version=$(jq -r .version package.json) + git reset --hard + + branch_name="${release_type}/${new_version}" + + echo "Source branch for new release is $source_branch_name" + echo "Current version is $current_version" + echo "Release type is $release_type" + echo "New version is $new_version" + echo "New release branch name is $branch_name" + git checkout -b "$branch_name" + git push --set-upstream origin "$branch_name" + + echo "source_branch_name=$source_branch_name" >> $GITHUB_OUTPUT + echo "branch_name=$branch_name" >> $GITHUB_OUTPUT + echo "new_version=$new_version" >> $GITHUB_OUTPUT + echo "CURRENT_VERSION_VALUE=$current_version" >> $GITHUB_ENV + echo "NEW_VERSION_VALUE=$new_version" >> $GITHUB_ENV + + - name: Update changelog & bump version + id: finish-release + env: + HUSKY: 0 + run: | + npm i -g conventional-changelog-cli + SUMMARY=$(((npx conventional-changelog -u) 2>&1) | sed "s/*/
*/g" | sed "s/#/ /g" | tr -d '\n' || true) + echo $SUMMARY + echo "Current version: $CURRENT_VERSION_VALUE" + echo "New version: $NEW_VERSION_VALUE" + npx replace $CURRENT_VERSION_VALUE $NEW_VERSION_VALUE README.md Sources/Classes/Public/RSVersion.h + git add README.md Sources/Classes/Public/RSVersion.h + echo ${{ steps.create-release.outputs.new_version }} + echo "commit_summary=$SUMMARY" >> $GITHUB_OUTPUT + npx standard-version -a + + - name: Push new version in release branch & tag + run: | + git push --follow-tags + + - name: Create pull request into master + uses: repo-sync/pull-request@v2 + with: + source_branch: ${{ steps.create-release.outputs.branch_name }} + destination_branch: 'master' + github_token: ${{ secrets.PAT }} + pr_title: "chore(release): pulling ${{ steps.create-release.outputs.branch_name }} into master" + pr_body: ":crown: *An automated PR*\n\n${{ steps.finish-release.outputs.commit_summary }}" + pr_reviewer: 'pallabmaiti' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 50455fc7..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: CI -on: - push: - tags: - - v1.* - -jobs: - build: - if: github.event.base_ref == 'refs/heads/master' - runs-on: macOS-latest - steps: - - uses: actions/checkout@v1 - - name: Publish to CocoaPod register - env: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} - run: | - pod trunk push --allow-warnings diff --git a/.github/workflows/notion-pr-sync.yml b/.github/workflows/notion-pr-sync.yml new file mode 100644 index 00000000..3d262964 --- /dev/null +++ b/.github/workflows/notion-pr-sync.yml @@ -0,0 +1,55 @@ +name: Notion PR Sync + +on: + issues: + types: + [ + opened, + edited, + deleted, + transferred, + pinned, + unpinned, + closed, + reopened, + assigned, + unassigned, + labeled, + unlabeled, + locked, + unlocked, + milestoned, + demilestoned, + ] + pull_request: + types: + [ + assigned, + unassigned, + labeled, + unlabeled, + opened, + edited, + closed, + reopened, + synchronize, + converted_to_draft, + ready_for_review, + locked, + unlocked, + review_requested, + review_request_removed, + auto_merge_enabled, + auto_merge_disabled, + ] + +jobs: + request: + runs-on: ubuntu-latest + steps: + - name: Sync Github PRs to Notion + uses: sivashanmukh/github-notion-pr-sync@1.0.0 + with: + notionKey: ${{ secrets.NOTION_BOT_KEY }} + notionDatabaseId: ${{ secrets.NOTION_PR_DB_ID }} + githubKey: ${{ secrets.PAT }} diff --git a/.github/workflows/publish-new-release.yml b/.github/workflows/publish-new-release.yml new file mode 100644 index 00000000..5496acd0 --- /dev/null +++ b/.github/workflows/publish-new-release.yml @@ -0,0 +1,66 @@ +name: Publish new github release + +on: + pull_request: + branches: + - master + types: + - closed + +jobs: + release: + name: Publish new release + runs-on: ubuntu-latest + if: (startsWith(github.event.pull_request.head.ref, 'release/') || startsWith(github.event.pull_request.head.ref, 'hotfix-release/')) && github.event.pull_request.merged == true # only merged pull requests must trigger this job + steps: + - name: Extract version from branch name (for release branches) + id: extract-version + run: | + BRANCH_NAME="${{ github.event.pull_request.head.ref }}" + VERSION=${BRANCH_NAME#hotfix-} + VERSION=${VERSION#release/} + echo "release_version=$VERSION" >> $GITHUB_OUTPUT + + - name: Checkout source branch + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set Node 16 + uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: Create Github Release + id: create_release + env: + HUSKY: 0 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + npx conventional-github-releaser -p angular + + - name: Create pull request into develop + uses: repo-sync/pull-request@v2 + with: + source_branch: 'master' + destination_branch: 'develop' + github_token: ${{ secrets.PAT }} + pr_title: "chore(release): pulling master into develop post release v${{ steps.extract-version.outputs.release_version }}" + pr_body: ':crown: *An automated PR*' + + - name: Delete hotfix release branch + uses: koj-co/delete-merged-action@master + if: startsWith(github.event.pull_request.head.ref, 'hotfix-release/') + with: + branches: 'hotfix-release/*' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Delete release branch + uses: koj-co/delete-merged-action@master + if: startsWith(github.event.pull_request.head.ref, 'release/') + with: + branches: 'release/*' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 80410c32..bd4e163c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,89 +1,139 @@ # Changelog All notable changes to this project will be documented in this file. -## Version - 1.1.4 - 2021-11-08 -### Added -- Automatic App Life cycle events tracking is added. `Application Installed`, `Application Updated`, `Application Opened`, `Application Backgrounded`. It is tracked by default and can be turned off using `RudderConfig`. -- Automatic Screen view events tracking is added. All `ViewControllers` are tracked once you turn on using `RudderConfig` -- Added support for ECommerce events from the SDK. Different builders for important events are added. -- A new header `anonymousId` is added to the request to `data-plane` along with `writeKey` to handle sticky-session at the server. -- Added support for open-source config generator. -- Added GDPR support. -- Added tvOS support. -### Changed -- Pod name from `RudderSDKCore` to `Rudder` and main header file from `RudderSDKCore.h` to `Rudder.h`. Please follow the doumentation page for more information. -- New field `userId` is supported to make it more compliant under `context->traits` for `identify` and all successive calls. Old filed for developer identification i.e. `id` is still supported. -- Removed User agent - -## Version - 1.1.5 - 2021-11-18 -### Changed -- Bugfix - timestamp as Gregorian Calender. - -## Version - 1.2.1 - 2021-11-22 -### Changed -- Added Support for Setting device token before SDK initialization as well. - -## Version - 1.2.2 - 2021-12-06 -### Changed -- Added logic to filter out the property which are not set for Application Opened event. - -## Version - 1.3.0 - 2021-12-29 -### Additions -- Added support for additional background run time through configuration on iOS, tvOS. -- Added watchOS as a supported platform. - -## Version - 1.3.1 - 2021-12-30 -### Changed -- Optimized the GDPR by removing the un-necessary checks in the life cycle events tracking code. - -## Version - 1.4.0 - 2021-12-29 -### Additions -- Added support for additional background run time through configuration on watchOS as well along with iOS, tvOS. - -## Version - 1.4.1 - 2022-01-11 -### Fix -- Fixed building issue via Carthage for watchOS & tvOS. - -## Version - 1.4.2 - 2022-01-12 -### Fix -- Fixed Memory leak issue while replaying events to the device mode factories once they are initialized. - -## Version - 1.5.0 - 2022-01-20 +### [1.7.0](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.6.4...v1.7.0) (2022-09-22) + + ### Feature -- Added Support for Client Side Event Filtering for Device Mode Destinations +* Added session tracking. + +### [1.6.4](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.6.3...v1.6.4) (2022-08-24) + + +### Bug Fixes + +* Made `context.device.attTrackingStatus` independent of `context.device.advertisingId` so that the att Tracking status would be sent along in the payload even if the advertisingId is nil as opposed to prior. +* Handled an edge case where in if the RSOption objects are created even before the SDK was initialized, the queue it was trying to dispatch a task on is nil and resulted in crash. + +### [1.6.3](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.6.2...v1.6.3) (2022-07-13) + + +### Bug Fixes + +* Removed HardCoded Status values of Bluetooth, Cellular, Wifi from the context object of the event payload + +### [1.6.2](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.6.1...v1.6.2) (2022-06-28) + + +### Bug Fixes + +* Fixed additional / in the url for both control plane url and dataplaneurl as a result of which the network requests to both control plane and data plane url are being failed. + +### [1.6.1](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.6.0...v1.6.1) (2022-06-22) + + +### Bug Fixes -## Version - 1.5.1 - 2022-02-11 -### Fix -- Removed warnings +* Included Build Number as well in the life cycle events Application Installed & Application Updated. +* Accepting path as well as part of the url for both control plane url and data plane url. -## Version - 1.5.2 - 2022-02-16 -### Fix -- Thread issue +### [1.6.0](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.5.3...v1.6.0) (2022-05-06) -## Version - 1.5.3 - 2022-03-07 -### Fix -- Improper timestamp issue -## Version - 1.6.0 - 2022-05-04 ### Feature -- Flush API -## Version - 1.6.1 - 2022-06-20 -- Included Build Number as well in the life cycle events Application Installed & Application Updated. -- Accepting path as well as part of the url for both control plane url and data plane url. +* Flush API -## Version - 1.6.2 - 2022-06-28 -- Fixed additional / in the url for both control plane url and dataplaneurl as a result of which the network requests to both control plane and data plane url are being failed. +### [1.5.3](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.5.2...v1.5.3) (2022-04-07) -## Version - 1.6.3 - 2022-07-11 -- Removed HardCoded Status values of Bluetooth, Cellular, Wifi from the context object of the event payload -## Version - 1.6.4 - 2022-08-24 -- Made `context.device.attTrackingStatus` independent of `context.device.advertisingId` so that the att Tracking status would be sent along in the payload even if the advertisingId is nil as opposed to prior. -- Handled an edge case where in if the RSOption objects are created even before the SDK was initialized, the queue it was trying to dispatch a task on is nil and resulted in crash. +### Bug Fixes + +* Improper timestamp issue + +### [1.5.2](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.5.1...v1.5.2) (2022-02-16) + + +### Bug Fixes + +* Thread issue + +### [1.5.1](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.5.0...v1.5.1) (2022-02-11) + + +### Bug Fixes + +* Removed warnings + +### [1.5.0](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.4.2...v1.5.0) (2022-01-20) + -## Version - 1.7.0 - 2022-07-14 ### Feature -- Added session tracking. +* Added Support for Client Side Event Filtering for Device Mode Destinations + +### [1.4.2](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.4.1...v1.4.2) (2022-01-12) + + +### Bug Fixes + +* Fixed Memory leak issue while replaying events to the device mode factories once they are initialized. + +### [1.4.1](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.3.1...v1.4.1) (2022-01-11) + + +### Feature + +* Added support for additional background run time through configuration on watchOS as well along with iOS, tvOS. + +### Bug Fixes + +* Fixed building issue via Carthage for watchOS & tvOS. + +### [1.3.1](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.2.2...v1.3.1) (2021-12-30) + + +### Feature + +* Added support for watchOS. +* Added support for event sending from background mode. + +### Bug Fixes + +* Optimized the GDPR by removing the un-necessary checks in the life cycle events tracking code. + +### [1.2.2](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.2.1...v1.2.2) (2021-12-13) + + +### Bug Fixes + +* Added logic to filter out the property which are not set for Application Opened event. + +### [1.2.1](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.2.0...v1.2.1) (2021-11-25) + + +### Bug Fixes + +* Method 'setAnonymousId' marked as deprecated method + +### [1.2.0](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.1.5...v1.2.0) (2021-11-24) + + +### Feature + +* Added Support for Setting device token before SDK initialization as well. + +### [1.1.5](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.1.4...v1.1.5) (2021-11-18) + + +### Bug Fixes + +* Timestamp as Gregorian Calender. + +### [1.1.4](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.1.3...v1.1.4) (2021-11-08) + + +### Bug Fixes + +* Removed User agent diff --git a/Examples/RudderSampleAppSwift/RudderSampleAppSwift/AppDelegate.swift b/Examples/RudderSampleAppSwift/RudderSampleAppSwift/AppDelegate.swift index e51df776..8cdb33f8 100644 --- a/Examples/RudderSampleAppSwift/RudderSampleAppSwift/AppDelegate.swift +++ b/Examples/RudderSampleAppSwift/RudderSampleAppSwift/AppDelegate.swift @@ -18,7 +18,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // Override point for customization after application launch. let builder: RSConfigBuilder = RSConfigBuilder() - .withLoglevel(RSLogLevelNone) + .withLoglevel(RSLogLevelDebug) .withDataPlaneUrl("http://localhost:8080") .withTrackLifecycleEvens(false) .withRecordScreenViews(false) diff --git a/Rudder.podspec b/Rudder.podspec index 126da2c5..055c533a 100644 --- a/Rudder.podspec +++ b/Rudder.podspec @@ -1,6 +1,10 @@ +require 'json' + +package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) + Pod::Spec.new do |s| s.name = 'Rudder' - s.version = "1.7.0" + s.version = package['version'] s.summary = "Privacy and Security focused Segment-alternative. iOS ,tvOS and watchOS SDK" s.description = <<-DESC Rudder is a platform for collecting, storing and routing customer event data to dozens of tools. Rudder is open-source, can run in your cloud environment (AWS, GCP, Azure or even your data-centre) and provides a powerful transformation framework to process your event data on the fly. diff --git a/Rudder.xcodeproj/project.pbxproj b/Rudder.xcodeproj/project.pbxproj index 32e86ffa..de2278b8 100644 --- a/Rudder.xcodeproj/project.pbxproj +++ b/Rudder.xcodeproj/project.pbxproj @@ -176,6 +176,7 @@ ED83FFFD27310B44006F27B3 /* RSECommerceCheckoutBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = ED83FF5627310B44006F27B3 /* RSECommerceCheckoutBuilder.m */; }; ED83FFFE27310B44006F27B3 /* RSECommerceCouponBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = ED83FF5727310B44006F27B3 /* RSECommerceCouponBuilder.m */; }; ED83FFFF27310B44006F27B3 /* RSECommerceOrder.h in Headers */ = {isa = PBXBuildFile; fileRef = ED83FF5827310B44006F27B3 /* RSECommerceOrder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + ED857DF4291279CF00B7BFCE /* RSVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = ED857DF32912773300B7BFCE /* RSVersion.h */; settings = {ATTRIBUTES = (Public, ); }; }; F623D3AB27954BF10027CBC3 /* RSEventFilteringPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = F623D3AA27954BF10027CBC3 /* RSEventFilteringPlugin.m */; }; F623D3AD27954C010027CBC3 /* RSEventFilteringPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = F623D3AC27954C010027CBC3 /* RSEventFilteringPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; F6A146842769DBC6009EF620 /* WKInterfaceController+RSScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = F6A146832769DBC5009EF620 /* WKInterfaceController+RSScreen.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -192,7 +193,6 @@ ED83FDAF2731019F006F27B3 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; ED83FDB02731019F006F27B3 /* Rudder.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Rudder.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; ED83FDB12731019F006F27B3 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - ED83FDB22731019F006F27B3 /* release.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = release.sh; sourceTree = ""; }; ED83FE5D2731019F006F27B3 /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; ED83FE5E2731019F006F27B3 /* Podfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Podfile; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; ED83FF0D27310B44006F27B3 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -361,6 +361,11 @@ ED83FFB427310B44006F27B3 /* RSEventRepository.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSEventRepository.m; sourceTree = ""; }; ED83FFB527310B44006F27B3 /* RSScreenPropertyBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSScreenPropertyBuilder.m; sourceTree = ""; }; ED83FFB627310B44006F27B3 /* RSLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSLogger.m; sourceTree = ""; }; + ED857DEF2912752300B7BFCE /* package.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = package.json; sourceTree = ""; }; + ED857DF02912754400B7BFCE /* .github */ = {isa = PBXFileReference; lastKnownFileType = folder; path = .github; sourceTree = ""; }; + ED857DF12912754400B7BFCE /* CODEOWNERS */ = {isa = PBXFileReference; lastKnownFileType = text; path = CODEOWNERS; sourceTree = ""; }; + ED857DF22912754400B7BFCE /* CONTRIBUTING.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CONTRIBUTING.md; sourceTree = ""; }; + ED857DF32912773300B7BFCE /* RSVersion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RSVersion.h; sourceTree = ""; }; F623D3AA27954BF10027CBC3 /* RSEventFilteringPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSEventFilteringPlugin.m; sourceTree = ""; }; F623D3AC27954C010027CBC3 /* RSEventFilteringPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RSEventFilteringPlugin.h; sourceTree = ""; }; F6A146832769DBC5009EF620 /* WKInterfaceController+RSScreen.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WKInterfaceController+RSScreen.h"; sourceTree = ""; }; @@ -383,13 +388,7 @@ 06CABB7A2630C3CA0097BEFF = { isa = PBXGroup; children = ( - ED83FE5D2731019F006F27B3 /* CHANGELOG.md */, - ED83FDB12731019F006F27B3 /* LICENSE */, - ED83FDAE2731019F006F27B3 /* Package.swift */, - ED83FE5E2731019F006F27B3 /* Podfile */, - ED83FDAF2731019F006F27B3 /* README.md */, - ED83FDB22731019F006F27B3 /* release.sh */, - ED83FDB02731019F006F27B3 /* Rudder.podspec */, + ED857DEE2912750900B7BFCE /* Others */, ED83FDB32731019F006F27B3 /* Sources */, 06CABB852630C3CA0097BEFF /* Products */, 06CABC2D2630C6660097BEFF /* Frameworks */, @@ -561,6 +560,7 @@ ED83FF3D27310B44006F27B3 /* RSTraitsBuilder.h */, ED3084812891900100A357E3 /* RSUserSession.h */, ED83FF4227310B44006F27B3 /* RSUtils.h */, + ED857DF32912773300B7BFCE /* RSVersion.h */, ED83FFA427310B44006F27B3 /* RSWishListProductAddedToCartEvent.h */, ED83FF2927310B44006F27B3 /* Rudder.h */, ED83FF4427310B44006F27B3 /* UIViewController+RSScreen.h */, @@ -632,6 +632,23 @@ path = Events; sourceTree = ""; }; + ED857DEE2912750900B7BFCE /* Others */ = { + isa = PBXGroup; + children = ( + ED857DF02912754400B7BFCE /* .github */, + ED857DF12912754400B7BFCE /* CODEOWNERS */, + ED857DF22912754400B7BFCE /* CONTRIBUTING.md */, + ED83FE5D2731019F006F27B3 /* CHANGELOG.md */, + ED83FDB12731019F006F27B3 /* LICENSE */, + ED857DEF2912752300B7BFCE /* package.json */, + ED83FDAE2731019F006F27B3 /* Package.swift */, + ED83FE5E2731019F006F27B3 /* Podfile */, + ED83FDAF2731019F006F27B3 /* README.md */, + ED83FDB02731019F006F27B3 /* Rudder.podspec */, + ); + name = Others; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -643,6 +660,7 @@ ED83FFD927310B44006F27B3 /* RSEventRepository.h in Headers */, ED83FFDA27310B44006F27B3 /* RSElementCache.h in Headers */, ED83FFE527310B44006F27B3 /* RSTraitsBuilder.h in Headers */, + ED857DF4291279CF00B7BFCE /* RSVersion.h in Headers */, ED83FFEC27310B44006F27B3 /* UIViewController+RSScreen.h in Headers */, ED83FFCC27310B44006F27B3 /* RSProperty.h in Headers */, ED83FFCA27310B44006F27B3 /* RSMessageType.h in Headers */, diff --git a/Sources/Classes/Public/RSVersion.h b/Sources/Classes/Public/RSVersion.h new file mode 100644 index 00000000..2231707b --- /dev/null +++ b/Sources/Classes/Public/RSVersion.h @@ -0,0 +1,13 @@ +// +// RSVersion.h +// Rudder +// +// Created by Pallab Maiti on 02/11/22. +// + +#ifndef RSVersion_h +#define RSVersion_h + +NSString *const SDK_VERSION = @"1.7.0"; + +#endif /* RSVersion_h */ diff --git a/Sources/Classes/RSConstants.m b/Sources/Classes/RSConstants.m index 70a47dd5..49a7e55c 100644 --- a/Sources/Classes/RSConstants.m +++ b/Sources/Classes/RSConstants.m @@ -6,6 +6,7 @@ // #import "RSConstants.h" +#import "RSVersion.h" @implementation RSConstants @@ -21,7 +22,7 @@ @implementation RSConstants bool const RSRecordScreenViews = NO; bool const RSEnableBackgroundMode = NO; bool const RSAutomaticSessionTracking = YES; -NSString *const RS_VERSION = @"1.7.0"; +NSString *const RS_VERSION = SDK_VERSION; NSString* const DISABLE = @"disable"; NSString* const WHITELISTED_EVENTS = @"whitelistedEvents"; NSString* const BLACKLISTED_EVENTS = @"blacklistedEvents"; diff --git a/package.json b/package.json new file mode 100644 index 00000000..b4037055 --- /dev/null +++ b/package.json @@ -0,0 +1,4 @@ +{ + "version": "1.7.0", + "description": "Rudder is a platform for collecting, storing and routing customer event data to dozens of tools" +} diff --git a/release.sh b/release.sh deleted file mode 100755 index f1d0e9d5..00000000 --- a/release.sh +++ /dev/null @@ -1,8 +0,0 @@ -read -p "Are you sure to release? " -n 1 -r -echo # (optional) move to a new line -if [[ $REPLY =~ ^[Yy]$ ]] -then - git tag -a $1 -m "Release $1" - git push origin $1 -fi -