I’m referring to the button that let you add an unprovisioned iPhone/iPad to the list of devices that you can deploy to. It copied the provisioning profile on to the device and added the device to the list of team members.
I found this out the hard way yesterday when I took my Mac mini to a client’s to add a new iPhone to the test. It was a bit stressful to put it mildly. I had upgraded Xcode to the latest which is 6.0.1.

Xcode Window Devices Menu Item

First the devices are no longer on the main Organizer App window which now shows only Projects and Archives. Click Devices on the Xcode Window menu and you get a form with a list of attached Devices and available Simulators. But No Button! You only got the button when you do this and have an iOS device that hasn’t been provisioned for development yet. Now you have to add the Provisioning Profile through the web interface on Apple’s site. This is surely a retrograde step.

To add a provisioning profile requires the following steps.
1. Log in the Apple Dev Portal and click Certificates, identifiers and Profiles. Click on Devices in the left menu. Note You may have to reset the list before you can add any extra. I assume it’s doing some kind of housekeeping update.

List of provisioned devices

2. You have to copy the UDID from the unprovisioned device and give it a name in the portal. Or you can add up to 100 in one go. 100 is the maximum you can have in your team.

3. Next you have to generate a new provsioning profile. This needs you to have a valid development certificate and all the devices ticked. If you don’t tick the newly added device then you won’t be able to install the provisioning profile on that device.

Generating a Provisioning profile

Back on the Xcode devices list add the provisioning profile to the device. You right click on the Show Provisioning Profiles and click + then browse to where ever the downloaded provisioning profile was. All this instead of one button! Now you can install your App.

A new privacy setting in iOS 8 means that apps using Location services need to have permissions enabled. One way to do this is by adding these extra keys to info.plist. One is for

        Please allow Location services

        Please allow Location services

Then in settings you’ll see this:

Location Access settings

I noticed this testing an App which relies on GPS. When I ran it on iOS 8, it was not providing location information

I’ve spent an entire day reading Apple Docs, scouring the web looking at Objective-C code and C# regarding mapping with a view to implementing it in my App. I’m talking about iOS 6 and 7 and in particular Apple Maps.

If you want to use Google Maps be aware that you cannot implement Turn by Turn according to their Google Maps T & C. You must not use the Service or Content with any products, systems, or applications for or in connection with any of the following: “(i) real time navigation or route guidance, including but not limited to turn-by-turn route guidance that is synchronized to the position of a user’s sensor-enabled device.“.

So it’s Apple Maps and MapKit which is jolly good. Now Apple have a lovely Maps app and you can invoke it from your App but that pushes your App into the background. There’s no way to use the excellent Apple Maps Turn By Turn within your App.

using MonoTouch.MapKit;
using MonoTouch.CoreLocation;
GeoCoder.GeocodeAddress("224 Richmond Road, Leytonstone,E11 4DA", ( placemarks, error) =>
            var coordinate = placemarks[0].Location.Coordinate;
            var placeMark = new MKPlacemark(coordinate,null);
            var mapItem = new MKMapItem(placeMark);

            mapItem.Name = "Where we are going to.";
            mapItem.PhoneNumber = "0203 555 9999";  // Not a real number (I hope!)

            var launchOptions = new MKLaunchOptions();
            launchOptions.DirectionsMode = MKDirectionsMode.Driving;
            launchOptions.ShowTraffic = false;

        catch (Exception ex)
            var erroralert = new UIAlertView("Location could not be found", "", null, "Ok", null);

That converts the old address (I once lived there – 12 years ago) to coordinates that are passed, along with the Name and Phonenumber to the Apple iPhone Maps App. Here’s what that code produces (dumped from my iPhone).


The Other Way

This involves creating a MapView etc and then asking Apple for directions between points a and b. Rather than explain further I point you to Blake Davidson who has done that (in C#).

It’s not that difficult but there’s not an awful lot about it. I haven’t tried it with .MP3 files but what I’ve done works with .wav.

First create a project folder containing the sound files. Each file should be set to Content in the property/build Action.


Then define AvAudioPlayer to play the file. I created three in the class:

public static AVAudioPlayer [] player = new AVAudioPlayer[3];
private static int playIndex {get;set;}
       public static void PlaySound(string filename)
            if (playIndex == 3)
                playIndex = 0;
            if (player[playIndex] != null)
                var file = Path.Combine("sounds", filename);
                var Soundurl = NSUrl.FromFilename(file);
                player[playIndex] = AVAudioPlayer.FromUrl(Soundurl);
                var onePlay = player[playIndex];
                onePlay.CurrentTime = onePlay.Duration*2;
                onePlay.NumberOfLoops = 1;
                onePlay.Volume = 1.0f;
                onePlay.FinishedPlaying += DidFinishPlaying;
            catch (Exception e)
                LogLine("PlaySound: Error: " + e.Message, true);

        public static void DidFinishPlaying(object sender , AVStatusEventArgs e)
            if (e.Status)
                // your code


The playIndex int variable tracks which is the next AvAudioPlayer to be used. Note that the file must specify the directory used – my files are in sounds. The player[] variables exist at the class level not locally because you don’t want the garbage collector to zap them once it exits the PlaySound method.

The AVAudioPlayer.FinishedPlaying event handler (delegate in Apple’s terms) lets you catch when it finishes playing. The AvStatusEventArgs.Status is a bool indicating if it has finished.

Because in my App, two possibly three sounds could play simultaneously, I used three AvAudioPlayers. Without them, you have to stop the current sound playing.