Swift Template Framework

January 4, 2017 Mobile , ,

I have noticed a few common patterns being used throughout my contracting career, so i have decided to make a simple template framework which masks all the hard work with networking. I will continue to add to this library to make it a very handy toolkit to use.
The idea of the framework is for people to fork a version and then customise it for their individual usage.

https://github.com/Reedyuk/SwiftTemplateFramework

Its still a work in progress and I’m hoping to use it in my other projects too.

TDD – Just a buzz word? or is it really needed?

June 6, 2016 BDD, Mobile, TDD , , , ,

Well i have been so busy over the last year working with startups in London, so my apologies for not updating sooner.

I have been looking for a new contracting role recently, and i have seen so many roles that require TDD and I know that these companies are just using it because it’s the current buzz word in tech. I would argue that BDD and TDD both have their own place, I have been a keen advocate to say that interfacing platforms, e.g. iOS, Web, Android, etc should be BDD because the user interacts with their behaviour, not programmatically or mathematically. In addition to this, the interface is forever evolving so the cost of refactoring a TDD interface is significantly higher than a BDD interface.

In my opinion TDD should be used for the API layer where most of the business logic will exist, this logic usually won’t change once its established and everything created in the API should have unit tests.

For the interface, that’s why UI Unit tests exist e.g. selenium, calabash, ui unit tests(Xcode), so if your interface does have some business logic, then yes write a unit test, but there is no need to have the whole app written in a TDD way!

I think the lack of understanding of TDD and BDD is a problem for businesses right now, they should be relying on their tech lead & architect to determine where and when to use the correct methodologies.

A great real world example is a company who will remain unnamed, a friend of mine mentioned they are looking for permanent staff who can develop in a TDD environment and use a specific tool/framework! I found it laughable that they have such requirements, clearly the person who is in charge of hiring employees is blind sighted to thought that you can find a permanent TDD developer who can write in this framework. What they really should do is re-evaluate their current infrastructure, determine where to use TDD and BDD, re-organise current employees and then look at hiring the correct personnel. If they need a TDD developer, then hire a TDD developer but don’t put the requirement that they must have experience with a particular framework, there is frameworks popping up left right and centre and the current framework they are using is probably out of date already in the first place!

Symbolicating crash reports in iOS

March 28, 2015 Mobile , ,

We have all been there, getting a crash report and the stack trace makes no sense because its not been symbolicated properly. I found this really handy tutorial that goes through every step to symbolicate manually instead of relying on the “magic” to happen. The blog post goes into a good level of depth on how it works and how to do it yourself.

http://possiblemobile.com/2015/03/symbolicating-your-ios-crash-reports/

 

IPA Assets

March 26, 2015 Mobile

I have uploaded my ipa assets project to github publicly so that anybody can use it.

https://github.com/Reedyuk/IPA-Assets

IPA-Assets allows you open an ipa file from the app store and get the images from it, it can be quite a handy tool when you want to understand how other apps work with their assets.

Future of mobile communications to businesses

March 26, 2015 Mobile

I have been really busy working on a few contracts this past year and I have started to get a good grasp on how the market is moving.

An interesting subject is digital communications with businesses, its now becoming a fast trend within the mobile market for apps to allow users communicate with businesses.

I guess the one of the major apps out there is Uber, you now can order a taxi without even speaking to anyone. So if you can order a taxi without speaking to anyone, then why not do this for every business? well actually this is happening,

I predict there will be a flurry of apps which will provide a service where you type in a message to the business, somebody on the other end gets the message and contacts the business and relays that information. There is already a few apps trying this, namely Path Find, it allows you to send a message to a business and they will relay that information back, at the moment they are covering bars and restaurants. Here is a screenshot of me trying out their service.

pathFind

So really, its just a matter of time until you will have true unity and all apps will allow you to “chat” with the business digitally. If you haven’t had chance, you should watch Facebook’s keynote at F8, the new update to the messenger app allows you interact with a business when you make an order, so you can amend your order and even get its delivery status. Facebook are looking into payments via the messenger app, so this process is going to be very seamless, from start to finish using the messenger app.

Alcatraz – xcode package/plugin manager

January 11, 2015 Mobile , ,

I discovered a nice plugin manager for Xcode, its called Alcatraz, you can get it from here http://alcatraz.io/

You can download a range of items to enhance your experience with Xcode, from Themes to plugins. I found that although Xcode is an excellent IDE, after using Android Studio(essentially Inteli-J), there is some items lacking. Alcatraz has a range of plugins which address some of these issues.

I have currently installed:

AdjustFontSize – Simple plugin to zoom in and out with the CMD +/- keys

CocoaPodsUI – A CocoaPods UI, to save me having to navigate to the project directory and perform an update.

DBSmartPanels – Automatically hides the panel when not in use, I find that you lose alot of screen real estate when you have all the panels open, this plugin will auto hide it when you switch views from an interface file to a code file.

FuzzyAutocomplete – Why have Apple not done this already!? Simple plugin which applies fuzzy matching when showing autocomplete.

RTImageAssets – Since the release of the iphone 6+, most apps should have @3x images, this means additional time in photoshop having to produce the images in an additional resolution, this plugin makes life alot easier, I only have to make the image in the @3x resolution, then get the RTImageAssets to generate the other resolutions.

Core-Data Debugging

November 3, 2014 Uncategorized

Recently I have been working on an iOS project which was using Core-Data for all model objects. I found it frustrating that I couldn’t inspect the data going into the Core-Data, I’m surprised that Apple haven’t released some form of tool.

Anyway, after an internet search, I found a tool called “PonyDebugger” it a simple tool which allows you to inspect the Core-Data objects during using the app.

You can download it from here

Installation is simple and it is very easy to get started.

To run the service:

ponyd serve –listen-interface=127.0.0.1

Then install the library into your application using cocoapods

pod 'PonyDebugger', '~> 0.4.0'


Then put this in your appdelegate:

PDDebugger *debugger = [PDDebugger defaultInstance];
[debugger connectToURL:[NSURL URLWithString:@"ws://localhost:9000/device"]];
[debugger enableCoreDataDebugging];
[debugger addManagedObjectContext:self.managedObjectContext withName:@"My MOC"];

 

iOS 8 Metal Tutorial with Swift: Getting Started

September 27, 2014 Uncategorized

There is an excellent tutorial from Ray Wenderlich

http://www.raywenderlich.com/77488/ios-8-metal-tutorial-swift-getting-started

The only issue i have found was that the suggested project wont compile, probably due to library changes by apple. I have now edited and updated the project and you can download it here:

HelloMetal

 

 

 

Chisel ios LLDB debugging tool

August 17, 2014 Mobile , , , ,

Wow and another great release from the Facebook engineering team, this little tool is an excellent addition to the lldb tool.

https://github.com/facebook/chisel

If you are like me, when you debug you usually put a breakpoint in and then print out objects in the lldb console, well now facebook engineering have released chisel, this tool adds extra commands to the lldb. Here a few to name:

Command Description
pviews Print the recursive view description for the key window.
pvc Print the recursive view controller description for the key window.
visualize Open a UIImage, CGImageRef, UIView, or CALayer in Preview.app on your Mac.
fv Find a view in the hierarchy whose class name matches the provided regex.
fvc Find a view controller in the hierarchy whose class name matches the provided regex.
show/hide Show or hide the given view or layer. You don’t even have to continue the process to see the changes!
mask/unmask Overlay a view or layer with a transparent rectangle to visualize where it is.
border/unborder Add a border to a view or layer to visualize where it is.
caflush Flush the render server (equivalent to a “repaint” if no animations are in-flight).)
bmessage Set a symbolic breakpoint on the method of a class or the method of an instance without worrying which class in the hierarchy actually implements the method.
wivar Set a watchpoint on an instance variable of an object.
presponder Print the responder chain starting from the given object.

These tools are really handy, especially if you are battling with Autolayout problems, clearly somebody at Facebook was having problems and decided to make a tool to make life easier, well thanks, its a really good idea!

Installation:

A pretty simple install, make sure you have homebrew installed, then its just a matter of:

brew update
brew install chisel

Then you just need to add a .lldbinit file to your home directory, essentially this is like you .bash_profile, but for xcode/lldb. So this is how i did it.

cd ~

touch .lldbinit

vi .lldbinit

Then once your in vi, just paste in:

command script import /usr/local/opt/chisel/libexec/fblldb.py

Then restart xcode and it should work straight out the box.

 

Finally, Apple have closed the gap with Swift

June 3, 2014 Mobile No comments

Swift sounds exactly what objective-c has been missing and all of the other competing programming languages have supported.
– Generics
– Closures
– Multiple return types
– Namespaces
– Type inference
– Operator overloading

I cant wait to get my hands on it and have a play, also there is a ibook available from apple which goes into detail about Swift.

%d bloggers like this: