Date post: | 18-Nov-2014 |
Category: |
Technology |
Upload: | raef-akehurst |
View: | 831 times |
Download: | 2 times |
Various Tips & TricksMarke&ng & DevelopingAppsBy Raef Akehurst & David Sullivan
Some of our Ti Projects
10 TipsFor Developing AppsBy David Sullivan
Alloy is Magic
1. alloy.js• Loaded before any other controller or any
UI is compiled
• Perfect place to declare global variables or to start calling any data
Alloy.isTablet = function(){ return !(Math.min(Ti.Platform.displayCaps.platformHeight, Ti.Platform.displayCaps.platformWidth) < 600);}
2. Global Stylesindex.tss
"Window":{ backgroundColor: 'blue'}"Label":{ top: 20, left: '25dp', right: '25dp'}"#subtitle":{ width: Ti.UI.FILL, textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER, font: { fontSize: '16dp', fontWeight: 'bold' }! !}
app.tss
"Window":{ backgroundColor: 'white', layout: 'vertical'}"Label":{ color: 'gray', textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT, backgroundColor: 'transparent', font: { fontFamily:'Helvetica', fontSize: '12dp', fontStyle: 'normal', fontWeight: 'normal' }!}
index.xml
<Alloy> <Window titleid="story_title" modal="true" exitOnClose="true"> <Label id="subtitle" color="orange" textid="story_subtitle" /> <Label top="25" color="white" textid="story_content" /> </Window></Alloy>
3. Pla<orm-‐Specific Resources
// Any device that does not fit any of the below platforms "Label": { backgroundColor: "#fff", text: 'Generic'},// iPhone"Label[platform=ios formFactor=handheld]": { backgroundColor: "#f00", text: 'iPhone'},// iPad and iPad mini"Label[platform=ios formFactor=tablet]": { backgroundColor: "#0f0", text: 'iPad'},// Android handheld and tablet devices "Label[platform=android]": { backgroundColor: "#00f", text: 'Android'}
4. Pla<orm-‐Specific Resources
• app• controllers
• android • index.js
• index.js • views
• ios• index.xml
• index.xml
if (OS_IOS){
$.window.leftNavButton = closeButton;
}
if (OS_ANDROID) { $.window.fullscreen = false;
}
5. Alloy BuilEns• Backbone.js
• Underscore.js
• Moment.js
• Animations
• Dialogs
• Measurements
• Time
• Social (Twitter only)
• String manipulation
6. Widgets
• Awesome way to not only reuse code but to share code
• Have their own views, controllers, styles and assets and are laid out the same as the app directory in the Alloy project.
7. Data binding
<Alloy> <Collection src="book" /> <Window class="container"> <TableView dataCollection="book" dataTransform="transformFunction" dataFilter="filterFunction"> <!-- Also can use Require --> <TableViewRow title="{title}" /> </TableView> </Window></Alloy>
• Update views as your data is updated
• Available for TableView, Views, ButtonBar, CoverFlowView, ScrollableView, ToolBar,TabbedBar and ListView
8. Accessibility
“Here, then, lies the answer to how to tell whether some developer you’ve just met (or are interviewing) is serious about their craft in five seconds flat: borrow their device,
and triple-click the home button. If you don’t hear “VoiceOver on”, or get prompted about VoiceOver,
consider that −3 points on the Steve Test.”
- Stephen van Egmond
9. Accessibility
10. Sublime Text + CLI
Bonus 1. Outside of Ti
• Make use of TestFlight - and use their SDK to get the full value
• Use Google Analytics or similar
• Always expect things with Apple to take longer than planned
• Android can be a bag of hurt - target the popular devices first
Bonus 2. Ti Community
• #TiAlloy
• @tonylukasavage, @FokkeZB, @nappdev & Co
• Github
• AlloyLove.com
10 Tips For Marke&ng AppsBy Raef Akehurst
1. Have a good app
2. Reviews. Get Them.
3. App Store OpEmisaEon
4. Use ExisEng Database
@
5. Old Fashioned PR
6. Social Media Campaigns
7. Online AdverEsing
8. Landing Page
9. TradiEonal Media
10. Push Updates
3
Bonus: Smart App Banners
Gratuitous Plug
http://projectproject.com.au/ticonf/presentation.pdf