9th June 2018 | 33 RPM
In this year's Platforms State of the Union at WWDC18, Apple reiterated that they are deprecating support for 32-bit Mac apps and frameworks and will fully stop supporting them after macOS Mojave. Apple explicitly showed on a presentation slide that their aging Quicktime framework is one of the casualties, which is a vital piece for 33 RPM to function.
Apple also hinted at something they are working on where they will bring over certain elements of the iOS UIKit framework to the Mac sometime next year, which might aid in the ability to more easily write apps which can run on both the iOS and Mac platforms. We have only been given a brief acknowledgement that this is in the works, but we likely won't have any concrete details for at least another year. Yet, it entices some interesting ideas.
As I mentioned in an earlier post, I've entertained the idea of making an iOS version of 33 RPM to supplant the horrid native Music player, so if I do rewrite this app, it might be useful to wait and see what the Mac version of UIKit brings, so I might be able to support multiple platforms.
If the promise of the cross-platform UIKit does pan out, it still will require a heavy investment of time and effort to update 33 RPM to work with the modern frameworks. These are merely ideas I'm considering at this point, but for now, 33 RPM should continue to run on macOS for at least the next year without any major issues.
1st June 2018 | Permanent Eraser
Permanent 2.8.0 has been released, which features the ability to delete write-protected files, such as files owned by another user. The system will ask for administrator credentials to use this feature. Due to Mac App Store restrictions not allowing for granting administrator privileges, this version of the app will only be available for download from the Edenwaith website.
This is the version of Permanent Eraser I have been looking forward to for a long time. With this release and the recent addition of the Erase Free Space Automator action in Permanent Eraser 2.7.2, two long standing features I (and other users) have wanted have finally been added to this app. A lot of features and improvements have gone into Permanent Eraser over the years, and this is the culmination of all of the major features I wanted to include in Permanent Eraser 2.
The Future of Permanent Eraser
Aside from any patches, this is expected to be the last major release for the Permanent Eraser 2.x line. It's been a fourteen year long trek from the initial release of Permanent Eraser 2.0 in April 2004 to today's version. There have been numerous changes in the world of computing since then, but none of have affected Permanent Eraser as much as the change from mechanical hard drives to solid state drives (SSD). It's time for a change.
The first fledgling ideas for Permanent Eraser 3 emerged in 2007, and the next incarnation formed in 2014, so the ideas on how to reimagine Permanent Eraser have been floating around for a number of years. Permanent Eraser was made to securely erase files on hard drives, but that need has declined precipitously over the years, but it leaves open the possibility of solving some new, interesting problems which have arisen over the past few years. There are a number of intriguing ideas I'm eager to explore with the next version of Permanent Eraser.
Permanent Eraser 3 will be a massive rewrite and require an extensive amount of time and effort, so I do not expect the next version to be released for at least a year or more. Permanent Eraser has long maintained an extensive backwards compatibility with older versions of the Mac operating system (PE 2.8 is still works on PowerPC Macs!), but that legacy support will be dropped and PE 3 will likely require at least OS X Yosemite as it makes use of more modern features and capabilities in current hardware and software.
Permanent Eraser 2 has had an amazing run with thousands and thousands of users, and this has become one of my favorite projects I've developed. I look forward to see where I can take this app in the future.
21st May 2018 | Programming
After three years, I have finally been able to upgrade the system software on my HTC One M7 (HTC6500LVW) phone from Android 4.2.2 to 5.0.2. I had previously used a Google Play version of this same phone before at a previous job and had encountered no problems in upgrading the operating system to 4.4 KitKat (which was the most recent version of Android at the time). However, whenever I tried to upgrade my current phone from its stock 4.2.2, there was no response. I looked into what it would take to try and upgrade the phone to Lollipop manually, but directions were confusing and inconsistent, often reliant on which carrier the phone was tied to, as well. One thing might work for GSM phones, but not for CDMA phones, et cetera. It was beginning to look like I would need to bypass certain securities and then root the phone before being able to upgrade the software. It shouldn't have been so complicated.
Oddly enough, it was when I was trying to restore an iPhone 5S back to factory settings did I stumble across the solution to be able to upgrade my Android phone, as well. I was erasing and then restoring an older iPhone for testing purposes, but one glitch I encountered was a SIM card needed to be in the device to properly finish the setup process. This iPhone was originally set up on AT&T, but I had a Verizon SIM card available for a similar model of phone, but that did not work, unfortunately. However, I did have a number of other older phones which had originated on AT&T. I first tried the SIM card from an iPhone 4S, but it was larger than the SIM card found on the iPhone 5/C/S models, but I then noticed it was the same size as the SIM card required in the HTC One, which did not have a SIM card since I had purchased the phone from a fire sale clearance.
Curious, I put the AT&T SIM card into my Android phone, which was set up for Verizon. Considering the earlier failure trying to set up the AT&T iPhone 5S with a Verizon SIM card, there were no expectations that this would work, but it was worth trying, at least.
Previous attempts to check for available software upgrades had always failed. I was pleasantly surprised to find that once the phone had a SIM card present that it was able to find software updates. The entire process took several hours since the phone had to upgrade to each to each iteration (Android 4.3, 4.4, 5.0) before stepping to the next version, plus updating any new software that was made available with each update.
All these years I had investigated convoluted methods to upgrade the software and the ability had been available to me all of these years. (sigh). All I needed to do was add the SIM card and it was ready to go.
19th May 2018 | Edenwaith
Welcome to the fifth iteration of the Edenwaith blog. The original incarnation started as a development log with many small updates (micro-blogging years before Twitter was even started) with a couple of longer form posts interspersed. The second version of this blog was a short lived WordPress blog. I did not care for the lack of the visual customization so it would properly match appearance of the rest of the Edenwaith site, and the performance was horrendously slow, so I quickly replaced the WP blog with my own custom solution, which mixed PHP and RSS. In 2011, the blog migrated from using an XML file to a database to help correct several issues.
Which brings us to today. In the efforts to revamp the entire Edenwaith website, the blog has been relocated to a more memorable
www.edenwaith.com/blog URL, improved responsiveness for different screen sizes, and pagination so the entire blog isn't crammed into a single page. In determining the best way to go about implementing pagination, it was nice to see that my ideas were pretty much spot on with what others have recommended in their own approach. It's encouraging to see that after 20+ years of programming that I'm getting the hang of this from time to time.*
* This is intended as a very tongue-in-cheek statement with an included sly wink and grin. Programming can be a very rewarding and daunting endeavor, but it is notoriously difficult and frustrating at times, so programmers love to celebrate their victories, no matter how minor or major.
7th May 2018 | Tutorial
Last year, I took on the arduous task of archiving around 200 old floppy disks. The last time I had done an archive was back in the late 90s, so it was a good idea to go through this process while there was still the necessary hardware available to back up these old relics of digital storage.
Most of my floppy disks were 720K or 1.44MB disks for the PC, with a handful of 800K Mac formatted disks. Since I haven't owned a computer with a floppy drive in it for many years, I went in search of an external floppy drive that would be able to read both 720K and 1.44MB disks. I found a number of products like this which claimed to work with 1.44MB disks, but most products were not very clear if they did or did not work with the older 720K format. Buying a drive off the internet and hoping that it would work with 720K disks was a bit of a gamble. User comments were varied in how reliable these drives would be with the disks.
I visited a Micro Center and they had two types of external USB floppy drives available. One of the drives was in a nondescript, tan cardboard box that was easy to open up. This drive is similar to the package I picked up at Micro Center for around $15 USD (just without the IBM logo). Disk Utility identifies this as the Y-E DATA USB-FDU (USB floppy disk drive). The back of the drive identifies as a Model: FD-05PUB.
The Micro Center staff was accommodating to let me try it out and see if my 1.44MB and 720K disks worked on Mac and/or PC. The Mac didn't initially seem to have any luck with the 720K disk (I later discovered that particular disk was probably dead, since Windows couldn't read it either). But Disk Utility did see the 1.44MB disk appear. When I went over to a PC (running Windows 7), it was able to see both the 1.44MB and another 720K disk which did work.
At home I tried another experiment and hooked the drive up to an older iMac running Snow Leopard. It was able to see any functioning disk I used (both 1.44MB and 720K). I was able to create a disk image off of a floppy, as well. One sad reminder about this relic of a technology — it's slow! Fortunately, even though some of these disks were well over 25 years old, they were of a higher quality than the floppies made in the late 90s (which tended to be a whole lot less unreliable). Of the 200 disks I archived, only about 1 in 10 had any major issues (compared to the Zip disks I also tried to back up, and nearly every one of them was dead or in the process of dying). Of those few floppies which had some bad sectors, I was still able to recover some of the contents by using the command line utility
sudo dd bs=512 if=/dev/rdiskXX# of=/path/to/foo.dmg conv=noerror,sync
In this example,
rdiskXX# represents the path to the floppy disk, and it then scrapes the drive and dumps the readable content to a disk image. Use Disk Utility to get the
/dev/rdisk path for the floppy drive. This was a welcome workaround to try and partially recover some files, versus having to throw away the entire disk.
800K Mac Floppies
This USB floppy drive did a great job in reading the PC-formatted disks, however it was not able to read the 800K Mac-formatted disks I had. Unfortunately, the Macs of the 80s and 90s which wrote out to 400K and 800K disks used a variable speed head, which allowed a little more data to be written to the disks, versus a PC-formatted disk. This also leads to that PC floppy drives cannot read these disks. The SuperDrive was introduced in 1988, which could also work with high-density 1.4MB floppies. I have a Macintosh SE, but it is the 1987 model, which predated the addition of the SuperDrive (which didn't happen until 1989). If my Mac had been equipped with a SuperDrive, backing up and archiving the Mac floppies would have been relatively simple by copying the contents of the original Mac floppies to the Mac and then copying the contents to a 1.4MB disk and then carrying that over to a modern system for backup. No such luck here, so I needed to find another way to be able to transfer the data from the 800K floppies to a modern computer.
One option to extract the data off of an old floppy is to use a service like RetroFloppy. This is a good option if you have some old floppy disks, but don't have a way to read them. RetroFloppy can handle pretty much any old type of magnetic storage, including Atari, Amiga, Commodore, TRS-80, CP/M, IBM-PC, Apple II, etc.
Some people have taken the route to purchase networking equipment and connect an old Mac up to an AppleTalk network, which might involve a not-quite-as-old Mac, and then transfer the files that way. I did make use of extra hardware, not by networking, but by emulating a floppy drive.
The route I took was to purchase a Floppy Emu from Big Mess O Wires, which acts as an emulated floppy drive. You can buy just the hardware, or get a bundled kit, which includes an clear acrylic enclosure. The acrylic has a paper adhesive on it which can be peeled off, but I was too impatient to try and peel off the paper and just assembled the kit as-is.
Configure for Mac
Once I had assembled the Floppy Emu, I still had one more step to perform to get it to work with my Mac SE by downloading the Macintosh firmware (version hd20-0.7H-F14.5 as of this writing). If you are working with an Apple II or Lisa, other firmware needs to be installed. The following are the instructions on how to install the firmware for the Floppy Emu:
See https://youtu.be/Gqpn9ugO1_U for a video demo of the firmware update process.
This update consists of two parts. You need to install both parts! If you see a warning message about "wrong CPLD", it means you haven't installed both parts.
PART 1 (CPLD firmware):
- Copy the files firmware.xvf and femu.bin to the root directory of your SD card
- Insert the card into your Floppy Emu, and turn on your computer.
At this point, you may see a "wrong CPLD" warning. This is normal.
- Hold down the NEXT and PREV buttons.
- Press and release the RESET button.
- Continue holding NEXT and PREV until the firmware update process begins (about 3 seconds).
- Wait 10-15 seconds for the process to complete. Status LED will be flashing.
- When finished, the LCD will display "RESULT: SUCCESS"
PART 2 (AVR microcontroller firmware):
Confirm the new firmware version number is displayed on the self-test/info screen during startup.
- Hold down the SELECT and PREV buttons. Note these are not the same buttons as for part 1.
- Press and release the RESET button.
- Continue holding SELECT and PREV until the firmware update process begins (about 1 second).
- Wait 5 seconds for the process to complete. Status LED will be flashing.
- When finished, the LCD will display self-test information, and the main menu.
Load up blank disks and software
The Floppy Emu comes with a variety of software titles preloaded and it also includes a couple of "blank" disks in several sizes (400K, 800K, and 1.4MB). Since the Mac SE does not know how to handle high-density disks (1.4MB), I could only make use of the 400K and 800K disks. By mounting these disks, I was able to copy my original files to these blank disks, which are then stored on the Floppy Emu's SD card. If one needs additional blank disks, they can be downloaded and then copied onto the SD card for additional spare "disks".
Connect and transfer
The Floppy Emu uses an SD card, which makes it possible to transfer data between an old Apple computer and a more modern machine. I connected the Floppy Emu to the back of the Macintosh SE. Once the Mac had started up, I selected a "blank" disk from the Macintosh section on the Floppy Emu, which then displays either a 400K or 800K emulated floppy disk on the Mac SE (the 1.4MB blank disk will not load on an older Mac SE). From this point, I was able to copy the files stored on the Mac over to the emulated disks. The Floppy Emu comes with a couple of these blank disks, but if more are needed, then download the blank disks and load them onto the SD card on a modern computer. Once the files have been copied over, eject the Untitled disk by dragging it to the Trash. Shut down the Mac and then move the SD card over to a modern computer. Unfortunately, the blank disks are stored as a DSK image, which cannot be natively ready by a modern Mac, so additional steps are needed to access these stored files from a modern Mac.
macOS and DSK Images
While modern versions of the Macintosh operating system (macOS High Sierra as of this writing) cannot open DSK images, there is an easy work around. Rename the
DSK extension to
img, and macOS should be able to open the renamed disk image. If you just want to get the files off of a DSK image, this is the simple method. If you want more complex ways of working with DSK images, you'll need to make use of another program such as Mini vMac or HFVExplorer for Windows.
Thanks go out to Steve from Big Mess O Wires for this tip.
Set Up Mini vMac
- Download Mini vMac. For a new Mac, download the x86-64 build for Macintosh.
- Mini vMac is not code signed, so right-click on the app and select Open. At the dialog box, click the Open button.
- Get a ROM image and place it in the same folder as Mini vMac (vMac.ROM). This is one of those sticky legal issues where you should have an old Mac and then extract the ROM image from it to make a legitimate copy of the ROM. Or you can search the internet. This part is left as an exercise for the reader.
- Once vMac.ROM is in the same folder as the Mini vMac app, start Mini vMac. You will get a start up screen with a disk bearing a flashing question mark. You will need a bootable disk image. Download the file MinivMacBoot.dsk and drop it on the screen to “launch” vMac.
Transfer Files from Mac to Mini vMac
It would be great if there was a straightforward method to open up the old DSK images and transfer files to and fro, but it is not nearly that simple. This is where Mini vMac comes in. Take out the SD card from the Floppy Emu and bring it over to a modern computer to access the DSK images.
Export Files From Mini vMac
Even once I had my files loaded up on the Floppy Emu's SD card, I had to find a way to get those files transferred to a modern computer. When the SD card is plugged into a modern computer, it displays a bunch of DSK images, which are not natively handled by macOS. This is where Mini vMac is necessary. Start up vMac and then load the DSK image with the files to mount the disk in vMac. I was able to see the files in vMac, but how would I extract the files from the DSK and loaded onto my Mac? This is where ExportFl comes in, which can take these files in vMac and export them one at a time to the host system. Since I had a quite a few files, I just archived them using StuffIt Lite 3.5 in vMac and then exported the .sit files to my Mac.
To use ExportFl, download it, then mount the ExportFL DSK into vMac, which appears as a disk. Launch the ExportFL application, then select File > Open. Select the file to export and then you will be prompted with a native file dialog window to tell vMac where to export the file.
Import Files To Mini vMac
We've now learned how to export files out of Mini vMac, but what if we have some files we want to import and save onto a DSK image or use directly within Mini vMac? There is ImportFl, very similar to ExportFl, except it allows Mini vMac to import files from a modern Mac. Download, ImportFL, unzip the file, mount the ImportFl DSK in Mini vMac, start the app up, and once the dialog box is on the screen, drag and drop files onto Mini vMac's window. This can be useful if one wants to take some files from a modern computer and move them to an older Apple computer.
Reading Old Files
The original documents were likely created with Word 6.0. Trying to open these documents using a more recent version of Word (in this case, Word 2011), a warning dialog appears about opening old files, but they can still be opened by selecting File > Open. For such an old file, Word was able to read them properly. If you are using an older version of Word (e.g. Word 2004), no such alert dialog will appear.
For any old ClarisWorks documents, AppleWorks can open and read those. If you have a Mac OS X installer of AppleWorks 6.2.9, it is possible to read these old documents on a not-completely-ancient Mac. I have a PowerBook G4 (running Mac OS X Tiger and Leopard) which has applications such as AppleWorks and Word 2004 on them.
Other Formats (HomeWord II, etc.)
For those file formats which have not persevered over the decades, some can only be opened with equally ancient programs, but sometimes they can be converted to a more modern or universal format. Many of the original documents I wrote on a Tandy 1000 HX computer were created with either DeskMate or Sierra's word processor Homework II. HomeWord II has a mode to export its files to ASCII, but it is also possible to open up the original files using a text editor of your choice. There is a lot of interspersed formatting, but it is legible, whereas if the file had been saved as a binary blob, the file might not be so easily translated/read.
Learning how to back up and transfer the data from some old 800K Mac floppy disks has been an interesting process, which had the additional benefit of getting a little extra use out of a 30 year old Mac by playing a couple of old Sierra games such as the original King's Quest and Space Quest games. I hope that this proves to be useful for someone who might be encountering a similar issue or just might want to get a little more life out of some beloved dinosaur technology. Many thanks go out to Big Mess O' Wires and Grphyel for all of the work put into developing Floppy Emu and Mini vMac.
21st April 2018 | Programming
With the release of macOS 10.13.4, Apple is now actively warning its users that any 32-bit software may not be fully compatible with future versions of the Macintosh operating system. This does not come as too much of a surprise since we recently underwent this forced transition from 32 to 64-bit software in iOS. 64-bit Intel processors, starting with the Core 2 Duo, have been available in Macs for well over a decade, but it is only now that Apple is "encouraging" that all modern software should be run as 64-bit. Fortunately, a casual perusal of what software is 64-bit shows that most software has already made the transition. Only older software and deprecated frameworks have not been updated. This includes even Apple's own QuickTime framework, which has been replaced by the newer AVFoundation framework.
From Apple's 64-Bit Transition Guide:
Beginning in OS X v10.5, most OS X APIs are available to 64-bit applications. Going forward, Apple plans to make new APIs 64-bit-compatible unless otherwise noted. However, not all existing 32-bit APIs are supported in 64-bit applications. ... In certain technology areas (Carbon particularly), a few APIs have been deprecated for 32-bit use beginning in OS X v10.5. Most of these APIs are not available in 64-bit applications.
Back in 2007, Apple notified developers that it would not be updating the Carbon framework to 64-bit. Considering that a few bits of Permanent Eraser still rely upon Carbon, I was concerned that Permanent Eraser would break in the future due to Carbon. The good news is that "Carbon" acts as more of an umbrella term, and some of its various functionality fall under other frameworks (such as Core Foundation or Core Services) which have been updated to 64-bit. However, in my research, I did come upon some older methods I've used have been deprecated over the years, so it was still a useful exercise to look for more modern alternatives.
I created a small example program which details several methods to determine if a select file contains a resource fork (or not), and if so, determine the size of the fork. Early methods depended on methods such as
FSGetCatalogInfo, which was deprecated several years ago in OS X 10.8 Mountain Lion. Even if some of these deprecated methods still work on a 64-bit system, it is a good idea to update them with more modern methods to protect against the case that these methods might break in the future since they are no longer being maintained.
This coding example examines four different methods:
getxattr - This is the most straightforward method I discovered, and it works well on older systems, as well.
NSFileManager - By appending
..namedfork/rsrc to the end of a file path, one can inspect a file's resource fork (if it exists). This naming scheme could change in the future, so this may not be the most reliable method.
getattrlist - This was mentioned on some message boards and mailing lists, but like in my free space example from last year, I was never able to get
getattrlist to work properly.
FSGetCatalogInfo - This is the "old" way to inspect a file's data and resource forks. It still works as of High Sierra, but several of the methods used in this example such as
FSGetCatalogInfo have been deprecated.
25th March 2018 | Website
Today marks the unveiling of the fourth major iteration of the Edenwaith website. This is an important milestone for the Edenwaith website as it adopts a responsive design for both desktop and mobile web browsers and finally strips away the last remnants of ancient table-based layout. Some of the oldest pages of the previous iteration dated as far back as 2005. The website was far, far past due for a refresh.
The website has slowly evolved since the last major version by eschewing older design methods and adopting newer technologies such as HTML5 and CSS3. Revamping the entire website was a good opportunity to rethink the design, layout, and content, which included stripping some ancient content such as the tutorials and product pages for retired apps.
When I first began doing web design, it was not uncommon to see a footnote on a site recommending that the site looked best on a screen with a minimum resolution of 640x480 or 800x600. One of the biggest shifts in web development over the past nine years has been the rise of mobile web browsers on phones and tablets. A web designer can no longer assume that their content will be viewed on a large desktop monitor, but instead, will likely be viewed on a smaller display limited to several inches along the diagonal.
Adopting a responsive web design was the top priority for Edenwaith 4.0. But with all of the changes which have occurred with the rise of mobile devices, where does one start to learn how to adopt these new methodologies? It initially seems like designing for multiple screen sizes can be daunting and complicated, but it pretty much all boils down to one bit of useful CSS:
@media screen and (max-width: 450px)
By being able to dynamically detect the size of the screen's viewport, it allows the page to resize and reposition its content, much in a similar manner to how Adaptive UI handles the interface for iOS. With some careful design, a site can look and work well with all sizes of screens. In learning responsive web design, I read through Ethan Marcotte's book Responsive Web Design and Interneting Is Hard's article on Responsive Design, topped with some neat CSS animation tricks from the W3Schools website.
17th March 2018 | EdenList
After a year of development, EdenList 2.0 for iOS has been released, featuring the following:
- New share feature to easily share lists between people
- Completely rewritten to better support the latest devices and iOS
- Support for iOS 11 and iPhone X
- Note: Now requires iOS 10 or later
With this release, EdenList for iOS has become Edenwaith's second product to reach its second major version. Work initially began on version 1.2.4, but the archaic code dating back to 2009 was finally succumbing to all of the changes which have occurred with iOS development since EdenList was first started. Instead of continuing to fight with trying to coax the code to play nicely with the latest version of Xcode, I made the decision to scrap the code and start from scratch. Gone is Objective-C, manually managed memory, and XIB files to be replaced by Swift 4, ARC, Auto Layout, and Storyboards. The previous version of EdenList still supported iOS 6, which would not have worked well with Xcode 9, much less properly supporting Safe Areas to handle layout and display for the new iPhone X. With this rewrite, it allowed me to discard any legacy code and methods and adhere to more modern practices. EdenList for iOS now requires iOS 10. As of this writing, according to Apple, 65% of active devices are using iOS 11, another 28% are using iOS 10, which leaves a slim 7% of devices using an earlier version of iOS 11.
In addition to a new version of EdenList, its product page also sports a new look with the first major steps towards the retooling of the Edenwaith website. Once the entire Edenwaith website has been converted to the new style (which is responsive for different screen sizes), this will mark off two of the major tasks mentioned last year.
11th March 2018 | Apple
It has been nearly three years since I originally wrote about the Mobile Plateau, so enough time has passed that it is worth to take another glance at the technological world and see if things have continued at a flat rate of progress or if there have been any noticeable advancements.
In 2017, the company I was working for offered its employees either an Android phone or an iPhone 7. I already had an iPhone 6, so I was more interested in what Android phones were available. After browsing through Best Buy's offerings, I became somewhat dismayed how the majority of phones were essentially bland imitators of each other. Only the Huawei Mate 9 and the Google Pixel phones really stood out. If one liked the look and feel of the iPhone, but wanted it packaged around Android, then the Pixel was a wonderful offering.
Unfortunately, I later learned that the only Android phone we were actually offered was the Samsung Galaxy 8. Knowing how many unique problems Android developers tend to face with Samsung devices, I was not too interested. Sadly, for those developers, the Samsung Galaxy is the most popular line of Android phones today, so it is not a market they can ignore.
I waited three years between the iPhone 4S and the iPhone 6, and the upgrade was well worth it. It's been another three years, but the set of improvements from the iPhone 6 to the iPhone 8 are not groundbreaking, and if not for the introduction of the iPhone X, I would have easily been tempted to have waited another year. The iPhone 6 continues to be a great and reliable phone. When compared to iPhone 8, the only areas which I feel are truly lacking are the 3D Touch and second generation Touch ID, two features which were introduced in the iPhone 6S. The addition of inductive charging is a very welcome feature, especially with the removal of the 3.5mm headphone jack, so if one wants to listen to music and charge their phone at the same time, using a Qi charging pad is a useful option.
Listed below are the major features and changes for the last three generations of the iPhone.
- iPhone 6S
- 3D Touch
- 2nd Generation Touch ID
- Live Photos
- New color: Rose Gold
- iPhone 7
- Removal of standard 3.5mm headphone jack
- New photo effect: Portrait mode (iPhone 7 Plus model only)
- New colors: Jet Black and Red
- iPhone 8
- Inductive charging
- New photo effect: Portrait Lighting (iPhone 8 Plus model only)
- New color: Pinkish "Gold"
- Up to 256GB of storage
On the hardware front, Apple and its competitors continue to refine and improve, but the hardware improvements from the iPhone 6 to the 8 are not as monumental as it was from the iPhone 4S to the 6. While the hardware has stagnated somewhat, it does provide a more stable field for software to build against. Perhaps one of the most exciting new developments in software is the introduction of augmented reality frameworks such as ARKit and ARCore. Any Apple device with an A9 chip or later can run ARKit applications, which means that millions of devices are capable of running augmented reality apps. ARCore is a very new framework for Android, but the number of devices which are compatible is quite limited, something which will hopefully be rectified in the near future.
The iPhone 8 was a decent improvement over the iPhone 7, and certainly more so than the 7 was over the 6S, but besides the addition of inductive charging, the 8 does not offer too much more than the iPhone 6S already possesses. Mostly more of the same. It's not broke, it has proven to be a great success for Apple, so why bother fixing what obviously still works?
Except this is technology, which sits still for no one. If all we did was make small iterations on the original model, we would still be working with punch cards and vacuum tubes. Which brings us to the elephant which has barely been mentioned in this article...
The iPhone has undergone several cosmetic changes since the original version. The materials have changed, the dimensions have been altered, but the basic appearance of the iPhone has essentially remained the same.
Enter the iPhone X — the iPhone for the next decade. The iPhone X boasts the following features:
- Face ID
- Inductive charging
- New design: Taller, but not wider than iPhone 6
- Dual camera system like on the iPhone 8 Plus
- Up to 256GB of storage
On the inside, the iPhone X contains many of the same improvements as the iPhone 8 Plus. However, it's the outside where the real changes are apparent. Gone are the forehead and chin bezels, supplanted with a screen which covers nearly the entire front of the device. Also gone is the (no longer) ever-present Home button. Face ID replaces Touch ID, and swipe gestures replace other functionality which had been piled on top of the Home button.
My initial impression of these changes were not exactly warmly met. I like Touch ID. That glaring notch at the top of the iPhone X looks stupid. What was Apple thinking?! I was not alone in my knee-jerk reactions. I heavily considered getting an iPhone 8, which would be released before the iPhone X, plus it would have all the comfort and familiarity of my old phone.
If I did not develop iOS apps for a living, then I probably would have waited another year or gone with the iPhone 8. But the iPhone X introduced many changes, especially with its form factor and how developers would need to work with it, so this became one of the biggest selling points to get an iPhone X. This isn't about having the latest tech, but to be able to perform my job.
After working with the iPhone X for several weeks, these are my initial impressions:
- Face ID : Face ID is one of the biggest selling points of the iPhone X. It feels so effortless, that it almost feels like there isn't even any security. Hold up the phone and it unlocks (but the lock screen remains in place until you swipe).
- Face ID in Apps : If Touch ID is already implemented in your app, then no additional work is necessary to implement Face ID. They are both forms of biometric authentication. I was initially concerned that developers would need to update their apps to enable the Face ID functionality, but that turned out to be a moot point.
- Lock Screen Notifications : A small, but welcome, improvement in security, the notifications on the lock screen will not display their contents until Face ID has "unlocked" them.
- Typing : I've found typing to be a little easier than on the iPhone 6. Occasionally, I found myself accidentally tapping the space bar when I intended to type the letter B. I have not had this problem on the iPhone X.
- Size + Weight : Due to its increased height and glass back, this phone is a little heavier than the iPhone 6, but not by much.
- Leather Case : The buttons on Apple's leather case are easier to press than the old leather case for the iPhone 6.
- Apple Pay : The software gives good visual cues on what to do to use Apple Pay.
- Home Screen : Despite the taller screen, the Home screen does not contain any more rows of icons than the iPhone 6 does — still limited to 6 rows.
- New Interface : Due to the removal of the Home button, some new tricks need to be learned on how to best make use of the buttonless interface. Example tips and tricks: swipe along the home button indicator to quickly switch between recently used apps. Swipe up and right (or at a diagonal) to quickly pull up the app switcher. To enable Reachability, perform a short swipe down near the home indicator.
- Taking Screenshots : To take a screenshot, hold down the right side button and the volume up button. Too bad it isn't the side button and volume down button to better match what many Android phones do to take a screenshot.
- Inductive Charging : This is the one feature which I was really happy to see added to 2017's batch of new iPhones. This is a great feature to have, especially after the removal of the dedicated headphone jack. This is another feature which brings the phone one step closer to being completely wire-free.
- The Notch : The notch isn't quite as annoying as I originally thought it would be, especially since I use most apps in portrait mode. I do miss having the percentage of battery visible, though.
- Camera Zoom : The one-fingered zoom feature on the camera is great, which is also available on the iPhone 8 Plus, but not the smaller iPhone 8.
Apple has made it clear that the iPhone X is the new direction they are taking with the iPhone for the foreseeable future. Had the iPhone X not been released alongside the iPhone 8, the technorati would have not bothered to suppress their collective yawn after another year of less than stellar changes. However, the iPhone X gave the press much to ponder and discuss. Already, other phone manufacturers are producing their own clone devices, mimicking Apple, which includes the obtrusive notch at the top of the phone. The notch sticks out like the proverbial sore thumb, but perhaps there will be a day that there will be a phone with a full display — no bevels, no notch — all screen.
Apple TV + Streaming Services
In my original piece, I lamented the lack of an update to the Apple TV, but this wish was soon granted several months later with the introduction of the 4th generation Apple TV and the new software platform of tvOS. My wish was for a platform that would replace traditional cable TV where the consumer can be more selective about what channels they want without having to pay increasing fees for the other 990 channels they don't want or need.
Apple TV takes a step in the right direction, but it is not alone in this space. In addition to other dedicated hardware options such as the Roku or Chromecast, there are other software offerings on pretty much any other device which can support Netflix, Hulu, YouTube, Twitch, PS Vue, or any of many other streaming content services.
Choice is good, but having too many choices can also be detrimental and overwhelming. There are so many streaming options, but none of them may have everything one might want. Netflix has older movies and TV shows, and Hulu has more recent episodes. If you want to watch a sports game, then you might need to subscribe to another service. If you add them all up, you might still end up with the same problem as having a cable provider — paying too much money for too much content.
I feel that this is a marginal improvement over cable, but it is not without its problems, especially regarding the fragmentation of content. It shall be interesting to see how things shake out in the next several years.
Three years ago, the Apple Watch had just been released, so it was certainly too early to get a proper gauge on how well the Apple Watch and competing wearables were going to perform. Three years later, the Apple Watch and its associated software of watchOS continue their yearly iterations while still trying to answer the question of What can we do with this thing?. The Apple Watch has leaned more in the direction of a fitness role, which is where its strongest competitors reside, such as the FitBit. The Apple Watch has not quite become the smash hit that the iPod or iPhone became, but it is not an unmitigated failure by any means, either. As the hardware and software continue to improve, the Apple Watch may eventually turn from an interesting gadget to a truly useful appliance that can stand on its own without needing to be tethered to a phone.
But what about the Android Wear Smartwatches? After the Apple Watch was announced, competitors quickly rushed to the scene, but none of them have gained a proper foothold in the wearables market, and many have stumbled and fallen away. Even the early smartwatch company Pebble became another technology casuality as it shut down in December 2016 and its intellectual properties were purchased by FitBit.
Time continues to march ever onwards, and so will the progress of technology, albeit not always at a rapid pace. The introduction of new hardware and software platforms provide for new sandboxes which to play in. The iPhone/iOS SDK has now been available for the past decade, and it has provided a fertile ground for new software development, the likes we also saw with the rise of microcomputers (PCs) and the Internet. The pace for new mobile software has not been abated, and a new disruptive platform has yet to truly rise up. watchOS and tvOS are new entrants into the Apple ecosystem, but neither one has a comparable user base that the iPhone has. Being that these are relatively new operating systems, there is much potential for them to grow during the next several years, but I see these as supplementary technologies when compared to the iPhone or even the Mac.
There are always new ideas cropping up, whether it is IoT or the latest "smart" gadget (smart speakers such as Amazon Echo, Google Home, or Apple's HomePod are the current fad in 2018). It's the products which prove to be truly useful and remain after the initial trend has come and gone which determine what becomes notable and what is relegated to a footnote. Let's check back in another three years to see how it all plays out.
6th March 2018 | Programming
When one is writing a computer program, one should write compact, logical, and modular components and veer away from source files which burgeon into unwieldy monoliths. In the iOS world, there are some who are turning away from the traditional Model-View-Controller (MVC) design pattern and are experimenting with other architectural patterns in the effort to correct the so-called "Massive View Controller" problem, where the ViewController class has become an unorganized heap of assorted bits. In a future post, I will discuss these alternative architectures in more depth, but for this post, I will detail several real world cases I've seen and how to fix them without having to resort to rearchitecting your entire app so the ViewController is not so massive.
There is no single "right way" for designing an application, but there certainly are some grave missteps which can be easily avoided so your code is better organized, cleaner, and easier to read, maintain and use.
The Category in Objective-C (otherwise known as Extensions in Swift) is an amazing feature which allows the programmer to extend the capabilities of an existing class, without having to create a subclass. Want to create a custom method for a color or font? Done. Want to extend the functionality of the string class? No problem. Not every programming language has this feature, but once you learn how to implement Categories, they are immensely useful.
In an old project I inherited, I came across a source file that was a little over a thousand lines of code. However, nearly a quarter of that was taken up by just one lengthy method. In this particular case, it was a method used to return a specific color, depending on the character passed in. In this example, several options could be used to reduce the code bloat. Instead of setting values for three different variables (assigning values for the red, green, and blue values), the UIColor can be created and returned for each case, which will cut down two-thirds of the code.
Next, since this is returning a UIColor, this entire method is better placed within a category class, which will also provide the benefit of code reusability so that any other parts of the app can make use of the same functionality.
The new UIColor category class (both header and implementation files) resulted in 225 lines of code after I slimmed down the original method by removing unnecessary braces in a giant switch statement. Another pass could like reduce this even further, but for an initial pass, that was a nice improvement for half an hour's worth of work.
After further inspection of this project, I discovered that this same lengthy method was copied and used in six different areas of the app. This is an obvious opportunity for code reuse. By consolidating all of these instances of the same method into the category, I was able to strip out 1,500 lines of code from the other classes.
Remember — Don't Repeat Yourself. If you can consolidate your code into a centralized location, do so. This reduces problems of having to modify all instances of duplicate code with the added bonus of reducing the amount of code.
Designing UI: Interface Builder vs. Programmatically
Years ago I wrote an FTP client in Java. Constructing the interface was an arduous task of making a small edit, compiling, running, and then repeating the whole process over again. Fine tuning the look and feel of the application was not a quick process.
Enter Interface Builder and Project Builder (the precursor to Xcode). It was immediately apparent that Interface Builder was a godsend of a tool. I could rapidly prototype new UI designs with the drag and drop interface. No more endless edit-build-run cycles! Improvements in programming languages and their associated tools are often incremental, but Interface Builder was one of those rare massive jumps in programming productivity.
I love the visual aspect and designing beautiful interfaces, whether it is for the web, desktop, or mobile software. One of the things I love about macOS (née Mac OS X) is the beautiful interface laid on top of a UNIX core. It's a world of both beauty and brawn. So it is not a surprise that I enjoy creating interfaces using Interface Builder.
I was once knocked out of consideration for a programming job because I preferred to design my UI in Interface Builder instead of doing everything in code. Perhaps that company felt it was easier to review UI changes if they were in code or to avoid the horrendous storyboard conflicts which easily arrise when more than one person works on the same project. I get that, but I'm not so certain that this is ultimately a worthy tradeoff.
The same program mentioned earlier had been originally designed without any storyboards or XIBs. This means that all of the UI is set up in code, which takes up a sizable portion of each ViewController to configure the UI elements. When separating the view and the controller, it is perhaps best to design the UI in the tool which was intended for it.
If you are purposefully designing all of your UI programmatically inside your view controllers, there is a special place in hell for masochists like you. If designing UI programmatically is your thing and you can do it quickly and effectively, then knock yourself out. Just keep in mind that other programmers may have to maintain your code someday. Designing UI in code is like the adage I heard when I was first learning C: Just because you can, doesn't mean you should.
This is not to say that there isn't a time and place for designing certain UI elements in code. Interface Builder is easy and powerful, but it is not all inclusive with everything which can be done. If you want to perform more complex UI operations, such as a wavy border or rotating a view to a specific angle, that will require the aid of code.
However, designing all of your UI elements in code takes both space and time to generate. In the effort to reduce unnecessary code bloat, use storyboards and XIBs as much as possible, and reserve the more complex effects to code. To extend the capabilities even further in Interface Builder, make use of IBInspectable and IBDesignable to add custom controls for your UI elements, such as buttons and views.
In Ryan Poolos' 360iDev presentation Life Beyond Storyboards: Building Your UI In Code, he shows how it is possible to design an iOS app without the aid of storyboards, but he does not propose an effective reason why someone would want to do this fulltime. He talks about the How, but not the Why. This echoes a line from the novel 1984: I understand HOW: I do not understand WHY.
Auto Layout certainly has its benefits, especially when dealing with variable size devices, but what it makes up in flexibility it sacrifices in brevity compared to the old method of using
CGRects to size and place views. What might have been a single line of code can easily quadruple (or more) in size by implementing Auto Layout constraints. Whether or not if you like Auto Layout, it's the direction Apple has been taking for years, and it will only continue as the variety of device sizes continues to expand. Fortunately, most of the complexity of setting up the interface is easily handled by Interface Builder.
While I espouse the use of storyboards, they can also be abused in a similar manner where too much is dumped into one file, resulting in their own "massive" problem. I've worked on some projects where every view was thrown into a single storyboard, which could quickly bring Xcode to its knees when trying to open the file or make any type of modifications. Much as with code, storyboards need to be divided into logical sections so no one storyboard is trying to do too much. Storyboards can be finicky and are a nightmare to resolve when doing merge conflicts, so it is best if storyboards are kept small enough that no more than one developer needs to actively work on any one storyboard at a time.
None of these approaches need to be all of nothing. Use the best tool for the job. Reuse code so you aren't unnecessarily repeating yourself. Just keep in mind that the best code is no code at all. The less code there is, the less there is to maintain, and the less chance there is for bugs. By maintaining good organization and programming practices, you should be able to keep the size of your ViewControllers to a manageable size.