Skip to content

Instantly share code, notes, and snippets.

@exclusiveTanim
exclusiveTanim / app.js
Created May 7, 2019 13:49
Example code which is not working for iOS
function DoTest() {
//download image, then show it in a web view
//create directory
sDir = Ti.Filesystem.applicationDataDirectory + "/productimages/";
d = Ti.Filesystem.getFile(sDir);
if (!d.exists()) {
d.createDirectory();
}
@exclusiveTanim
exclusiveTanim / crash.txt
Created April 15, 2019 14:11
Full Crash log of SF-01051413
Incident Identifier: 86F272E9-876A-4151-9F1F-6490902D21B1
CrashReporter Key: fcd594280d46d6da35d7672a885733bd3b5f9a16
Hardware Model: iPhone8,2
Process: Capella Mobile [2530]
Path: /private/var/containers/Bundle/Application/E90D4B8E-9616-4FBC-93E9-7BE25AC10632/Capella Mobile.app/Capella Mobile
Identifier: edu.capella.mobile.android
Version: 3.25.1 (3.25.1)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
@exclusiveTanim
exclusiveTanim / app.js
Created March 21, 2019 14:56
Test code Intercom-21301183670
var url = "http://www.google.com";
var client = Ti.Network.createHTTPClient({
onload : function(e) {
Ti.API.info("Received text: " + this.responseText);
alert('success');
@exclusiveTanim
exclusiveTanim / app.js
Created March 15, 2019 19:42
Webview Cookies Test on 8.0.0.GA
var win = Ti.UI.createWindow({
layout : 'vertical'
});
// Create a TextField.
var cookiename = Ti.UI.createTextField({
height : 40,
top : 20,
left : 10,
right : 10,
@exclusiveTanim
exclusiveTanim / app.js
Created March 11, 2019 13:54
iOS 11.x screen rotation issue
var win = Ti.UI.createWindow({
width:"100%",
height:"100%",
color:"yellow"
});
videoPlayerView = Ti.UI.createView({
left:'3%',
backgroundColor:'#D8D8D8',
borderColor:'#979797',
borderWidth:'1',
@exclusiveTanim
exclusiveTanim / app.js
Created March 6, 2019 17:14
Front camera code for testing
var window = Ti.UI.createWindow({
backgroundColor : '#000'
});
// create button, register the modified click callback, add button to window
function addButton(title, clickCallback) {
var button = Ti.UI.createButton({
title : title,
width : '300',
height : '50'
@exclusiveTanim
exclusiveTanim / index.js
Created March 5, 2019 18:29
iPhone X camera issue
/*- Yes this only happens on iPhone X series (seems like the extra space created by the notch at the top might be the cause?)
- Another factor might be that they're not using the native controls of the camera, but instead they have an OVERLAY view with a custom button for actions.*/
function showCamera(){
// This is a custom view that has a button for start / stop the record
const overlay = Alloy.createController('overlay', {
fnStartRecording: index => {
question = index;
Ti.Media.startVideoCapture();
@exclusiveTanim
exclusiveTanim / trace.log
Last active February 19, 2019 15:05
NFC module trace
This file has been truncated, but you can view the full file.
Appcelerator Command-Line Interface, version 7.0.9
Copyright (c) 2014-2019, Appcelerator, Inc. All Rights Reserved.
2019-02-19T15:00:40.542Z | TRACE | set environment to {"registry":"https://registry.platform.axway.com","baseurl":"https://platform.axway.com"}
2019-02-19T15:00:40.543Z | TRACE | checking credentials for existing session
2019-02-19T15:00:40.691Z | TRACE | Attempting to load session info from config file
2019-02-19T15:00:40.713Z | TRACE | check if session is invalidated
2019-02-19T15:00:42.426Z | TRACE | refresh session expiry to: 1551193242245
2019-02-19T15:00:42.427Z | TRACE | session expiry 1551193242245 false
2019-02-19T15:00:42.428Z | TRACE | Arrow Cloud config file: /Users/user/.acs
2019-02-19T15:00:42.434Z | TRACE | found Arrow Cloud login { mid: 'f1d2078a5c6706b1ed08e85b8e89a2b6fe45fa76',
Ti.UI.iPhone.setStatusBarBackgroundColor("red");
var win = Ti.UI.createWindow({
backgroundColor : "#fff"
});
var nav = Ti.UI.iOS.createNavigationWindow({window:win});
var btn = Ti.UI.createButton({
title : "Open another window"
});
@exclusiveTanim
exclusiveTanim / app.js
Created February 11, 2019 18:33
Simple code
var win2 = Titanium.UI.createWindow({
backgroundColor : 'red',
barColor : 'yellow',
titleImage : 'logo.png'
});