Friday, October 22, 2010

Updated Kindle for Mac now with Search and Text Highlight support

If you have Kindle for Mac, try opening the application and wait for it to be updated to get the new Search and Highlight features.

Kindle for Mac comes with the auto-update feature turned on. But if you still find yourself using the old version, try checking the Preferences option and select the "Automatically install updates" option to receive the latest version without prompts.

Below is a picture of the Search function for Kindle for Mac in action. The button to the left of the Search box is for the new Text Highlight support.



Thank you Amazon!

Tuesday, September 28, 2010

Facebook iOS SDK post to wall problem: facebookErrDomain error 10000

I was trying to post an image to a friend's wall using the Facebook iOS SDK and the DemoApp which comes with it.

I added a new button which posts a sample image using the Graph API


NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
kAppId, @"api_key", imagePath, @"picture", @"testing", @"message",
nil];
[_facebook requestWithGraphPath:@"USER_ID/feed" andParams:params andHttpMethod:@"POST" andDelegate:self];


but was getting the error:

facebookErrDomain error 10000

The solution was to add publish_stream to the list of permissions passed on to the [facebook authorize] method and finally got it to work.

NOTE: The image I posted to a friend's wall was from a publicly available link and not some binary data I have on the iOS application. For some reasons (and I find this really strange), Facebook does not allow posting an image from their domain to friend's wall using the Graph API.

Thursday, September 2, 2010

System.InvalidProgramException: Invalid IL code

I created a program in VB Express, tested it and added the application to our daily ANT build using Mono. I then made some modifications and re-compiled with mono. The compile process went well and the program was able to start properly. But when it reached a certain part of the code, I got the error: "System.InvalidProgramException: Invalid IL code".

I searched all over the web about this problem but was unable to find the root cause of the problem. I then decided to try out re-compiling in VS Express and was presented with lots of compile errors. That's when I realized that mono's compiler (specifically vbnc) is not as good as it's supposed to be (yet). And that you should still try to compile with VS every now and then just to make sure everything's working.

Lesson of the story: If you get this error, try compiling with VS to see if there are other problems.

Sunday, April 4, 2010

Apple Push Notification: Failed to register with error: Error Domain=NSCocoaErrorDomain

I'm currently working on getting Push Notifications to work in my test application using Urban Airship's service and got this message:

Failed to register with error: Error Domain=NSCocoaErrorDomain Code=3000 UserInfo=0x117520 "no valid 'aps-environment' entitlement string found for application"

I searched the web and most of the blogs/tutorials I found mentioned that I needed to create a provisioning profile in my iPhone developer account which is configured for push notifications.

I was pretty confident that my account was setup properly because I was already able to send push notifications before using an app id that I created so I assumed the problem was with my development setup.

Below are the steps I followed to make push notifications working again:

1. Check whether the profile you're using for the application is the one configured with push

Often times developers will have multiple provisioning profiles to test and develop on devices. In my case, I had a generic/wildcard profile (BLAHBLAHXX.*) for deploying on the device and another profile for an actual app configured for Push notifications (BLAHBLAHXX.com.companyname.appname).

I was using the generic profile when I checked so I had to switch that back to the profile configured for push. To edit your setting choose Project > Edit Project Settings > Code Signing and then choose the appropriate profile.

2. In case step 1 did not fix your problem (like in my situation), delete all the apps in your device which use the provisioning profile for push notification and perform a soft reset.

3. In Xcode, try to clean all targets. Reboot your machine (probably not necessary but it does wonders most of the time). Then re-build and deploy.

I was back in business with APNS after following those three steps.

HTH.

Tuesday, March 23, 2010

Fatal error: Call to undefined function wp_dashboard_setup()

I got this error in Wordpress this morning when trying to logon to the Admin pages:

Fatal error: Call to undefined function wp_dashboard_setup() in /home/username/public_html/wp-admin/index.php on line 15

I didn't make any changes or upgrades to the site and the weird part is that all of a sudden, two of our Wordpress installations were displaying this error.

UPDATE: March 24, 10:12 PM GMT+8 It looks like the problem is related to A2 Hosting changing the default PHP version (see Neil's post in the comments section).

I did some Googling and found a workaround.

The solution is to change this line in wp-admin/index.php:

require_once(ABSPATH . 'wp-admin/includes/dashboard.php');

to this line:

require_once('./includes/dashboard.php');

I'm still trying to investigate the cause of the problem but in the meantime, hope this quick fix solves your problem.

Thanks to Florent for sharing his solution. And thanks also to Neil for providing the reason for the error and a better approach to handling the problem for those who are with A2 Hosting.

Tuesday, December 29, 2009

Unable to read a jre library while constructing the blacklist

Yesterday I started playing around with Google App Engine and Java. Today, when I tried upgrading the JDK/VM that Google App Engine is using from Eclipse Galileo to Java 6 in Mac OS X, I got the error below:
com.google.appengine.tools.development.agent.impl.BlackList initBlackList
SEVERE: Unable to read a jre library while constructing the blacklist. Security restrictions may not be entirely emulated. /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/plugin.jar
The server is running at http://localhost:8888/

Fortunately, after a bit of searching I found a quick fix.

cd /System/Library/Frameworks/JavaVM.framework/Resources/Deploy.bundle/Contents/Home/lib/

sudo ln -s plugin.jar plugin2.jar

Details taken from: http://groups.google.com/group/google-appe

Wednesday, September 30, 2009

Eclipse 3.5 Galileo and SVN (Subversive)

With Subversive being an official Eclipse project (2007) and the recent Eclipse 3.5 Galileo release (2009), you may be wondering why Eclipse still does not have SVN support built-in.

But don't fuss, because it's not that hard to configure SVN support (using Subversive) with a few simple steps. This document aims to guide you with the install process.

The first time you try to run Eclipse Galileo and click any of the update sites, you'll probably receive the "Unable to read repository at ..." error like what is shown below:

Update Error

To fix this problem, simply select "Galileo" (or any other update site you wish to use) from the "Available Software Sites" link (Help>Install New Software) and click the "Test Connection" option on the right.

Test Connection

Click "OK" when done and select "Galileo" from the "Available Software" dropdown.

Available Software

From the Galileo Update site, choose "Collaboration > Subversive SVN Team Provider".

Collaboration Subversive

Click Finish/OK when done. Due to licensing restrictions, the connectors need to be installed using another update site.

To do this, simply "Add" the "Subversive SVN Connectors" Update Site: http://community.polarion.com/projects/subversive/download/eclipse/2.0/galileo-site/

Add Subversive Connectors Update Site

Select the Subversion Connectors you need (select all if you're not sure which ones) and Install.

Select Subversive Connectors

After the installation process, you will be  asked for restart of a Eclipse for the changes to take effect.

To see the available options for SVN, open the "SVN Repository Exploring" perspective.

SVN Repository Exploring Perspective

Hope this helps. Comments and feedback are much appreciated.

Thanks.