All posts by timmitra

now

Timothy A. Mitra

artist, podcaster, iOS Developer, Development Manager, technical consultant, lecturer, web developer, and technical writer. You can find many links on my Links Bio page. I’m also becoming active on Mastodon (see the links bio.)

In August of 2022, I spoke at the last 360iDev about finding work as an iOS engineer. We regret to inform you… finding a job as an iOS Engineer.
In November 2022 I gave a talk on Hacking Your Brain… with Brain Science

I’ve did some technical writing and evangelism for a Apple in 2020  that has “evangelists”, ending in Dec 2021.

In August 2021, I was interviewed about engineering iOS apps for a major Canadian bank – Decoded: The Art and Science of Building Mobile Banking Applications

I spoke at the first SwiftTO conference on August 13, 2019. Here’s a link to my talk. 5 Ways to Level Up Your Mobile Development. I gave a preview of the talk at TACOW on July 9, 2019.

I am currently a Senior Engineering Manager, iOS at SpotHero. Before that I joined TD Bank as a Senior iOS Developer  and subject matter expert, working on their mobile banking platform. I was promoted in 2017 to manager.  I got my first TD account in 1979 and I have been a TD Canada Trust client since the early 90’s. So it’s really cool to be working on the apps in at the TD Centre, which was created by one of my favorite architects, Mies Van Der Rohe.

I also host and produce the More Than Just Code podcast, which focuses on iOS development. It is a round table format including developers across North America. My current co-hosts are Jaime Lopez Jr, Mark Rubin,  sometimes Greg Heo and Tammy Coron. I also guest host on the RoundaboutFM podcast.  Aaron Vegh left the show in 2016.

Jaime Lopez Jr, Jonathan Kuehlien and I have been hosting a pop culture sci-fi podcast, Spockcast, centered around Star Trek: Picard and Star Trek: Discovery.

I am still working on iOS apps. This involves updating apps that I have produced for 2 For Life Media, Son House Productions and my own company, iT Guy Technologies. These are some pretty diverse apps in life style, entertainment, productivity and of course games. Apps you can check out are the Strombo ShowDevice Tracker and Geese Squad to name a few. 2life, 2life Baby, 2life Ultimate Wedding Planner, were sunset in 2021.

Under the hood, for those who are interested, I work primarily in Xcode with Swift, SwiftUI and Objective-C. I spend a lot of time with UIKit, CoreData, NSURLSession, AVToolKit as well as Sprite Kit and the requisite frameworks needed to manage content in apps. I can also be found wielding design tools to create artwork  and wire frames. Soup to nuts I wrangle all parts to iOS and OS X app development. I also do a fair amount of web development, mostly custom WordPress and app APIs that support the mobile apps.

For more than five years, I have been a member of the kodeco.com (formerly RayWenderlich.com) tutorial team. I have written a couple of tutorials but lately I have been part of the Articles Team. I recently was involved as Developmental Editor on The Swift Apprentice book which was published in October 2015. I am working on another new project headed up my Ray Wenderlich himself. Stay tuned.

2019 marked my 30th year of using Apple Macintosh computers. It was true turning point for me using Macs and computers in general. I started as one of a few people who worked full-time on a computer and now 30 years later we carry them in our pockets and wear them on our wrists. Access to information is taken for granted.

I am no longer able to teach iOS development outside of TD. My latest course is Swift 101, for persons interested in learning Swift for iOS and OS X. Ongoing courses are on iOS development introduction and advanced. I have also trained users on Objective-C, WordPress, and various Adobe titles for print & web.

During the week of Dec 14, 2015, I taught “Advanced iOS Development” online. We covered some advanced topics on iOS development and Swift.

I continue to provide consulting services in iOS development & IT and I am available for contract work.

Refactoring: Face ID/Touch ID for iOS 13 Update

Back in February 2015, my article on Touch ID was published on raywenderlich.com. I was written in Swift for Xcode 8. Every year or so i would update the article as an author on the iOS Team. Here’s a link to the latest — How To Secure iOS User Data: The Keychain and Biometrics – Face ID or Touch ID. A few months ago, I had to update one of my own apps for iOS 13 with Apple’s biometric identification framework, Local Authentication. My app was also still supporting Objective-C so here’s follow up on what I had to change. As a bonus you can also take your user to Settings in case they have disabled

First thing is to add Local Authentication at the top of the Login view controller.

#import <LocalAuthentication/LocalAuthentication.h>

Next create an action for the Touch ID method:

- (IBAction)touchIDAction:(id)sender {
  LAContext *myContext = [[LAContext alloc] init];
  NSError *authError = nil;
  NSString *myLocalizedReasonString = @"Used for quick and secure access to the test app";
  //...
}

After that we need to check if the device can support biometrics with canEvaluatePolicy and have an error ready.

Inside the touchIDAction add:

if ([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics 
error:&authError]) {
  // 1. successful steps
} else {
  // 2. Oops. There's a error!
}

Inside the canEvaluatePolicy, we’ll use evaluatePolicy:localizedReason:reply. The reply will have a block that either succeeds or fails with our error.

// 1. successful steps.
[myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
localizedReason:myLocalizedReasonString
reply:^(BOOL success, NSError *error) {
   if (success) {
      dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){
 //Background Thread
dispatch_async(dispatch_get_main_queue(), ^(void){
//Run UI Updates
// using a Keychain utility method to get the email and password
NSString *passwordFound = [KeychainUtils getPasswordForUsername:self->emailTextField.text andServiceName:@"My_app" error:nil];
self->passwordTextField.text = passwordFound;
self->usingSecureID = true; // a Bool I added to keep track
 [self loginAction:nil];
  [NSLog showWithStatus:@"Logging_In"];
  });
});
} else {
    // User did not authenticate successfully, look at error and take appropriate action 
   //I'm using a showAlert method to bring up a UIAlertViewController
   [self showAlert: @"There was a problem verifying your identity." withTitle:@"Error!"];
    return;
 }
}];

What do we do if there is an error enabling Face ID/Touch ID? It could be because the user has disabled the feature. What’s new is that we can now take the user to your application settings — without a hack.

Initially you can pop up an alert to inform the user. Added to UIKit in iOS 8, UIApplicationOpenSettingsURLString lets you add a button to the alert that will take the user to your app in Settings, where they can enable Face ID/Touch ID.

// Could not evaluate policy; look at authError and present an appropriate message to user
    NSString *title = @"Error!";
    NSString *message = @"Your device cannot authenticate using TouchID.";
    UIAlertController *alert = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
    UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault
                                                          handler:^(UIAlertAction * action) {
  // do we need to return animation?
                                                          }];
    // open your app in Settings
    NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
    UIApplication *application = [UIApplication sharedApplication];
    NSString *settingTitle = @"Settings";
    UIAlertAction* settingsAction = [UIAlertAction actionWithTitle:settingTitle style:UIAlertActionStyleDefault
                                                           handler:^(UIAlertAction * action) {
                                                             [application openURL:url  options:@{}
completionHandler:nil];
                                                           }];
    [alert addAction:settingsAction];
    [alert addAction:defaultAction];
    [self presentViewController:alert animated:YES completion:nil];
    return;
 }

The whole method would look like this:

- (IBAction)touchIDAction:(id)sender {
  LAContext *myContext = [[LAContext alloc] init];
  NSError *authError = nil;
  NSString *myLocalizedReasonString = @"Used for quick and secure access to the test app";
  if ([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) {
// 1. successful steps
[myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
localizedReason:myLocalizedReasonString
reply:^(BOOL success, NSError *error) {
   if (success) {
      dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){
 //Background Thread
dispatch_async(dispatch_get_main_queue(), ^(void){
//Run UI Updates
// using a Keychain utility method to get the email and password
NSString *passwordFound = [KeychainUtils getPasswordForUsername:self->emailTextField.text andServiceName:@"My_app" error:nil];
self->passwordTextField.text = passwordFound;
self->usingSecureID = true; // a Bool I added to keep track
 [self loginAction:nil];
  [NSLog showWithStatus:@"Logging_In"];
  });
});
} else {
    // User did not authenticate successfully, look at error and take appropriate action 
   //I'm using a showAlert method to bring up a UIAlertViewController
   [self showAlert: @"There was a problem verifying your identity." withTitle:@"Error!"];
    return;
 }
}];
} else {
// 2. Oops. There's a error!
// Could not evaluate policy; look at authError and present an appropriate message to user
    NSString *title = @"Error!";
    NSString *message = @"Your device cannot authenticate using TouchID.";
    UIAlertController *alert = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
    UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault
                                                          handler:^(UIAlertAction * action) {
  // do we need to return animation?
                                                          }];
    // open your app in Settings
    NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
    UIApplication *application = [UIApplication sharedApplication];
    NSString *settingTitle = @"Settings";
    UIAlertAction* settingsAction = [UIAlertAction actionWithTitle:settingTitle style:UIAlertActionStyleDefault
                                                           handler:^(UIAlertAction * action) {
                                                             [application openURL:url  options:@{}
completionHandler:nil];
                                                           }];
    [alert addAction:settingsAction];
    [alert addAction:defaultAction];
    [self presentViewController:alert animated:YES completion:nil];
    return;
 }
}
}

