This feature, built into Cordova 2.3.0, will take the place of ChildBrowser for me. Here are the steps to take to preview it yourself.
Sometimes you’d like to remove just a few files or directories from Trash, like a couple of 500MB downloads you know you won’t use again, and they’re just hogging space. Yet you want to leave the other files there just in case. Currently, Mac’s Trash only provides an “Empty Trash” option for the entire contents. (Windows, on the other hand, allows users to click on a file or folder and tap the Delete key to remove it. Nice!) Here is how you can selectively delete files and directories from the Mac Trash bin. Continue reading
When we use raster icons on our buttons, such as a 16 x 16 PNG graphic of an Export icon, the size may be right for a small handheld device. But when the same page is viewed in a larger device that scales up the images, the icon will look less than its best. Of course, we can use larger icons to begin with and let them scale up or down, but there is a better way.
Our best bet is to use font icons. That is, fonts that are not letters, but come in the shape of familiar icons. Fonts resize to any size and still retain their sharpness. Their storage size is lighter than raster icons. If we use a font in place of a small icon, it will remain crisp no matter the resolution or size of the device. Who knows what larger resolutions and pixel densities are coming up in the future?
Here is how to add font icons to a button. Continue reading
Setup used: Mac OS X Mountain Lion 10.8, Xcode 4.5.1. The version of PhoneGap is not an issue in this article.
Xcode allows us to add source control to a project, such as online by using GitHub.com, or just publishing it locally. With source control on github.com, we could go backward and forward in time to various stages of code changes, and even create a new branch to test or create a different version of the project. That collection of a project’s files is called a repository. GitHub.com allows us to create public repositories (free) or private (paid monthly).
There are several helpful tutorials on how to start a GitHub repository (git repo) when starting a new Xcode 4 project, but I wanted to learn how to create a git repo from an existing Xcode 4 project where the repository option had not been checked when starting up.
Xcode already allows us to make a Snapshot of a project’s state and get back to it, but a GitHub repository has extra advantages of being able to share your code with others as well as store it offsite. I wanted to write about a how-to article on a recent project I worked on and make it available to everyone for download. It was a great time to try out GitHub.com. My final modest effort is seen here: https://github.com/iPhoneDevLog/fonts-bookmarks-notes Continue reading
Here are the steps I followed to create my first successful web app
Create the app files first
1) Create a web app with HTML, CSS, and JS that will support HTML5 specs, and put all the files in their various folders. Make sure all is working in the browser. Ideally, one should use a Jquery-type html page where all pages and content are linked to just one html page, not multiple html pages. That way, when the one page is loaded in the mobile brower, all resources are cached at once and will be available for offline use immediately. Otherwise, one would have to navigate through every page to cache all the resources.
Put all folders in a central folder named just for that app, such as /widget_appname/ if your app is about a widget.
2) In your index.html page, make your <title> the name you want under the web app icon on the home screen, up to 11 characters.
3) Make a “file not found” notice and name it “offline.html” with perhaps a way for the visitor to email you of this problem. Continue reading