-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phrase OTA no working on First Relaunch #78
Comments
Hi @DineshThakur, this is currently the expected behaviour of the SDK. On first launch after a new release the translations will be fetched in the background to not delay the start of the app. On a second launch they're then displayed from the cache. We're still looking into a way to immediately refresh the translations after a successful translations update. This is something that we hopefully can release later this year. How is the language switching working in your app? Apple's recommendation is to use the iOS settings for language switching. This should also immediately display the correct translations from the included bundle |
How is the language switching working in your app? Apple's recommendation is to use the iOS settings for language switching. This should also immediately display the correct translations from the included bundle Comment:- We are always using Phrase SDK (i.e Phrase.shared.localizedString) to get the value for given key. If we are not getting any value from Phrase SDK then fallback is to get the value for given key from Local Bundle. Just want to understand how Phrase SDK support multiple language. It download all the supported languages and cache them? Or it download a particular language at run time depend on device setting? For example in our app, we are supporting around 30 languages, is Phrase SDK download and cached all these languages? In our case when we are switching from one language to another, on verify first launch translation are not reflecting all the screen. You need to kill and relaunch the app couple of times then only translations is reflecting in all the screens. |
Hi @DineshThakur, the SDK only fetches one locale that is currently displayed and then caches it. Is there a specific reason why you're calling |
We have handled the fallback. As it cache the translation of one language. When we switch from one language to another, how long it take to download the data. As of now when we switch from one language to another, we need need to kill and relaunch the app multiple time, then only newly text appear in newly selected language. In Android it works perfectly, when we switch from one language to another. |
Hi @DineshThakur , the SDK needs a maximum of 2 app starts to display the OTA translations. If we take this process:
We need 2 app launches because Apple caches bundles. We have the translations shortly after the first app start and these are also saved in the file system, but the previous data is still in the bundle cache. If you need more than 2 app launches, then there is a problem. Please check what the result of updateTranslation is. If updateTranslation returns a .success(true) new translations have been successfully pulled and should be there after the next app start. We still had problems in old SDK versions, so I also recommend to use the latest version if not already done. |
It seems to be a restriction we have due to apples cached bundle. @DineshThakur Does this answer your question or is there anything left to clarify? |
Hi Team,
Phrase OTA is not working on first time kill and relaunch the app.
We need to kill and relaunch the app two time, then only phrase update is reflecting in the app.
Step to reproduce:-
• Update string on phrase portal.
• Release new version via OTA.
• Kill and Relaunch the app.
• Kill and relaunch the app 2nd time.
I have tried Phrase OTA with Phrase Demo app: -
https://github.com/phrase/ios-demo-app
Same issue is there demo app as well. You have to kill and relaunch app two time then only updates are reflecting in app.
Even we have same issue when we switch from one language to another.
Suppose we are using our app in English. Go to Setting app and change the language from English to German. After changing the language, first you wont’ see text in German, if you kill and relaunch the app then text will appear in German Language, some how this is not good user experience.
Anytime line to fix this issue?
Pls let me know if you need any other details.
The text was updated successfully, but these errors were encountered: