Support the native in-app-purchasing API's in Titanium.
var IAP = require('ti.iap');
var PRODUCT_IDENTIFIER = 'YOUR_PRODUCT_IDENTIFIER';| #!/usr/bin/bash | |
| # | |
| # Description: Zip the current Titanium project on macOS | |
| # File: backup.sh | |
| # Author: Jose Cerrejon (ulysess_at_gmail.com) | |
| # Help: Copy in the root of your Titanium project and Add to package.json the script: "backup": "sh backup.sh", | |
| # | |
| clear | |
| stop_liveview() { |
| import { createSign, randomBytes } from 'crypto' | |
| import axios from 'axios' | |
| import { resolve } from 'url' | |
| const PK_HEADER = '\n-----BEGIN PRIVATE KEY-----\n' | |
| const PK_FOOTER = '\n-----END PRIVATE KEY-----\n' | |
| const BASE_URL = 'https://marketplace.walmartapis.com/' | |
| const WALMART_CONSUMER = "b68d2a72...."; |
| //XML | |
| <Alloy> | |
| <SplitWindow id="splitWindow" backgroundColor="white" showMasterInPortrait="true" masterIsOverlayed="true" platform="ios"> | |
| <!--MASTER--> | |
| <NavigationWindow platform="ios"> | |
| <Window title="Master" layout="vertical"> | |
| <LeftNavButtons> | |
| <Label id="masterCollapseButton" class="navButton" text="<<" onClick="toggleMaster" /> | |
| </LeftNavButtons> | |
| export default class DeepLinkingManager { | |
| constructor () { | |
| this.handledLinks = {}; | |
| this.activityType = 'io.lambus.app.universalLink'; | |
| const activity = Ti.App.iOS.createUserActivity({ | |
| activityType: this.activityType | |
| }); |
| var TiSpeech = require('ti.speech'); | |
| TiSpeech.initialize('en_US'); // locale is optional | |
| var win = Ti.UI.createWindow({ | |
| backgroundColor: '#fff' | |
| }); | |
| var currentValue = ''; |
The Amplify Framework provides a set of libraries, UI components, and a command line interface to build a mobile backend and integrate with your iOS, Android, Web, and React Native apps.
This article will describe how to use Amplify to easily create serverless API's.
I'll follow this tutorial.
| /** | |
| * Crops a given image URL to an optional aspect ratop (square by default). | |
| * | |
| * Example: | |
| * | |
| * const image = await ImageCroppingManager.crop(myImageURL); | |
| * | |
| */ | |
| export default class ImageCroppingManager { |
| export function showOptions (args) { | |
| const title = args.title; | |
| const message = args.message; | |
| const options = args.options; | |
| const destructive = args.destructive !== undefined ? args.destructive : -1; | |
| let cancel = -1; | |
| return new Promise((resolve, reject) => { | |
| if (OS_IOS) { | |
| options.push('Cancel'); |
| export default class Utils { | |
| static loadCachedImageFromURL(url, cb) { | |
| let filename; | |
| try { | |
| filename = url.substring(url.lastIndexOf('/') + 1); | |
| } catch (err) { | |
| cb(null); | |
| } |