| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 562628f commit 1c0218e
85 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -150,7 +150,7 @@ class IOSApplication implements IOSApplicationDefinition { | |||
| 150 | 150 | this.setWindowContent(args.root); | |
| 151 | 151 | } else { | |
| 152 | 152 | this._window = UIApplication.sharedApplication.delegate.window; | |
| 153 | - } | ||
| 153 | + } | ||
| 154 | 154 | } | |
| 155 | 155 | ||
| 156 | 156 | @profile | |
@@ -294,7 +294,7 @@ export function start(entry?: string | NavigationEntry) { | |||
| 294 | 294 | started = true; | |
| 295 | 295 | ||
| 296 | 296 | if (!iosApp.nativeApp) { | |
| 297 | - // Normal NativeScript app will need UIApplicationMain. | ||
| 297 | + // Normal NativeScript app will need UIApplicationMain. | ||
| 298 | 298 | UIApplicationMain(0, null, null, iosApp && iosApp.delegate ? NSStringFromClass(<any>iosApp.delegate) : NSStringFromClass(Responder)); | |
| 299 | 299 | } else { | |
| 300 | 300 | // TODO: this rootView should be held alive until rootController dismissViewController is called. | |
@@ -309,7 +309,7 @@ export function start(entry?: string | NavigationEntry) { | |||
| 309 | 309 | rootView._setupAsRootView({}); | |
| 310 | 310 | let embedderDelegate = NativeScriptEmbedder.sharedInstance().delegate; | |
| 311 | 311 | if (embedderDelegate) { | |
| 312 | - embedderDelegate.performSelectorWithObject("presentNativeScriptApp:", controller); | ||
| 312 | + embedderDelegate.presentNativeScriptApp(controller); | ||
| 313 | 313 | } else { | |
| 314 | 314 | let visibleVC = utils.ios.getVisibleViewController(rootController); | |
| 315 | 315 | visibleVC.presentViewControllerAnimatedCompletion(controller, true, null); | |
@@ -368,4 +368,4 @@ global.__onLiveSync = function () { | |||
| 368 | 368 | } | |
| 369 | 369 | ||
| 370 | 370 | livesync(); | |
| 371 | - } | ||
| 371 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -160,14 +160,3 @@ interface Array<T> { | |||
| 160 | 160 | //Dialogs | |
| 161 | 161 | declare function alert(message?: any): void; | |
| 162 | 162 | declare function confirm(message?: string): boolean; | |
| 163 | - | ||
| 164 | - // Embedding | ||
| 165 | - declare interface NativeScriptEmbedderDelegate /* NSObject */ { | ||
| 166 | - presentNativeScriptApp(any/* UIViewController*/): any; | ||
| 167 | - performSelectorWithObject(string, any): any; | ||
| 168 | - } | ||
| 169 | - | ||
| 170 | - declare class NativeScriptEmbedder { | ||
| 171 | - public static sharedInstance(): NativeScriptEmbedder; | ||
| 172 | - public delegate: NativeScriptEmbedderDelegate; | ||
| 173 | - } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -154,12 +154,15 @@ export class TextBase extends TextBaseCommon { | |||
| 154 | 154 | case "none": | |
| 155 | 155 | break; | |
| 156 | 156 | case "underline": | |
| 157 | + // TODO: Replace deprecated `StyleSingle` with `Single` after the next typings update | ||
| 157 | 158 | dict.set(NSUnderlineStyleAttributeName, NSUnderlineStyle.StyleSingle); | |
| 158 | 159 | break; | |
| 159 | 160 | case "line-through": | |
| 161 | + // TODO: Replace deprecated `StyleSingle` with `Single` after the next typings update | ||
| 160 | 162 | dict.set(NSStrikethroughStyleAttributeName, NSUnderlineStyle.StyleSingle); | |
| 161 | 163 | break; | |
| 162 | 164 | case "underline line-through": | |
| 165 | + // TODO: Replace deprecated `StyleSingle` with `Single` after the next typings update | ||
| 163 | 166 | dict.set(NSUnderlineStyleAttributeName, NSUnderlineStyle.StyleSingle); | |
| 164 | 167 | dict.set(NSStrikethroughStyleAttributeName, NSUnderlineStyle.StyleSingle); | |
| 165 | 168 | break; | |
@@ -196,7 +199,7 @@ export class TextBase extends TextBaseCommon { | |||
| 196 | 199 | // UITextView's font seems to change inside. | |
| 197 | 200 | dict.set(NSFontAttributeName, this.nativeTextViewProtected.font); | |
| 198 | 201 | } | |
| 199 | - | ||
| 202 | + | ||
| 200 | 203 | const result = NSMutableAttributedString.alloc().initWithString(source); | |
| 201 | 204 | result.setAttributesRange(<any>dict, { location: 0, length: source.length }); | |
| 202 | 205 | if (this.nativeTextViewProtected instanceof UIButton) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1 @@ | |||
| 1 | + ios-typings-prj | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -37,3 +37,12 @@ d.ts files require a lot of memory and CPU. Consider adding skipLibCheck option | |||
| 37 | 37 | * To generate android dependencies use [android-dts-generator](https://github.com/NativeScript/android-dts-generator) with the appropriate android version and android support jars | |
| 38 | 38 | * To regenerate android-*.d.ts file use the **android-dts-generator** passing the corresponding android jar (described [here](https://github.com/NativeScript/android-dts-generator/blob/master/README.md#generate-definitons-for-android-sdk)) | |
| 39 | 39 | * More details for using the **android-dts-generator** can be found in [this article](https://docs.nativescript.org/core-concepts/android-runtime/metadata/generating-typescript-declarations). | |
| 40 | + | ||
| 41 | + ## Generate ios .d.ts files | ||
| 42 | + | ||
| 43 | + The `.d.ts` files for iOS are generated using iOS Runtime's metadata generator. You can use the [typings-gen.sh](./typings-gen.sh) script like this: | ||
| 44 | + | ||
| 45 | + ```BASH | ||
| 46 | + ./typings-gen.sh rc [<path-to-medatadata-generator-binary>] | ||
| 47 | + ``` | ||
| 48 | + Where `rc` can be an NPM tag/version of `tns-ios` that will be used for generating the typings. If the metadata generator to be used has not been released in NPM, you can optionally specify its path as a 2nd argument. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,19 +1,23 @@ | |||
| 1 | 1 | /// <reference path="interop.d.ts" /> | |
| 2 | + /// <reference path="objc-x86_64/objc!ARKit.d.ts" /> | ||
| 3 | + /// <reference path="objc-x86_64/objc!AVFoundation.d.ts" /> | ||
| 4 | + /// <reference path="objc-x86_64/objc!AVKit.d.ts" /> | ||
| 2 | 5 | /// <reference path="objc-x86_64/objc!Accelerate.d.ts" /> | |
| 3 | 6 | /// <reference path="objc-x86_64/objc!Accounts.d.ts" /> | |
| 7 | + /// <reference path="objc-x86_64/objc!AdSupport.d.ts" /> | ||
| 4 | 8 | /// <reference path="objc-x86_64/objc!AddressBook.d.ts" /> | |
| 5 | 9 | /// <reference path="objc-x86_64/objc!AddressBookUI.d.ts" /> | |
| 6 | - /// <reference path="objc-x86_64/objc!AdSupport.d.ts" /> | ||
| 7 | 10 | /// <reference path="objc-x86_64/objc!AppleTextureEncoder.d.ts" /> | |
| 8 | - /// <reference path="objc-x86_64/objc!ARKit.d.ts" /> | ||
| 9 | - /// <reference path="objc-x86_64/objc!asl.d.ts" /> | ||
| 10 | 11 | /// <reference path="objc-x86_64/objc!AssetsLibrary.d.ts" /> | |
| 11 | 12 | /// <reference path="objc-x86_64/objc!AudioToolbox.d.ts" /> | |
| 12 | - /// <reference path="objc-x86_64/objc!AVFoundation.d.ts" /> | ||
| 13 | - /// <reference path="objc-x86_64/objc!AVKit.d.ts" /> | ||
| 14 | - /// <reference path="objc-x86_64/objc!CallKit.d.ts" /> | ||
| 13 | + /// <reference path="objc-x86_64/objc!AuthenticationServices.d.ts" /> | ||
| 14 | + /// <reference path="objc-x86_64/objc!BusinessChat.d.ts" /> | ||
| 15 | 15 | /// <reference path="objc-x86_64/objc!CFNetwork.d.ts" /> | |
| 16 | + /// <reference path="objc-x86_64/objc!CallKit.d.ts" /> | ||
| 17 | + /// <reference path="objc-x86_64/objc!CarPlay.d.ts" /> | ||
| 18 | + /// <reference path="objc-x86_64/objc!ClassKit.d.ts" /> | ||
| 16 | 19 | /// <reference path="objc-x86_64/objc!CloudKit.d.ts" /> | |
| 20 | + /// <reference path="objc-x86_64/objc!CommonCrypto.d.ts" /> | ||
| 17 | 21 | /// <reference path="objc-x86_64/objc!Compression.d.ts" /> | |
| 18 | 22 | /// <reference path="objc-x86_64/objc!Contacts.d.ts" /> | |
| 19 | 23 | /// <reference path="objc-x86_64/objc!ContactsUI.d.ts" /> | |
@@ -25,11 +29,12 @@ | |||
| 25 | 29 | /// <reference path="objc-x86_64/objc!CoreGraphics.d.ts" /> | |
| 26 | 30 | /// <reference path="objc-x86_64/objc!CoreImage.d.ts" /> | |
| 27 | 31 | /// <reference path="objc-x86_64/objc!CoreLocation.d.ts" /> | |
| 28 | - /// <reference path="objc-x86_64/objc!CoreMedia.d.ts" /> | ||
| 29 | 32 | /// <reference path="objc-x86_64/objc!CoreMIDI.d.ts" /> | |
| 30 | 33 | /// <reference path="objc-x86_64/objc!CoreML.d.ts" /> | |
| 34 | + /// <reference path="objc-x86_64/objc!CoreMedia.d.ts" /> | ||
| 31 | 35 | /// <reference path="objc-x86_64/objc!CoreMotion.d.ts" /> | |
| 32 | 36 | /// <reference path="objc-x86_64/objc!CoreNFC.d.ts" /> | |
| 37 | + /// <reference path="objc-x86_64/objc!CoreServices.d.ts" /> | ||
| 33 | 38 | /// <reference path="objc-x86_64/objc!CoreSpotlight.d.ts" /> | |
| 34 | 39 | /// <reference path="objc-x86_64/objc!CoreTelephony.d.ts" /> | |
| 35 | 40 | /// <reference path="objc-x86_64/objc!CoreText.d.ts" /> | |
@@ -38,70 +43,67 @@ | |||
| 38 | 43 | /// <reference path="objc-x86_64/objc!DeviceCheck.d.ts" /> | |
| 39 | 44 | /// <reference path="objc-x86_64/objc!Dispatch.d.ts" /> | |
| 40 | 45 | /// <reference path="objc-x86_64/objc!DispatchIntrospection.d.ts" /> | |
| 41 | - /// <reference path="objc-x86_64/objc!dnssd.d.ts" /> | ||
| 42 | 46 | /// <reference path="objc-x86_64/objc!EventKit.d.ts" /> | |
| 43 | 47 | /// <reference path="objc-x86_64/objc!EventKitUI.d.ts" /> | |
| 44 | 48 | /// <reference path="objc-x86_64/objc!ExternalAccessory.d.ts" /> | |
| 45 | 49 | /// <reference path="objc-x86_64/objc!FileProvider.d.ts" /> | |
| 46 | 50 | /// <reference path="objc-x86_64/objc!FileProviderUI.d.ts" /> | |
| 47 | 51 | /// <reference path="objc-x86_64/objc!Foundation.d.ts" /> | |
| 52 | + /// <reference path="objc-x86_64/objc!GLKit.d.ts" /> | ||
| 53 | + /// <reference path="objc-x86_64/objc!GSS.d.ts" /> | ||
| 48 | 54 | /// <reference path="objc-x86_64/objc!GameController.d.ts" /> | |
| 49 | 55 | /// <reference path="objc-x86_64/objc!GameKit.d.ts" /> | |
| 50 | 56 | /// <reference path="objc-x86_64/objc!GameplayKit.d.ts" /> | |
| 51 | - /// <reference path="objc-x86_64/objc!GLKit.d.ts" /> | ||
| 52 | - /// <reference path="objc-x86_64/objc!GSS.d.ts" /> | ||
| 53 | 57 | /// <reference path="objc-x86_64/objc!HealthKit.d.ts" /> | |
| 54 | 58 | /// <reference path="objc-x86_64/objc!HealthKitUI.d.ts" /> | |
| 55 | 59 | /// <reference path="objc-x86_64/objc!HomeKit.d.ts" /> | |
| 56 | - /// <reference path="objc-x86_64/objc!iAd.d.ts" /> | ||
| 60 | + /// <reference path="objc-x86_64/objc!ICU.d.ts" /> | ||
| 61 | + /// <reference path="objc-x86_64/objc!IOSurface.d.ts" /> | ||
| 57 | 62 | /// <reference path="objc-x86_64/objc!IdentityLookup.d.ts" /> | |
| 63 | + /// <reference path="objc-x86_64/objc!IdentityLookupUI.d.ts" /> | ||
| 58 | 64 | /// <reference path="objc-x86_64/objc!ImageIO.d.ts" /> | |
| 59 | 65 | /// <reference path="objc-x86_64/objc!Intents.d.ts" /> | |
| 60 | 66 | /// <reference path="objc-x86_64/objc!IntentsUI.d.ts" /> | |
| 61 | - /// <reference path="objc-x86_64/objc!IOSurface.d.ts" /> | ||
| 62 | 67 | /// <reference path="objc-x86_64/objc!JavaScriptCore.d.ts" /> | |
| 63 | - /// <reference path="objc-x86_64/objc!libkern.d.ts" /> | ||
| 64 | 68 | /// <reference path="objc-x86_64/objc!LocalAuthentication.d.ts" /> | |
| 65 | 69 | /// <reference path="objc-x86_64/objc!MachO.d.ts" /> | |
| 66 | 70 | /// <reference path="objc-x86_64/objc!MapKit.d.ts" /> | |
| 67 | 71 | /// <reference path="objc-x86_64/objc!MediaAccessibility.d.ts" /> | |
| 68 | 72 | /// <reference path="objc-x86_64/objc!MediaPlayer.d.ts" /> | |
| 69 | 73 | /// <reference path="objc-x86_64/objc!MediaToolbox.d.ts" /> | |
| 70 | - /// <reference path="objc-x86_64/objc!Messages.d.ts" /> | ||
| 71 | 74 | /// <reference path="objc-x86_64/objc!MessageUI.d.ts" /> | |
| 75 | + /// <reference path="objc-x86_64/objc!Messages.d.ts" /> | ||
| 72 | 76 | /// <reference path="objc-x86_64/objc!Metal.d.ts" /> | |
| 73 | 77 | /// <reference path="objc-x86_64/objc!MetalKit.d.ts" /> | |
| 74 | 78 | /// <reference path="objc-x86_64/objc!MetalPerformanceShaders.d.ts" /> | |
| 75 | - /// <reference path="objc-x86_64/objc!MobileCoreServices.d.ts" /> | ||
| 76 | 79 | /// <reference path="objc-x86_64/objc!ModelIO.d.ts" /> | |
| 77 | 80 | /// <reference path="objc-x86_64/objc!MultipeerConnectivity.d.ts" /> | |
| 81 | + /// <reference path="objc-x86_64/objc!NativeScriptEmbedder.d.ts" /> | ||
| 82 | + /// <reference path="objc-x86_64/objc!NaturalLanguage.d.ts" /> | ||
| 83 | + /// <reference path="objc-x86_64/objc!Network.d.ts" /> | ||
| 78 | 84 | /// <reference path="objc-x86_64/objc!NetworkExtension.d.ts" /> | |
| 79 | 85 | /// <reference path="objc-x86_64/objc!NewsstandKit.d.ts" /> | |
| 80 | 86 | /// <reference path="objc-x86_64/objc!NotificationCenter.d.ts" /> | |
| 81 | 87 | /// <reference path="objc-x86_64/objc!ObjectiveC.d.ts" /> | |
| 82 | 88 | /// <reference path="objc-x86_64/objc!OpenAL.d.ts" /> | |
| 83 | 89 | /// <reference path="objc-x86_64/objc!OpenGLES.d.ts" /> | |
| 84 | - /// <reference path="objc-x86_64/objc!os_object.d.ts" /> | ||
| 85 | - /// <reference path="objc-x86_64/objc!os.d.ts" /> | ||
| 86 | - /// <reference path="objc-x86_64/objc!PassKit.d.ts" /> | ||
| 87 | 90 | /// <reference path="objc-x86_64/objc!PDFKit.d.ts" /> | |
| 91 | + /// <reference path="objc-x86_64/objc!PassKit.d.ts" /> | ||
| 88 | 92 | /// <reference path="objc-x86_64/objc!Photos.d.ts" /> | |
| 89 | 93 | /// <reference path="objc-x86_64/objc!PhotosUI.d.ts" /> | |
| 90 | 94 | /// <reference path="objc-x86_64/objc!PushKit.d.ts" /> | |
| 91 | 95 | /// <reference path="objc-x86_64/objc!QuartzCore.d.ts" /> | |
| 92 | 96 | /// <reference path="objc-x86_64/objc!QuickLook.d.ts" /> | |
| 93 | 97 | /// <reference path="objc-x86_64/objc!ReplayKit.d.ts" /> | |
| 98 | + /// <reference path="objc-x86_64/objc!SQLite3.d.ts" /> | ||
| 94 | 99 | /// <reference path="objc-x86_64/objc!SafariServices.d.ts" /> | |
| 95 | 100 | /// <reference path="objc-x86_64/objc!SceneKit.d.ts" /> | |
| 96 | 101 | /// <reference path="objc-x86_64/objc!Security.d.ts" /> | |
| 97 | - /// <reference path="objc-x86_64/objc!simd.d.ts" /> | ||
| 98 | 102 | /// <reference path="objc-x86_64/objc!Social.d.ts" /> | |
| 99 | 103 | /// <reference path="objc-x86_64/objc!Speech.d.ts" /> | |
| 100 | 104 | /// <reference path="objc-x86_64/objc!SpriteKit.d.ts" /> | |
| 101 | - /// <reference path="objc-x86_64/objc!SQLite3.d.ts" /> | ||
| 102 | 105 | /// <reference path="objc-x86_64/objc!StoreKit.d.ts" /> | |
| 103 | 106 | /// <reference path="objc-x86_64/objc!SystemConfiguration.d.ts" /> | |
| 104 | - /// <reference path="objc-x86_64/objc!TKLiveSync.d.ts" /> | ||
| 105 | 107 | /// <reference path="objc-x86_64/objc!TNSWidgets.d.ts" /> | |
| 106 | 108 | /// <reference path="objc-x86_64/objc!Twitter.d.ts" /> | |
| 107 | 109 | /// <reference path="objc-x86_64/objc!UIKit.d.ts" /> | |
@@ -113,6 +115,15 @@ | |||
| 113 | 115 | /// <reference path="objc-x86_64/objc!WatchConnectivity.d.ts" /> | |
| 114 | 116 | /// <reference path="objc-x86_64/objc!WatchKit.d.ts" /> | |
| 115 | 117 | /// <reference path="objc-x86_64/objc!WebKit.d.ts" /> | |
| 118 | + /// <reference path="objc-x86_64/objc!_Builtin_intrinsics.d.ts" /> | ||
| 119 | + /// <reference path="objc-x86_64/objc!asl.d.ts" /> | ||
| 120 | + /// <reference path="objc-x86_64/objc!dnssd.d.ts" /> | ||
| 121 | + /// <reference path="objc-x86_64/objc!iAd.d.ts" /> | ||
| 122 | + /// <reference path="objc-x86_64/objc!libkern.d.ts" /> | ||
| 123 | + /// <reference path="objc-x86_64/objc!libxml2.d.ts" /> | ||
| 124 | + /// <reference path="objc-x86_64/objc!libxslt.d.ts" /> | ||
| 125 | + /// <reference path="objc-x86_64/objc!os.d.ts" /> | ||
| 126 | + /// <reference path="objc-x86_64/objc!os_object.d.ts" /> | ||
| 127 | + /// <reference path="objc-x86_64/objc!simd.d.ts" /> | ||
| 116 | 128 | /// <reference path="objc-x86_64/objc!zlib.d.ts" /> | |
| 117 | - | ||
| 118 | 129 | declare function __collect(): void; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments