Read the blog at http://fokkezb.nl/2013/08/26/url-schemes-for-ios-and-android-1/
This gist assumes:
- you have a local git repo
- with an online remote repository (github / bitbucket etc)
- and a cloud server (Rackspace cloud / Amazon EC2 etc)
- your (PHP) scripts are served from /var/www/html/
- your webpages are executed by apache
- apache's home directory is /var/www/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcm.js | |
/** | |
* Librería gcm - CommonJS - Alloy | |
* @author Andrés Castaño Cuervo | |
* @version 1.1.1 | |
* Copyright Evomedia | |
* www.evoluciondigital.com.co | |
*/ | |
// Inclusión del módulo. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Provide the Host Information. | |
//$tHost = 'gateway.sandbox.push.apple.com'; | |
$tHost = 'gateway.push.apple.com'; | |
$tPort = 2195; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Server file | |
class PushNotifications { | |
// (Android)API access key from Google API's Console. | |
private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI'; | |
// (iOS) Private key's passphrase. | |
private static $passphrase = 'joashp'; | |
// (Windows Phone 8) The name of our push channel. | |
private static $channelName = "joashp"; |
Quick Example of registering a scheme in TiApp.xml, implementing the code in app.js / alloy.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Ti.DynamicLib | |
* @abstract Support embedded binaries (aka dynamic libraries) in Titanium modules and Hyperloop. | |
* @version 1.1.0 | |
* | |
* Install: | |
* 1) Search and replace '../../src/<YourFramework>.framework' with your framework location. | |
The path is relative to the `build/iphone` directory. | |
* 2a) For classic modules: | |
* - Add 'LD_RUNPATH_SEARCH_PATHS=$(inherited) "@executable_path/Frameworks" $(FRAMEWORK_SEARCH_PATHS)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- note the ONLY change to this is the additional module="tabIndicator" | |
attribute + properties to override indicator defaults //--> | |
<Alloy> | |
<TabGroup module="tabIndicator" tabsBackgroundColor="#000" tabIndicatorHeight="1" tabIndicatorColor="white" tabIndicatorWidth="75%"> | |
<Tab title="Tab 1" icon="/images/icons/519-tools-1.png" activeIcon="/images/icons/519-tools-1_active.png" color="#555" activeColor="#fff"> | |
<Window title="Tab 1" barColor="black" navTextColor = "#fff"> | |
<Label onClick="openWin1">Tab 1</Label> | |
</Window> | |
</Tab> | |
<Tab title="Tab 2" icon="/images/icons/516-archive-box.png" activeIcon="/images/icons/516-archive-box_active.png" color="#555" activeColor="#fff"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var AVAudioEngine = require('AVFoundation/AVAudioEngine'); | |
var AVAudioPlayerNode = require('AVFoundation/AVAudioPlayerNode'); | |
var AVAudioFile = require('AVFoundation/AVAudioFile'); | |
var NSBundle = require('Foundation/NSBundle'); | |
var win = Ti.UI.createWindow({ | |
backgroundColor: '#fff' | |
}); | |
var btn = Ti.UI.createButton({ |