Yesterday’s Google I/O keynote unveiled some new features in Music, Maps and Search. But to me the biggest and most important announcement was the new Google+ photo features. Full-size high-resolution photos, automatic highlights of entire albums, automatic enhancement and auto-awesome combine to make Google+ the most feature packed photo hosting service on the web. Add the ability to share pictures with anyone via e-mail (take that Facebook) and Google+ is now the best social network to host and share photos.
Why is this important? It encroaches directly on Facebook’s bread and butter, sharing pictures. Take a look at the statistics. As of May 2013 Facebook hosts 240 billion photos and averages roughly 350 million photo uploads per day. This implies (and my limited anecdotal evidence supports) that most Facebook users view the site as a photo sharing service. If Google can gain mindshare as the premiere social network for sharing photos you may see a large defection users from Facebook.
No one can question Apple’s dominance in hardware. The build quality and user experience of the iPod, iPhone and iPad positioned Apple as the most profitable company in the world. However, with the build quality of rival devices quickly approaching Apple quality, software will be the next battleground for consumer loyalty. And Apple has a software problem.
The release of Google Now for iOS has shown that Google’s software engineering and user interface design can combine to release high quality, functional products surpassing those custom-built by Apple on Apple’s own hardware. Cloud-based mobile apps will continue to gain users and Google’s cloud based offerings are on a completely different level than Apples meagre offerings. In my personal experience Apple’s Reminders App constantly goes out of sync between my iPad and iPhone — with only a simple to-do list on two devices! As more and more data is pushed to the cloud Google’s offerings will continue to outpace what Apple’s — Google has solved so many distributed and cloud computing problems and their infrastructure is not easily replicated.
I have completely replaced Safari with Google Search and Google Chrome, Mail with Gmail, Siri with Google Voice Search, and Google Now is a complete product offering with no answer from Apple. These services work even better with deeper integration and for my next phone I’ll be switching over to Android to gain this integration. As Google Plus and the Google identity layer gain more penetration, more and more people will be using Google products. Imagine a new user with a Google account and a few Google services buying a phone. You can buy Android, sign in once and all your data is exactly where you expect. Or you can buy Apple, download 3 apps, configure the rest to work properly with your existing calendar and hope that everything stays in sync. I know what I do.
I’m not sure why this was so difficult to discover. For the longest time I was not sure how to create a new file using NERDTree. I finally sat down and figure out how it works.
First, bring up NERDTree and navigate to the directory where you want to create the new file. Press m to bring up the NERDTree Filesystem Menu. This menu allows you to create, rename, and delete files and directories. Type a to add a child node and then simply enter the filename. You’re done! To create a directory follow the same steps but append a / to the filename.
Submitting a Unity3d game to the Mac App Store is a somewhat painful process. This guide refers to Unity3d 3.5 but should apply to Unity 4.0 and up.
First, build your application for Mac and make sure that you uncheck Mac App Store Validation in the PlayerSettings Inspector window.
Building your App from Unity will create a .App file. Navigate to this file in Finder and right-click. Choose Show Package Contents from the context menu to open your app as a folder.
Navigate to the Contents directory and open the file Info.plist in your favorite text editor. You will need to make a few changes to this file.
Specifically, you will need to edit the following entries to correspond to your specific application.
CFBundleExecutable: The name of your game.
CFBundleGetInfoString: Human readable information about your game.
CFBundleIdentifier: The App identifier you registered at the Mac App Store.
CFBundleName: The name of your game.
CFBundleShortVersionString: The version number of your game.
NSHumanReadableCopyright: Your copyright.
LSApplicationCategoryType: The category of your application.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plistversion="1.0"><dict><key>CFBundleDevelopmentRegion</key><string>English</string><key>CFBundleExecutable</key><string>PhantomLeader</string><key>CFBundleGetInfoString</key><string>Phantom Leader version 1.0.7</string><key>CFBundleIconFile</key><string>icons.icns</string><key>CFBundleIdentifier</key><string>com.dvg.phantomleadermac</string><key>CFBundleInfoDictionaryVersion</key><string>6.0</string><key>CFBundleName</key><string>PhantomLeader</string><key>CFBundlePackageType</key><string>APPL</string><key>CFBundleShortVersionString</key><string>1.0.7</string><key>CFBundleSignature</key><string>????</string><key>CFBundleVersion</key><string>1.0.7</string><key>NSMainNibFile</key><string>MainMenu</string><key>NSPrincipalClass</key><string>PlayerApplication</string><key>NSHumanReadableCopyright</key><string>Dan Verssen Games/Red Finch Software</string><key>LSApplicationCategoryType</key><string>public.app-category.board-games</string><key>UnityBuildNumber</key><string>b81e0151ec83</string></dict></plist>
You can get more information about these keys from the Apple developer documentation. The most notable key in need of changing is the LSApplicationCategoryType which must correspond to an actual category on the Mac App Store. You can find the LS keys documentation here.
You will need to generate an iconset matching Apple’s Human Interface Guidelines. The first step is to create all of the required icons. You will need variations of your icon supporting the following resolutions.
Place all of these icons in the same folder called icons.iconset. Now we have to drop in to Terminal and run the iconutil program to create your icns file which will be named the same as your icons folder. Running
iconutil -c icns
will generate a file called icons.icns. You will need to replace the file UnityPlayer.icns with this icon file using Finder. The UnityPlayer.icns file is located in Contents -> Resources within your .App.
All Apps on the Mac App Store must be sandboxed. To sandbox your Unity app you have to provide an entitlements file to use during the code signing process. A fairly minimal entitlements file should look something like this.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plistversion="1.0"><dict><key>com.apple.security.app-sandbox</key><true/><key>com.apple.security.device.usb</key><true/></dict></plist>
Now that we have our iconset and entitlements ready we can codesign our App for delivery to the Mac App Store. We have to drop back to the Terminal to run the codesign application.
codesign --force --sign "3rd Party Mac Developer Application: XXXX" --entitlements yourapp.entitlements YourApp.app
You can find ”XXXX” in the Keychain Access program. Look for a code signing certificate beginning with the text “3rd Party Mac Developer Application” you will need to copy this entire text to the codesign command above. You can find more details from the App Store Submission documentation.
In addition to signing your app you must sign libmono.dylib.
codesign --force --sign "3rd Party Mac Developer Application: XXXX" --entitlements yourapp.entitlements YourApp.app/Contents/Frameworks/MonoEmbedRuntime/osx/libmono.0.dylib
If you don’t have the required Keychain Access certificates you will need to create these using the Apple Member Center.
To build your final product run productbuild from the command line.
productbuild --component /YourApp.app /Applications --sign "3rd Party Mac Developer Installer: XXXX" YourApp.pkg
Where ”XXXX” is again from Keychain Access. This time, use the certificate beginning with ”3rd Party Mac Developer Installer”.
You are finally ready to submit your App! Before submission you must create your App on iTunes Connect and fill out detailed app information. After your app is created launch Application Loader and click on Deliver Your App. Choose the application you created in iTunes Connect from the drop down menu and follow the prompts to choose your .pkg file that was created with the productbuild command.
Your done! Click submit and, if all went well, you will see your app will be delivered to the App Store and be ready for review.
The latest version of OS X (Mountain Lion) broke compatibility with the vim and the OS clipboard. In most cases you can configure vim to use the operating system clipboard by setting clipboard=unnamed in your .vimrc. Unfortunately this setting does not work in OS X because the default version of vim was not compiled with clipboard support. You can check if your version of vim is compiled with clipboard support by typing vim –version and looking for clipboard. A prepended + means support is enabled. A prepended – means support is disabled.
So, how do we get clipboard support? By using Macports to install a new version of vim using the huge flag of port install. I also compiled with support for python, ruby, and cscope.
I’ve been working with Prime31’s Etcetera plugin for iOS development with Unity3d. There are a lot of great things in there but some of the documentation is lacking.
Anyways, if you want to show a local web page with the showWebPage command it is a two step process.
Copy the files you wish to access into a folder called StreamingAssets under your Assets directory.
Unfortunately this requires the user to use the file menu or the right-click button to save the image from the newly opened browser tab. I wouldn’t call this user friendly.
What to do? Enter PHP.
Permadi presents a technique using PHP and AJAX that is exactly what I need. After some tweaking here’s what I came up with.
The first PHP file saves the passed in canvas data to the server at a random location determined by the md5(uniqid()) method.
$data = $_POST['data'];
$file = md5(uniqid()) . '.png';
// remove "data:image/png;base64,"
$uri = substr($data,strpos($data,",") 1);
// save to file
// return the filename
We would call this via JQuery with the $.post method, filling the data parameter using the toDataURL method.
I’ve been getting familiar with the Leiningen build tool for Clojure but had trouble connecting to the Clojar and Maven repositories behind a proxy.
I ended up adding my proxy to Maven’s settings.xml and everything worked out.
You can find settings.xml at C:\apache-maven-X.X.X\conf\settings.xml and can edit it according to the conventions described here.
After editing the file run lein deps to download your project dependencies. If still can’t connect to the repository servers you may have to copy the settings.xml file to your .m2 directory at C:\Documents and Settings\username\.m2\settings.xml