- Install LiveView globally:
npm i -g liveview
- Change the
~/.titanium/config.json
to include the CLI hook (underpaths
->hook
):
{
"user": { ... },
"app": { ... },
"cli": { ... },
npm i -g liveview
~/.titanium/config.json
to include the CLI hook (under paths
-> hook
):{
"user": { ... },
"app": { ... },
"cli": { ... },
name: Build Titanium App | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: # Do not run if we push tags | |
- '**' | |
jobs: |
import TiPDFMerge from 'ti.pdfmerge'; | |
const win = Ti.UI.createWindow({ | |
backgroundColor: '#fff' | |
}); | |
const btn = Ti.UI.createButton({ | |
title: 'Trigger' | |
}); |
Support the native in-app-purchasing API's in Titanium.
product
:
discounts
(Object with identifier
, price
, subscriptionPeriod
, …)introductoryPrice
var IAP = require('ti.iap'); | |
var PRODUCT_IDENTIFIER = 'YOUR_PRODUCT_IDENTIFIER'; | |
var SHARED_SECRET = 'YOUR_SHARED_SECRET'; | |
var win = Ti.UI.createWindow({ backgroundColor: '#fff', title: 'IAP Demo' }); | |
win.addEventListener('open', onOpen); | |
// Retrieve products info | |
var btn1 = Ti.UI.createButton({ title: 'Retrieve products info', top: 50 }); |
var Stripe = require('ti.stripe'); | |
var win = Ti.UI.createWindow({ | |
backgroundColor: '#fff', | |
layout: 'vertical' | |
}); | |
win.addEventListener('open', initialize); | |
win.open(); |
import TiFirebaseConfig from 'firebase.config'; | |
export default class ConfigManager { | |
static fetch () { | |
return new Promise(resolve => { | |
const lastVersions = Ti.App.Properties.getList('kMyAppLastVersions', []); | |
const lastVersionLegacy = Ti.App.Properties.getString('lastVersion', null); | |
// Migrate prior updates |
var CXCallObserver = require('CallKit/CXCallObserver'); // Require native class from CallKit | |
var CallDelegate = require('callDelegate'); // Require delegate class from app/lib/ (Alloy) or Resources/ (Classic) | |
var myDelegate = new CallDelegate(); // Instantiate Delegate | |
myDelegate.callChanged = function (callObserver, call) { | |
if (call.hasConnected) { | |
Ti.API.info('********** voice call connected **********\n'); | |
} else if(call.hasEnded) { | |
Ti.API.info('********** voice call disconnected **********/n'); | |
} |
/** | |
* Crops a given image URL to an optional aspect ratop (square by default). | |
* | |
* Example: | |
* | |
* const image = await ImageCroppingManager.crop(myImageURL); | |
* | |
*/ | |
export default class ImageCroppingManager { |