Skip to content
This repository was archived by the owner on Jun 14, 2026. It is now read-only.

Commit d44b9e8

Browse files
Merge branch 'steveupdate'
2 parents 992140f + 3dc8850 commit d44b9e8

10 files changed

Lines changed: 266 additions & 200 deletions

File tree

build_ios.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ if [ "$1" != "skip" ]
33
then
44
# ionic cordova plugin remove cordova-plugin-ionic-webview 2>/dev/null
55
echo "Adding wkwebview..."
6-
cordova plugin add https://github.com/ZoneMinder/cordova-plugin-ionic-webview.git
6+
cordova plugin add cordova-plugin-ionic-webview
77

88
else
99
echo "Skipping plugin update process. Make sure you did not build for Android before this"
@@ -13,6 +13,6 @@ fi
1313
echo "-- building --"
1414
#ionic cordova build ios --release --buildConfig="./build-auto.json"
1515
cordova prepare
16-
cordova build ios --buildConfig="./build.json"
16+
cordova build ios --release --device --buildConfig="./build.json"
1717
echo "********* Done *************"
1818

config.xml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='utf-8'?>
2-
<widget id="com.zoneminder.zmNinja" version="1.7.009" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
2+
<widget id="com.zoneminder.zmNinja" version="1.7.010" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
33
<name>zmNinja</name>
44
<description>
55
High performance ZoneMinder client
@@ -23,7 +23,6 @@
2323
<preference name="AutoHideSplashScreen" value="false" />
2424
<preference name="ShowSplashScreenSpinner" value="false" />
2525
<preference name="SplashScreen" value="screen" />
26-
<preference name="deployment-target" value="15.0" />
2726
<preference name="SplashScreenDelay" value="300" />
2827
<preference name="SplashMaintainAspectRatio" value="true" />
2928
<preference name="FadeSplashScreen" value="false" />
@@ -37,11 +36,8 @@
3736
<platform name="ios">
3837
<hook src="hooks/after_platform_add/010_create_notification_extension.js" type="after_platform_add" />
3938
<preference name="Orientation" value="all" />
40-
<preference name="WKWebViewOnly" value="true" />
41-
<feature name="CDVWKWebViewEngine">
42-
<param name="ios-package" value="CDVWKWebViewEngine" />
43-
</feature>
44-
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
39+
<preference name="SwiftVersion" value="5.0" />
40+
<preference name="deployment-target" value="15.0" />
4541
<resource-file src="www/sounds/blop.caf" target="blop.caf" />
4642
<config-file parent="NSPhotoLibraryAddUsageDescription" platform="ios" target="*-Info.plist">
4743
<string>Store photos of events and live feeds</string>

electron_js/notarize.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
require('dotenv').config();
2-
const { notarize } = require('electron-notarize');
2+
const { notarize } = require('@electron/notarize');
33

44
exports.default = async function notarizing(context) {
5-
const { electronPlatformName, appOutDir } = context;
5+
const { electronPlatformName, appOutDir } = context;
66
if (electronPlatformName !== 'darwin') {
77
return;
88
}

hooks/after_platform_add/010_create_notification_extension.js

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module.exports = function(context) {
3838
}
3939
// Copy in the extension files
4040
console.log('Copying in the extension files to the iOS project');
41-
fs.mkdirSync(`${iosPath}${extName}`);
41+
try { fs.mkdirSync(`${iosPath}${extName}`, {recursive: true}); } catch (e) {}
4242
extFiles.forEach(function (extFile) {
4343
let targetFile = `${iosPath}${extName}/${extFile}`;
4444
fs.createReadStream(`${sourceDir}${extFile}`)
@@ -59,6 +59,33 @@ module.exports = function(context) {
5959
// Add a target for the extension
6060
console.log('Adding the new target');
6161
let target = proj.addTarget(extName, 'app_extension');
62+
63+
64+
// Get app bundle id from <widget id="..."> in config.xml
65+
const bundleId = appConfig.packageName();
66+
const desiredExtBundleId = `${bundleId}.${extName}`;
67+
const marketing = appConfig.version();
68+
69+
// Point the target at the copied plist and set the bundle id
70+
const cfgs = proj.pbxXCBuildConfigurationSection();
71+
Object.keys(cfgs).forEach(ref => {
72+
const cfg = cfgs[ref];
73+
if (!cfg || !cfg.buildSettings) return;
74+
75+
// Only touch the new extension target’s configs
76+
if (cfg.buildSettings.PRODUCT_NAME === `"${extName}"`) {
77+
cfg.buildSettings.PRODUCT_BUNDLE_IDENTIFIER = desiredExtBundleId;
78+
cfg.buildSettings.INFOPLIST_FILE = `"${extName}/${extName}-Info.plist"`;
79+
80+
// sensible defaults for extensions
81+
cfg.buildSettings.SDKROOT = 'iphoneos';
82+
cfg.buildSettings.SKIP_INSTALL = 'YES';
83+
cfg.buildSettings.LD_RUNPATH_SEARCH_PATHS = `"$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"`;
84+
cfg.buildSettings.MARKETING_VERSION = marketing; // CFBundleShortVersionString
85+
cfg.buildSettings.CURRENT_PROJECT_VERSION = marketing; // CFBundleVersion
86+
}
87+
});
88+
6289
// Add build phases to the new target
6390
console.log('Adding build phases to the new target');
6491
proj.addBuildPhase([ 'NotificationService.m' ], 'PBXSourcesBuildPhase', 'Sources', target.uuid);

package-lock.json

Lines changed: 36 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)