Apple, IBM add machine learning to partnership with Watson-Core ML coupling | TechCrunch

Nice step in closing gaps between ML training, usage, feedback, and retraining. Hopefully it will also evolve into a service that independent app developers can use.

Apple, IBM add machine learning to partnership with Watson-Core ML coupling | TechCrunch
— Read on techcrunch.com/2018/03/19/apple-ibm-extend-partnership-with-watson-core-ml-coupling/

Xcode unable to create snapshot: unable to write to file … plist

Xcode error:  Unable to create snapshot  Unable to write to info file ‘<DVTFilePath: ~~~~~ info.plist’>’.

Xcode has been tossing this error at me for over a year now.  This problem has persisted across multiple versions of Xcode and OS X.  Whenever I open an older project (from a previous version of Xcode), it often suggests some updates to the project and offers to create a snapshot of the project before continuing.  It always fails with an error similar to this.  Manually initiating an Xcode snapshot from menu FILE | Create Snapshot results in the same error.

It hasn’t been real issue for me, I use GIT for version control and have never relied on Xcode snapshots.  It’s only been a minor nuisance, but I’m procrastinating on some other work and this seems like a good time to investigate the problem.

Xcode unable to create snapshot

Quite a few web posts indicate it has something to do with corrupted .DS_Store files and/or conflicts with GIT and the location of the .git folder relative to the Xcode project.

To test those ideas, I tried deleting those files… it didn’t work.  Also tried creating a new project without using GIT at all.  It still failed with the error.

Creating a brand new directory, verifying permissions, and changing Xcode preferences to use that directory for snapshots didn’t work either.

For now, I’m stumped on this one.  Next step may be to try running clean copy of Xcode and OS X in a VM and see if the problem shows up there.  Maybe I’ll find something later… if I do, I’ll post an update.

Testing “Xcode 4.5 and iOS 6 SDK beta 3” using a virtual machine instance of OS X Lion

For a couple weeks now, I’ve been using Xcode 4.3.3 and the iOS 5.1 SDK on a mid 2012 MacBook Air 13″ with 8GB Ram.  It’s very nice.

With the July 16th update to the iOS 6 development betas, it was time test running the new Xcode environment under a VM on the MacBook Air.  The first step in the process was to get a virtual instance of OS X Lion 10.7 running under VMware Fusion.

I’ve done this before, but the new 2012 MacBook CPU (Intel Ivy Bridge) caused a “CPU disabled by guest operating system… ” error under Fusion.  The solution was to add this line to the *.vmx config file of the target VM.

      cpuid.1.eax = “—-:—-:—-:0010:—-:—-:1010:0111”

VMware should have a 2012 update to Fusion for OS X Mountain Lion 10.8, they are currently testing it as a “technical preview”.  This post provides more information on the error and it’s solution.

With that problem solved, it was time to get Xcode 4.5 beta 3 up and running.  Right after installing VMware Tools and configuration some OS X settings to my preferences (I didn’t use Migration Assistant for this VM as I wanted a fresh environment).

The next issue was with the Xcode 4.5 app.  It would not run.  I used Lion 10.7.3 to create the VM the new beta requires a minimum of 10.7.4.  Using software updates to get 10.7.4, iTunes, and Safari updates downloaded about 1GB.  After the updates, the Xcode 4.5 beta is now able to run.  This is a good place to make a backup of the VMDK and save for future use.

VMware snapshots or Fusion Time Machine integration are both good features, but I prefer to locate the *.vmwarevm file (package) in Finder and copy to a compressed zip file.  I’ll use this zip as a clean start for additional beta releases as well as some OSX Server testing.  Will also use it to testing the Mountain Lion upgrade.

After installing Xcode, you’ll most likely want the ability to do something with it.  This entails installing some “core libraries”.  From within Xcode Preferences, the Downloads tab provides access to additional Components and Documentation. Plan for another GB or more of downloads.

If you’re setting up your virtual dev/test environment for first time, plan on 4 or 5 hours and several GB of downloads/updates during the process.  After that you’ll be able to test beta releases or do other experimental work in a VM (with USB access to physical devices if desired) without affecting any of the apps of your host Mac.

Xcode 4.2 – using source code branches and other Xcode shortcuts

command T — to open a new tab in Xcode.  Tabs can be pulled outside the main tab to create a multi-window environment.  These additional windows can then be pulled over to a second monitor.  The Xcode | Settings | Behavior pane can be used to setup window layouts to automatically launch when performing certain activities (like debugging, building, or testing).

Run multiple instances of your project simultaneously:  Xcode 4.2 supports launching multiple instances of an app (or multiple apps).  This helps with testing client-server scenarios and multi-user peer-to-peer apps.  You can mix and match simulator versions and physical device types, or just run multiple instances of the same version.

running Xcode from the command line:
$ /Xcode/usr/bin/clang -c myfile.h
$ /Xcode/usr/bin/clang++ -c another_file.cpp

Source control and multiple branches: From Organizer | Repositiories you can navigate into the Branches folder under a project, and the select the + Add Branch icon to create a new branch (additional options appear in popup dialog boxes).  From within your Xcode Workspace and the Editor, activate the “Show the Version Editor” icon (it’s in the upper right area of the toolbar).  Now you’ll have a navigator bar display at the bottom of each editor pane, and you can use this navigator bar to view items in various branches.

Note: navigating in the Version Editor does not switch your currently actively branch.  Be sure to use the Organizer’s Repository view to switch branches.  When clicking the Version Editor icon, it will initially display the currently active branch and version in the lower navigation bar (in case you need to quickly verify which branch you are working in).

