diff --git a/.github/workflows/build-and-quality-checks-v2.yml b/.github/workflows/build-and-quality-checks-v2.yml index a295736f..bb4df1d2 100644 --- a/.github/workflows/build-and-quality-checks-v2.yml +++ b/.github/workflows/build-and-quality-checks-v2.yml @@ -1,39 +1,42 @@ name: Code Quality Checks(v2) on: pull_request: - branches: ['master-v2', 'develop-v2'] - types: ['opened', 'reopened', 'synchronize'] + branches: ["master-v2", "develop-v2"] + types: ["opened", "reopened", "synchronize"] jobs: build: name: Code Quality Checks(v2) runs-on: macOS-latest - + steps: - name: Checkout source branch uses: actions/checkout@v3 - + - name: Install xcpretty run: gem install xcpretty + - name: Select Xcode version + run: sudo xcode-select -s '/Applications/Xcode_13.2.1.app/Contents/Developer' + - 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: Build SDK(macOS) run: | xcodebuild build -scheme RudderSDK-iOS -workspace Rudder.xcworkspace -destination 'platform=macOS,variant=Mac Catalyst' | xcpretty - + - name: Install Cocoapods run: gem install cocoapods - + - name: Execute pod lint run: pod lib lint --no-clean --allow-warnings diff --git a/Podfile.lock b/Podfile.lock index 9ed56f3e..e3730673 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - Rudder (2.2.4) + - Rudder (2.2.5) DEPENDENCIES: - Rudder (from `.`) @@ -9,7 +9,7 @@ EXTERNAL SOURCES: :path: "." SPEC CHECKSUMS: - Rudder: 5fb72ab3d09de72cab0a949aa7b1aad2f24947f9 + Rudder: decdbd805872e80089665333f9752c8ed317c99d PODFILE CHECKSUM: ee379229e6a0b60bc98226700ace2de002171547 diff --git a/Sources/Classes/Client/Plugins/RSContextPlugin.swift b/Sources/Classes/Client/Plugins/RSContextPlugin.swift index 6c02a19f..84ac58cf 100644 --- a/Sources/Classes/Client/Plugins/RSContextPlugin.swift +++ b/Sources/Classes/Client/Plugins/RSContextPlugin.swift @@ -118,18 +118,19 @@ class RSContextPlugin: RSPlatformPlugin { } func insertDynamicOptionData(message: RSMessage, context: inout [String: Any]) { + /// First priority will given to the `option` passed along with the event if let option = message.option { if let externalIds = option.externalIds { context["externalId"] = externalIds } if let customContexts = option.customContexts { - for key in customContexts.keys { - context[key] = [key: customContexts] + for (key, value) in customContexts { + context[key] = value } } } + // TODO: Fetch `customContexts` set using setOption API. } - } extension RSClient {