Skip to content

Instantly share code, notes, and snippets.

View hansemannn's full-sized avatar
🗺️

Hans Knöchel hansemannn

🗺️
View GitHub Profile
/**
* HYPERLOOP GENERATED - DO NOT MODIFY
*
* This source code is Copyright (c) 2016 by Appcelerator, Inc.
* All Rights Reserved. This code contains patents and/or patents pending.
*/
var $dispatch = Hyperloop.dispatch,
$init,
$imports,
$class;
<?xml version="1.0" encoding="UTF-8"?>
<ti:module xmlns:ti="http://ti.appcelerator.org" xmlns:android="http://schemas.android.com/apk/res/android">
<ios>
<plist>
<dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fbauth2</string>
var win = Ti.UI.createWindow({backgroundColor:"#f00", title: "Red Window"});
var nav = Ti.UI.iOS.createNavigationWindow({window: win});
var trigger = Ti.UI.createButton({
title: "Open Blur Window"
});
win.add(trigger);
trigger.addEventListener("click", function() {
-(void)onSocket:(AsyncSocket *)sock didConnectToHost:(NSString *)host port:(UInt16)port
{
// This gets called for sockets created via accepting, so return if the connected socket is NOT us
if (sock != socket) {
return;
}
internalState = SOCKET_CONNECTED;
dispatch_block_t eventBlock = ^{
var Activity = require('android.app.Activity'),
activity = new Activity(Ti.Android.currentActivity),
View = require('android.view.View'),
MyView = android.view.View.extend({
onDraw: function(canvas) {
// implementation here
}
}),
view = new MyView(activity);
/**
* Ti.TouchID
*
* Summary: Support native Touch ID with Hyperloop in Titanium Mobile.
* Author: Hans Knoechel | Appcelerator, Inc
* Date: 03/22/2016
* Version: 0.1.0
* Example
*
* var touchID = require("ti.touchid");
//
// TiTouchId.h
// TiTouchId
//
// Created by Hans Knöchel on 22.03.16.
// Copyright © 2016 Hans Knoechel. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <LocalAuthentication/LocalAuthentication.h>
import Foundation
import UIKit
import LocalAuthentication
public class TiTouchId {
var context: LAContext?
init() {
context = LAContext()
}
var utils = require("utils");
var UIView = require("UIKit/UIView");
var view = new UIView();
var CGRectMake = require("CoreGraphics").CGRectMake;
var win = Ti.UI.createWindow({
backgroundColor: "#333"
});
view.setFrame(CGRectMake(0, 0, 200, 200));
/* global ENV_PROD */
var WebColor,
TiApp,
UIDevice,
UIForceTouchCapabilityAvailable,
NSDate,
NSDateFormatter,
NSTimeZone,
NSLocale,