Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nativescript - iOS app name?

Tags:

nativescript

How is the app name set in iOS version of the build?

Looking at app/App_Resources/iOS/Info.plist - I see

<key>CFBundleDisplayName</key> <string>${PRODUCT_NAME}</string> <key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string>

How are these 2 set and when are they set (during prepare?)?

like image 391
dashman Avatar asked Feb 01 '17 19:02

dashman


People also ask

Can a developer build an app using NativeScript?

NativeScript is a free and open-source framework for developing mobile applications. It is used to build truly native mobile apps using JavaScript. You can easily develop a native UI and higher-performance apps for your iOS and Android platforms using Angular skills.


1 Answers

By default, the name of the app is same as PRODUCT_NAME, which in return is the project name (the root-folder name of your app). EXECUTABLE_NAME is the name of the .ipa file that is generated. I would recommend to leave these two alone, the way they are :)

You can add the following to the Info.plist in order to set your own name:

<key>CFBundleDisplayName</key>
<string>My App</string>

UPDATE: If you need to fetch values from the Info.plist file, you can do it like this:

var utils = require("utils/utils");
var mainBundle = utils.ios.getter(NSBundle, NSBundle.mainBundle);
var appName = mainBundle.infoDictionary.objectForKey("CFBundleDisplayName"));
like image 131
Manijak Avatar answered Jan 14 '23 00:01

Manijak