phonegap

macgap - make iOS apps

crosswalk

hooks

statusbar plugin

<preference name="StatusBarOverlaysWebView" value="false"/>
<preference name="StatusBarBackgroundColor" value="#000000"/>
<preference name="StatusBarStyle" value="lightcontent" />

Bonjour (ios)

ZeroConf (android)

ZeroConf.watch("_3dprinter._tcp.local.", function(result) { console.log('>>>>>>>>>>>>>>>>> _3dprinter._tcp.local.'); console.log(JSON.stringify(result, null, 4)); //console.log(util.inspect(service, false, null)); });


# android run
  phonegap run android --device

# angular directive with templateUrl
be careful with templateUrl's in angular directives. iPhone (and probably Android) is case-sensitive. So not exactly matching templateUrl's don't show up on iPhone but do show up on OSX!

make sure to delete files in www/ and platforms/.../www/ folder since overwriting file WebLink.html with Weblink.html will keep the same file!

# Overscroll / webview bounce background color
* https://github.com/EddyVerbruggen/iOSWebViewColor-PhoneGap-Plugin
or disable:

in native Objective C code in MainViewController.m

define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

  • (void)webViewDidFinishLoad:(UIWebView*)theWebView { // Black base color for background matches the native apps theWebView.backgroundColor = UIColorFromRGB(0xF1EFF0);

get rid of 'Started backup to iCloud! Please be careful...'

in config.xml:

libobjc.A.dylib`objc_msgSend + 6, name = 'WebThread', stop reason = EXC_BAD_ACCESS

splashscreen notation in config.xml

Don't use '''gap:''' in front of '''splash''' because that doesn't work!

<splash gap:platform="ios" src="assets/screen/ios/Default-568h@2x~iphone.png" width="640" height="1136" />
<splash gap:platform="ios" src="assets/screen/ios/Default-Landscape@2x~ipad.png" width="2048" height="1536" />
<splash gap:platform="ios" src="assets/screen/ios/Default-Landscape~ipad.png" width="1024" height="768" />
<splash gap:platform="ios" src="assets/screen/ios/Default-Portrait@2x~ipad.png" width="1536" height="2048" />
<splash gap:platform="ios" src="assets/screen/ios/Default-Portrait~ipad.png" width="768" height="1024" />
<splash gap:platform="ios" src="assets/screen/ios/Default@2x~iphone.png" width="640" height="960" />
<splash gap:platform="ios" src="assets/screen/ios/Default~iphone.png" width="320" height="480" />

log verbose

phonegap -d build ios > build.log

toolchain info

sw_vers -productVersion
ios-deploy -V
xcodebuild -version
xcode-select --print-path
gcc --version
lldb --version

Unable to mount developer disk image

no solution yet. see my issue: https://github.com/phonegap/ios-deploy/issues/73

couldn't understand kern.osversion `14.0.0'

To solve this I removed ios-deploy. But then I wasn't able to re-install it with npm because the make command failed.

sudo npm install -g ios-deploy gcc -ObjC -g -o ios-deploy -framework Foundation -framework CoreFoundation -framework MobileDevice -F/System/Library/PrivateFrameworks ios-deploy.c couldn't understand kern.osversion `14.0.0' The solution was to disable the llvm-gcc42 compiler installed by macports ('''type gcc''' gave '''/opt/local/bin/gcc'''). And use the Xcode gcc compiler instead.

sudo port deactivate llvm-gcc42 type gcc # result: gcc is hashed (/usr/bin/gcc) gcc -v # result: Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr ...... sudo npm install -g ios-deploy

now it works

create a true empty phonegap project

icons and splashscreens

Writing plugins

Books

Error: CDVPlugin class CDVLogger (pluginName: Console) does not exist.

first remove platform/ios folder then: cordova platforms add ios cordova plugin rm org.apache.cordova.console cordova plugin add org.apache.cordova.console cordova build hmm.. en als dat niet werkt dan: plugins map en platforms map verwijderen en dan: phonegap local plugin add org.apache.cordova.inappbrowser phonegap local plugin add org.apache.cordova.console phonegap local plugin add org.apache.cordova.statusbar phonegap build ios

cordova.js aan het eind van je index.html

tutorial

forward console.log to xcode

phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git phonegap build ios

stop lldb

killall lldb

hangs on (lldb) connect

update ios-deploy....? npm update -g ios-deploy

init

phonegap create MyApp -i com.myapp.app -n MyApp
cd MyApp
phonegap build ios
export ANDROID_HOME=/Users/rick/Documents/android-sdk-macosx/
export PATH=$PATH:$ANDROID_HOME/tools/
export PATH=$PATH:$ANDROID_HOME/platform-tools
phonegap build android

don't backup to iCloud

list plugins

phonegap plugin list

add/remove plugin

debug

http://debug.build.phonegap.com/

nice slideshow

*http://don.github.io/slides/2013-02-16-snow-mobile/#

error Abort trap: 6 ios-deploy

error .........platforms/ios/cordova/run: line 138: 58950 Abort trap: 6 ios-deploy -d -b "$DEVICE_APP_PATH" fix: npm install -g ios-deploy

Run

phonegap run ios phonegap build ios phonegap remote build ios

in app browser

phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git

InAppBrowser

function openInternalBrowser(id) { var ref = window.open('http://10.0.0.161', '_blank', 'location=yes,transitionstyle=fliphorizontal'); ref.addEventListener('loadstart', function(event) { if (event.url.indexOf(".stl") > 0) { alert(event.url); ref.close(); } }); }

function openExternalBrowser(id) { var ref = window.open('http://10.0.0.161', '_system', 'location=yes'); }



# phonegap remote build ios - PhoneGap 3.5.0 not supported....
Solution from [[http://community.phonegap.com/nitobi/topics/phonegap_3_5_0_not_supported_is_there_a_fix_for_this_or_a_way_around_it|here]]. In your ''www/config.xml'' file add the following:
  <preference name="phonegap-version" value="3.4.0" />

# certificate help
http://docs.build.phonegap.com/en_US/signing_signing-ios.md.html

# combine gulp & phonegap
* http://danielhough.co.uk/blog/gulp-browserify-phonegap-ripple/
* http://blog.dynamicprogrammer.com/2014/05/06/refactoring-the-js-code-structure-part-4.html

# Phonegap App
http://app.phonegap.com/
  phonegap serve

# emulate.phonegap.com 
http://emulate.phonegap.com/