Code Monkey home page Code Monkey logo

Comments (3)

irlennard avatar irlennard commented on August 20, 2024 1

Thanks for the tip. It was indeed just a timing issue as I was initialising the Phrase SDK just after creating the app's root view controller.

from ios-sdk.

winkelsdorf avatar winkelsdorf commented on August 20, 2024

@irlennard Thank you for your report!

When swizzling is enabled Phrase.shared.localizedString(forKey:) internally just forwards to Bundle.main.localizedString(forKey:) (as this method is swizzled).

Without seeing any code, I think you are probably running into a timing issue. The completion closure of updateTranslations() is a safe place to re-assign translations with NSLocalizedString() or Phrase.shared.localizedString(forKey:). Ensure dispatching to mainQueue first where needed.

Always a good hint: Please also try deleting the App from your Simulator or Device to see if the Bundle somehow got corrupted (not related to the OTA SDK).

Please let me know if this helps.

from ios-sdk.

winkelsdorf avatar winkelsdorf commented on August 20, 2024

@irlennard You're weclome, glad I could help! 😊 No problem, asynchronous network communication is always a bit tricky to handle, especially when UI comes into play.

from ios-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.