Blog Stats
  • Posts - 168
  • Articles - 0
  • Comments - 36
  • Trackbacks - 0

 

Tuesday, April 21, 2015

I’m pleased to announce


 

The SCAMBS Bin Collection App. is now available on Google Play.

https://play.google.com/store/apps/details?id=com.binaryrefinery.bincollections

 

SCAMBS Bin Collections - screenshot thumbnail

Wednesday, April 15, 2015

Watch App is Go!


My Easter project, was to build an update to my South Cambridgeshire Bin Collection App. Apple approved it to go onto the App Store this morning. Its now running on the Apple Watch (along with iPhone and iPad) If you live in SCAMBS download for free at - 

https://itunes.apple.com/gb/app/scambs-bin-collections/id596…

Wednesday, April 1, 2015

Pleased to announce


I’ve submitted for review my Bin Collections WatchKit App.    It took a while to get everything correctly code signed, but its done...

Sunday, March 29, 2015

iOS Grid Control


So,  after fighting it for a while,   I’ve realised that  most  line of business apps  need a grid control.    iOS just doesn’t have this out of the box,  we have UITableView and UICollectionView but they don’t really support the notion of a selectable or editable dataset of records with multiple fields that have dropped down from a database.

So, I’ve been building…   

Untitled

 

I’ve taken a UIScrollView and built a sub-class (UIGridView).    I’ve hand painted a header and a body view on-top of this.    I can set headers like this - 

    gvmaintain.addheader("Work Order", width: 110, sortable: true)

    gvmaintain.addheader("Job", width: 60, sortable: true)

    gvmaintain.addheader("Crop", width: 110, sortable: true)

 

 

I can add rows like this - 

      

    gvmaintain.addrecord(fields: [no,job_no,crop,field,plot,work_type,pickpriority,status])

 

I’ve implemented a delegate to pass back when a user has touched on a row

  func HitRowAtIndex(uigridview:UIGridView,index:Int)

 

I have gone as far as to implement properties to allow for read-only and multi-selection.

Futures.   I’m now looking to add sorting,  filtering and the ability to drag and drop change column order.

You have to wonder whether the alliance between Apple and IBM we will see a better out of the box solution in iOS 9?

 

 

Wednesday, March 18, 2015

Final Polishing of Apple Watch App


Its done,  my first Apple Watch App.   Ready to send to Apple when they allow submissions….

This

Saturday, February 21, 2015

Cross Platform with Raspberry Pi


So this is nice.   Being able to fully access RPI file system from a Mac.  Just tweaked 

sudo nano /etc/avahi/services/afpd.service

To get hostname all looking consistent (i.e Mac and PC all see Raspberry Pi having a standard name).    So now I can edit and add new files from Mac/PC seamlessly…    

NewImage

Thursday, February 19, 2015

Apple Watch - oData and Images


So its been a month since I started experimenting with making oData calls from the Apple Watch SDK.     I picked up the project again this evening.

I wanted to go beyond the basics and try and get some images out of the Northwind demo database,  and display those to my watch user.

 

I found that Northwind database really does date back to an original  Microsoft Access sample and all images in the database are prefixed with 78 bytes of stuff.

So this is what I did to extract the images from the Odata feed (in Swift)

 

func populate(ret:[NSObject : AnyObject])

    {

        

        if let records=ret["Data"] as? NSArray

        {

            var rec:NSDictionary=records.objectAtIndex(0) asNSDictionary

            var picstr = rec.objectForKey("Picture") as String

            

            let decodeddata = NSData(base64EncodedString: picstr, options: NSDataBase64DecodingOptions(0))!

            

            var range:NSRange = NSMakeRange(78, decodeddata.length - 78)

            var refinedData = decodeddata.subdataWithRange(range)

 

            

            var ourpic:UIImage = UIImage(data:refinedData)!

            self.ourimg.setImage(ourpic)

            


End result, images on an Apple Watch!

 NewImage

 

 

 

 

      

Wednesday, February 18, 2015

oData Offline, Worth The Wait?


So I’m syncing data to my App.   It all works well,  I’m looking at strategies now to disguise the (inevitable) synchronisation process.

 

At the moment, I have a nice Windows Mobile esq. form.   I’m sure I can improve on this...

 

IMG 2414

Wednesday, February 11, 2015

Odata Consistency


So I’m drawing to the end of a long day and a long project.    As you know I’ve been building an iPad client in Swift that uses Core Data and OData to provide offline and online access to Dynamics NAV.

A few observations - 

Odata is different depending on what you do,  criteria for a filter clause, is different to an individual clause.   You have to remember/guess what to URL escape when to use quotes/double quotes etc.

Don’t fear it.   Its powerful.   I’ve spent all my time in the front end,  not getting bogged down in adding web service methods for everything you need.

Its responsive.    If a field isn’t there or something has changed it tells you at runtime.    Add web-reference/service reference is just a million miles from this.

Its lightweight.   Everything is sent up and down in JSON format.   Speed is incredible.

 

Would I do it again?   Now that I have SWIFT libraries and extensions to base classes,  HELL YEAH!

Friday, February 6, 2015

SWIFT a property to set controls to visible


Fed up with typing .hidden=true ?

My brain only works with .visible = false 

Is it me, or does the World need this SWIFT extension?

Just add this in a file to your SWIFT app.

 

import Foundation

import UIKit

 

extension UIView

{

    

    var visible:Bool

    {

        get

        {

             return !hidden

        }

        set

        {

            hidden = !newValue

        }

    }

}

 

 

Copyright © Richard Jones