当前位置: 首页 > 软件库 > 手机/移动开发 > >

ios-runtime

iOS Runtime for NativeScript
授权协议 Apache-2.0 License
开发语言 JavaScript TypeScript
所属分类 手机/移动开发
软件类型 开源软件
地区 不详
投 递 者 益楷
操作系统 iOS
开源组织
适用人群 未知
 软件概览

iOS Runtime for NativeScript

Contains the source code for the NativeScript's iOS Runtime. NativeScript is a framework which enables developers to write truly native mobile applications for Android and iOS using JavaScript and CSS. Each mobile platform has its own ecosystem and offers completely different development tools and language(s) - Java for Android and Objective C (Swift) for iOS. In order to translate JavaScript code to the corresponding native APIs some kind of proxy mechanism is needed. This is exactly what the "Runtime" parts of NativeScript are responsible for. The iOS Runtime may be thought of as "The Bridge" between the JavaScript and the iOS world. A NativeScript application for iOS is a standard native package (ipa) which besides the JavaScript files embed the runtime as well.

git clone --recursive git@github.com:NativeScript/ios-runtime.git

Requirements

Architecture Diagram

The NativeScript iOS Runtime architecture can be summarized in the following diagram.

For more details on how it works, read the documentation.

Local Development

To be able to open and build {N} iOS Runtime in Xcode you need to configure it for WebKit development and generate the Xcode project files using cmake. To do this execute the following:

sudo ./src/webkit/Tools/Scripts/configure-xcode-for-ios-development
./cmake-gen.sh
open "cmake-build/NativeScript.xcodeproj"

After you open the newly generated project in Xcode you can run the TestRunner target or the Gameraww example app.

For more information on WebKit configuration see Building iOS Port section of WebKit's README

Building a Distribution Package

To build the tns-ios npm package run ./build/scripts/package-tns-ios.sh in the root of the repository. The package contains the NativeScript Cocoa Framework, the NativeScript CLI template project and the API metadata generator.

To build the tns-ios-inspector npm package run ./build/scripts/package-tns-ios-inspector.sh in the root of the repository. The package contains the Web Inspector frontend.

Contribute

We love PRs! Check out the contributing guidelines. If you want to contribute, but you are not sure where to start - look for issues labeled help wanted.

Get Help

Please, use github issues strictly for reporting bugs or requesting features. For general questions and support, check out Stack Overflow or ask our experts in NativeScript community Slack channel.

  • runtime就是运行时机制,可以通过命令行clang -rewrite-objc 对应的目标文件,就能将对应的OC的代码转成对应的运行时的代码 所有的OC类和对象,在runtime层都是用struct表示的. 用处: 1、在category中想添加属性,则可与使用runtime动态添加。 objc_setAssociatedObject(self, @selector(summaryDataMo

  • 详细示例代码github仓库总结:NIiOS  ``` 001-iOS 开发:『Runtime』详解(一)基础知识 见:有道云笔记、总结思维导图 应用案例:-proj_2020/006Runtime 002-iOS 开发:『Runtime』详解(二)Method Swizzling(动态方法交换) 见:有道云笔记、总结思维导图 应用案例:-NIiOS_GitHub/proj_2020/024YS

 相关资料
  • ios

    Native.js for iOS封装一条通过JS语法直接调用Native Objective-C接口通道,通过plus.ios可调用几乎所有的系统API。 方法: importClass: 导入Objective-C类对象 newObject: 创建实例对象 deleteObject: 销毁实例对象 invoke: 调用对象(类对象/示例对象)的方法 implements: 实现代理的方法 cu

  • iOS

    iOS 是由苹果公司为 iPhone 开发的操作系统。它主要是给iPhone、iPod touch、iPad 以及 Apple TV 使用。就像其基于的 Mac OS X 操作系统一样,它也是以 Darwin 为基础的。原本這個系统名为 iPhone OS,直到 2010 年 6 月 7 日 WWDC 大會上宣布改名为 iOS。 iOS 的系统架构分为四個层次:核心操作系统层(the Core O

  • Native 对外接口 注册 SDK 默认的 Module、Handler 和 Component 注册自定义 module、Handler 和 Component 重置 JSFramework Handler (对应于 Android 的 Adapter) 介绍 WXImgLoaderDefaultImpl 图片下载 handler。Weex 会把需要设置图片的 View 和 URL 透露出来,

  • 概述 一 SDK导入及Xcode配置 二 标准接口快速集成 三 扩展功能 四 基本的事件监听 五 设置加密方式 六 语音识别功能 七 推送集成 八 版本更新说明 九 常见错误码 十 SDK下载

  • 这里介绍 FinClip 小程序 SDK 提供了哪些能力,以及API的详细说明和使用示例。 1. 基础API 1.1 SDK初始化 在使用小程序的API之前,需要先初始化小程序SDK。只有成功初始化之后,才能使用SDK提供的API,否则 API都无法调用。 初始化SDK的API如下: /// 初始化SDK /// @param config 配置对象 /// @param error 初始化失败时

  • iOS Objective-C SDK iOS Swift SDK

  • 描述 (Description) Framework7允许您在iOS布局中使用不同类型的通知。 例子 (Example) 以下示例演示了在Framework7中使用iOS通知 - <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1, max

  • 工具准备 Cocos2d-x v3.17,下载后解压,下载参见:Cocos官网页面 Xcode 9 下载后安装,下载参见:Apple官网页面 配置步骤: 打开 cocos2d-x-3.17/build/cocos2d_tests.xcodeproj 在 Xcode 顶部工具栏选择 cpp-tests iOS,iPhone 7 Plus,点击运行,项目将自动编译运行,效果如图: 如何调试(Debug