Category Archives: Mobile Development

My occupation

Migrating from XCode 7 to XCode 8 with Jenkins Continuous Integration

0

Posted on November 12, 2016 by

During the latest iOS release, a new version of XCode was released. We have continuous integration using Jenkins installed on a Mac. It has XCode and Xamarin installed. We encountered problems in the initial rollout to the build server of XCode.

But, I have worked out what the trouble was with XCode 8. It does not seem to have anything to do with XCode itself, but the fact that XCode 8 uses a different svn client.

  • XCode 8 installs SVN client tool for Subversion 1.9, where the previous version was 1.7 in /usr/bin/svn. The 1.9 client cannot handle reading a 1.7 repository. The current version of Jenkins SVN plugin is set to check out at 1.7, and does not have support for 1.9, although it could be updated. There was a call in the Touch.Build.sh script to get the svn revision number ( REVISION=`svn info ../.. | awk ‘/^Last Changed Rev:/ {print $NF}’` ). This was necessary for CruiseControl on the old Mac Build server, but is no longer necessary in Jenkins because I have added an SVN Revision variable in the Jenkins configuration.
  • Modifiying the Info.plist has been a vexing problem, because the Jenkins build would report this error every time I modified the Info.plist, no matter how I did it.

Encountered unknown tag <<<<<< on line 59

Error Reading File: ../Containers/Touch.Container/Info.plist

Encountered unknown tag <<<<<< on line 59

Error Reading File: ../Containers/Touch.Container/Info.plist

Xamarin Studio Build Tool

It was actually reporting this because the Subversion client was failing to merge on the svn update for the next build. The merge conflict exists because we use a tool called “Plistbuddy” to alter the Info.plist with the build number. It actually re-arranges the XML significantly. Then the next svn merge puts text in like >>>>>>>.mine. The workaround is twofold:

  1. Go to Jenkins and clear the workspace so that the new Info.plist gets read and no merge occurs
  2. Set the svn update in Jenkins to be “revert and update” not just “update”.

 

Windows Phone Is Out Of Time

0

Posted on August 20, 2016 by

I’m in a very small minority of people who have tried a Windows Phone. I have experience with two phones, the HTC Titan and the HTC One M8. I never tried any of the Nokia phones, which many people had. From the start, there was no excitement for the Windows phones. Here are some of my thoughts on the reasons to not push the Windows phones, which were apparent four years ago.

Apps: easy enough, Android and iPhone already had a huge head start on apps, with significant market penetration. Some of the Windows phone apps that did appear, were superior than their counterparts for a while. This was probably because the teams focused on the new platform for a release.  Ultimately, no further development was done when the audience did not show up.

Marketplace: The carrier retail locations did not push them. You had to ask specifically, and then they would talk about them. I am not sure what the markup or kickback was, but it must not have been significant enough to give these phones a try. I don’t know what was spent on marketing these, but it was not enough and not in the right places

Popularity: Not many people had them. They were not going to become popular unless they had something that was really outstanding.

Cool factor: They were “Microsoft” phones. Despite their range of productions and familiarity, “Microsoft” and “Windows” are not “cool” brand names. People speculated that there would have been more success if they had been branded “XBox” phones. The XBox people were probably afraid it would dilute the brand. Nokia was cool, but they are all dead now.

Music: Microsoft had already fallen down with the Zune player, which was a joke by the time the Windows phones came around. But you still used the Zune software to load music. Apple had really set the bar high here with iTunes and the Apple store. The iTunes software may be a horribly unreliable sync tool (which even MacWorld has admitted), but it is a great retail tool and great free music organizer.

At this point the main apps I use are failing. The Amazon Windows app is suspended as of August 15, 2016. The Fitbit app is very slow to sync, and now poor in comparison with the iPhone version. The MapMyRun has not been syncing for at least a year. But it makes nicer run screen shots than the iPhone version. The LinkedIn app is way behind the iPhone version. The iPhone camera has jumped ahead of the HTC cameras and photo apps.

The live tiles are still cool. The Microsoft Solitaire is still the best. But honestly, you cannot play Pokemon Go on a Windows phone.

So, why did I stick with it for so long? I think the easy answer is that because I work with iPhones all day, it was kind of like a holiday. I have a work iPhone that I could turn to if I wanted. The fact that I rarely wanted to told me that what I had was good. But, now that I have an iPhone SE with iOS 9, I find myself using it more and more.

wp_ss_20160820_0001

Apple iOS9 and Enterprise distribution certificate trusting

0

Posted on December 12, 2015 by

 

Apple iOS9 has made changes to how you trust enterprise certificates.  Previously you could trust a profile the first time you ran an application from an alert.  Now you need to go to Settings à-> General -> Profiles and trust the profile there.

For example, with iOS 9 , when you try to launch App Market, you may see this alert.

appmkt1

There may in fact be no message at all, the app may fail to launch at all.

Go to Settings -> General. Select Profiles & Device Management.

appmkt2

 

Select your Enterprise App Profile.

appmkt3

 

Click on ‘Trust {your app}.

appmkt4

 

Click on the ‘Trust’ button on the popover.

appmkt5

