iOS8 Widgets

Quick post, today I was asked to look in to making a simple iOS8 widget that displayed some contacts with status updates, A Widget is a kind of iOS8 extension that is part of your main app but a separate target.  The widget needed to be displayed under the Today notification center.

The first guide I followed showed that Apple had done a really good job on making this super simple!

iOS8 : Creating a Today Widget

Then I needed to share simple data between my parent app and the widget

Sharing NSUserDefaults between your app and a Today Extension on iOS8

The last bit was to make it clickable so that it took you to the main app

iOS8 Day by Day : Today Extension

iBeacon

A bit more fun than the normal day at work, I was asked to investigate iBeacons.  We had been sent 4 3rd party iBeacons to try out which had been setup with different Major and Minor settings and transmitting frequency (seconds).

To be honest, I did not know where to start, however a nice tutorial on Raywenderlich.com covered everything I needed to know to complete the tutorial.

iBeacons Tutorial

 

UISearchController and custom cells

I have just spent the last hour banging my head against the table and I thought I would blog about it incase others use UISearchDisplayController.

This allows you to add a nice search box to a UITableView, and is really easy to implement.

Except!
If you are using custom UITableViewCells, performing a search will not return the cell you think it is in cellForRowAtIndexPath.  It looks for a cell in the SearchController (not visible or in the storyboard), not your table that’s in the storyboard.

A simple fix that seems to work is. (fingers cross)

From:
TalkListTableViewCell *cell = [tableViewdequeueReusableCellWithIdentifier:cellId];

To:
TalkListTableViewCell *cell = [self.tableViewdequeueReusableCellWithIdentifier:cellId];

However custom height cell’s may require more work. See:
http://stackoverflow.com/questions/15892651/uisearchdisplaycontroller-not-correctly-displaying-custom-cells

Hack24 : Whats coming next?

So Hack24 has seen some downloads, and some regular players. 1.01 was a fast update to fix a few issues however 1.02 (which may become 1.1) will hopefully see quite a few improvements.

New stuff coming (hopefully) soon

  • Steal player buildings (done)
  • Rob player item (master key for players basically) (done)
  • Claim all money for buildings (would save a lot of time)
  • Scan renamed to probe. (done)
  • New scan item to list online players
  • Some in game help to guide you on your way (done in a basic way)
  • Avatar colour changes based on level / rank?
  • APN’s (may not make 1.02)
  • Some server securities (done)
  • More game levels (may not make 1.02)
  • Joystick improvements (done)

Near Future:

  • In game messaging
  • Customise buildings
  • Heads up display of near users  (may not make 1.02)

Don’t do server updates in your lunch break!

I decided to have a rest today as I have been training for a marathon and a few other things.  I thought this lunch break I would do some important fixes to Hack24 server.

DON’T do this, lunch breaks and servers do not mix.  

I assumed my fix would sort out the issues, it did, but it brought on a whole load of more because I cleared out some corrupted records and forgot the client side would have a cache that now does not match the server side.  Oh boy what a mess.

Backup, nope because I was rushing as it was my lunch break!

Luckily, one of my friends managed to do some database magic.  He will receive a burger on me .

So again, don’t do server upgrades at lunch time, it ruins your day when it goes wrong!

HACK24 : Submitted

2014-07-06 22.27.38

 

Finally, a month and a week late, the first version of Hack24 has been submitted.  Emotional moment, trying to write even a simple MMO single handedly is a massive task, trying to do it in a month with a family and full time job, is practically impossible.  I did it in 2 months 🙂

I will write more on it soon, enjoying a beer at the moment.

Version 1.0 supports (I wanted to call it 0.1):

Hacking, buying, entering, claiming from buildings

Scanning and Robbing players

Items allow players to teleport, scan, brute force hack, enter buildings, shield, speed up and invisibility.

I will be updating the website, and writing a how to play guide 🙂