creamy-plastic-26432
01/23/2025, 6:10 PMtrackingCallback
is never called, and the experiment doesn't work.
The only way I can get it to work is by using the user_uuid
attribute. Then the callback is called and the experiment works fine.
I've tried creating many attribute types and seeing if they will match, but none work.
Does anyone have any suggestions on what to do?
if let growthBook = growthBook {
self.growthBook = growthBook
} else {
let builder = GrowthBookBuilder(
apiHost: apiHost,
clientKey: clientKey,
attributes: [
// None of these work
"platform": "tvos", // enum attribute type
"platform_is_tv_tvos": true, // boolean type
"is_tvos": "true" // string type
// If I use the user_uuid experimentation works
// "user_uuid": "3A662C6E-0A43-4BFB-B691-B25D685CD409"
],
trackingCallback: { experiment, result in
print("[Debug] Experiment \(experiment.key) assigned variation \(result.variationId) with result \(result.value)")
}
)
let sdk = builder.initializer()
self.growthBook = GrowthBookSDKWrapper(sdk: sdk)
}
freezing-postman-69602
01/24/2025, 5:02 PMcreamy-plastic-26432
01/24/2025, 5:05 PMuser_uuid
as an attribute. Thank you.