Posts by jldavid

Displaying .SVG Files on Windows Phone 7.5

Posted by on May 7, 2012

I was attending a Windows 8 workshop last Saturday & an acquaintance I haven’t seen in three years came up and started chatting with me. He was trying to display an .SVG file in mobile browsers. It worked in all browsers except for Windows Phone 7.5. He was using the <embed> tag to bring in the external .SVG file to no avail – it would show up as a blank graphic on the screen.

I decided at that point to help him out. My first try was to attempt to include the external .SVG file using:

  • <img>
  • <object>
  • <iframe>
  • <frameset> (yes, frames)

All to no avail. It showed up blank in Internet Explorer no matter what I tried to use to embed the file. The strange thing is that if you accessed the file directly from Internet Explorer, the .SVG file would display no problem on the phone. The SVG file content would also display if you added the SVG code inline in the page (as opposed to an external file) – curiouser & curiouser.

With a little research, I came across the following MSDN article with guidance on embedding SVG into a web page to be optimally displayed in Internet Explorer: http://msdn.microsoft.com/en-us/library/gg589526(v=vs.85).aspx#inlineXHTML. As per the article’s recommendation, I used the <object> tag, added an .xhtml extension on the file and the .SVG image displayed on the phone as expected.

I may be wrong, but I think the source of the issue is that the browser was unable to bridge the gap between the HTML DOM and the XML DOM in the SVG file. By switching the HTML file to a valid XHTML file, the parser interpreted the document as an XML file within another XML file and successfully displayed the SVG image.

Here are official recommendations on how to choose between Canvas and SVG: http://msdn.microsoft.com/en-us/library/IE/gg193983(v=vs.85).aspx

 

Read More

Fixing the Infinite Reboot Loop on Google IO Galaxy Tab 10.1

Posted by on May 7, 2012

Last year, I was fortunate to attend Google IO and receive a Samsung Galaxy Tab 10.1. It’s a nice device, but a little temperamental - minor mood swings manifesting as unexpected crashes and reboots. I’ve had to tinker & revive it a few times over the past year – compared to the iPad, it’s definitely a tablet for geeks. The latest issue I’ve experienced is the infinite reboot loop which has been extensively documented on the XDA-Developer website. Apparently, a recent 3. 1 update from Samsung causes a file corruption issue, which then leads to the infinite reboot. To fix the issue, I followed these steps:

 

Read More

Certificate Problems on Samsung Galaxy Tab 10.1

Posted by on Apr 3, 2012

If you haven’t used your Galaxy Tab in a few weeks & start getting errors such as “Cannot safely connect to sever” when trying to configure email, visiting Google.com gives you SSL certificate errors and the Android Marketplace hasn’t switched over to Google Play, then chances are that that there is a problem with your root certificate. The fix is trivial (but unfortunately not obvious) – check the date and time on your tablet (if it has reset). Update the clock to the current date and time and everything should start working normally.

Read More

Setting up GIT & SSH on BitBucket

Posted by on Mar 31, 2012

Tried to set up SSH certificate using BitBucket’s documentation and found it woefully lacking and they recommend 37 steps to follow in order to complete the task. Even after following the instructions carefully – it wasn’t working out for me. My colleague Leo Tse recommended I follow GitHub’s instructions for setting up SSH (in five steps no less) and it worked like a charm. If you are having problems – check it out.

BONUS: git is now part of the installation package for Xcode 4+
Read More

Deploying Titanium iOS Apps using TestFlight

Posted by on Mar 26, 2012

Here are the five steps for deploying your Titanium Studio iOS apps using TestFlight. These steps were done with the latest bits as of March 26th, 2012. There is a lot of misinformation on YouTube & many of the existing tutorials apply to earlier versions of iOS and Xcode (for example, Entitlements are not handled the same way in the latest version of iOS). Hopefully, this tutorial will help you get off the ground quickly and avoid the potholes along the way!

  1. Set up your Development & Distribution Provisioning Profiles on the iOS Provisioning Portal:
  2. Set up a new project & add members in TestFlight:
    • Create an account & log into TestFlight: https://testflightapp.com
    • Setting up a new project is easy in TestFlight. Just select +Add Team and choose a name for your project
    • Add members to the team by entering their email addresses. You should include a message to your testers strongly urging them to open the email and click on the invite link using the devices they will be using to test on.
  3. Get your testers to sign in/sign up USING THEIR DEVICES:
    • I can’t urge you enough to encourage your testers to open their invites using their test devices. TestFlight has a quirk that it doesn’t necessarily recognize mobile devices after a user has set up their account. For example, if the user accepted the invite using Gmail on a MacBook Air and tries to access the link using an iPhone at a later date, it may not capture the UUID and the fact that it belongs to that tester. If this happens, you’ll pretty much need another email address for the tester and resend the invite as there is no easy way to input UUIDs per user.
    • Once you have the UUIDs, you can either copy/paste them or export them. You need to do these steps every time you add a new user/device:
      • Log into the iOS Provisioning Portal: https://developer.apple.com/ios/manage/overview/index.action
      • Add the new devices
      • Revoke your Developer & Distribution certificates
      • Create new Developer & Distribution certificates (including the new devices)
      • Download & install the certificates into your development environment
      • Build your project using the new Distribution certificate
  4. Build & upload an .ipa file in TestFlight:
    • In Titanium Studio, instead of deploying to your device, select “Distribute – Apple iTunes Store”. It will build an .app file which will be destined for Release rather than Debug (important)
    • When the Distribute window comes up, attach & build using your iOS Distribution Provisioning Profile as opposed to your iOS Developer Provisioning Profile (in my case, I called it multidev.mobileprovision – see Step 1). Otherwise, you’ll encounter an “Invalid Profile: distribution build entitlements must have get-task-allow set to false” error (see below).
    • In essence, you are trying to distribute an app using an iOS Development Provisioning Profile (meant for deployment on personal devices), rather than an iOS Distribution Provisioning Profile (meant for a team of up to 100 testers). The correct way of setting it up is shown below:
    • Once the build process is completed, you‘ll see <terminated> Application Packager and [INFO] Performing clean build in the Console status
    • Navigate to your Workspace using Finder. Your .appfile can be found in a directory like this one:
    • Create a folder called Payload (with a capital P at the beginning) on your desktop. Drag the .app file you built into the folder.
    • Control+click the Payload folder and select Compress “Payload”
    • A Payload.zip file will appear on your desktop. Rename it to <your app name>.ipa. You may want to include a version number to keep track of all the apps you’ve built – for example: Payload.zip renamed to AngryBirds.v1.0.0.ipa
    • Upload your new .ipa file to TestFlight (https://testflightapp.com/dashboard/builds/add/)
  5. Deploy your app to your testers:
    • Once the file uploads, you’ll have the option to send an email to all testers that (a) have devices registered by TestFlight and (b) are listed in the provisioning certificate. See below:
    • Next, all of your selected testers will receive a notification that a new build is available. They will be able to install your new app directly from the phone (as shown below):
Read More