When going green turns brown

We bought a Multoa 60 at the Cottage Show in Toronto last fall, after years of research and debate on whether to get an incinerating or composting toilet. We were told we would need to by the XL version because we have more than 3 or 4 people at the cottage at a time. (Read this if you are considering buying the Multoa composting toilet.)

So we followed the installation instructions, even buying extra insulated sections for the chimney so that we could properly vent the toilet. It heats and evaporates excess liquid up a fan powered chimney from a second chamber at the bottom of the toilet.

However to our horror after two weeks of full time use the toilet’s tray became full and overflowed into the main chamber. There are two tubes that indicate the level of liquid in the toilet. However the tech support people who sold us the toilet NEVER mentioned that the liquid in the tube on the left indicates that the chamber is full of “liquid”. [I suppose they assumed we had the manual at the cottage.] BTW the “liquid” as quoted by the support guy – “The liquid will look like espresso but not smell like it.”

They only offer to berate us for overusing the toilet and for having poor ventilation in the cottage. It’s a fifty year old cottage – so it is no where near air tight. They claim that the toilet can only support 3 to 4 people even though the staff at the cottage show assured us that we would need the larger toilet – we told them that often there are up to eight people at the cottage.

We cranked the thermostat up to 10 (this one doesn’t go to 11) back in July and left the toilet running constantly – in a vain effort to eliminate the excess liquid. We kept the bathroom window closed to aid in venting… and contacted the the company who sold us the unit (There is only one in Canada – you figure it out) but they NEVER mentioned the liquid in the left tube. I should also mention that we do have an outhouse and that many of our male guests used the trees since we could seem to use the toilet.

I spent the better part of last week babying the toilet and trading notes with the company – via email. After days of back and forth… I finally went and bought a low flow ceramic toilet and reconnected it to our septic system. (I feel sorry for you if cannot use a septic system.) I started to bail out the toilet through the top opening. To my surprise I removed gallons of liquid from the UPPER chamber. I then started to empty the liquid from the silicon tube on the left. That was a comedy of errors as the tube easily comes undone – we had several spills of “expresso”. After hours of draining gallons from this tube, I finally had an inch of fluid in the left tube (I am going to retrofit a drain on this tube – and recommend you do the same.)

I then turned my attention to the right tube – by this time there was little or no liquid in the right tube… maybe it does work… so I opened the front access panel. Immediately a thick chocolate fudge-like liquid began to ooze out. We then lifted the whole toilet into our oversized shower so I could rinse it off. (Are you still reading this?) To my surprise there is a panel cover on the bottom of the toilet held on with double-sided tape. What a joke. If you are installing this toilet do yourself a favor and apply duck tape over the panel (12 x 18 inch best guess) – if your toilet gets wet this panel will come off.

After about eight hours of draining and cleaning up “expresso” I finally had the toilet back to the condition it was back in June. I had last sent the reseller a message stating the we would try the toilet again but if it had this problem again we would be returning it. If you’re looking for a testimonial on this product this is it – I cannot in all consciousness recommend that anyone buy this toilet under any circumstance. This opinion may change – but I doubt it.

BTW I found a page of people complaining about the same problems we experienced. Composting Toilets | Poopreport.com

More here.

here are some highlights:


We had a Biolet 20 Deluxe (US version of Mulltoa 20). It had 120v electric fan and a heater with a thermostat. We are off-grid and found this piece of sh_t to eat our batteries, as the fan required the inverter to be on constantly, and the heater draws 250W.

Biolet USA did call me, long distance, once to address a customer support email I sent. They claimed it was installed wrong, or the vent was blocked, or the room was too cold, on and on….
Also, it did not evaporate the piss fast enough, so we ended up with it overflowing the tray once, plus the “indicator tube” leaked, so the pee left the tray and was pooling in the bottom of the unit.
We are a couple, using the toilet on weekends and peeing outside and TRYING to wait and poop at work on weekdays- it still doesn’t work. The tray contained soaking, stinking (horrible) wet raw sewage all three times I emptied it in 4 months. This unit was advertised as needing emptied once every 6 months with 3-4 people and full-time use.


