phrase / ios-sdk

Phrase Over the Air iOS SDK
https://phrase.com
Other
14 stars 3 forks source link

Configure OTA with two different distributions #58

Closed JAIRMG closed 11 months ago

JAIRMG commented 11 months ago

Hi, I would like to update strings that live in two different projects. However, distributions only accept one project. If this is not possible, can I configure the project twice in the app using different distributions?

thanks!

e.g.

// 1st distribution 
Phrase.shared.setup(distributionID: "xx",
                        environmentSecret: "xx")

 Phrase.shared.updateTranslation()

 and immediately

 // 2nd distribution 
Phrase.shared.setup(distributionID: "yy",
                        environmentSecret: "yy")

 Phrase.shared.updateTranslation()
JAIRMG commented 11 months ago

Actually I jus tested the example provided in my comment above and if I try to setup a second time then the strings from the first distribution stop working 🙁

theSoenke commented 11 months ago

Hi @JAIRMG, unfortunately distributions can currently only be connected to one project and only one distribution can be used at a time by the SDK. We had a couple similar features requests and are looking into it how we can support multiple projects better in the SDK. But for now the solution would be to have one project containing all needed keys

JAIRMG commented 11 months ago

Oh, understood, thanks for the quick response. Have a nice day