-
Create a new project using:
appc new
-
For npm's required in your project, you need to do the following:
- "sudo npm install " for running locally OR add to package.json -> devDependencies section
#Appcelerator PDF Viewer Demo
This sampe app demonstrates how to view PDF files from the web and from local application resource on iOS and Android
The PDFs used in this demo are:
- Resource PDF - stored in the /app/assets/pdf folder - "the Best of Wikipedia's Worst Writing"
- Web hosted PDF - MBTA Map - https://www.mbta.com/uploadedfiles/Documents/Schedules_and_Maps/Rapid%20Transit%20w%20Key%20Bus.pdf
var Arrow = require("arrow"); | |
var Model = Arrow.Model.reduce("appc.salesforce/Account","Account",{ | |
"fields": { | |
"Name": { | |
"type": "string", | |
"description": "Account Name", | |
"readonly": false, | |
"maxlength": 255, | |
"required": true, |
var Arrow = require("arrow"); | |
var Model = Arrow.Model.reduce("appc.mysql/table1","SalesByRegion",{ | |
"fields": { | |
"rid": { | |
"type": "number", | |
"required": false, | |
"optional": true, | |
"readonly": false, | |
"writeonly": false |
#Arrow Authentication Scheme
https://gist.github.com/lbrenman/f884ea1f43d75ed98deb
*Using Basic APIKey Authentication provides a single key for all users of the API
- What if want to provide a different API Key for different users/customers
- this is an API Management feature
- Today, we don’t support this but it can easily be built using Arrow Authentication Scheme
- Further, ArrowDB can be used to store the users and their keys for authentication
- Then, access to the API can use different keys (passed in a header) and the user API can use a separate private key that only the admin/Arrow project developer knows
var Arrow = require("arrow"); | |
var Model = Arrow.createModel("MyUser",{ | |
"fields": { | |
"username": { | |
"type": "String", | |
"required": true | |
}, | |
"password": { | |
"type": "String", |
var Arrow = require('arrow'); | |
var fbwebhook = Arrow.API.extend({ | |
group: 'webhooks', | |
path: '/api/fbwebhook', | |
method: 'GET', | |
description: 'this is an api that shows how to handle requests from the FB chatbot', | |
parameters: { | |
'hub.mode': { | |
description: 'hub.mode', |
var Arrow = require('arrow'); | |
var fbwebhook = Arrow.API.extend({ | |
group: 'webhooks', | |
path: '/api/fbwebhook', | |
method: 'GET', | |
description: 'this is an api that shows how to handle requests from the FB chatbot', | |
parameters: { | |
'hub.mode': { | |
description: 'hub.mode', |
Titanium has no built in Unit Test as Xcode/ObjC and Android Java have | |
Jasmine and Ti-mocha are the two main unit test frameworks for titanium | |
Jasmine runs without requiring the app to run | |
Ti-mocha runs while the app is running | |
Using T-Mocha |
Web scraping is technique of extracting information from websites. For mobile applications, it should be considered a last resort. Instead try to get access to the inderlying data via a documented REST web service API.
However, you may find that an REST or SOAP API is not available and you may need to web scrape in order to get the web site data into your mobile application.
If you are going web scrape, then don't do it in the mobile app. Instead, use a microservices platform, like Arrow. By implementing the screen scraping in an Arrow middle tier server, then when the web site changes, you can change your scraping algorithm without needing to publish a new mobile application.
This blog post will show a simple example of using Arrow Builder to build an API that utilizes web scraping.