We want to be able to easily distribute UIKit as a module to build existing iOS apps and to easily integrate into existing Android projects. This PR moves us in the right direction for both:
The directory can be added as a module to an Android project in settings.gradle (via include ':uikit'). Then you just set your MainActivity as a subclass of UIKitActivity, or render a UIKitView directly.
An Android Studio project can build Swift Packages dependent on UIKit easily. All dependent libraries will be built and bundled automatically. In CMakeLists.txt:
set(UIKit_DIR ../UIKit)
find_package(UIKit REQUIRED)
add_swiftpm_library(MySwiftPackage # the product name listed in Package.swift
PROJECT_DIRECTORY ./anAbsoluteOrRelativePath
PROJECT_DEPENDENCIES UIKit
)
Fixes #215
Type of change: Deployment improvement
Motivation
We want to be able to easily distribute UIKit as a module to build existing iOS apps and to easily integrate into existing Android projects. This PR moves us in the right direction for both:
The directory can be added as a module to an Android project in
settings.gradle
(viainclude ':uikit'
). Then you just set your MainActivity as a subclass ofUIKitActivity
, or render aUIKitView
directly.An Android Studio project can build Swift Packages dependent on UIKit easily. All dependent libraries will be built and bundled automatically. In
CMakeLists.txt
: