Debug Certificate expired – ugh

I decided to complete an app I’ve been working on and post it to the Droid Market.  After makiing a few changes, I fire off the commands to compile it – rake run:android

after copiuos amounts of logging to the screen, I’m greeted with –

THIS TOOL IS DEPRECATED. See –help for more information.

Debug Certificate expired on 27.10.11 08:10
Error building APK file

Seriously?  Wonderful.

If or should I say WHEN you get this because apparently the debug certificates are valid for 365 days – here’s the solution –

Find and delete the file “debug.keystore”.  This is stored in your home directory under “~/.android” (OSX, Linux).  Similarly on Windows file resides in the “C:\Users\[user]\.android folder.

Just delete it, rm it, shred it, drag it to the trash, whatever.  Get it out of there.  A new one will regen much like I do in Black Ops when I get nailed by a zombie.  Its probably a good idea to do a rake clean:android as well, just to clean up from the failed compile, although this probably isn’t 100% necessary.

Now you’re good to go.

-Jon

 

 

 

 

Posted in Uncategorized | Leave a comment

Appcelerator – a second chance

I subscribe to the TechZing podcast and the two hosts, Justin Vincent and Jason Roberts have used Appcelerator for a couple projects of theirs and talk about it in many of the older episodes.  I had tried Appcelerator on my old windows box and it was a disaster. Could have been them, could have been me – didn’t care.  Then I moved to Mac – and tried it.  I still had problems, think I even tweeted about that back in February.

Since I respect the guys from TechZing and with the on going praise, I figured I’d try it again.  I googled how to remove it completely from my mac, just to make sure the old broken / mis-configured stuff was gone, downloaded and installed it.

To my amazement, it installed easily, and I was able to quickly open Titanium Studio (essentially eclipse customized for Titanium) and run a new empty app.  Granted it wasn’t an exciting app, but it did open in the simulator.  After about 40 minutes of dinking around, I was able to get everything in order (thanks Apple) and deployed it to my iPhone.  Again, no awesomeness in that app, but still – a huge leap.  Titanium has an app called Kitchen Sink – where they add all of their features, and show off the framework.  I downloaded that, imported it, and was able to deploy that on my phone as well.  This rocked.  10 minutes later, I had it running in the Android simulator. It only took 10 minutes because I had to get the Android SDK stuff in order.

Within an hour of downloading, I had both created and imported apps, built them, tested them on the simulator and deployed them to my iPhone.  Amazing.

Appcelerator uses Javascript as a programming language, yea, not just a scripty thing you use on a webpage, as the language. Pretty cool.  The code gets compiled using the device SDKs so so the deployed app runs natively on the phone.  This gives you access to the device’s features like calendar, GPS, accelerometer, camera, video, photo libraries, file system etc.

I have yet to really start playing around with it, but I’m planning on building an app for a friend, so keep watching this blog for that.

All in all – when I can go from download to deployment on my device in about an hour, that rocks. Titanium Appcelerator gets an A+ from me. Thanks Justin and Jason for influencing me to try it again.

 

 

Posted in Appcelerator | 1 Comment

ezSQL – database wrapper/abstraction layer

I was looking for a database wrapper / abstraction layer to use for PHP a couple weeks ago.  I’m working on a large PHP project and its using Oracle.  I started out with the app using oci calls throughout.  Launched the beta – and its working pretty well.    Now I’m going through cleaning up sections of code gearing up for a 1.1 release and thought I’d look for something to make the database coding easier.  Not that its difficult, but each database call is bloated with multiple lines of code for each call, I wanted something easier.  Enter ezSQL.

ezSQL was created by Justin Vincent – and its nothing short of amazing. ezSQL can sit on a multitude of databases including – mySQL / Oracle8/9 / InterBase/FireBird / PostgreSQL / MS-SQL / SQLite / SQLite c++ … I mean WOW.  One thought I had was to possibly have a development version of the database as MySQL – and the production version as Oracle.  The data structure won’t change, I’m pretty much building screens off of that, so table changes would be minimal. But seriously, in practice who does that ?  Hmmm, maybe me.  We’ll see after I get out from under the mound of work I have.  My problem is – while I have VPN access to the Oracle database, if I don’t have a net connection – I can’t work on the app – since I have no database, not good.  So this may help me be more productive, if I’m sitting at the pool waiting for my kids to finish swim practice, I can code, or if I’m out in the park or at my mother-in-law’s place (yea – she’s got no wireless).  Anyway, the more I think about this – I could easily create a config option as to which database to use.

Back to ezSQL…

Once configured (which took a whole 2 minutes, and that was because I moved the files from the demo into my app) you can make calls like this –

$users = $db->get_results("SELECT name, email FROM users");

Typically, results are stored in an object, but you can alter the call to return associative arrays, or numerical arrays.

So using the example above, you’d pull out the name and email like this –

foreach ( $users as $user )
  {
      // Access data using object syntax
      echo $user->name;
      echo $user->email;
  }

If you have just one row you use get_row, if you’re simply getting 1 item like a count, you use get_var.  A simple to read instruction page explains it all.  There are many examples on that page to help get you started.

Probably the best feature is $db->debug();  this little gem (can’t thank Justin enough for this one) spits out a pile of information about the query, as well as the data that’s coming back.  So if you’re having a problem with the database call – toss in this command and it’ll help you out.

