plugin-seed icon indicating copy to clipboard operation
plugin-seed copied to clipboard

How to update the application ID?

Open xulihang opened this issue 3 years ago • 1 comments

I tried modifyingapps\demo\nativescript.config.ts like the following which works for iOS. But it does not work for Android.

import { NativeScriptConfig } from '@nativescript/core';

export default {
-	id: 'org.nativescript.plugindemo',
+	id: 'com.xulihang.nativescript',
	appResourcesPath: '../../tools/assets/App_Resources',
	android: {
		v8Flags: '--expose_gc',
		markingMode: 'none',
	},
	appPath: 'src',
  cli: {
    packageManager: 'npm'
  }
} as NativeScriptConfig;

xulihang avatar Jan 03 '23 09:01 xulihang

@xulihang You set the bundle ID in package.json

We read this value in our nativesceript.config.ts

Of course, these are just demo apps and this configuration is from an actual project so you will need to amend the paths to suit your demos.

import { NativeScriptConfig } from '@nativescript/core';
import { readFileSync } from 'fs';

const { name } = JSON.parse(readFileSync('./package.json', 'utf-8'));

export default {
  name,
  id: name,
  appResourcesPath: 'App_Resources',
  android: {
    v8Flags: '--expose_gc',
    markingMode: 'none'
  },
  useLegacyWorkflow: true,
} as NativeScriptConfig;

insytes avatar May 28 '23 21:05 insytes