diff --git a/apps/automated/project.json b/apps/automated/project.json
index 4a8eeefb9b..ea342ae029 100644
--- a/apps/automated/project.json
+++ b/apps/automated/project.json
@@ -24,6 +24,7 @@
"executor": "@nativescript/nx:debug",
"options": {
"noHmr": true,
+ "debug": false,
"uglify": false,
"release": false,
"forDevice": false,
diff --git a/apps/toolbox/src/pages/forms.ts b/apps/toolbox/src/pages/forms.ts
index dc4ea36a8e..6c43de1232 100644
--- a/apps/toolbox/src/pages/forms.ts
+++ b/apps/toolbox/src/pages/forms.ts
@@ -1,4 +1,4 @@
-import { Page, Observable, EventData, TextField, PropertyChangeData } from '@nativescript/core';
+import { Page, Observable, EventData, TextField, PropertyChangeData, TextView } from '@nativescript/core';
let page: Page;
@@ -28,6 +28,12 @@ export class SampleData extends Observable {
console.log(args.value);
this.notifyPropertyChange('formattedPhoneInput', args.value);
}
+
+ textChangeArea(args: PropertyChangeData) {
+ const textArea = args.object as TextView;
+ console.log('---- AI active:', textArea.isWritingToolsActive);
+ console.log('textChangeArea:', args.value);
+ }
}
function formatPhoneNumber(value: string, useParens?: boolean) {
diff --git a/apps/toolbox/src/pages/forms.xml b/apps/toolbox/src/pages/forms.xml
index 6b55050d9d..d451a16dc1 100644
--- a/apps/toolbox/src/pages/forms.xml
+++ b/apps/toolbox/src/pages/forms.xml
@@ -20,6 +20,10 @@
+
+
+
+
diff --git a/packages/core/ui/index.ts b/packages/core/ui/index.ts
index 039b7d038a..5b6f611fb8 100644
--- a/packages/core/ui/index.ts
+++ b/packages/core/ui/index.ts
@@ -75,7 +75,7 @@ export { TextBase, getTransformedText, letterSpacingProperty, textAlignmentPrope
export { FormattedString } from './text-base/formatted-string';
export { Span } from './text-base/span';
export { TextField } from './text-field';
-export { TextView } from './text-view';
+export { TextView, WritingToolsAllowedInput, WritingToolsBehavior } from './text-view';
export { TimePicker } from './time-picker';
export { Transition } from './transition';
export { ModalTransition } from './transition/modal-transition';
diff --git a/packages/core/ui/text-view/index.android.ts b/packages/core/ui/text-view/index.android.ts
index a3eead5662..cf305ad0c0 100644
--- a/packages/core/ui/text-view/index.android.ts
+++ b/packages/core/ui/text-view/index.android.ts
@@ -1,6 +1,6 @@
import { TextViewBase as TextViewBaseCommon } from './text-view-common';
import { CSSType } from '../core/view';
-
+export { WritingToolsAllowedInput, WritingToolsBehavior } from './text-view-common';
export * from '../text-base';
@CSSType('TextView')
diff --git a/packages/core/ui/text-view/index.d.ts b/packages/core/ui/text-view/index.d.ts
index 9419793eca..21f35cb2cf 100644
--- a/packages/core/ui/text-view/index.d.ts
+++ b/packages/core/ui/text-view/index.d.ts
@@ -1,5 +1,6 @@
import { EditableTextBase } from '../editable-text-base';
import { Property } from '../core/properties';
+export { WritingToolsAllowedInput, WritingToolsBehavior } from './text-view-common';
/**
* Represents an editable multiline text view.
@@ -30,6 +31,16 @@ export class TextView extends EditableTextBase {
* @nsProperty
*/
maxLines: number;
+
+ /**
+ * (iOS Only) Are Apple Intelligence writing tools active
+ */
+ isWritingToolsActive: boolean;
+
+ /**
+ * (iOS Only) Allow Apple Intelligence writing tools to emit text changes on each alteration instead of after the final change (default).
+ */
+ enableWritingToolsEvents: boolean;
}
export const maxLinesProperty: Property;
diff --git a/packages/core/ui/text-view/index.ios.ts b/packages/core/ui/text-view/index.ios.ts
index f26280a66d..d894cece54 100644
--- a/packages/core/ui/text-view/index.ios.ts
+++ b/packages/core/ui/text-view/index.ios.ts
@@ -1,16 +1,16 @@
import { ScrollEventData } from '../scroll-view';
import { textProperty } from '../text-base';
-import { TextViewBase as TextViewBaseCommon } from './text-view-common';
+import { iosWritingToolsAllowedInputProperty, iosWritingToolsBehaviorProperty, TextViewBase as TextViewBaseCommon, WritingToolsAllowedInput, WritingToolsBehavior } from './text-view-common';
import { editableProperty, hintProperty, placeholderColorProperty, _updateCharactersInRangeReplacementString } from '../editable-text-base';
import { CoreTypes } from '../../core-types';
import { CSSType } from '../core/view';
import { Color } from '../../color';
import { colorProperty, borderTopWidthProperty, borderRightWidthProperty, borderBottomWidthProperty, borderLeftWidthProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty, paddingLeftProperty, Length } from '../styling/style-properties';
-import { iOSNativeHelper, layout } from '../../utils';
+import { layout, isRealDevice } from '../../utils';
+import { SDK_VERSION } from '../../utils/constants';
import { profile } from '../../profiling';
-
-const majorVersion = iOSNativeHelper.MajorVersion;
+export { WritingToolsAllowedInput, WritingToolsBehavior } from './text-view-common';
@NativeClass
class UITextViewDelegateImpl extends NSObject implements UITextViewDelegate {
@@ -70,6 +70,21 @@ class UITextViewDelegateImpl extends NSObject implements UITextViewDelegate {
return owner.scrollViewDidScroll(sv);
}
}
+
+ public textViewWritingToolsWillBegin(textView: UITextView): void {
+ const owner = this._owner?.deref();
+ if (owner) {
+ owner.isWritingToolsActive = true;
+ }
+ }
+
+ public textViewWritingToolsDidEnd(textView: UITextView): void {
+ const owner = this._owner?.deref();
+ if (owner) {
+ owner.isWritingToolsActive = false;
+ owner.textViewDidChange(textView);
+ }
+ }
}
@NativeClass
@@ -92,8 +107,8 @@ export class TextView extends TextViewBaseCommon {
public _isEditing: boolean;
- private _hintColor = majorVersion <= 12 || !UIColor.placeholderTextColor ? UIColor.blackColor.colorWithAlphaComponent(0.22) : UIColor.placeholderTextColor;
- private _textColor = majorVersion <= 12 || !UIColor.labelColor ? null : UIColor.labelColor;
+ private _hintColor = SDK_VERSION <= 12 || !UIColor.placeholderTextColor ? UIColor.blackColor.colorWithAlphaComponent(0.22) : UIColor.placeholderTextColor;
+ private _textColor = SDK_VERSION <= 12 || !UIColor.labelColor ? null : UIColor.labelColor;
createNativeView() {
const textView = NoScrollAnimationUITextView.new();
@@ -144,10 +159,12 @@ export class TextView extends TextViewBaseCommon {
}
public textViewDidChange(textView: UITextView): void {
- if (this.updateTextTrigger === 'textChanged') {
- textProperty.nativeValueChange(this, textView.text);
+ if (!this.isWritingToolsActive || this.enableWritingToolsEvents) {
+ if (this.updateTextTrigger === 'textChanged') {
+ textProperty.nativeValueChange(this, textView.text);
+ }
+ this.requestLayout();
}
- this.requestLayout();
}
public textViewShouldChangeTextInRangeReplacementText(textView: UITextView, range: NSRange, replacementString: string): boolean {
@@ -399,6 +416,52 @@ export class TextView extends TextViewBaseCommon {
right: inset.right,
};
}
+
+ [iosWritingToolsBehaviorProperty.setNative](value: WritingToolsBehavior) {
+ if (SDK_VERSION >= 18 && isRealDevice()) {
+ this.nativeTextViewProtected.writingToolsBehavior = this._writingToolsBehaviorType(value);
+ }
+ }
+
+ [iosWritingToolsAllowedInputProperty.setNative](value: Array) {
+ if (SDK_VERSION >= 18 && isRealDevice()) {
+ let writingToolsInput = null;
+ for (const inputType of value) {
+ writingToolsInput = (writingToolsInput != null ? writingToolsInput : 0) + this._writingToolsAllowedType(inputType);
+ }
+ if (writingToolsInput === null) {
+ writingToolsInput = UIWritingToolsResultOptions.Default;
+ }
+ this.nativeTextViewProtected.allowsEditingTextAttributes = true;
+ this.nativeTextViewProtected.allowedWritingToolsResultOptions = writingToolsInput;
+ }
+ }
+
+ private _writingToolsBehaviorType(value: WritingToolsBehavior) {
+ switch (value) {
+ case WritingToolsBehavior.Complete:
+ return UIWritingToolsBehavior.Complete;
+ case WritingToolsBehavior.Default:
+ return UIWritingToolsBehavior.Default;
+ case WritingToolsBehavior.Limited:
+ return UIWritingToolsBehavior.Limited;
+ case WritingToolsBehavior.None:
+ return UIWritingToolsBehavior.None;
+ }
+ }
+
+ private _writingToolsAllowedType(value: WritingToolsAllowedInput) {
+ switch (value) {
+ case WritingToolsAllowedInput.Default:
+ return UIWritingToolsResultOptions.Default;
+ case WritingToolsAllowedInput.List:
+ return UIWritingToolsResultOptions.List;
+ case WritingToolsAllowedInput.PlainText:
+ return UIWritingToolsResultOptions.PlainText;
+ case WritingToolsAllowedInput.RichText:
+ return UIWritingToolsResultOptions.RichText;
+ }
+ }
}
TextView.prototype.recycleNativeView = 'auto';
diff --git a/packages/core/ui/text-view/text-view-common.ts b/packages/core/ui/text-view/text-view-common.ts
index da72653dde..0bb9b076ac 100644
--- a/packages/core/ui/text-view/text-view-common.ts
+++ b/packages/core/ui/text-view/text-view-common.ts
@@ -1,3 +1,5 @@
+import { Property } from '../core/properties';
+import { booleanConverter } from '../core/view-base';
import { TextView as TextViewDefinition } from '.';
import { EditableTextBase } from '../editable-text-base';
@@ -5,4 +7,39 @@ export class TextViewBase extends EditableTextBase implements TextViewDefinition
public static returnPressEvent = 'returnPress';
public maxLines: number;
+ public isWritingToolsActive: boolean;
+ public enableWritingToolsEvents: boolean;
}
+
+/**
+ * (iOS Only) Behavior for Apple Intelligence Writing Tools
+ * @since 8.9
+ */
+export enum WritingToolsBehavior {
+ Complete,
+ Default,
+ Limited,
+ None,
+}
+export const iosWritingToolsBehaviorProperty = new Property({
+ name: 'iosWritingToolsBehavior',
+ defaultValue: WritingToolsBehavior.Default,
+});
+iosWritingToolsBehaviorProperty.register(TextViewBase);
+
+/**
+ * (iOS Only) Allowed input for Apple Intelligence Writing Tools
+ * @since 8.9
+ */
+export enum WritingToolsAllowedInput {
+ Default,
+ List,
+ PlainText,
+ RichText,
+ Table,
+}
+export const iosWritingToolsAllowedInputProperty = new Property>({
+ name: 'iosWritingToolsAllowedInput',
+ defaultValue: [WritingToolsAllowedInput.Default],
+});
+iosWritingToolsAllowedInputProperty.register(TextViewBase);
diff --git a/packages/core/utils/ios/index.ts b/packages/core/utils/ios/index.ts
index 6a28495809..df13b1ea9f 100644
--- a/packages/core/utils/ios/index.ts
+++ b/packages/core/utils/ios/index.ts
@@ -192,11 +192,10 @@ export function createUIDocumentInteractionControllerDelegate(): NSObject {
export function isRealDevice() {
try {
- // https://stackoverflow.com/a/5093092/4936697
- const sourceType = UIImagePickerControllerSourceType.UIImagePickerControllerSourceTypeCamera;
- const mediaTypes = UIImagePickerController.availableMediaTypesForSourceType(sourceType);
-
- return !!mediaTypes;
+ if (NSProcessInfo.processInfo.environment.valueForKey('SIMULATOR_DEVICE_NAME')) {
+ return false;
+ }
+ return true;
} catch (e) {
return true;
}
diff --git a/packages/types-ios/package.json b/packages/types-ios/package.json
index e2c5f220fb..cf1ef81bdf 100644
--- a/packages/types-ios/package.json
+++ b/packages/types-ios/package.json
@@ -1,6 +1,6 @@
{
"name": "@nativescript/types-ios",
- "version": "8.8.0",
+ "version": "8.9.0-alpha.0",
"description": "NativeScript Types for iOS.",
"homepage": "https://nativescript.org",
"repository": {
diff --git a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!AVFoundation.d.ts b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!AVFoundation.d.ts
index 6d5d120cc7..c34effb585 100644
--- a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!AVFoundation.d.ts
+++ b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!AVFoundation.d.ts
@@ -3161,6 +3161,18 @@ declare class AVCaptureConnection extends NSObject {
isVideoRotationAngleSupported(videoRotationAngle: number): boolean;
}
+/**
+ * @since 18.0
+ */
+declare class AVCaptureControl extends NSObject {
+
+ static alloc(): AVCaptureControl; // inherited from NSObject
+
+ static new(): AVCaptureControl; // inherited from NSObject
+
+ enabled: boolean;
+}
+
/**
* @since 11.0
*/
@@ -3437,6 +3449,11 @@ declare class AVCaptureDevice extends NSObject {
*/
readonly deviceWhiteBalanceGains: AVCaptureWhiteBalanceGains;
+ /**
+ * @since 18.0
+ */
+ readonly displayVideoZoomFactorMultiplier: number;
+
/**
* @since 11.0
* @deprecated 13.0
@@ -4007,6 +4024,16 @@ declare class AVCaptureDeviceFormat extends NSObject {
*/
readonly supportedVideoZoomRangesForDepthDataDelivery: NSArray;
+ /**
+ * @since 18.0
+ */
+ readonly systemRecommendedExposureBiasRange: AVExposureBiasRange;
+
+ /**
+ * @since 18.0
+ */
+ readonly systemRecommendedVideoZoomRange: AVZoomRange;
+
/**
* @since 11.0
*/
@@ -4119,6 +4146,16 @@ declare class AVCaptureDeviceInput extends AVCaptureInput {
*/
videoMinFrameDurationOverride: CMTime;
+ /**
+ * @since 18.0
+ */
+ windNoiseRemovalEnabled: boolean;
+
+ /**
+ * @since 18.0
+ */
+ readonly windNoiseRemovalSupported: boolean;
+
constructor(o: { device: AVCaptureDevice; });
initWithDeviceError(device: AVCaptureDevice): this;
@@ -4297,6 +4334,21 @@ declare class AVCaptureFileOutput extends AVCaptureOutput {
readonly recording: boolean;
+ /**
+ * @since 18.0
+ */
+ readonly recordingPaused: boolean;
+
+ /**
+ * @since 18.0
+ */
+ pauseRecording(): void;
+
+ /**
+ * @since 18.0
+ */
+ resumeRecording(): void;
+
startRecordingToOutputFileURLRecordingDelegate(outputFileURL: NSURL, delegate: AVCaptureFileOutputRecordingDelegate): void;
stopRecording(): void;
@@ -4309,6 +4361,16 @@ interface AVCaptureFileOutputRecordingDelegate extends NSObjectProtocol {
captureOutputDidFinishRecordingToOutputFileAtURLFromConnectionsError(output: AVCaptureFileOutput, outputFileURL: NSURL, connections: NSArray | AVCaptureConnection[], error: NSError): void;
+ /**
+ * @since 18.0
+ */
+ captureOutputDidPauseRecordingToOutputFileAtURLFromConnections?(output: AVCaptureFileOutput, fileURL: NSURL, connections: NSArray | AVCaptureConnection[]): void;
+
+ /**
+ * @since 18.0
+ */
+ captureOutputDidResumeRecordingToOutputFileAtURLFromConnections?(output: AVCaptureFileOutput, fileURL: NSURL, connections: NSArray | AVCaptureConnection[]): void;
+
captureOutputDidStartRecordingToOutputFileAtURLFromConnections?(output: AVCaptureFileOutput, fileURL: NSURL, connections: NSArray | AVCaptureConnection[]): void;
}
declare var AVCaptureFileOutputRecordingDelegate: {
@@ -4345,6 +4407,42 @@ declare const enum AVCaptureFocusMode {
*/
declare var AVCaptureISOCurrent: number;
+/**
+ * @since 18.0
+ */
+declare class AVCaptureIndexPicker extends AVCaptureControl {
+
+ static alloc(): AVCaptureIndexPicker; // inherited from NSObject
+
+ static new(): AVCaptureIndexPicker; // inherited from NSObject
+
+ accessibilityIdentifier: string;
+
+ readonly localizedIndexTitles: NSArray;
+
+ readonly localizedTitle: string;
+
+ readonly numberOfIndexes: number;
+
+ selectedIndex: number;
+
+ readonly symbolName: string;
+
+ constructor(o: { localizedTitle: string; symbolName: string; localizedIndexTitles: NSArray | string[]; });
+
+ constructor(o: { localizedTitle: string; symbolName: string; numberOfIndexes: number; });
+
+ constructor(o: { localizedTitle: string; symbolName: string; numberOfIndexes: number; localizedTitleTransform: (p1: number) => string; });
+
+ initWithLocalizedTitleSymbolNameLocalizedIndexTitles(localizedTitle: string, symbolName: string, localizedIndexTitles: NSArray | string[]): this;
+
+ initWithLocalizedTitleSymbolNameNumberOfIndexes(localizedTitle: string, symbolName: string, numberOfIndexes: number): this;
+
+ initWithLocalizedTitleSymbolNameNumberOfIndexesLocalizedTitleTransform(localizedTitle: string, symbolName: string, numberOfIndexes: number, localizedTitleTransform: (p1: number) => string): this;
+
+ setActionQueueAction(actionQueue: NSObject & OS_dispatch_queue, action: (p1: number) => void): void;
+}
+
/**
* @since 4.0
*/
@@ -4599,7 +4697,9 @@ declare const enum AVCaptureMultichannelAudioMode {
None = 0,
- Stereo = 1
+ Stereo = 1,
+
+ FirstOrderAmbisonics = 2
}
/**
@@ -4924,6 +5024,11 @@ declare class AVCapturePhotoOutput extends AVCaptureOutput {
readonly availablePhotoPixelFormatTypes: NSArray;
+ /**
+ * @since 18.0
+ */
+ readonly availableRawPhotoCodecTypes: NSArray;
+
/**
* @since 11.0
*/
@@ -5126,6 +5231,11 @@ declare class AVCapturePhotoOutput extends AVCaptureOutput {
*/
supportedPhotoPixelFormatTypesForFileType(fileType: string): NSArray;
+ /**
+ * @since 18.0
+ */
+ supportedRawPhotoCodecTypesForRawPhotoPixelFormatTypeFileType(pixelFormatType: number, fileType: string): NSArray;
+
/**
* @since 11.0
*/
@@ -5364,6 +5474,11 @@ declare class AVCapturePhotoSettings extends NSObject implements NSCopying {
*/
rawEmbeddedThumbnailPhotoFormat: NSDictionary;
+ /**
+ * @since 18.0
+ */
+ rawFileFormat: NSDictionary;
+
/**
* @since 11.0
*/
@@ -5602,6 +5717,21 @@ declare class AVCaptureSession extends NSObject {
*/
readonly connections: NSArray;
+ /**
+ * @since 18.0
+ */
+ readonly controls: NSArray;
+
+ /**
+ * @since 18.0
+ */
+ readonly controlsDelegate: AVCaptureSessionControlsDelegate;
+
+ /**
+ * @since 18.0
+ */
+ readonly controlsDelegateCallbackQueue: NSObject & OS_dispatch_queue;
+
/**
* @since 16.0
*/
@@ -5620,6 +5750,11 @@ declare class AVCaptureSession extends NSObject {
*/
readonly masterClock: any;
+ /**
+ * @since 18.0
+ */
+ readonly maxControlsCount: number;
+
/**
* @since 16.0
*/
@@ -5636,6 +5771,11 @@ declare class AVCaptureSession extends NSObject {
sessionPreset: string;
+ /**
+ * @since 18.0
+ */
+ readonly supportsControls: boolean;
+
/**
* @since 15.4
*/
@@ -5651,6 +5791,11 @@ declare class AVCaptureSession extends NSObject {
*/
addConnection(connection: AVCaptureConnection): void;
+ /**
+ * @since 18.0
+ */
+ addControl(control: AVCaptureControl): void;
+
addInput(input: AVCaptureInput): void;
/**
@@ -5672,6 +5817,11 @@ declare class AVCaptureSession extends NSObject {
*/
canAddConnection(connection: AVCaptureConnection): boolean;
+ /**
+ * @since 18.0
+ */
+ canAddControl(control: AVCaptureControl): boolean;
+
canAddInput(input: AVCaptureInput): boolean;
canAddOutput(output: AVCaptureOutput): boolean;
@@ -5685,15 +5835,43 @@ declare class AVCaptureSession extends NSObject {
*/
removeConnection(connection: AVCaptureConnection): void;
+ /**
+ * @since 18.0
+ */
+ removeControl(control: AVCaptureControl): void;
+
removeInput(input: AVCaptureInput): void;
removeOutput(output: AVCaptureOutput): void;
+ /**
+ * @since 18.0
+ */
+ setControlsDelegateQueue(controlsDelegate: AVCaptureSessionControlsDelegate, controlsDelegateCallbackQueue: NSObject & OS_dispatch_queue): void;
+
startRunning(): void;
stopRunning(): void;
}
+/**
+ * @since 18.0
+ */
+interface AVCaptureSessionControlsDelegate extends NSObjectProtocol {
+
+ sessionControlsDidBecomeActive(session: AVCaptureSession): void;
+
+ sessionControlsDidBecomeInactive(session: AVCaptureSession): void;
+
+ sessionControlsWillEnterFullscreenAppearance(session: AVCaptureSession): void;
+
+ sessionControlsWillExitFullscreenAppearance(session: AVCaptureSession): void;
+}
+declare var AVCaptureSessionControlsDelegate: {
+
+ prototype: AVCaptureSessionControlsDelegate;
+};
+
/**
* @since 4.0
*/
@@ -5810,6 +5988,42 @@ declare var AVCaptureSessionRuntimeErrorNotification: string;
*/
declare var AVCaptureSessionWasInterruptedNotification: string;
+/**
+ * @since 18.0
+ */
+declare class AVCaptureSlider extends AVCaptureControl {
+
+ static alloc(): AVCaptureSlider; // inherited from NSObject
+
+ static new(): AVCaptureSlider; // inherited from NSObject
+
+ accessibilityIdentifier: string;
+
+ readonly localizedTitle: string;
+
+ localizedValueFormat: string;
+
+ prominentValues: NSArray;
+
+ readonly symbolName: string;
+
+ value: number;
+
+ constructor(o: { localizedTitle: string; symbolName: string; minValue: number; maxValue: number; });
+
+ constructor(o: { localizedTitle: string; symbolName: string; minValue: number; maxValue: number; step: number; });
+
+ constructor(o: { localizedTitle: string; symbolName: string; values: NSArray | number[]; });
+
+ initWithLocalizedTitleSymbolNameMinValueMaxValue(localizedTitle: string, symbolName: string, minValue: number, maxValue: number): this;
+
+ initWithLocalizedTitleSymbolNameMinValueMaxValueStep(localizedTitle: string, symbolName: string, minValue: number, maxValue: number, step: number): this;
+
+ initWithLocalizedTitleSymbolNameValues(localizedTitle: string, symbolName: string, values: NSArray | number[]): this;
+
+ setActionQueueAction(actionQueue: NSObject & OS_dispatch_queue, action: (p1: number) => void): void;
+}
+
/**
* @since 4.0
* @deprecated 10.0
@@ -5959,6 +6173,24 @@ declare class AVCaptureSynchronizedSampleBufferData extends AVCaptureSynchronize
readonly sampleBufferWasDropped: boolean;
}
+/**
+ * @since 18.0
+ */
+declare class AVCaptureSystemExposureBiasSlider extends AVCaptureControl {
+
+ static alloc(): AVCaptureSystemExposureBiasSlider; // inherited from NSObject
+
+ static new(): AVCaptureSystemExposureBiasSlider; // inherited from NSObject
+
+ constructor(o: { device: AVCaptureDevice; });
+
+ constructor(o: { device: AVCaptureDevice; action: (p1: number) => void; });
+
+ initWithDevice(device: AVCaptureDevice): this;
+
+ initWithDeviceAction(device: AVCaptureDevice, action: (p1: number) => void): this;
+}
+
/**
* @since 11.1
*/
@@ -6024,6 +6256,24 @@ declare const enum AVCaptureSystemUserInterface {
MicrophoneModes = 2
}
+/**
+ * @since 18.0
+ */
+declare class AVCaptureSystemZoomSlider extends AVCaptureControl {
+
+ static alloc(): AVCaptureSystemZoomSlider; // inherited from NSObject
+
+ static new(): AVCaptureSystemZoomSlider; // inherited from NSObject
+
+ constructor(o: { device: AVCaptureDevice; });
+
+ constructor(o: { device: AVCaptureDevice; action: (p1: number) => void; });
+
+ initWithDevice(device: AVCaptureDevice): this;
+
+ initWithDeviceAction(device: AVCaptureDevice, action: (p1: number) => void): this;
+}
+
/**
* @since 4.0
*/
@@ -7129,7 +7379,11 @@ declare const enum AVError {
SandboxExtensionDenied = -11884,
- ToneMappingFailed = -11885
+ ToneMappingFailed = -11885,
+
+ MediaExtensionDisabled = -11886,
+
+ MediaExtensionConflict = -11887
}
/**
@@ -7182,6 +7436,22 @@ declare var AVErrorRecordingSuccessfullyFinishedKey: string;
*/
declare var AVErrorTimeKey: string;
+/**
+ * @since 18.0
+ */
+declare class AVExposureBiasRange extends NSObject {
+
+ static alloc(): AVExposureBiasRange; // inherited from NSObject
+
+ static new(): AVExposureBiasRange; // inherited from NSObject
+
+ readonly maxExposureBias: number;
+
+ readonly minExposureBias: number;
+
+ containsExposureBias(exposureBias: number): boolean;
+}
+
/**
* @since 17.4
*/
@@ -9569,6 +9839,11 @@ declare var AVMetadataIdentifierQuickTimeMetadataDisplayName: string;
*/
declare var AVMetadataIdentifierQuickTimeMetadataEncodedBy: string;
+/**
+ * @since 18.0
+ */
+declare var AVMetadataIdentifierQuickTimeMetadataFullFrameRatePlaybackIntent: string;
+
/**
* @since 8.0
*/
@@ -10593,6 +10868,11 @@ declare var AVMetadataQuickTimeMetadataKeyDisplayName: string;
*/
declare var AVMetadataQuickTimeMetadataKeyEncodedBy: string;
+/**
+ * @since 18.0
+ */
+declare var AVMetadataQuickTimeMetadataKeyFullFrameRatePlaybackIntent: string;
+
/**
* @since 4.0
*/
@@ -11760,10 +12040,6 @@ declare class AVMutableComposition extends AVComposition {
insertEmptyTimeRange(timeRange: CMTimeRange): void;
- /**
- * @since 16.0
- * @deprecated 18.0
- */
insertTimeRangeOfAssetAtTimeCompletionHandler(timeRange: CMTimeRange, asset: AVAsset, startTime: CMTime, completionHandler: (p1: NSError) => void): void;
/**
@@ -11772,11 +12048,6 @@ declare class AVMutableComposition extends AVComposition {
*/
insertTimeRangeOfAssetAtTimeError(timeRange: CMTimeRange, asset: AVAsset, startTime: CMTime): boolean;
- /**
- * @since 18.0
- */
- insertTimeRangeOfTracksAtTimeError(timeRange: CMTimeRange, tracks: NSArray | AVAssetTrack[], startTime: CMTime): boolean;
-
/**
* @since 15.0
*/
@@ -15363,6 +15634,11 @@ declare var AVVideoCodecTypeHEVCWithAlpha: string;
*/
declare var AVVideoCodecTypeJPEG: string;
+/**
+ * @since 18.0
+ */
+declare var AVVideoCodecTypeJPEGXL: string;
+
/**
* @since 10.0
*/
diff --git a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!CoreGraphics.d.ts b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!CoreGraphics.d.ts
index 686d1be5d7..42bd83c556 100644
--- a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!CoreGraphics.d.ts
+++ b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!CoreGraphics.d.ts
@@ -212,11 +212,30 @@ declare const enum CGBlendMode {
kCGBlendModePlusLighter = 27
}
+interface CGColorBufferFormat {
+ version: number;
+ bitmapInfo: CGBitmapInfo;
+ bitsPerComponent: number;
+ bitsPerPixel: number;
+ bytesPerRow: number;
+}
+declare var CGColorBufferFormat: interop.StructType;
+
+/**
+ * @since 18.0
+ */
+declare function CGColorConversionInfoConvertData(info: any, width: number, height: number, dst_data: interop.Pointer | interop.Reference, dst_format: CGColorBufferFormat, src_data: interop.Pointer | interop.Reference, src_format: CGColorBufferFormat, options: NSDictionary): boolean;
+
/**
* @since 10.0
*/
declare function CGColorConversionInfoCreate(src: any, dst: any): any;
+/**
+ * @since 18.0
+ */
+declare function CGColorConversionInfoCreateForToneMapping(from: any, source_headroom: number, to: any, target_headroom: number, method: CGToneMapping, options: NSDictionary, error: interop.Pointer | interop.Reference): any;
+
/**
* @since 13
*/
@@ -357,6 +376,11 @@ declare const enum CGColorRenderingIntent {
*/
declare function CGColorRetain(color: any): any;
+/**
+ * @since 18.0
+ */
+declare function CGColorSpaceCopyBaseColorSpace(space: any): any;
+
/**
* @since 10.0
*/
@@ -3533,3 +3557,8 @@ declare var kCGUse100nitsHLGOOTF: string;
* @since 18.0
*/
declare var kCGUseBT1886ForCoreVideoGamma: string;
+
+/**
+ * @since 18.1
+ */
+declare var kCGUseLegacyHDREcosystem: string;
diff --git a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!Foundation.d.ts b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!Foundation.d.ts
index 8d451550e3..aa1a0feee3 100644
--- a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!Foundation.d.ts
+++ b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!Foundation.d.ts
@@ -12863,6 +12863,10 @@ declare class NSString extends NSObject implements CKRecordValue, CNKeyDescripto
static alloc(): NSString; // inherited from NSObject
+ static atob(data: string): string;
+
+ static btoa(stringToEncode: string): string;
+
static itemProviderVisibilityForRepresentationWithTypeIdentifier(typeIdentifier: string): NSItemProviderRepresentationVisibility;
static localizedNameOfStringEncoding(encoding: number): string;
diff --git a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!ObjectiveC.d.ts b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!ObjectiveC.d.ts
index aac18cbda5..2921557cef 100644
--- a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!ObjectiveC.d.ts
+++ b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!ObjectiveC.d.ts
@@ -314,6 +314,16 @@ declare class NSObject implements NSObjectProtocol {
*/
accessibilityShouldGroupAccessibilityChildrenBlock: () => boolean;
+ /**
+ * @since 18.1
+ */
+ accessibilityTextInputResponder: UITextInput;
+
+ /**
+ * @since 18.1
+ */
+ accessibilityTextInputResponderBlock: () => UITextInput;
+
/**
* @since 13.0
*/
diff --git a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!UIKit.d.ts b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!UIKit.d.ts
index 877ef4aef5..894942a316 100644
--- a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!UIKit.d.ts
+++ b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!UIKit.d.ts
@@ -16291,6 +16291,8 @@ interface UIFocusItem extends UIFocusEnvironment {
*/
focusGroupPriority?: number;
+ focusItemDeferralMode?: UIFocusItemDeferralMode;
+
/**
* @since 12.0
*/
@@ -16325,6 +16327,18 @@ declare var UIFocusItemContainer: {
prototype: UIFocusItemContainer;
};
+/**
+ * @since 18.0
+ */
+declare const enum UIFocusItemDeferralMode {
+
+ Automatic = 0,
+
+ Always = 1,
+
+ Never = 2
+}
+
/**
* @since 12.0
*/
@@ -21696,6 +21710,11 @@ declare var UIMenuMinimizeAndZoom: string;
*/
declare var UIMenuNewScene: string;
+/**
+ * @since 14.0
+ */
+declare var UIMenuOpen: string;
+
/**
* @since 14.0
*/
@@ -24711,6 +24730,9 @@ declare class UIPresentationController extends NSObject implements UIAppearanceC
readonly shouldRemovePresentersView: boolean;
+ /**
+ * @since 17.0
+ */
readonly traitOverrides: UITraitOverrides;
readonly debugDescription: string; // inherited from NSObjectProtocol
@@ -24912,7 +24934,11 @@ declare const enum UIPressType {
PageUp = 30,
- PageDown = 31
+ PageDown = 31,
+
+ TVRemoteOneTwoThree = 32,
+
+ TVRemoteFourColors = 33
}
/**
@@ -26496,6 +26522,8 @@ declare class UIScene extends UIResponder {
*/
subtitle: string;
+ readonly systemProtectionManager: UISceneSystemProtectionManager;
+
title: string;
constructor(o: { session: UISceneSession; connectionOptions: UISceneConnectionOptions; });
@@ -26821,6 +26849,23 @@ declare class UISceneSizeRestrictions extends NSObject {
minimumSize: CGSize;
}
+/**
+ * @since 18.0
+ */
+declare var UISceneSystemProtectionDidChangeNotification: string;
+
+/**
+ * @since 18.0
+ */
+declare class UISceneSystemProtectionManager extends NSObject {
+
+ static alloc(): UISceneSystemProtectionManager; // inherited from NSObject
+
+ static new(): UISceneSystemProtectionManager; // inherited from NSObject
+
+ readonly userAuthenticationEnabled: boolean;
+}
+
/**
* @since 13.0
*/
@@ -27775,6 +27820,11 @@ declare class UISearchBar extends UIView implements UIBarPositioning, UILookToDi
*/
translucent: boolean;
+ /**
+ * @since 18.0
+ */
+ allowedWritingToolsResultOptions: UIWritingToolsResultOptions; // inherited from UITextInputTraits
+
autocapitalizationType: UITextAutocapitalizationType; // inherited from UITextInputTraits
autocorrectionType: UITextAutocorrectionType; // inherited from UITextInputTraits
@@ -27846,11 +27896,6 @@ declare class UISearchBar extends UIView implements UIBarPositioning, UILookToDi
*/
textContentType: string; // inherited from UITextInputTraits
- /**
- * @since 18.0
- */
- writingToolsAllowedInputOptions: UIWritingToolsAllowedInputOptions; // inherited from UITextInputTraits
-
/**
* @since 18.0
*/
@@ -30519,6 +30564,8 @@ declare class UITab extends NSObject implements UIAccessibilityIdentification, U
image: UIImage;
+ readonly managingTabGroup: UITabGroup;
+
readonly parent: UITabGroup;
preferredPlacement: UITabPlacement;
@@ -30921,7 +30968,7 @@ interface UITabBarControllerDelegate extends NSObjectProtocol {
/**
* @since 18.0
*/
- tabBarControllerDidSelectTabPreviousTab?(tabBarController: UITabBarController, tab: UITab, tab2: UITab): void;
+ tabBarControllerDidSelectTabPreviousTab?(tabBarController: UITabBarController, selectedTab: UITab, previousTab: UITab): void;
tabBarControllerDidSelectViewController?(tabBarController: UITabBarController, viewController: UIViewController): void;
@@ -30930,6 +30977,11 @@ interface UITabBarControllerDelegate extends NSObjectProtocol {
*/
tabBarControllerDisplayOrderDidChangeForGroup?(tabBarController: UITabBarController, group: UITabGroup): void;
+ /**
+ * @since 18.0
+ */
+ tabBarControllerDisplayedViewControllersForTabProposedViewControllers?(tabBarController: UITabBarController, tab: UITab, proposedViewControllers: NSArray | UIViewController[]): NSArray;
+
/**
* @since 7.0
*/
@@ -31028,6 +31080,20 @@ declare class UITabBarControllerSidebar extends NSObject {
scrollToTargetAnimated(target: UITabSidebarScrollTarget, animated: boolean): void;
}
+/**
+ * @since 18.0
+ */
+interface UITabBarControllerSidebarAnimating extends NSObjectProtocol {
+
+ addAnimations(animations: () => void): void;
+
+ addCompletion(completion: () => void): void;
+}
+declare var UITabBarControllerSidebarAnimating: {
+
+ prototype: UITabBarControllerSidebarAnimating;
+};
+
/**
* @since 18.0
*/
@@ -31045,7 +31111,7 @@ interface UITabBarControllerSidebarDelegate extends NSObjectProtocol {
tabBarControllerSidebarUpdateItem?(tabBarController: UITabBarController, sidebar: UITabBarControllerSidebar, item: UITabSidebarItem): void;
- tabBarControllerSidebarVisibilityDidChange?(tabBarController: UITabBarController, sidebar: UITabBarControllerSidebar): void;
+ tabBarControllerSidebarVisibilityWillChangeAnimator?(tabBarController: UITabBarController, sidebar: UITabBarControllerSidebar, animator: UITabBarControllerSidebarAnimating): void;
tabBarControllerSidebarWillBeginDisplayingTab?(tabBarController: UITabBarController, sidebar: UITabBarControllerSidebar, tab: UITab): void;
}
@@ -34251,6 +34317,11 @@ declare class UITextField extends UIControl implements NSCoding, UIContentSizeCa
adjustsFontForContentSizeCategory: boolean; // inherited from UIContentSizeCategoryAdjusting
+ /**
+ * @since 18.0
+ */
+ allowedWritingToolsResultOptions: UIWritingToolsResultOptions; // inherited from UITextInputTraits
+
autocapitalizationType: UITextAutocapitalizationType; // inherited from UITextInputTraits
autocorrectionType: UITextAutocorrectionType; // inherited from UITextInputTraits
@@ -34367,11 +34438,6 @@ declare class UITextField extends UIControl implements NSCoding, UIContentSizeCa
readonly tokenizer: UITextInputTokenizer; // inherited from UITextInput
- /**
- * @since 18.0
- */
- writingToolsAllowedInputOptions: UIWritingToolsAllowedInputOptions; // inherited from UITextInputTraits
-
/**
* @since 18.0
*/
@@ -34381,6 +34447,11 @@ declare class UITextField extends UIControl implements NSCoding, UIContentSizeCa
constructor(o: { coder: NSCoder; }); // inherited from NSCoding
+ /**
+ * @since 12.0
+ */
+ attributedTextInRange(range: UITextRange): NSAttributedString;
+
baseWritingDirectionForPositionInDirection(position: UITextPosition, direction: UITextStorageDirection): NSWritingDirection;
/**
@@ -34423,6 +34494,11 @@ declare class UITextField extends UIControl implements NSCoding, UIContentSizeCa
dictationRecordingDidEnd(): void;
+ /**
+ * @since 18.0
+ */
+ didDismissWritingTools(): void;
+
drawPlaceholderInRect(rect: CGRect): void;
/**
@@ -34556,6 +34632,11 @@ declare class UITextField extends UIControl implements NSCoding, UIContentSizeCa
* @since 16.0
*/
willPresentEditMenuWithAnimator(animator: UIEditMenuInteractionAnimating): void;
+
+ /**
+ * @since 18.0
+ */
+ willPresentWritingTools(): void;
}
interface UITextFieldDelegate extends NSObjectProtocol {
@@ -35269,6 +35350,11 @@ interface UITextInput extends UIKeyInput {
tokenizer: UITextInputTokenizer;
+ /**
+ * @since 12.0
+ */
+ attributedTextInRange?(range: UITextRange): NSAttributedString;
+
baseWritingDirectionForPositionInDirection(position: UITextPosition, direction: UITextStorageDirection): NSWritingDirection;
/**
@@ -35299,6 +35385,11 @@ interface UITextInput extends UIKeyInput {
dictationRecordingDidEnd?(): void;
+ /**
+ * @since 18.0
+ */
+ didDismissWritingTools?(): void;
+
/**
* @since 16.0
*/
@@ -35388,6 +35479,11 @@ interface UITextInput extends UIKeyInput {
* @since 16.0
*/
willPresentEditMenuWithAnimator?(animator: UIEditMenuInteractionAnimating): void;
+
+ /**
+ * @since 18.0
+ */
+ willPresentWritingTools?(): void;
}
declare var UITextInput: {
@@ -35591,6 +35687,11 @@ declare var UITextInputTokenizer: {
interface UITextInputTraits extends NSObjectProtocol {
+ /**
+ * @since 18.0
+ */
+ allowedWritingToolsResultOptions?: UIWritingToolsResultOptions;
+
autocapitalizationType?: UITextAutocapitalizationType;
autocorrectionType?: UITextAutocorrectionType;
@@ -35645,11 +35746,6 @@ interface UITextInputTraits extends NSObjectProtocol {
*/
textContentType?: string;
- /**
- * @since 18.0
- */
- writingToolsAllowedInputOptions?: UIWritingToolsAllowedInputOptions;
-
/**
* @since 18.0
*/
@@ -36418,6 +36514,11 @@ declare class UITextView extends UIScrollView implements UIContentSizeCategoryAd
adjustsFontForContentSizeCategory: boolean; // inherited from UIContentSizeCategoryAdjusting
+ /**
+ * @since 18.0
+ */
+ allowedWritingToolsResultOptions: UIWritingToolsResultOptions; // inherited from UITextInputTraits
+
autocapitalizationType: UITextAutocapitalizationType; // inherited from UITextInputTraits
autocorrectionType: UITextAutocorrectionType; // inherited from UITextInputTraits
@@ -36533,11 +36634,6 @@ declare class UITextView extends UIScrollView implements UIContentSizeCategoryAd
readonly tokenizer: UITextInputTokenizer; // inherited from UITextInput
- /**
- * @since 18.0
- */
- writingToolsAllowedInputOptions: UIWritingToolsAllowedInputOptions; // inherited from UITextInputTraits
-
/**
* @since 18.0
*/
@@ -36550,6 +36646,11 @@ declare class UITextView extends UIScrollView implements UIContentSizeCategoryAd
*/
constructor(o: { frame: CGRect; textContainer: NSTextContainer; });
+ /**
+ * @since 12.0
+ */
+ attributedTextInRange(range: UITextRange): NSAttributedString;
+
baseWritingDirectionForPositionInDirection(position: UITextPosition, direction: UITextStorageDirection): NSWritingDirection;
/**
@@ -36596,6 +36697,11 @@ declare class UITextView extends UIScrollView implements UIContentSizeCategoryAd
dictationRecordingDidEnd(): void;
+ /**
+ * @since 18.0
+ */
+ didDismissWritingTools(): void;
+
/**
* @since 18.0
*/
@@ -36737,6 +36843,11 @@ declare class UITextView extends UIScrollView implements UIContentSizeCategoryAd
* @since 16.0
*/
willPresentEditMenuWithAnimator(animator: UIEditMenuInteractionAnimating): void;
+
+ /**
+ * @since 18.0
+ */
+ willPresentWritingTools(): void;
}
/**
@@ -38914,6 +39025,9 @@ declare class UIView extends UIResponder implements CALayerDelegate, NSCoding, U
*/
readonly trailingAnchor: NSLayoutXAxisAnchor;
+ /**
+ * @since 17.0
+ */
readonly traitOverrides: UITraitOverrides;
/**
@@ -38989,6 +39103,8 @@ declare class UIView extends UIResponder implements CALayerDelegate, NSCoding, U
*/
readonly focusItemContainer: UIFocusItemContainer; // inherited from UIFocusEnvironment
+ readonly focusItemDeferralMode: UIFocusItemDeferralMode; // inherited from UIFocusItem
+
readonly hash: number; // inherited from NSObjectProtocol
readonly isProxy: boolean; // inherited from NSObjectProtocol
@@ -39367,6 +39483,9 @@ declare class UIView extends UIResponder implements CALayerDelegate, NSCoding, U
updateFocusIfNeeded(): void;
+ /**
+ * @since 17.0
+ */
updateTraitsIfNeeded(): void;
/**
@@ -39993,6 +40112,9 @@ declare class UIViewController extends UIResponder implements NSCoding, NSExtens
*/
readonly topLayoutGuide: UILayoutSupport;
+ /**
+ * @since 17.0
+ */
readonly traitOverrides: UITraitOverrides;
/**
@@ -40417,6 +40539,9 @@ declare class UIViewController extends UIResponder implements NSCoding, NSExtens
updateFocusIfNeeded(): void;
+ /**
+ * @since 17.0
+ */
updateTraitsIfNeeded(): void;
/**
@@ -41495,6 +41620,9 @@ declare class UIWindowScene extends UIScene implements UITraitChangeObservable,
*/
readonly statusBarManager: UIStatusBarManager;
+ /**
+ * @since 17.0
+ */
readonly traitOverrides: UITraitOverrides;
/**
@@ -41893,31 +42021,31 @@ declare class UIWindowSceneStandardPlacement extends UIWindowScenePlacement {
/**
* @since 18.0
*/
-declare const enum UIWritingToolsAllowedInputOptions {
-
- Default = 0,
+declare const enum UIWritingToolsBehavior {
- PlainText = 1,
+ None = -1,
- RichText = 2,
+ Default = 0,
- List = 4,
+ Complete = 1,
- Table = 8
+ Limited = 2
}
/**
* @since 18.0
*/
-declare const enum UIWritingToolsBehavior {
-
- None = -1,
+declare const enum UIWritingToolsResultOptions {
Default = 0,
- Complete = 1,
+ PlainText = 1,
- Limited = 2
+ RichText = 2,
+
+ List = 4,
+
+ Table = 8
}
/**
diff --git a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!Vision.d.ts b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!Vision.d.ts
index 6cca1e433d..f607649f45 100644
--- a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!Vision.d.ts
+++ b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!Vision.d.ts
@@ -827,6 +827,7 @@ declare var VNDetectBarcodesRequestRevision1: number;
/**
* @since 15.0
+ * @deprecated 18.0
*/
declare var VNDetectBarcodesRequestRevision2: number;
@@ -2788,6 +2789,7 @@ declare var VNRecognizeTextRequestRevision1: number;
/**
* @since 14.0
+ * @deprecated 18.0
*/
declare var VNRecognizeTextRequestRevision2: number;
diff --git a/tools/scripts/run-automated.js b/tools/scripts/run-automated.js
index 49e64d695c..87cb83d73c 100644
--- a/tools/scripts/run-automated.js
+++ b/tools/scripts/run-automated.js
@@ -20,7 +20,7 @@ const spawned_process = spawn(
platform,
// "--log=trace",
// `--flags="--log=trace"`,
- "--timeout=600" // 10 minutes, booting avds on CI is very slow...
+ `--timeout=${TIMEOUT_MS}`
],
{
cwd: workspaceDir,