Another gem is the $db->vardump($users); which displays the contents and structure of the variable / object.  Again great for determining what is happening with a query.

I know I sound like a paid advertisement for this, but the support was amazing too.  I had a problem with the version I had downloaded, and emailed Justin.  The next day – he fixed it right away and posted a new version, which is currently posted on his site (2.10)

Overall, this is a big win for me.

Posted in PHP | Leave a comment

Patching Samigo

So along with mobile development and other programming tasks, I also manage Sakai (at least the backend code portion).  Luckily I have a co-worker that deals with the user end of things.

With the release of 2.7 many sakai projects are being moved out of the core svn code tree and becoming ‘indie’ projects.  These projects are still included in the OOTB Sakai build, but they get pulled down and compiled during the main sakai build / deploy process.  In one aspect it makes it nice, because there’s less source code to wade through when looking for things.  On the other hand (which is actually the important hand) it makes it close to impossible to patch a bug, or add a custom mod to one of these projects if you don’t under stand this new architecture because the source is no where to be found.

This recently happend to me (had to patch Samigo – aka Tests & Quizzes) and it took a good long while to figure out what to do.  Here is a great article on what the new indie project process is like (thanks to my co-worker for sending me this link).  While that does a good job outlining how it all works and overall what you need to do, sometimes a newbie needs a hand held during the process.  I like to hold hands – so here’s what I’ve done.

Couple notes about my architecture :

  • I’m using Sakai 2.7.1 on Linux.
    • While windows processes _should_ be similar – I’m sure there will be some slight differences that I’m not aware of.
  • I have my sakai source located in /home/sakai/sakai
    • the first sakai in the path is the local user
  • Tomcat is located here in /home/sakai/tomcat

PART 1

Remove Current Samigo Files

cd ~/sakai
rm -rf .m2/repository/org/sakaiproject/samigo
rm -rf tomcat/shared/lib/samigo-*
rm -rfd tomcat/webapps/samigo-app*

**for grins I logged into Sakai and clicked Tests & Quizzes
to make sure the tool was gone.
If you get an error – this is a good thing.

Pull Down Samigo for 2.7.1

svn co https://source.sakaiproject.org/svn/sam/tags/samigo-2.7.1/ sam
cd sam
mvn clean install sakai:deploy
**now check to see if Tests & Quizzes work, log in and enter a site and click
   Tests & Quizzes  - this should be working

PART 2

Now Patch Samigo

Yea, remember what got me started on this ?  I needed to patch Samigo with the patch here

Dowload the patch and get it to your sakai machine   … somehow.

place it into your sam directory

cd ~/sakai/sam
patch -p0 < SAM-964.patch

follow the prompts

mvn clean install sakai:deploy

test to make sure the patch is there and working.

Pour yourself a drink, you’re done.

The process is actually easier than it originally sounds.  You can easily see how part 1 can apply to any indie project – you just create a new directory and pull the source down.  Just be sure to remove the current files from tomcat and your .m2 repository or else its possible if you do a big sakai deploy your changes may be overwritten.

Posted in The Sakaiatrist | 1 Comment

Base SDK Missing

If you ‘play’ around in XCode, chances are you’ve seen this “Base SDK Missing” message in your project.  This happens to me almost every time I try to use someone else’s sample project or demo app I’ve pulled, even sample apps from Apple.

There are two things you can check / change to make this go away and allow you to build your project :

Project | Edit Project Settings | General tab

– look at the Base SDK for all Configurations setting near the bottom of that screen – chances are it’ll be set to a version you do not have installed for one reason or another. Set it to iPhone Simulator 4.0 (or whatever version you have)

– this will also fix any missing libraries that display in red in your project files when the sdk is missing.

Now change to the Build tab (sometimes this works** see further below if it doesn’t)

– Look at the Base SDK – and if it does not match the option you set above, change it (iPhone Simulator 4.0)

** I think last time I did this, it actually did list iPhone Simulator on the build tab and I STILL saw the missing SDK message.

If after doing the above, you still see the Base SDK Missing message do this as well –

Project | Edit Active Target “yourAppName” | Build tab

– change Base SDK on that screen to iPhoneSimulator 4.0 – apparently these settings are separate configs.

This should now add a base sdk to your project dropdown, any missing libraries will now be linked and you’ll be able to build your app.

One further Note – obviously if you’re wanting or needing 4.1 or greater – set it to that instead of iPhone Simulator 4.0

-Jon

Posted in XCode | Leave a comment

We got blogged !

… Ok, our app got blogged, but still – how cool is that ?

Our first iPhone app and it made a review on someone’s blog, someone I don’t know for that matter.

Check it out here – http://blog.gisuser.com/?p=8249

Posted in Personal | Leave a comment

Nivo Slider

So my screensaver comes up and I have it grab the RSS feed from Smashing Magazine.com (my favorite website for inspiration and cool ideas).  It has a list of 40 Useful jQuery Techniques, so I click it to read the article, since jQuery is my framework of choice.  Scrolling down through, I see the typical items like tool tips, menu creators, and then the over used slideshows, I mean how many different ways can you slide pictures across the screen.

But one caught my eye, Nivo Slider (http://nivo.dev7studios.com/)  This is amazing.

Posted in jQuery | Tagged | Leave a comment