7. WHEN TO USE NATIVE
• Anything that needs to access the device’s hardware
8. WHEN TO USE NATIVE
• Anything that needs to access the device’s hardware
• You can put it on the app store
9. WHEN TO USE NATIVE
• Anything that needs to access the device’s hardware
• You can put it on the app store
• That’s it*
10. WHEN TO USE NATIVE
• Anything that needs to access the device’s hardware
• You can put it on the app store
• That’s it*
*We’ll cover a few gotchas later in the presentation
118. OFFLINE MODE
Used to display the most recent data in case
of no connectivity
Data(native storage)
119. OFFLINE MODE
Used to display the most recent data in case
of no connectivity
Data(native storage)
120. OFFLINE MODE
Used to display the most recent data in case
of no connectivity
Data(native storage)
Y.Lang.Substitute (for
templating)
121. OFFLINE MODE
Used to display the most recent data in case
of no connectivity
Data from Local
Data(native storage)
storage
Y.Lang.Substitute (for
templating)
142. WINDOW.LOCATION
On your JS:
window.location = myProtocol://performAction?param=foo
On your native code:
if([[request.URL scheme] isEqualToString:@"myProtocol"])
{
//Parse the request, perform an action
}
else {
return TRUE; //Navigate
}
143. XHR
• Cross domain policies restrictions
• Works if the content is loaded locally
• Can send a response back