ios -
iOS support for app.nit
System configuration
Configure your system for OS X by installing Xcode and brew.
Follow the instructions in README.md
at the root of the repository.
Optionally, install ios-sim to run compiled apps in the simulator: brew install ios-sim
Compile and run a simple application
Let's use the hello_ios
example in the folder lib/ios/examples/
.
Compile with: nitc hello_world.nit
Run in the simulator with: ios-sim hello_world.app
Sample portable applications
See the calculator example at examples/calculator
and the Tnitter client at contrib/tnitter/
for portable applications working on GNU/Linux, OS X, iOS and Android.
Application icon
To associate icons to your application, create the directory ios/AppIcon.appiconset
and fill it with standard icons and Contents.json
.
These files can be generated in a number of different ways:
Using the tool
svg_to_icons
packaged with the Nit repository atcontrib/inkscape_tools/bin/svg_to_icons
.Using Xcode to assign images to each slot, create the folder and the file
Contents.json
.Write or modify the file
Contents.json
manually. It is in Json format and easily readable.
Content
- ios: iOS support for app.nit (lib/ios)
- app: Basic structure for Nit apps on iOS (lib/ios/app.nit)
- assets: Implementation of
app::assets
(lib/ios/assets.nit) - audio: iOS implementation of
app::audio
usingAVAudioPlayer
(lib/ios/audio.nit) - data_store: Implements
app::data_store
usingNSUserDefaults
(lib/ios/data_store.nit) - examples (lib/ios/examples)
- hello_ios: Simple iOS app with a single label (lib/ios/examples/hello_ios.nit)
- glkit: GLKit services to create an OpenGL ES context on iOS (lib/ios/glkit.nit)
- http_request: Implementation of
app::http_request
for iOS (lib/ios/http_request.nit) - ios: iOS platform support (lib/ios/ios.nit)
- platform: Triggers compilation for the iOS platform (lib/ios/platform.nit)
- ui (lib/ios/ui)
- ui: Implementation of
app::ui
for iOS (lib/ios/ui/ui.nit) - uikit: File generated by objcwrapper (lib/ios/ui/uikit.nit)
- ui: Implementation of