Hi <@U06LR7J7REK>, could you please provide additi...
# sdk-swift
c
Hi @bright-pharmacist-73946, could you please provide additional information about this issue? We've conducted multiple tests, and each time we received features whether background sync was set to true or false. Additionally, in this version, we have fixed the issue with the tracking callback, which now runs only once per experiment.
b
Hi @calm-dog-24239 thank you for getting back to me. here is the setup I am using in the Swift SDK.
Copy code
let growthBookSDK = GrowthBookBuilder(apiHost: "<https://cdn.growthbook.io>", clientKey: <client key defined in the connection>,
encryptionKey: <key defined in connection>,
attributes: <client attributes>,
trackingCallback: trackingCallback,
refreshHandler: refreshHandler,
backgroundSync: false).initializer()
After the refresh handler is called, I check the features I have defined ( I have two defined for the environment I am testing in) and the result I get back is :
Copy code
po growthBookSDK?.getFeatures()
▿ Optional<Dictionary<String, Feature>>
  - some : 0 elements
Yesterday when I posted I could change
backgroundSync
to
true
and get features back. Today, no features are returned regardless of `backgroundSync`state. I am not really sure what is happening at this point. I do notice that on the connection setup screen in the GrowthBook App, the Swift SDK Version says 1.0.44.
Screenshot 2024-03-01 at 10.13.00 AM.png
A few additional data points that might be helpful: 1. I have encryption enabled for my connection 2. I recreated the connection and when I run my app I see that it connects successfully on the GrowthBook App when viewing my connection page. 3. The connection page shows the 1.0.44 setup instructions using the now removed
GrowthBookBuilder(url:encryptionKey:trackingCallback:)
4. When I switch back to 1.0.44 everything works again.
c
Thank you for the information. Now it will be easier to detect the issue. We will take a look at it and let you know when we will fix it.