Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

iOS custom build fails as per the docs #284

Open
pzanitti opened this issue Feb 14, 2018 · 4 comments
Open

iOS custom build fails as per the docs #284

pzanitti opened this issue Feb 14, 2018 · 4 comments

Comments

@pzanitti
Copy link

The docs naturally state that the config.xml widget id has to be changed to something unique.

1. Next, from the main project folder (`<your-path>/phonegap-app-developer`) open the **config.xml** file. Within the root `widget` element, modify the `id` attribute to set your own unique app bundle id.

But there is also a ./google-services.json file that references the id.

https://github.com/phonegap/phonegap-app-developer/blob/83417c7fb083ebc2ec7df8441806ad444866e0d8/google-services.json#L13

If you try to build without changing that attribute, you will get

  • What went wrong:
    Execution failed for task ':processDebugGoogleServices'.
    No matching client found for package name 'my.unique.phonegap.app'

However even when I change it and make my custom build (phonegap run android --device), it never connects to my phonegap serve, it gets stuck at DOWNLOADING.... Same phone, same computer, the App Store version works perfectly.

@pzanitti
Copy link
Author

pzanitti commented Feb 15, 2018

The right way is to replace ./google-services.json with your own version of that file (obtained from FCM). So there are actually two things you have to customize before you can build:

  1. Change the widget id.
  2. Replace ./google-services.json with your own.

I don't know the consequences of editing the reference in ./google-services.json. Of course if you don't have your own Firebase account you won't be able to roll out your own ./google-services.json.

Sorry if this is already explained in the custom build docs, I couldn't find it.

@pzanitti
Copy link
Author

However even when I change it and make my custom build (phonegap run android --device), it never connects to my phonegap serve, it gets stuck at DOWNLOADING.... Same phone, same computer, the App Store version works perfectly.

This actually seems to be a bug phonegap/phonegap-app-developer#523

@purplecabbage
Copy link
Member

Is this still happening @pzanitti ?

@pzanitti
Copy link
Author

I haven't tested again in a while but it shouldn't. The startup bug was fixed.

However the Custom Build docs don't mention that when you change the widget it you also need to roll in your own ./google-services.json or it will break, like my second post mentions.

1. Next, from the main project folder (`<your-path>/phonegap-app-developer`) open the **config.xml** file. Within the root `widget` element, modify the `id` attribute to set your own unique app bundle id.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants