Skip to content

Add iOS SDK configuration plist for Flutter identification#46

Open
ab1470 wants to merge 8 commits intomasterfrom
ab/MAGE-284/add-sdk-config-plist
Open

Add iOS SDK configuration plist for Flutter identification#46
ab1470 wants to merge 8 commits intomasterfrom
ab/MAGE-284/add-sdk-config-plist

Conversation

@ab1470
Copy link
Contributor

@ab1470 ab1470 commented Feb 27, 2026

Summary

  • Adds a klaviyo-sdk-configuration.plist to the iOS plugin so the native Swift SDK identifies outgoing requests as coming from the Flutter SDK
  • Adds s.resources to the podspec so the plist gets bundled into the host app
  • Adds a pre-commit hook to ensure that the SDK version number in the plist is in sync with the version number in the pubspec.yaml.
    • The pubspec.yaml is the source of truth
    • This pre-commit hook only runs when the developer commits changes to the pubspec.yaml file
  • Adds a Github workflow to validate that the SDK version number in the plist is in sync with the version number in the pubspec.yaml.

Once the companion Swift SDK change is released, this will cause:

  • User-Agent on iOS network requests to show klaviyo-flutter/1.0.0 instead of klaviyo-swift/5.2.0
  • Push token payloads to report flutter as klaviyo_sdk and 1.0.0 as sdk_version
  • Event metadata to report flutter for SDK Name and 1.0.0 for SDK Version

Dependencies

  • Requires klaviyo-swift-sdk#519 to be merged and released — that PR removes the React Native-specific guard that currently prevents the plist from being read in non-RN apps
  • The KlaviyoSwift dependency version pin in the podspec will need to be bumped to whichever Swift SDK release includes that change

Test plan

  • With the Swift SDK change applied locally, verify that iOS network requests show klaviyo-flutter/1.0.0 in the User-Agent
  • Verify push token payloads report flutter / 1.0.0
  • Verify event metadata reports flutter / 1.0.0

Related issues

  • Linear: MAGE-284
  • Jira: CHNL-31878

🤖 Generated with Claude Code

@ab1470 ab1470 marked this pull request as ready for review February 27, 2026 20:10
@ab1470 ab1470 requested a review from a team as a code owner February 27, 2026 20:10
@klaviyoit klaviyoit requested a review from dan-peluso February 27, 2026 20:10
@ab1470 ab1470 marked this pull request as draft February 27, 2026 20:13
s.author = { 'Klaviyo' => 'support@klaviyo.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.resources = ['klaviyo-sdk-configuration.plist']
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation on s.resources line

Low Severity

The s.resources line uses 2-space indentation while all other spec attribute lines (e.g. s.source_files, s.dependency) use 4-space indentation. This breaks the visual consistency of the podspec file.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just not accurate 🫠

@ab1470 ab1470 force-pushed the ab/MAGE-284/add-sdk-config-plist branch from a75c925 to a767dc4 Compare February 27, 2026 20:39
@ab1470 ab1470 marked this pull request as ready for review February 27, 2026 20:39
<key>klaviyo_sdk_name</key>
<string>flutter</string>
<key>klaviyo_sdk_version</key>
<string>1.0.0</string>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we change this to 0.1.0-alpha.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. I also did two things to ensure this value is kept in sync:

  1. I added a pre-commit hook that automatically updates this value to match the pubspec.yaml whenever that file changes.
  2. I added a Github workflow that validates that this plist value is in sync with the pubspec.yaml value.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice - I also added a 'bump version' script. I have it modify a plist but mind running it now that it's merged to see if it works?

Copy link
Contributor

@dan-peluso dan-peluso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably want some ios eyes, and def change that version but otherwise lgtm

@ab1470 ab1470 force-pushed the ab/MAGE-284/add-sdk-config-plist branch from a767dc4 to b68f811 Compare March 2, 2026 22:57
@ab1470 ab1470 force-pushed the ab/MAGE-284/add-sdk-config-plist branch from b68f811 to 90ae295 Compare March 3, 2026 04:06
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

@ab1470 ab1470 force-pushed the ab/MAGE-284/add-sdk-config-plist branch from 46827ff to 4cd5082 Compare March 3, 2026 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants