Skip to content

Instantly share code, notes, and snippets.

View AmbreB's full-sized avatar

Andréa Buisset AmbreB

View GitHub Profile
cordova.InAppBrowser.open(encodeURI(wellKnownUrl), '_system', 'location=yes')
@AmbreB
AmbreB / request.js
Last active February 3, 2017 14:09
const wellKnownUrl = baseUrl + (/api/.well-known/mac.mobileconfig?username=${email}&password=${password});
getConfig()
.then(
config => {
fs.readFile(__dirname + '/template.mobileconfig', 'utf-8', (err, template) => {
const mustacheConfig = {
CalDAVHostName: config.davserver,
CalDAVUsername: req.query.username,
CalDAVPassword: req.query.password,
};
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadDescription</key>
<string>Awesome CalDAV</string>