Hi there, I noticed that the SDK sends the reques...
# sdk-swift
l
Hi there, I noticed that the SDK sends the request to the
/sub/sdk-*
endpoint and the server returns a 401 error:
Copy code
{
  "status": 401,
  "message": "No authorization token was found"
}
The SDK was initialized with
backgroundSync: true
setting. Now we can do a release without this option, but can you help sort out the problem please? SDK: 1.0.62
Copy code
apiHost: apiHost, // we use CloudFlare CDN, but see the same error with GB's CDN
clientKey: clientKey,
encryptionKey: nil,
attributes: attributes,
trackingCallback: { experiment, result in
    trackingCallback?(experiment.key, result.variationId)
},
refreshHandler: nil,
backgroundSync: true,
remoteEval: false
c
Hi @late-ambulance-66508. Let us check that and we will write you.
👍 1
Hi @late-ambulance-66508. Are you still seeing that error? We've tried to reproduce it, but we haven't been able to.
l
Hi @calm-dog-24239. Yes, the error still persists. I'm using 1.0.62 sdk version.
c
Could you please try to update to the latest 1.0.71?
l
Will check later, now we made a release with this option turned off.
🙌 1
c
Please let us know if it will help.
l
Hi @calm-dog-24239 @future-teacher-7046 helped me to find missing option for JS SDK, but it's not supported in Swift.
As for streaming, the Javascript SDK has a
streamingHost
option that you could point directly to
<https://cdn.growthbook.io>
, but unfortunately, it looks like our Swift and Kotlin SDKs do not support this right now. I can put in a feature request there for you. In the meantime, if you want to use your own CDN, you will need to disable streaming in the SDK.
Here are the details: https://github.com/growthbook/growthbook/pull/3966#issuecomment-2842042940
c
Hi @late-ambulance-66508. Do you want to have this option to Kotlin and Swift SDK's? We can also start working on implementing that to these SDK's if we need to have that.
l
It's not necessary for my product right now, but might be a good option to have later.
🙌 1
c
Ok, thank you. We will keep that in mind.
👍 1