Comments (6)
Thanks for the fast reply Dima! :)
I was playing a bit around with breakpoints in the SDK and my hunch is that it might be due to Localization.refreshLocalization() -> Localization.fetchRemoteLocalization()
being first called when the localization is set in the LocalizationProvider()
. The LocalizationProvider
is initialized in the setRemoteStorage
which does not call a completion block when it is done.
Maybe passing the completion handler from CrowdinSDK.startWithConfig
all the way to Localization.fetchRemoteLocalization()
might solve this?
from mobile-sdk-ios.
Hi @stevi-clue
Checking this :)
from mobile-sdk-ios.
@serhii-londar could you please assist with this?
from mobile-sdk-ios.
Hi @stevi-clue, you need to add a download handler:
CrowdinSDK.addDownloadHandler {
NSLocalizedString(key, comment: "")
}
from mobile-sdk-ios.
@stevi-clue Does it help?
from mobile-sdk-ios.
My team had a similar question as well.
In my opinion, the completion
parameter to startWithRemoteStorage
is not well documented as to what receiving a completion callback means to us client apps. In our observation startWithRemoteStorage
ultimately calls three different network endpoints. What if one of them fails? CrowdinSDK.addDownloadHandler
has the same documentation issue -- is that called for each individual translation file or for when all of them are done?
I think the more communicative approach would have been to have a single callback that tells us what state the SDK is in.
From my comments here, here, and here, the emerging theme in my opinion is that edge cases surrounding the initialization of the SDK are not well defined and automated tests have room to grow.
from mobile-sdk-ios.
Related Issues (20)
- SDK with SwiftUI does not seem to do much? HOT 1
- Internal error after login HOT 10
- Don't receive any flag value in the first launch for the iOS App on real devices only (works fine on simulator)
- "es" (spanish) translations are not working properly. HOT 2
- Switch must be exhaustive in SocketAPI (StarScream 4.0.6 update) HOT 3
- Languages with dialects aren't downloading HOT 1
- WatchOS does not compile in Xcode 15 HOT 4
- CI: add cache for CocoaPods dependencies in the build Workflow
- Use the distribution manifest `content` to fetch localization instead of building paths on the SDK side
- CI: add build step for the ObjCExample project HOT 3
- How to update the translation into the project by clicking Publish?
- How to update the translation into the project by clicking Publish? HOT 5
- Type 'SocketAPI' does not conform to protocol 'WebSocketDelegate' HOT 1
- visionOS support
- Question: Toast.swift? HOT 5
- Infinite authentication loop
- Not working screenshot feature HOT 4
- Query on SDK Support for Plurals HOT 1
- Query on SDK Support for Plurals HOT 1
- .xcstrings files support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mobile-sdk-ios.