Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova 6 and hyphenated package names

I have an app with a package id of com.test.a-b

When I upgraded to Cordova 6, I noticed that with this package ID cordova keeps complaining Error: Error validating package name. Package name must look like: com.company.Name

The problem is if I remove the hyphen, it is treated as a 'new app' when uploaded to the stores. So how do I solve this problem? thanks

like image 752
user1361529 Avatar asked Apr 09 '16 20:04

user1361529


1 Answers

thank you for trying. Looks like I over reacted. The issue is with android only -it does not allow hyphens. Looks like in previous versions, it was silently replacing a hyphen with an underscore during compilation. With Cordova 6, it throws an error. So I changed my ionic config.xml to

<widget id="com.test.ab" android-packageName="com.test.a_b" ios-CFBundleIdentifier="com.test.a-b" version="1.1.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

and all is good again

like image 200
user1361529 Avatar answered Sep 28 '22 05:09

user1361529