Skip to content
A NativeScript hook that allows setting the development region and known regions in the generated project.pbxproj file.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Fixed build error when using NativeScript 6. Oct 1, 2019
.gitignore Initial commit Mar 8, 2018
README.md Update readme and package.json Mar 8, 2018
index.js
package-lock.json Bump the version number Oct 8, 2019
package.json Bump the version number Oct 8, 2019
postinstall.js Initial commit Mar 8, 2018
preuninstall.js Initial commit Mar 8, 2018

README.md

nativescript-plugin-regions

This module installs a NativeScript after prepare hook that gives you full control about the development region and known regions which are set in the auto generated platforms/ios/app-name.xcodeproj/project.pbxproj file.

How to use

Install

tns plugin install nativescript-plugin-regions

Configuration

Create a file called region.nativescript.json in your project directory:

{
  "developmentRegion": "de",
  "knownRegions": [
    "de"
  ]
}

Apply your configuration. Multiple known regions are supported.

Please also make sure that you apply correct config inside your app/App_Resources/iOS/Info.plist file. An example for the above region config would be:

<key>CFBundleDevelopmentRegion</key>
<string>de</string>
<key>CFBundleLocalizations</key>
<array>
  <string>de</string>
</array>

Usage

You will need to execute tns platform clean ios in the CLI and tns prepare ios for the changes to take effect.

Example workflow for a release build

tns platform clean ios
tns prepare ios --release
tns build ios --bundle --env.uglify --env.aot  --release --forDevice

Manual steps after project has been built

This step is only required if you target a single language.

In order to make iTunes Connect recognize a single language only you will need to open up your platforms/ios/app-name.xcodeproj file, or platforms/ios/app-name.xcworkspace if available, with Xcode.

Within Xcode apply the changes described in the following graphic.

Manual step

You will only have to make these manual changes when you are creating an archive for iTunes Connect. It doesn't really matter during development.

License

The NativeScript plugin nativescript-plugin-regions is open-sourced software licensed under the MIT license.

You can’t perform that action at this time.