To switch your active editing to a different branch, navigate back to the Organizer | Repositories and select the blue folder under your project repository (left side of screen).  From here, the lower area of the Repository view will display icons to Pull, Commit, or Switch Brach.  The upper right hand portion of the Repository view will display “Current Branch: yourBranchNameHere“.  If you switch branches while a workspace has that project open, the workspace window will refresh and load the selected branch’s files into the navigator.

Reconciling code from multiple branches:  When using the Version Editor, the navigation bar in the lower area of screen “appears” to allow you to look at two branches simultaneously.  At least for me (and my installation of Xcode 4.2.1), that doesn’t actually work.  The version editor is limited to viewing within the currently active branch.   Instead, when you need to compare across branches (or are ready to merge), it seems necessary use the Xcode | File | Source Control | Merge menu option.  This will launch you into a another popup window version of the version editor; however, it will only show the most recent version in each branch (the other version navigation features are disabled in the Merge view).

I’ll update these notes if I find a better way to compare versions across multiple branches or if this is updated/fixed in a subsequent release of Xcode.

Adding Perl modules to OS X Lion with Terminal and CPAN.

If you’ve installed the Apple developer tools for OS X Lion, then you should already have a working installation of Perl.  But you might find a need for some additional modules.

  • Visit CPAN and search for the name of the required module, such as “Net::Telnet::Cisco”.  If you have an existing Perl script, it probably identifies the requires modules near the top of the script.
  • Review that module’s information on CPAN to identify any prerequisite modules which need to be installed first, such as “Net::Telnet”.
  • open a Terminal session
  • to confirm Perl is installed, use:  mac$ perl -v
  • mac$ sudo su 
  • Password: AdminPassword
  • mac# cpan
  • cpan[n]> install ModuleName
  • cpan[n]> q       # ends the CPAN session
  • mac# exit        # exits sudo and returns Terminal session normal user permissions
Additional notes:
  • If you don’t “sudo su” first, the final steps of the module install process will fail.
  • If this is first time you’ve used “cpan”, you’ll be prompted with configuration options.  “automatic” should work just fine.  It will locate the URLs for the CPAN Mirror sites , complete the auto configuration, and provide the cpan prompt.

PS: after evaluating XCODE vs Komodo Edit v7, I found XCODE to be adequate for editing Perl.  Normally I would not make a case for using an IDE to edit a Perl script, but I’ve recently been asked to refactor a collection of large systems management scripts.  In this situation, using an IDE to organize the files and provide source control is imperative.

  • syntax highlighting:  XCODE was able to perform syntax highlighting equivalent to Komodo Edit.
  • code completion: XCODE offers completion of some basics items.  Plus it offers completion for anything you’ve already typed elsewhere in the project. Komodo Edit has full completion for some methods, but on others it only offered a hovering text box suggesting some syntax that you might use.
  • source control:  Komodo Edit has a menu option to “back up” a file to another location.  XCODE treats the Perl files like any other project file, with full control of updates, comments, tracking, etc.
  • The full (paid) version of KOMODO is probably a nice tool if you spend most of your time with the languages it focuses on.  The free version may be useful if your learning one of the supported languages and don’t have other tools available; however, it doesn’t offer enough capabilities to justify it over XCODE or Eclipse if you already use one of those.

Handling Interruptions in your iOS App.

iOS – Handling Interruptions

As we all know, iOS Apps run on mobile devices.  The users of mobile devices can be interrupted by any number of things.  Many of the interruptions come from other services and features of the devices themselves.  Incoming phone calls, text messages, notifications, alerts, etc.
As an App developer, it is a good idea to plan for handling interruptions and test the results.
One simple technique for testing uses the iPhone’s built in Clock App.  Setting the alarm clock about ~ 1 minute ahead, use app and observe behavior when alarm interrupts the app.
A well designed App should respect the interruption, be prepared to be backgrounded, and be prepared to be exited.  For a good user experience, the current application state should be saved (if applicable) so the user can eventually return to the app and resume where they left off.

displaying web content withing an iOS app

I’ve been using some work related iOS apps which have a frustrating habit of kicking you out to a Safari browser to view something, and then leaving it up to you (the user) to find your way back into the app and also to deal with the left over Safari windows later.  Had this app developer paid attention to the interface guidelines, perhaps they would have noticed a better design pattern.

~~~~~~~~~~~~~~~

Instead of sending the user to an external Safari browser session (which has no good options for navigating “back” to the part of your app the user was at);

incorporate one of these into your app:

iOS web content:
UIWebView
NSUrlConnection

HTTP Authentication
NSUrlConnection to download content

OffscreenRendererViewController – does a background conversion of the web content to create an image of that page and then display the image to the user within the app’s view.

Xcode 4 Shortcuts

Xcode 4 shortcuts:

hold COMMAND key and double click a method to find it’s header.

hold OPTION key and double click a method to find it’s documentation.

rename a local variable within a method….
place cursor behind an object (ie., after last character), and then MENU | EDIT ALL IN SCOPE to rename all occurances of that object WITHIN the current local scope.

iOS App Delegate — the controller of controllers

For some this may seem obvious, but if you’re still getting used to this Model View Controller (MVC) design pattern and wondering where the App Delegate fits in…

I found it helpful to think of it as the controller of controllers.  For example, using AppDelegate on app load to initialize app and pass control among view controllers is a way to determine at launch time which device model and iOS version and present a specific view for that configuration.