-
Notifications
You must be signed in to change notification settings - Fork 133
create cordova hooks #171
Comments
why would you manipulate the plist file? |
For example to add the supported languages on iOS to the app. In this way labels on buttons from native plugins will be translated. |
I talked to Frank today, he used this hook, for my described usecase above: I like it, and I think we should think about a way to scaffold this with the generator-m (at least ask the user) |
This Hook can also add all kind of entries to the AndroidManifest.xml if specified in the config.xml. Very useful |
#188 (add badges on app icons) |
Agreements as of today:update platform config
Nice to have in the future: provide hooks as node module. splash & icons (Gulp, no hook!)based on: https://generator-m.slack.com/files/mathias/F0873DD8W/setup_splash_and_icons.js
the task then copies all files to the The task is started when It's the developer's responsibility to correctly link to the resource files in the |
Adding <platform name="android">
<hook type="after_prepare" src="hooks/update_platform_config.js"/>
</platform>
<platform name="ios">
<hook type="after_prepare" src="hooks/update_platform_config.js"/>
</platform> to the
I'm reverting to adding the hook using the directory For future reference, this is the code for the gulp config task: if (options.addHook && options.type && options.src) {
result.widget.platform = result.widget.platform || [];
result.widget.platform.push({
$: { name: 'android' },
hook: {
$: {
type: options.type,
src: options.src
}
}
});
result.widget.platform.push({
$: { name: 'ios' },
hook: {
$: {
type: options.type,
src: options.src
}
}
});
} and the gulp tasks could have been called in the |
closed with 9a36328 |
I thought we will not support the deprecated method with using the Although the demo has it. Is there any reason why? |
Yes! See the comment above. #171 (comment) |
To solve some problems like manipulation the plist, we need to use cordova hooks.
We should write a colletion of most used cordova hooks and maybe integrate them then into generator-m.
The text was updated successfully, but these errors were encountered: