iOS
Installing OneSky on iOS
OneSky for iOS helps developers actualize cross-platform localization experience quickly with out-of-box solutions. Save hundreds of hours in finding and trying out best practices. You can mix-and-match building blocks with your own implementations if needed.
Step 1 - Configure the Display Interface Language effect
If you’re new to OneSky, you’ll need to create an account. You can sign in to the dashboard to configure localization effects. The "Display Interface Texts" effect determines which language gets displayed to your end-users.
In particular, configure the following:
-
What languages do you want to make available to the user to select?
Check "Published" checkbox for languages to display to your end-users. -
What is the source language of your site?
Check "Default" checkbox
Step 2 - Obtain Your API Key
Obtain your API key via Conductor > Installation on the dashboard
Step 3 - Apply OneSky Conductor build script
You can find the build script from installation page:
Copy the build script from dashboard, which looks like:
# Run script in Build Phases
curl -H "Authorization: Bearer ${ONESKY_API_KEY}" -s https://app-api.onesky.app/v1/apps/${ONESKY_APP_ID}/build-scripts?platformId=ios | sh
then paste it into Xcode with following steps:
- Under the tab Build Phases, add New Run Script Phase
- Move the phase Run Script above Compile Sources phase
- Paste the build script inside the text area under Shell
Step 2 - Run Script to retrieve the latest string files
- Click the Build button in order to run the script and download the latest string files to the app
- After the build succeeded, add the string files to the main bundle
- Choose the new language project folders (*.lproj), and add them into main bundle
- Check if the resources are added into main bundle
You don't need to manually update the string files or re-associate language project folders to the main bundle again when a/the source or translated strings have been updated. You only have to sync the latest published languages and add them to the main bundle (Step 2) again when there're new languages ready to be published.
Updated about 1 year ago