Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
Added new hook type (before_build)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Grácio authored and MobileUX committed May 18, 2017
1 parent ab9a294 commit f9b0111
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion hooks/add_swift_support.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ module.exports = function (context) {
// on the hook execution cycle.
if ((context.hook === 'after_platform_add' && context.cmdLine.includes('platform add')) ||
(context.hook === 'after_prepare' && context.cmdLine.includes('prepare')) ||
(context.hook === 'after_plugin_add' && context.cmdLine.includes('plugin add'))) {
(context.hook === 'after_plugin_add' && context.cmdLine.includes('plugin add')) ||
(context.hook === 'before_build' && context.cmdLine.includes('build'))) {
platformMetadata.getPlatformVersions(projectRoot).then(function (platformVersions) {
var IOS_MIN_DEPLOYMENT_TARGET = '7.0';
var platformPath = path.join(projectRoot, 'platforms', 'ios');
Expand Down
4 changes: 2 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@

<!-- ios -->
<platform name="ios">
<hook type="after_plugin_add" src="hooks/install_prerequisites.js"/>
<hook type="after_plugin_add" src="hooks/add_swift_support.js" />
<hook type="before_build" src="hooks/install_prerequisites.js"/>
<hook type="before_build" src="hooks/add_swift_support.js" />
<config-file target="*-Info.plist" parent="NSLocationAlwaysUsageDescription">
<string>${EXECUTABLE_NAME} Would Like to Use Your Current Location Even In Background.</string>
</config-file>
Expand Down

0 comments on commit f9b0111

Please sign in to comment.