amplitude / amplitude/experiment-ios-client

Platform reports `iOS` while running on `macOS`

オープン
#31 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Swift
スター
5
フォーク
17
平均マージ
1日 9時間
マージ済み PR(30日)
3

説明

See this line of code: https://github.com/amplitude/experiment-ios-client/blob/main/Sources/Experiment/DefaultUserProvider.swift#L54

When using the SDK on macOS, I would expect this value to be `macOS`.
The Amplitude SDK seems to do this differently, since our analytics still show users for `macOS`. However, variants are fetched using `iOS` instead:

```
[Experiment] Fetch variants for user: ["platform": "iOS", "version": "2.0.0", "user_id": "XXX", "language": "English", "os": "ios 13.3.1.", "device_id": "XXX", "device_manufacturer": "Apple", "device_model": "arm64", "library": "experiment-ios-client/1.9.0"]
```

Note the value for `os` being `ios 13.3.1.`: the macOS version is correct, but it's prefixed with `iOS` instead of `macOS`. Due to this, our experiment didn't work as we were targeting `macOS` users.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。