From 6fc9dcbb40d0c1c739af5d9a2b5fe2088f7398fd Mon Sep 17 00:00:00 2001 From: Michael Gangolf Date: Fri, 29 Nov 2024 09:44:36 +0100 Subject: [PATCH 1/7] fix(android): tableView row parent (#13826) Co-authored-by: Chris Barber --- .../ui/src/java/ti/modules/titanium/ui/TableViewProxy.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewProxy.java index 65bc33c7acd..53f03988226 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewProxy.java @@ -190,6 +190,7 @@ private void appendRowInternal(Object rows, KrollDict animation, boolean interna row.getProperties().getString(TiC.PROPERTY_FOOTER))); // Add row to section. + row.setParent(section); section.add(row); } From 69b645f185d860b4371ae5c912fd2b36e55bbfda Mon Sep 17 00:00:00 2001 From: Michael Gangolf Date: Fri, 29 Nov 2024 10:55:06 +0100 Subject: [PATCH 2/7] fix(android): optimize cameraX rotation after camera is active (#14139) * fix(android): optimize cameraX rotation after camera is active * update --- .../titanium/media/TiCameraXActivity.java | 46 ++++++++++++++++++- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/android/modules/media/src/java/ti/modules/titanium/media/TiCameraXActivity.java b/android/modules/media/src/java/ti/modules/titanium/media/TiCameraXActivity.java index 10e0d13224e..16b7f20e74b 100644 --- a/android/modules/media/src/java/ti/modules/titanium/media/TiCameraXActivity.java +++ b/android/modules/media/src/java/ti/modules/titanium/media/TiCameraXActivity.java @@ -19,7 +19,9 @@ import android.os.Environment; import android.provider.MediaStore; import android.util.Size; +import android.view.OrientationEventListener; import android.view.ScaleGestureDetector; +import android.view.Surface; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; @@ -112,6 +114,8 @@ public class TiCameraXActivity extends TiBaseActivity implements CameraXConfig.P private ProcessCameraProvider cameraProvider; static int targetResolutionWidth = -1; static int targetResolutionHeight = -1; + private OrientationEventListener orientationEventListener; + private int lastDisplayOrientation = 0; public static void takePicture() { @@ -417,6 +421,30 @@ private void startCamera() int rotation = getWindowManager().getDefaultDisplay().getRotation(); Activity activity = TiApplication.getAppCurrentActivity(); + + orientationEventListener = new OrientationEventListener(activity) + { + @Override + public void onOrientationChanged(int orientation) + { + if (orientationEventListener == null || orientation == ORIENTATION_UNKNOWN) { + return; + } + int rotation = getWindowManager().getDefaultDisplay().getRotation(); + if (lastDisplayOrientation != rotation) { + imageCapture.setTargetRotation(rotation); + lastDisplayOrientation = rotation; + } + + } + }; + if (orientationEventListener.canDetectOrientation()) { + orientationEventListener.enable(); + } else { + orientationEventListener.disable(); + orientationEventListener = null; + } + ListenableFuture cameraProviderFuture = ProcessCameraProvider.getInstance(activity); cameraProviderFuture.addListener(() -> { try { @@ -493,8 +521,13 @@ private void startCamera() } if (targetResolutionWidth != -1 && targetResolutionHeight != -1) { - imageCaptureBuilder.setTargetResolution( - new Size(targetResolutionWidth, targetResolutionHeight)); + if (rotation == Surface.ROTATION_0 || rotation == Surface.ROTATION_180) { + imageCaptureBuilder.setTargetResolution( + new Size(targetResolutionWidth, targetResolutionHeight)); + } else { + imageCaptureBuilder.setTargetResolution( + new Size(targetResolutionHeight, targetResolutionWidth)); + } } imageCapture = imageCaptureBuilder.build(); @@ -573,6 +606,11 @@ protected void onDestroy() if (camera != null) { camera = null; } + if (orientationEventListener != null) { + orientationEventListener.disable(); + orientationEventListener = null; + } + // Destroy this activity. super.onDestroy(); } @@ -581,6 +619,10 @@ protected void onDestroy() public void finish() { overlayProxy = null; + if (orientationEventListener != null) { + orientationEventListener.disable(); + orientationEventListener = null; + } super.finish(); } From 829d4ab2b481e5cb4e5ee399ab8cad419267c21d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Kn=C3=B6chel?= Date: Fri, 29 Nov 2024 11:22:03 +0100 Subject: [PATCH 3/7] feat: update hyperloop to 7.0.9 to fix dex issues --- support/module/packaged/modules.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/support/module/packaged/modules.json b/support/module/packaged/modules.json index 31ea75415cc..be069492db9 100644 --- a/support/module/packaged/modules.json +++ b/support/module/packaged/modules.json @@ -54,8 +54,8 @@ "commonjs": {}, "hyperloop": { "hyperloop": { - "url": "https://github.com/tidev/hyperloop.next/releases/download/v7.0.8/hyperloop-7.0.8.zip", - "integrity": "sha512-JM75vnzaJQR2ygN+M7hUKFVa64CKCgG9xCGHijfOpRq+BaSyVaDaagbMBDGgm2m9xlrHJetOKwcfwzfE0wXfkg==" + "url": "https://github.com/tidev/hyperloop.next/releases/download/v7.0.9/hyperloop-7.0.9.zip", + "integrity": "sha512-IhFR4zLLEGAuLz1rgkQprjL5nDuIUHLh0lcAXL+NJPJ3Roy9JsrCuH7JtrKrXelpyp1H6yXQlC+4Wqh1kQLhRg==" } } } From 8f201d94bd13dc3a7c67ce850d11c828d2ca12e7 Mon Sep 17 00:00:00 2001 From: dlewis23 Date: Fri, 29 Nov 2024 10:27:28 -0500 Subject: [PATCH 4/7] iOS 18 dark mode icons (#14138) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(ios): added support for iOS 18 dark mode icons * Update _build.js Update _build.js for dark mode icon support and so dark mode and tinted icon is not flatted against a white background. * Update iphone/cli/commands/_build.js Co-authored-by: Hans Knöchel * Update iphone/cli/commands/_build.js Co-authored-by: Hans Knöchel * fix: fix indentation --------- Co-authored-by: AbdullahFaqeir Co-authored-by: Hans Knöchel --- iphone/cli/commands/_build.js | 20 +++- .../AppIcon.appiconset/Contents.json | 26 ++++- .../AppIcon.appiconset/Contents.json | 103 +++++++++++++----- 3 files changed, 117 insertions(+), 32 deletions(-) diff --git a/iphone/cli/commands/_build.js b/iphone/cli/commands/_build.js index 0dee04a1307..9866a4f2be3 100644 --- a/iphone/cli/commands/_build.js +++ b/iphone/cli/commands/_build.js @@ -5809,6 +5809,8 @@ iOSBuilder.prototype.createAppIconSetAndiTunesArtwork = async function createApp '-76': { height: 76, width: 76, scale: 1, idioms: [ 'ipad' ], required: true }, '-76@2x': { height: 76, width: 76, scale: 2, idioms: [ 'ipad' ], required: true }, '-83.5@2x': { height: 83.5, width: 83.5, scale: 2, idioms: [ 'ipad' ], minXcodeVer: '7.2' }, + '-Dark': { height: 1024, width: 1024, scale: 1, idioms: [ 'universal' ], required: true, minXcodeVer: '16.0' }, + '-Tinted': { height: 1024, width: 1024, scale: 1, idioms: [ 'universal' ], required: true, minXcodeVer: '16.0' }, '-Marketing': { height: 1024, width: 1024, scale: 1, idioms: [ 'ios-marketing' ], required: true, minXcodeVer: '9.0' } }; // Add macOS icons if target is macOS @@ -5897,12 +5899,22 @@ iOSBuilder.prototype.createAppIconSetAndiTunesArtwork = async function createApp let flatten = false; if (pngInfo.alpha) { if (defaultIcon && !defaultIconHasAlpha) { - this.logger.warn(__('Skipping %s because it has an alpha channel and generating one from %s', info.src.replace(this.projectDir + '/', ''), defaultIcon.replace(this.projectDir + '/', ''))); - return; + if (filename === 'DefaultIcon-Dark.png' || filename === 'DefaultIcon-Tinted.png') { + // Do nothing + } else { + this.logger.warn(__('Skipping %s because it has an alpha channel and generating one from %s', info.src.replace(this.projectDir + '/', ''), defaultIcon.replace(this.projectDir + '/', ''))); + return; + } + } + + if (filename === 'DefaultIcon-Dark.png' || filename === 'DefaultIcon-Tinted.png') { + this.logger.warn(__('%s contains an alpha channel and will NOT BE flattened against a white background', info.src.replace(this.projectDir + '/', ''))); + flatten = false; + } else { + this.logger.warn(__('%s contains an alpha channel and will be flattened against a white background', info.src.replace(this.projectDir + '/', ''))); + flatten = true; } - this.logger.warn(__('%s contains an alpha channel and will be flattened against a white background', info.src.replace(this.projectDir + '/', ''))); - flatten = true; flattenIcons.push(info); } diff --git a/iphone/iphone/Assets.xcassets/AppIcon.appiconset/Contents.json b/iphone/iphone/Assets.xcassets/AppIcon.appiconset/Contents.json index 973aa2af684..9e8bc4f3e7f 100644 --- a/iphone/iphone/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/iphone/iphone/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -103,10 +103,34 @@ "idiom" : "ios-marketing", "filename" : "appicon-1024.png", "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "DefaultIcon-Dark.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "filename" : "DefaultIcon-Tinted.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" } ], "info" : { "version" : 1, "author" : "xcode" } -} \ No newline at end of file +} diff --git a/iphone/layout/layout/Assets.xcassets/AppIcon.appiconset/Contents.json b/iphone/layout/layout/Assets.xcassets/AppIcon.appiconset/Contents.json index 36d2c80d889..c7628d8b56a 100644 --- a/iphone/layout/layout/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/iphone/layout/layout/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,68 +1,117 @@ { "images" : [ + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "DefaultIcon-Dark.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "filename" : "DefaultIcon-Tinted.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, { "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" + "scale" : "3x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" + "scale" : "3x", + "size" : "40x40" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" + "scale" : "2x", + "size" : "60x60" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" + "scale" : "3x", + "size" : "60x60" }, { "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" + "scale" : "2x", + "size" : "20x20" }, { "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" + "scale" : "1x", + "size" : "29x29" }, { "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" + "scale" : "1x", + "size" : "40x40" }, { "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} From 2e857038e3f0ad620bf3f3b0bfd23bab2ec5100d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Kn=C3=B6chel?= Date: Fri, 29 Nov 2024 16:42:37 +0100 Subject: [PATCH 5/7] fix: fix line --- iphone/cli/commands/_build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iphone/cli/commands/_build.js b/iphone/cli/commands/_build.js index 9866a4f2be3..06c2ea47c67 100644 --- a/iphone/cli/commands/_build.js +++ b/iphone/cli/commands/_build.js @@ -5906,7 +5906,7 @@ iOSBuilder.prototype.createAppIconSetAndiTunesArtwork = async function createApp return; } } - + if (filename === 'DefaultIcon-Dark.png' || filename === 'DefaultIcon-Tinted.png') { this.logger.warn(__('%s contains an alpha channel and will NOT BE flattened against a white background', info.src.replace(this.projectDir + '/', ''))); flatten = false; From 5c25ec197b929c341b1c51a0429c87454ebb9c75 Mon Sep 17 00:00:00 2001 From: Michael Gangolf Date: Fri, 29 Nov 2024 19:49:14 +0100 Subject: [PATCH 6/7] chore: update node-titanium-sdk (#14148) * chore: update node-titanium-sdk * package.json --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3d7b346a791..d531aa1886c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,7 @@ "markdown": "0.5.0", "moment": "2.30.1", "node-appc": "1.1.7", - "node-titanium-sdk": "6.0.0", + "node-titanium-sdk": "6.0.1", "node-uuid": "1.4.8", "nodeify": "1.0.1", "p-limit": "3.1.0", @@ -11751,9 +11751,9 @@ "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==" }, "node_modules/node-titanium-sdk": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/node-titanium-sdk/-/node-titanium-sdk-6.0.0.tgz", - "integrity": "sha512-CQwGAD2ZRz7UgaISySLgr66miRgfZnXBsH7wQTj1Awf4fBZxUuTXImksWdBYxAeX89kZO7SbSn6Xv9wIQE5f4w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/node-titanium-sdk/-/node-titanium-sdk-6.0.1.tgz", + "integrity": "sha512-uwDvlHZNNygGi+s07+0/G3RAFVA7c22ljCgbzU5yzytaIZtp2AKoPPbxpmSWau5HYJfqVp2U5f8yehM0biMKgA==", "dependencies": { "@babel/core": "7.11.6", "@babel/parser": "7.11.5", @@ -24921,9 +24921,9 @@ "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==" }, "node-titanium-sdk": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/node-titanium-sdk/-/node-titanium-sdk-6.0.0.tgz", - "integrity": "sha512-CQwGAD2ZRz7UgaISySLgr66miRgfZnXBsH7wQTj1Awf4fBZxUuTXImksWdBYxAeX89kZO7SbSn6Xv9wIQE5f4w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/node-titanium-sdk/-/node-titanium-sdk-6.0.1.tgz", + "integrity": "sha512-uwDvlHZNNygGi+s07+0/G3RAFVA7c22ljCgbzU5yzytaIZtp2AKoPPbxpmSWau5HYJfqVp2U5f8yehM0biMKgA==", "requires": { "@babel/core": "7.11.6", "@babel/parser": "7.11.5", diff --git a/package.json b/package.json index e9575c117c4..db4f8b7186f 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "markdown": "0.5.0", "moment": "2.30.1", "node-appc": "1.1.7", - "node-titanium-sdk": "6.0.0", + "node-titanium-sdk": "6.0.1", "node-uuid": "1.4.8", "nodeify": "1.0.1", "p-limit": "3.1.0", From e3a93643c23c3a1769beb64f04cc7b7e1e0af506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Kn=C3=B6chel?= Date: Fri, 29 Nov 2024 22:06:14 +0100 Subject: [PATCH 7/7] chore: bump to 12.7.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d531aa1886c..0f2d21a575d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "titanium-mobile", - "version": "12.6.0", + "version": "12.7.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "titanium-mobile", - "version": "12.6.0", + "version": "12.7.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index db4f8b7186f..347236f6f39 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "titanium-mobile", "description": "Titanium SDK", - "version": "12.6.0", + "version": "12.7.0", "moduleApiVersion": { "iphone": "2", "android": "4"