Skip to content

Instantly share code, notes, and snippets.

@exclusiveTanim
exclusiveTanim / app.js
Created October 11, 2019 15:24
iOS test code
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
var myTemplate = {
childTemplates : [{// Title
type: 'Ti.UI.Label',
// Use a label for the
bindId : 'info',
// Maps to a custom info property of the item data
properties : {// Sets the label properties
@exclusiveTanim
exclusiveTanim / app.js
Created September 23, 2019 13:24
Corrected code for iOS 10.x.x and below
var win = Ti.UI.createWindow({
backgroundColor : 'red'
});
var label2 = Ti.UI.createLabel({
color : 'blue',
text : 'Play Video',
width : 300,
height : 200
});
@exclusiveTanim
exclusiveTanim / full_log.txt
Created July 19, 2019 16:15
ENDatabase module full Trace log error
This file has been truncated, but you can view the full file.
Appcelerator Command-Line Interface, version 7.0.12
Copyright (c) 2014-2019, Appcelerator, Inc. All Rights Reserved.
2019-07-19T15:47:20.422Z | TRACE | set environment to {"registry":"https://registry.platform.axway.com","baseurl":"https://platform.axway.com"}
2019-07-19T15:47:20.423Z | TRACE | checking credentials for existing session
2019-07-19T15:47:20.520Z | TRACE | Attempting to load session info from config file
2019-07-19T15:47:20.524Z | TRACE | check if session is invalidated
2019-07-19T15:47:20.960Z | TRACE | refresh session expiry to: 1564156040913
2019-07-19T15:47:20.961Z | TRACE | session expiry 1564156040913 false
2019-07-19T15:47:20.962Z | TRACE | Arrow Cloud config file: /Users/v423327/.acs
2019-07-19T15:47:20.964Z | TRACE | found Arrow Cloud login { mid: '188545ab2373fea7b264c39aff49db91533ad461',
@exclusiveTanim
exclusiveTanim / error.txt
Created July 18, 2019 19:36
ENDatabase module error
ERROR] : no such function: sqlcipher_export
[ERROR] : A SQLite database error occurred on database '/var/mobile/Containers/Data/Application/739B1681-4006-4C02-BBB7-AC96CB4CF4F3/Library/Private Documents/wcNovaMobility.enc.db.sql': Error Domain=com.plausiblelabs.EncPLDatabase Code=4 "Cipher migrate: failed sqlcipher_export." UserInfo={com.plausiblelabs.EncPLDatabase.error.vendor.string=no such function: sqlcipher_export, NSLocalizedDescription=Cipher migrate: failed sqlcipher_export., com.plausiblelabs.EncPLDatabase.error.vendor.code=1} (SQLite #1: no such function: sqlcipher_export) (query: '<none>')
[ERROR] : Script Error {
[ERROR] : column = 39;
[ERROR] : line = 294;
[ERROR] : message = "Couldn't open database and migrate";
[ERROR] : nativeLocation = "";
[ERROR] : nativeReason = "wcNovaMobility.enc.db";
[ERROR] : nativeStack = "3 DASH-Dev 0x00000001008380c8 DASH-Dev + 1933512\n4 DASH-Dev 0x0000000100833ba4 DASH-Dev + 1915812\n5 CoreFoundation 0x000000019b0e7ba0 <redacted> + 144\n6 CoreFoundation 0x0
@exclusiveTanim
exclusiveTanim / app.js
Created July 8, 2019 21:00
Open Settings iOS
var win = Titanium.UI.createWindow({
title : 'Pin Example',
backgroundColor : 'white'
});
var button = Titanium.UI.createButton({
title : 'Hello',
top : 10,
width : 100,
height : 50
@exclusiveTanim
exclusiveTanim / app.js
Created July 4, 2019 19:28
Case: 01069114
function initUI() {
const appWindow = Ti.UI.createWindow();
const listView = createListViewWithLazyLoad(40, 15, 1);
activityIndicator = Ti.UI.createActivityIndicator({
bottom: 10,
color: 'red',
zIndex: 1000,
style: Ti.UI.ActivityIndicatorStyle.DARK
});
@exclusiveTanim
exclusiveTanim / app.js
Created June 17, 2019 18:31
CSN: 01058435
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var verticalView = Ti.UI.createView({layout: 'vertical', width: "100%", height: "100%"});
verticalView.add(Ti.UI.createLabel({text: 'Label 1', top: 30, width: Ti.UI.SIZE, height: Ti.UI.SIZE}));
var htmla = "<div style='font-family: Helvetica Neue; font-size:16px'><ul><li>Item 1</li><li>Item 2</li></ul></div>";
@exclusiveTanim
exclusiveTanim / row.xml
Last active June 13, 2019 17:21
New code
<Alloy>
<TableViewRow id="rowTabbedPanel" layout="horizontal" height='Ti.UI.SIZE'>
<View backgroundColor='green' left="0" right="0" top="0" bottom="0" height='Ti.UI.SIZE'>
<Label id='narrativeTxt' left='2%' right='40%' height='40dp' backgroundColor='red' ></Label>
<Button right="45dp" width="26dp" height"26dp" backgroundColor="gray" backgroundImage="/images/black_overview.png"></Button>
<Button right='5' width="26dp" height"26dp" backgroundColor='white' backgroundImage="/images/black_camera.png"></Button>
</View>
</TableViewRow>
</Alloy>
@exclusiveTanim
exclusiveTanim / app.js
Created June 3, 2019 20:01
base64encode image
var win = Ti.UI.createWindow();
win.open();
function takePhoto() {
Ti.Media.showCamera({
mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],
success: function(event) {
console.log(event);
if(event.mediaType === Ti.Media.MEDIA_TYPE_PHOTO) {
var image = event.media;
$.index.open();