Automattic / Automattic-Tracks-iOS

Client library for tracking user events for later analysis
GNU General Public License v2.0
43 stars 12 forks source link

Groundwork to support ExPlat in Jetpack #253

Closed salimbraksa closed 1 year ago

salimbraksa commented 1 year ago

Ref p1682352977248619-slack-C04M1NX8YCR

Related PRs

This PR is blocking:

The Problem

ExPlat works in WordPress, but it doesn't in Jetpack. This is because of the following endpoint that only supports WordPress:

var assignmentsEndpoint: String {
    return "https://public-api.wordpress.com/wpcom/v2/experiments/0.1.0/assignments/\(platform)"
}

The platform variable is substituted with wpios when running WordPress and jpios when running Jetpack. The problem is that the Backend doesn't support the .../assignments/jpios endpoint.

Workaround

The Workaround that's already implemented in Android ( see p1682483378071949/1682352977.248619-slack-C04M1NX8YCR ) is to call .../assignments/wpios endpoint even on Jetpack.


salimbraksa commented 1 year ago

Hey @mokagio, any idea why buildkite/tracks-ios/validating-podspec check is failing?

crazytonyli commented 1 year ago

@salimbraksa If you use the "Jump to end" feature on buildkite, you'll see the error message:

[!] Automattic-Tracks-iOS did not pass validation, due to 72 warnings (but you can use --allow-warnings to ignore them). You can use the --no-clean option to inspect any issue.

Which is probably introduced by the new platform property.