1. 程式人生 > >Kotlin/Native Plugin for AppCode

Kotlin/Native Plugin for AppCode

Greetings Kotlin fans!

Ever since we announced interoperability with Objective-C for Kotlin/Native, we’ve been getting lots of questions about IDE support that would allow working on projects that mix Kotlin/Native and Swift/Objective-C. Today we are happy to announce that we are working on a Kotlin/Native plugin for AppCode!

AppCode is our macOS-only IDE designed for iOS/macOS developers. It already supports the Xcode project model, running and debugging in simulators and on devices, and offers extensive support for Objective-C and Swift. So, it felt natural to add Kotlin/Native support to the mix.

To try out Kotlin/Native support, download

AppCode 2018.1.1, then navigate to Preferences | Plugins | Install JetBrains Plugin and install the Kotlin/Native for AppCode plugin. Please keep in mind that both Kotlin/Native and the plugin for AppCode are still under active development. They are being published as a sneak peek of what’s coming and not suitable for production use yet. In particular, the list of known issues includes high memory consumption and only initial debugger support.

Creating New Project

Kotlin/Native uses Gradle as a build tool. To make a project with Kotlin/Native compilable from Xcode, you need to add to the project a Run Script phase that invokes building of Kotlin/Native code with Gradle. Setting up a project like that from scratch can be a bit tricky, so the Kotlin/Native plugin comes with several iOS and macOS templates which simplify this process:

create_project@2x

After the project has been created, building & launching it in the simulator is as easy as hitting the Run button:

run@2x

*Note: Currently the directory with Kotlin code is not marked as a source root, so some actions (e.g. New Kotlin File/Class) might work incorrectly. To fix that, navigate to the Project tool window, select Files pane, find the src/main/kotlin directory and mark it as Project Sources using context menu.

Code Insight

Like the plugin for CLion, this plugin for AppCode is based on the Kotlin plugin for IntelliJ IDEA, which means that lots of code-insight features are already available for Kotlin/Native code. These include code inspections, refactorings and many more:

assist@2x

Testing

The AppCode plugin supports running tests written using the kotlin.test framework. To create a test, navigate to Projects Settings and add a Tests target from the Kotlin/Native group. Then create a Kotlin/Native test run configuration and you are good to go:

tests@2x

SDK Documentation

One of the things that makes Kotlin/Native so appealing is its interoperability, which makes it very easy to use existing Objective-C API provided by Apple. The Kotlin/Native plugin for AppCode makes it even easier by giving you access to the documentation for these API right in the IDE:

doc@2x

Conclusion

This is all the functionality that we have to share with you at the moment. Give it a try, let us know what you think, and stay tuned for more exciting features as we continue our work on Kotlin/Native!

相關推薦

Kotlin/Native Plugin for AppCode

Greetings Kotlin fans! Ever since we announced interoperability with Objective-C for Kotlin/Native, we’ve been getting lots of questions about

React Native (android for windows) 第一課 --環境配置 & Hello World

本篇文章的作用在於幫助你快速上手使用React Native編寫android應用。如果你還不太瞭解React Native是什麼以及Facebook為什麼要建立React Native, 安裝Android SDK JDK安裝最新的 安裝Android SDK: 在Linux

TypeScript Plugin for Sublime Text

TypeScript Plugin for Sublime Text 這個最好用,語法高亮,查詢引用,變數函式跳轉都支援。 注意:選這個by Microsoft ST2/ST3 https://packagecontrol.io/packages/TypeScript

IDEA執行kotlin native

今天試了下kotlin native,好久沒玩過這個玩意兒了。 然後建了一個kotlin native的工程 發現IDEA一直在說是多平臺專案 Kotlin Multiplatform Projects are an experimental feature. 執行kotlin na

Google登入接入(play-games-plugin-for-unity)

Google後臺配置 進入google後臺:https://play.google.com/apps/publish/?hl=zh&account=5458629459868388661#GameListPlace 新版外掛下載:https://github.com/playgame