Your enterprise application, and any other apps signed with your distribution certificate should be listed under the Apps from Developer “iPhone Distribution: {your companyt}”.

appmkt6

Two more project motivational posters

0

Posted on January 2, 2015 by

These have made the wall of fame now for our project.

The final feature that breaks the team’s back could be that one that just must be added!

64449768

 

Not My Circus, Not My Monkeys!

 

malpy2

 

Our new project mantra

0

Posted on November 17, 2014 by

Calm Down!

Honest Abe, from the Whitest Kids You Know

43635871

And the real Honest Abe

92610119

Add your Xamarin App to Crashlytics

0

Posted on October 14, 2014 by

Here are the steps that I followed
1.) In the Xamarin Studio , go to the touch container and add the Crashlytics API key in the Build -> Crash reporting section. Build and run that app. The evidence suggests that is enough to get data sent to Crashlytics. I saw that it knew about older versions of the app I had built and ran weeks ago with the API key already in.
2.) Go to Xcode and create a new project with the same name as the Xamarin project, com.{company}.{appname}. (You probably need to have that profile downloaded.) I did it in Swift by the way with no issues.
3.) Go to crashlytics.com com and go to settings -> Apps (or https://www.crashlytics.com/onboard)
4.) You will get an app to download and run. The app walks through the steps of adding
A.) A build phase run script
B.) Code to the application main Crashlytics.startWithAPIKey(“nnnn”)
5.) Run your Xcode version of the app

The Crashlytics web page popped up immediately.

 

Apple Lightning Cable Magic Knot

1

Posted on August 24, 2014 by

When you go into the Apple store, you might get your cable tied into their magic knot. We were there because the replaced iPod crapped out. We got another new iPod. They replaced the first one with a cracked screen at no charge. Thanks Apple!

Lightning Cable USB Knot

What happens to your cable at the Apple Store

Consensus

0

Posted on May 30, 2014 by

We had some fun on our new project.

CONSENSUS: It’s easier to go down with the ship if everyone is on board.

Consensus Despair 12521971

Using Sublime Text as my new essential development tool

3

Posted on August 16, 2013 by

I have list of PC must haves in my toolbox. A good text editor is a must. I have been using Textpad  ( http://www.textpad.com ) for a long time and really have nothing bad to say about it. It can open large files and has a decent regular expression editor. It is able to delete at column and row level.

I dabbled with Notepad+ and Notepad++ as I looked for replacements for notepad. I used Editpad for quite some time.

When I attended the BuildWindows conference this summer, I saw many of the presenters using Sublime as a text editor. It runs on both PCs with Windows and Mac. It also works on Linux. It seemed to be the consensus editor of choice. http://www.sublimetext.com/. I have enabled my Sublime plugin to prettify the XML files I work with on a regular basis. I used this tip here: http://www.bergspot.com/blog/2012/05/formatting-xml-in-sublime-text-2-xmllint/

You will need the xmllint command for your PC from Google CodePlex. https://code.google.com/p/xmllint/ Take the one that allows inline piping.

More about xmllint: http://xmlsoft.org/xmllint.html

 

The command line to fix your XML: xmllint –format –encode utf-8

MSI Building options: InstallShield LE, MakeMSI, WiX

3

Posted on July 24, 2013 by

We had been packaging one of our Windows WPF clients since 2010 using InstallShield LE. It was available as a free option for Visual Studio 2010 to create an MSI.

This had been problematic since we had continuous integration with MSBuild and  CruiseControl.NET. There was not a nice way to produce that MSI as part of the integration. LE really does mean Limited Edition in this case.

In 2012 we implemented MakeMSI. The MakeMSI scripts have been used to build the MSI files on each Cruise Control build. We made a bat file that runs all the environment versions of the MSI files. The environments each have their own configuration (mm) file. The mm file includes the specific header of Mem.mmh. We customized three header files that determine the MSI properties: Mem.mmh which #include(s) Dept.mmh, which #include(s) Company.mmh. The ver files set the version.

Today I set up the same MSI builder using WiX. The Windows Installer XML (WiX, pronounced “wicks”), is a free software toolset that builds Windows Installer (MSI) packages from an XML document. It supports a command-line environment that developers may integrate into their build processes to build MSI and MSM setup packages. WiX was the first software released by Microsoft under an open-source license called Common Public License.

Evidently, since Visual Studio 2012, the traditional setup project type has been removed. WiX becomes a recommended option to create Windows Installer package.

I used dark.exe to reverse engineer my existing MSI created with MSI. With some tooling around, I created a better config file for candle.exe, the wxs file.

It took about two hours from start to finish. I found this book helpful in a couple of spots as a reference.

WiX 3.6: A Developer’s Guide to Windows Installer XML by Nick Ramirez

InsallShield LE:

http://learn.flexerasoftware.com/content/IS-EVAL-InstallShield-Limited-Edition-Visual-Studio

MakeMSI:

http://www.dennisbareis.com/makemsi.htm

WiX

http://wixtoolset.org/ WiX Project Home
http://wix.tramontana.co.hu/ WiX tutoria
http://wix.codeplex.com/ WiX CodePlex files