Swift-CC


Source link: https://github.com/swift-cc/tools

Tools

## Swift-CC ### Introduction

swift-cc is a python script that simplifies the compiling of Swift and Objective-C(++) code into object files.

Once installed, you can easily compile any number of Swift and Objective-C(++) files into object files that are targeted for armv7.

###Overview

swift-cc is a two stage wrapper for clang and the swift compiler that uses the Android NDK tools to produce android compatible .o files.

The first stage uses clang or swift to compile source code and emit LLVM-IR code which is passed to the Android second stage tools which compile the IR into .o files.

All of this is completely handled by the tool, and so the tool is super easy to use.

script-cc.py file.mm file2.swift 

This will produce file.o and file2.o which can be linked using the Android NDK library archiver or linker.

For other info, use the following to get command line help.

script-cc.py -h 

Installation

In order to be able to use the tool from anywhere, i.e. in Android.mk or other makefiles, it needs to be added to the environment path variable.

Open up your .bash_profile or whatever file you use for setting up your environment, and add the following line before the path export.

PATH=$PATH:<your path to swift-cc.py> 

Remember to re-parse the profile using source .bash_profile or whatever your profile name is.

Once installed, this script will be available from anywhere and can be used as a drop in compiler for compiling Swift and Objective-C(++) into object files for Android.

Configuration

There is an example configuration file config_example.txt

There are four variables you need to setup in order for the tool to work. The config file must be in the same directory as the tool, and must be named config.txt. It is a simple key value pair file that has variables that tell the tool where Xcode, Android SDK/NDK are etc.

The variable are at the top of the file, and are named as follows.

MODULE_NAME = <your module name>  XCODE = <path to xcode.app>
 ANDROID_SDK = <path to android sdk>  ANDROID_NDK = <path to android ndk> 

Once these variables have been set, the tool should work out of the box. The rest of the variables in the config file are derived from these four config variables.

Resources

Connecting to webservices from Android devices is now easy. The sending and receiving of data to and from webservices can be customized in a desired way and can be done by a single method.

A much nicer toast structure and a customized sub-dialog.

A timetable designed for planning employees to projects.

  • You only need the name of the plan, the person's name, and a start & end date.
  • No need for multi-dimensional arrays
  • No need to calculate the X,Y / row,colum
  • Pannable in X and Y
  • Optimized for best performance
  • Multiple items are merged in a single row.

WeekViewSwipeable is a simple view for showing data in weekly format. It supports swiping between weeks and automatically fitting data to the current date.

An Android Layout Manager to create a gridview with cells of different sizes inspired by Flow Layout for iOS.

EditTextView suggests and fills up email domains.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes