mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
* feat(tns-platform-declarations): Generate iOS typings from iOS 12.1 SDK
* Instructions for generating iOS typescript definitions
* Refactor `typings-gen.sh` to use {N} CLI and generate fuller
metadata for the system libraries
* Automatically generate `ios.d.ts` wrapper
* Add interop pointers and references as alternatives
to `string` for `char*` args
(implemented in https://github.com/NativeScript/ios-runtime/pull/1022)
BREAKING CHANGE: Several enum values have changed because
they have been wrongly generated.
To migrate your app or plugin code use the new names of the
following:
* enum NSUnderlineStyle:
- `StyleNone` -> `None`
- `StyleSingle` -> `Single`
- `StyleThick` -> `Thick`
- `StyleDouble` -> `Double`
* enum AVAudioSessionErrorCode:
- `CodeNone` -> `None`
- `CodeMediaServicesFailed` -> `MediaServicesFailed`
- `CodeIsBusy` -> `IsBusy`
- `CodeIncompatibleCategory` -> `IncompatibleCategory`
- `CodeCannotInterruptOthers` -> `CannotInterruptOthers`
- `CodeMissingEntitlement` -> `MissingEntitlement`
- `CodeSiriIsRecording` -> `SiriIsRecording`
- `CodeCannotStartPlaying` -> `CannotStartPlaying`
- `CodeCannotStartRecording` -> `CannotStartRecording`
- `CodeBadParam` -> `BadParam`
- `CodeResourceNotAvailable` -> `ResourceNotAvailable`
- `CodeUnspecified` -> `Unspecified`
* fix(ui/text-base): Update NSUnderlineStyle.StyleSingle constant
After the typings regeneration its and several others' names have
changed to the expected `NSUnderlineStyle.Single`.
* fix(tns-platform-declarations): Restore deprecated enum values
In order to not introduce a breaking change in a patch version, we
are keeping `Style...` and `Code...` values that have been wrongly
generated till now. In the next major/minor release of the package
when the typings are regenerated we can safely remove them.
Revert to using the deprecated one's in `text-base.ios.ts` so that
the introduction of this breaking change doesn't slip in undetected.
* fix(application.ios): Directly call presetnNativeScriptApp
We've been using `performSelectorWithObject` but it's
declaration has been manually added. Moreover it's more
convenient to directly call the method.
150 lines
5.1 KiB
TypeScript
150 lines
5.1 KiB
TypeScript
|
|
declare class INUIAddVoiceShortcutButton extends UIButton {
|
|
|
|
static alloc(): INUIAddVoiceShortcutButton; // inherited from NSObject
|
|
|
|
static appearance(): INUIAddVoiceShortcutButton; // inherited from UIAppearance
|
|
|
|
static appearanceForTraitCollection(trait: UITraitCollection): INUIAddVoiceShortcutButton; // inherited from UIAppearance
|
|
|
|
static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): INUIAddVoiceShortcutButton; // inherited from UIAppearance
|
|
|
|
static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray<typeof NSObject> | typeof NSObject[]): INUIAddVoiceShortcutButton; // inherited from UIAppearance
|
|
|
|
static appearanceWhenContainedIn(ContainerClass: typeof NSObject): INUIAddVoiceShortcutButton; // inherited from UIAppearance
|
|
|
|
static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray<typeof NSObject> | typeof NSObject[]): INUIAddVoiceShortcutButton; // inherited from UIAppearance
|
|
|
|
static buttonWithType(buttonType: UIButtonType): INUIAddVoiceShortcutButton; // inherited from UIButton
|
|
|
|
static new(): INUIAddVoiceShortcutButton; // inherited from NSObject
|
|
|
|
delegate: INUIAddVoiceShortcutButtonDelegate;
|
|
|
|
shortcut: INShortcut;
|
|
|
|
readonly style: INUIAddVoiceShortcutButtonStyle;
|
|
|
|
constructor(o: { style: INUIAddVoiceShortcutButtonStyle; });
|
|
|
|
initWithStyle(style: INUIAddVoiceShortcutButtonStyle): this;
|
|
}
|
|
|
|
interface INUIAddVoiceShortcutButtonDelegate extends NSObjectProtocol {
|
|
|
|
presentAddVoiceShortcutViewControllerForAddVoiceShortcutButton(addVoiceShortcutViewController: INUIAddVoiceShortcutViewController, addVoiceShortcutButton: INUIAddVoiceShortcutButton): void;
|
|
|
|
presentEditVoiceShortcutViewControllerForAddVoiceShortcutButton(editVoiceShortcutViewController: INUIEditVoiceShortcutViewController, addVoiceShortcutButton: INUIAddVoiceShortcutButton): void;
|
|
}
|
|
declare var INUIAddVoiceShortcutButtonDelegate: {
|
|
|
|
prototype: INUIAddVoiceShortcutButtonDelegate;
|
|
};
|
|
|
|
declare const enum INUIAddVoiceShortcutButtonStyle {
|
|
|
|
White = 0,
|
|
|
|
WhiteOutline = 1,
|
|
|
|
Black = 2,
|
|
|
|
BlackOutline = 3
|
|
}
|
|
|
|
declare class INUIAddVoiceShortcutViewController extends UIViewController {
|
|
|
|
static alloc(): INUIAddVoiceShortcutViewController; // inherited from NSObject
|
|
|
|
static new(): INUIAddVoiceShortcutViewController; // inherited from NSObject
|
|
|
|
delegate: INUIAddVoiceShortcutViewControllerDelegate;
|
|
|
|
constructor(o: { shortcut: INShortcut; });
|
|
|
|
initWithShortcut(shortcut: INShortcut): this;
|
|
}
|
|
|
|
interface INUIAddVoiceShortcutViewControllerDelegate extends NSObjectProtocol {
|
|
|
|
addVoiceShortcutViewControllerDidCancel(controller: INUIAddVoiceShortcutViewController): void;
|
|
|
|
addVoiceShortcutViewControllerDidFinishWithVoiceShortcutError(controller: INUIAddVoiceShortcutViewController, voiceShortcut: INVoiceShortcut, error: NSError): void;
|
|
}
|
|
declare var INUIAddVoiceShortcutViewControllerDelegate: {
|
|
|
|
prototype: INUIAddVoiceShortcutViewControllerDelegate;
|
|
};
|
|
|
|
declare class INUIEditVoiceShortcutViewController extends UIViewController {
|
|
|
|
static alloc(): INUIEditVoiceShortcutViewController; // inherited from NSObject
|
|
|
|
static new(): INUIEditVoiceShortcutViewController; // inherited from NSObject
|
|
|
|
delegate: INUIEditVoiceShortcutViewControllerDelegate;
|
|
|
|
constructor(o: { voiceShortcut: INVoiceShortcut; });
|
|
|
|
initWithVoiceShortcut(voiceShortcut: INVoiceShortcut): this;
|
|
}
|
|
|
|
interface INUIEditVoiceShortcutViewControllerDelegate extends NSObjectProtocol {
|
|
|
|
editVoiceShortcutViewControllerDidCancel(controller: INUIEditVoiceShortcutViewController): void;
|
|
|
|
editVoiceShortcutViewControllerDidDeleteVoiceShortcutWithIdentifier(controller: INUIEditVoiceShortcutViewController, deletedVoiceShortcutIdentifier: NSUUID): void;
|
|
|
|
editVoiceShortcutViewControllerDidUpdateVoiceShortcutError(controller: INUIEditVoiceShortcutViewController, voiceShortcut: INVoiceShortcut, error: NSError): void;
|
|
}
|
|
declare var INUIEditVoiceShortcutViewControllerDelegate: {
|
|
|
|
prototype: INUIEditVoiceShortcutViewControllerDelegate;
|
|
};
|
|
|
|
declare const enum INUIHostedViewContext {
|
|
|
|
SiriSnippet = 0,
|
|
|
|
MapsCard = 1
|
|
}
|
|
|
|
interface INUIHostedViewControlling extends NSObjectProtocol {
|
|
|
|
configureViewForParametersOfInteractionInteractiveBehaviorContextCompletion?(parameters: NSSet<INParameter>, interaction: INInteraction, interactiveBehavior: INUIInteractiveBehavior, context: INUIHostedViewContext, completion: (p1: boolean, p2: NSSet<INParameter>, p3: CGSize) => void): void;
|
|
|
|
configureWithInteractionContextCompletion?(interaction: INInteraction, context: INUIHostedViewContext, completion: (p1: CGSize) => void): void;
|
|
}
|
|
declare var INUIHostedViewControlling: {
|
|
|
|
prototype: INUIHostedViewControlling;
|
|
};
|
|
|
|
interface INUIHostedViewSiriProviding extends NSObjectProtocol {
|
|
|
|
displaysMap?: boolean;
|
|
|
|
displaysMessage?: boolean;
|
|
|
|
displaysPaymentTransaction?: boolean;
|
|
}
|
|
declare var INUIHostedViewSiriProviding: {
|
|
|
|
prototype: INUIHostedViewSiriProviding;
|
|
};
|
|
|
|
declare const enum INUIInteractiveBehavior {
|
|
|
|
None = 0,
|
|
|
|
NextView = 1,
|
|
|
|
Launch = 2,
|
|
|
|
GenericAction = 3
|
|
}
|
|
|
|
declare var IntentsUIVersionNumber: number;
|
|
|
|
declare var IntentsUIVersionString: interop.Reference<number>;
|