JetBrains開發者日見聞(一)之Kotlin/Native 嚐鮮篇

簡述: 今天我們來講點Kotlin中比較時髦的東西,有的人可能會說:“不像你之前的風格啊,之前的文章不是一直在死扣語法以及語法糖背後祕密。當你還在死扣泛型語法的時候,別人的文章早就說了Kotlin/Native和Kotlin1.3的新特性”。瞬間感覺自己out了,今天我們就說說這些時髦的東西,也許你能看到一些

Gradle、Gradle Wrapper與Android Plugin for Gradle的區別和聯絡

原文連結:https://www.cnblogs.com/jiangxinnju/p/8229129.html 總結: Gradle:是一個專案構建系統,類似於Maven。Gradle並不是只能用於Android,而是Android引用裡Gradle。https://docs.gradle.

Kotlin/Native Tech Preview: Kotlin without a VM

We are happy to announce the first Technology Preview of Kotlin/Native that compiles Kotlin directly to machine code. The Kotlin/N

Do more with Data: Building a Data Supplier plugin for Sketch

In Sketch 52, we introduced an exciting new feature —Data. If you still haven’t read about it, be sure to check our release blog post, or take a look at th

Apache OpenWhisk adds native support for Ruby

Ruby goes Serverless! - Apache OpenWhisk adds native support for RubyRuby has finally become a first class citizen in the Serverless world now that Apache

徹底搞懂Gradle、Gradle Wrapper與Android Plugin for Gradle的區別和聯絡

歡迎和大家交流技術相關問題: 郵箱: [email protected] 部落格園地址: http://www.cnblogs.com/jiangxinnju GitHub地址: https://github.com/jiangxincode 知乎地址: https://www.zhihu.com/

Kotlin 1.3 Released with Coroutines, Kotlin/Native Beta, and more

You can read this blog post in other languages: Today we are releasing Kotlin 1.3 together with a set of accompanying libraries, build too

WebApp mui&H5+ 使用者頭像處理之選擇照片並剪下(Native.js for Android)

在app開發過程中我們經常會遇到使用者上傳頭像,一般都是兩種做法。 1、直接進入系統相簿,選擇照片後進行裁剪、上傳 2、拍照後裁剪、上傳 本節簡單介紹進入系統相簿選擇圖片後並裁剪,使用程式碼註釋(會原生android就很容易明白下面的程式碼)

android studio大坑 executing external native build for cmake

描述:cmakelist.txt中so庫的名稱不符合規範,android自己建立的c++支援專案中庫名是native-lib, 我直接寫的庫名是test,必須將庫名寫成test-lib,然後編譯就可以了 bug:Error:A problem occurred confi

React Native 4 for Android原始碼分析 一《JNI智慧指標之介紹篇》

導讀 React Native 釋出以來將近一年多了,也被抄的火爆到不行,包括RN的中文網和各種資料也很多,加之SE5,Se6語法升級,學習成本並不在RN環境搭建和入門,關鍵還是對JS的掌握入門,不管你是用Native開發,h5開發,還是React

kotlin 中的 "for" 迴圈和迭代map

文章目錄 ● 場景 ● “for” 迴圈 ● 迭代map ● 總結 場景 kotlin 中的 “for” 迴圈和迭代 map 與我們熟知的 java 中的有什麼區別呢,有哪些更好的表現形式呢? “for” 迴圈

kotlin學習之for迴圈

java中的for迴圈有兩種實現方式: for (int i = 0; i < 10; i++) { } for (int i = 10; i > 0; i--) { } private ArrayList<String> list = new ArrayL

Kotlin/Native v0.8 released

We’re happy to announce the release of Kotlin/Native v0.8! The focus of this release is on: safer concurrent programming extending the stdlib

Kotlin/Native v0.6 is Here!

We are pleased to announce Kotlin/Native v0.6 (Valentine’s Day release) of our toolchain. This is a major update, including the following feat

Application development in Kotlin/Native

In this blog post we are discussing development of Kotlin/Native applications. Today we take a look on basic video player, using FFMPEG audio/