This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update appxmanifests with ToastCapable=true after plugin install (#1158)
- Loading branch information
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = function(context) { | ||
console.log('Updating appxmanifests with ToastCapable=true...'); | ||
var path = require('path'); | ||
var platformProjPath = path.join(context.opts.projectRoot, 'platforms/windows'); | ||
var AppxManifest = require(path.join(platformProjPath, 'cordova/lib/AppxManifest')); | ||
|
||
['package.phone.appxmanifest', 'package.windows.appxmanifest'].forEach(function(manifestPath) { | ||
var manifest = AppxManifest.get(path.join(platformProjPath, manifestPath)); | ||
manifest.getVisualElements().setToastCapable(true); | ||
manifest.write(); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters