Coins for iOS

April 12, 2018 by Paul Cook

Preamble

Coins iconOne project that has been on the back-burner for too long is Coins for iOS devices. This project page will highlight major milestones for the development of this app.

If you have any ideas, comments or questions, please add a reply to the bottom of this page.

Unlike Stamps2Go and GedGap2Go which shared data across devices based on a transaction notifications and logs, the Coins iOS app will be document based and be a different target OS to the existing Coins project, sharing not only the same data model but classes and structures as well.

If this new approach works well, it will be deployed for new iOS versions of Stamps and GedGap. The existing iOS apps (Stamps2Go and GedGap2Go) will be retired.

Updated April 26, 2018

Feasibility

The feasibility of document based iOS coding can be attributed to learnings from “iOS 11 Swift Programming Cookbook” by Vandad Nahavandipoor (O’Reilly). Copyright © 2017-2018 Vandad Nahavandipoor, 978-1-491-99247-0.

For chapter 5, reuse the Core Data from prior iOS apps (e.g. Stamps2Go) but revisit it for any changes in latest SDK and different style and approach;

Core Data is without a doubt the standard and best way to store large amounts of data and structure your data object models in an iOS application. In this chapter we will focus on the fundamentals of Core Data and how you can leverage its power to not only store your data, but also search for it using queries and retrieve it as managed objects (Preface page xi, Nahavandipoor, 2017).

From chapter 9, the ability to create, open and save Coins databases in iCloud resolves our feasibility concerns. A summary of the chapter contents is;

We’ve had the ability to develop apps that take advantage of iCloud data storage for a while now, but never have developers been able to present an iCloud document browser to their users, allowing them to create documents right in iCloud from within this system UI. We now have a view controller that functions as a built-in document browser that is easy to use in and integrate with our application. User can now open and create iCloud documents without ever leaving your applications. In this chapter you will learn all about the document browser view controller and how you can harness its power to create document-based applications (Preface page xii, Nahavandipoor, 2017).

Updated May 10, 2018

Core Data

Vandad had some nice code that I though I would share but to put it in context (no pun intended), the data model has two entities, car and person with a many-to-one relationship (i.e. many cars can be owned by one person).

Data Model Car-Person

The code for transversing the car object is sublime (i.e. the forEach loop on the enumerated cars object);

if let cars = person.cars?.allObjects as? [Car], cars.count > 0{
  cars.enumerated().forEach {offset, car in ...

My usual approach is more like this;

if let cars = person.cars?.allObjects as? [Car], cars.count > 0{
  for (offset, car) in cars.enumerated() {...

But, the strong points of this chapter is the discussion on predicate and background operations. The predicate discussion walks through many typical filtering and searching of a specific person, person matching some criteria and then searching via a relationship. The background operations is a showing batch task of writing many records with appropriate error checking as well as verification. Solid chapter and one I will likely return to doing the project build.

Attribution: Data model and code in chapter 5 “Core Data” from “iOS 11 Swift Programming Cookbook” by Vandad Nahavandipoor (O’Reilly). Copyright © 2017-2018 Vandad Nahavandipoor, 978-1-491-99247-0.

Updated May 16, 2018

Document Based Apps

Vandad’s starts this chapter by setting up the App Delegate as a delegate of the UIDocumentBrowserViewController and modifies the plist to allow for document based apps. So far so good. The section covering associating a file type with your app was detailed and well explained but it is using graphic images which seem to be a fallback for technology authors to use (probably due to availability) rather than using a custom file type. That been said, Vandad did explain how to manage custom file types but given the other material covered, for example, the car example from the prior chapter would have been more meaningful in my opinion. More to come…

Updated June 11, 2018

Project Deadline

Afew support issues and other factors have lead to a push-back on the expected delivery of the Coins for iOS app. I am performing more research so as to produce a better final product as we relaunch back into the iOS world. I am currently reading “Programming iOS 11″ by Matt Neuburg (O’Reilly). Copyright 2018 Matt Neuburg, 978-1-491-99922-6.


Project Type: Coins for iOS
Project Tags: planning feasibility


Advertisements

One Reply to “Coins for iOS”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.