Skip to content

fix: remove serverUrl as default value for configuration#34

Merged
liuyang1520 merged 2 commits intoamplitude:mainfrom
kolyan94:fix/server_url
Feb 14, 2023
Merged

fix: remove serverUrl as default value for configuration#34
liuyang1520 merged 2 commits intoamplitude:mainfrom
kolyan94:fix/server_url

Conversation

@kolyan94
Copy link
Copy Markdown
Contributor

@kolyan94 kolyan94 commented Feb 1, 2023

Summary

I fixed a small issue related to the EU server zone.
The code below doesn't work, because u still use DEFAULT_API_HOST
let amplitude = Amplitude( Configuration( apiKey: "YOUR-API-KEY", serverZone: ServerZone.EU ) )

You could double-check HttpClient.getUrl(). It always uses configuration.serverUrl if it's not empty. So the default serverUrl value should be empty to solve this issue.

Currently, I'm using your lib for EU server zone. And made a workaround from my side:
let amplitude = Amplitude( Configuration( apiKey: "YOUR-API-KEY", serverZone: ServerZone.EU, serverUrl: "" ) )

Comment thread Sources/Amplitude/Configuration.swift Outdated
@liuyang1520 liuyang1520 merged commit 48d0921 into amplitude:main Feb 14, 2023
github-actions bot pushed a commit that referenced this pull request Feb 14, 2023
## [0.3.1](v0.3.0...v0.3.1) (2023-02-14)

### Bug Fixes

* fix userId is overwritten by deviceId and make reset public ([#33](#33)) ([4f49720](4f49720))
* remove serverUrl as default value for configuration ([#34](#34)) ([48d0921](48d0921))
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 0.3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants