ProMotion

iPhone Apps, Ruby-style
ProMotion is a RubyMotion gem that makes iOS development more like Ruby and less like Objective-C. It introduces a clean, Ruby-style syntax for building screens that is easy to learn and remember and abstracts a ton of boilerplate UIViewController, UINavigationController, and other iOS code into a simple, Ruby-like DSL.
Watch the September Motion Meetup where Gant Laborde interviews Jamon Holmgren about ProMotion!
# app/app_delegate.rb
class AppDelegate < PM::Delegate
def on_load(app, )
open RootScreen.new(nav_bar: true)
end
end
# app/screens/root_screen.rb
class RootScreen < PM::Screen
title "Root Screen"
def on_load
:right, title: "Help", action: :help
end
def help
open HelpScreen
end
end
# app/screens/help_screen.rb
class HelpScreen < PM::TableScreen
title "Table Screen"
def table_data
[{
title: "Help",
cells: [
{ title: "About this app", action: :tapped_about },
{ title: "Log out", action: :log_out }
]
}]
end
end
Features
| Screens | Navigation Bars | Tab Bars |
|---|---|---|
![]() |
![]() |
![]() |
| Table Screens | Grouped Tables | Searchable | Refreshable |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
| iPad SplitScreens | Map Screens | Web Screens |
|---|---|---|
![]() |
![]() |
![]() |
...and much more.
Getting Started
- Check out the Getting Started Guide in the wiki
- Follow a tutorial: Building an ESPN app using RubyMotion, ProMotion, and TDD
What's New?
Version 1.1.x
- Added a ProMotion executable called
promotion. You can typepromotion new <myapp>and it will create a ProMotion-specific app. We will be adding more functionality in the future. - Can now pass a symbol to
add,add_to, andset_attributesto call a method with that name to get styles. - Added
button_title:toopen_split_screento customize the auto-generated button title - Updates to set_tab_bar_button
- Added to PM::Delegate
on_open_url(args = {})whereargscontains:url,:source_app, and:annotation - Added to PM::Delegate
tint_colorto customize the application-wide tint color - Added to PM::MapScreen annotations the ability to set an image
- Removed legacy
navigation_controllerreferences which were causing confusion. - Allowed setting a
custom_viewforbar_button_items. - Added
will_begin_searchandwill_end_searchcallbacks to PM::TableScreen. - Added
title_viewandtitle_view_heightto sections in PM::TableScreen. - Updated screenshots for iOS 7
- Refactored code and lots of new passing tests
Tutorials
Shows how to make a basic app in ProMotion. Updated in May.
http://www.clearsightstudio.com/insights/ruby-motion-promotion-tutorial
Screencasts
Shows how to create a Youtube app that shows Portland Trailblazer highlights.
http://www.clearsightstudio.com/insights/tutorial-make-youtube-video-app-rubymotion-promotion/
Sample Apps
Here's a demo app that is used to test new functionality. You might have to change the Gemfile source to pull from Github.
https://github.com/jamonholmgren/promotion-demo
Here's a demo app showing some styling options.
https://github.com/jamonholmgren/promotion-styling
API Reference
We've created a comprehensive and always updated wiki with code examples, usage examples, and API reference.
ProMotion API Reference
Help
If you need help, feel free to tweet @jamonholmgren or open an issue on GitHub. Opening an issue is usually the best and we respond to those pretty quickly. If we don't respond within a day, tweet Jamon or Mark a link to the issue.
Contributing
See CONTRIBUTING.md.
Primary Contributors
- Jamon Holmgren: @jamonholmgren
- Silas Matson: @silasjmatson
- Matt Brewer: @macfanatic
- Mark Rickert: @markrickert
- Many others
- Run
git shortlog -s -n -eto see everyone who has contributed.