My comments reference a Biolet purchased from Home Depot. Fan, mixing mechanism, heating element, blah, blah, blah. Two months into the experience we’ve had a liquid overflow, sheared pin. Liquid level stays high no matter what temperature setting we use. Tech support is useless. They can’t even send out the shear pins (non standard size so not locally available) on a timely basis. Maybe they should supply a couple extras with the new unit????? DUH! My plan is to haul the whole rotten mess outside, clean it out, replace the pin and start the process over. I’m all for giving it a fair chance, but a little voice keeps telling me I’ve been had. If I can’t get this right after 6 months, I’ll be shopping legal options to have these things outlawed!!!!!!


yep.. just bought a Multoa60 (Biolet XL in the states I think), Swedish technology, about a month ago for our cottage. Nothing but problems so far. Have already had to replace a faulty thermostat. It is simply incapable of evaporating the urine even at the highest temperature setting and the composting chamber is just a big pile of very soggy poop-mulch which strains the mixing arms. I’m sure the pin on the drive arm will shear soon.

I’m still working with product support to iron out the issues but have lost all confidence at this point. I will re-post an update if/when issues are resolved but am not betting my bottom dollar…since I’m broke after paying an arm and a leg for this boner…


iPhone needs MultiFinder

The iPhone needs the MultiFinder from System 6 to make it truly functional. Then we can truly say that it is the best cell phone for the 1990’s!

I don’t how many of you remember System 6 (or earlier) when Macs needed MultiFinder to run more than one application at a time. Ok, yes, System 6 had MultiFinder – but it crashed all the time and it didn’t become an “all the time app” until System 7 debuted. With System 6 you opened an application in the Finder – which would quit to get out of the way and free up memory – then you ran your application. If you wanted to go back and rename an folder or move things around you had to quit the running application so you could return to the Finder. The same was true if you wanted to open another application – you quit to return to the Finder and then launch the second application.

How is this any different than iPhone 2.1? You can open an app in Springboard but if you want to do anything else you press “Home” to go back to Springboard then open the other application. If you want to email a picture the iPhone quits the Photos app and launches Mail and creates a new message with the photo attached. 

When I ran System 6, I had an application called Disktop which was a “Desk Accessory” and I could run it with a running app. I could rename a folder, move or copy a file from one place to another and even switch to another application – without going to the Finder. Hmmm.

So it begs the question: When is System 7 coming out for the iPhone or when is someone going to – or be allowed to – develop DiskTop for the iPhone?

Anyone?

Anyone?

Apple?

Anyone?

Run and get iPhone 2.01

As you might have guessed, I’ve been using an iPhone for about 6 months or so. I was really disappointed with the speed of the new iPhone 3G. For instance my Contacts app would take 45 seconds to load. After upgrading the bug fixes in 2.01 update  – the Contacts app loads in less than 10 seconds.

I highly recommend it!

Rogers threat to iPhone 1.0

Rogers continues to threaten to cut off “unlocked” iPhones even though Apple seems to be OK with it. In an notice they say, “At this time there are NO Provision to sell these units outright or to unlock and / or sell unlocked units.  Rogers has advised that units which are sold outright and / or unlocked will not be allowed on the network.” What that means in action is anybody’s guess.

In case your wondering they can tell what kind of phone you are using because the iPhone’s IMEI number identifies itself. International Mobile Equipment Identity or IMEI “is only used to identify the device, and has no permanent or semi-permanent relation to the subscriber. Instead, the subscriber is identified by transmission of an IMSI number, which is stored on a SIM card which can (in theory) be transferred to any handset.” – From Wikipedia

Further Rogers says:

Unauthorized modification to iPhone

Your iPhone is restricted to use on the Rogers network, unless you are roaming. If you attempt to unlock your iPhone and use it on another network, it may become permanently unusable. Making unauthorized modifications to the software on your iPhone violates the iPhone software license agreement, and any resulting inability to use your iPhone is not covered under your iPhone’s warranty.”

Looks like Canadian iPhones are in short supply

It’s no surprise that just as Rogers reduces it’s data plan cost – Apple short ships iPhones to Canada. Rogers just announced that it would offer 6GB/mo for $30 as a special promotion  – while at that exact moment (or perhaps earlier) the iPhones arrived at the Rogers dealers. Only 20% or less of what was actually ordered arrived.

We where supposed to get some phones set aside for us – now it looks like only new activations early on Friday morning will get the iPhone. Does any one know where I can get a Nintendo Wii?