Blog

iOS 10 Privacy Settings

Since the iOS upgrade apps need to register their use of various phone features, which if you are developing an old app can cause unexpected results.

Our TheatreSound app suddenly started to create two strange results:

  • The Media Picker wouldn't work. It would just open as a blank screen and then immediately close again. No warnings or notifcations were posted on the phone.
  • When connected to Xcode, the same procedure produced:
    2017-01-16 22:16:37.612964 TheatreSound[271:10452] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
    2017-01-16 22:16:37.620851 TheatreSound[271:10452] [MC] Reading from public effective user settings.

The media picker should have been fine. It was called via a simple IBAction

- (IBAction) showMediaPicker: (id) sender {
    MPMediaPickerController *picker = [[MPMediaPickerController alloc] initWithMediaTypes: MPMediaTypeAnyAudio];
    picker.delegate = self;
    picker.allowsPickingMultipleItems = YES;
    picker.showsCloudItems = NO;
    picker.prompt = NSLocalizedString (@"Choose loops", @"");
   
    [self presentViewController:picker animated:YES completion:nil];
}

The first of these problems was harder to diagnose because no warnings were posted. But I had a feeling the problem might be to do with privacy settings, having had isses with connection to the microphone previously. Also, reviewing the Apple Media Player API reference, (the parent of the MPMediaPickerController), there is posted a notice saying:

Important  Starting in iOS 10, accessing a user's media library requires the user's consent. You must provide the reason for accessing the media library in the app's info.plist.

The solution is to add the following into the app info.plist (Property List) file:

    <key>NSAppleMusicUsageDescription</key>
    <string>The library is used to source tracks, loops and sounds for your shows</string>

This information can also be added via Xcode, by clicking on the app name at the top of the file list tree to bring up the various project settings, selecting the main app target from TARGETS, and selecting the 'Info' tab. Expand 'Custom iOS Target Properties' and hover over the bottom line to bring up the + - buttons and click on the +. Then scroll down the list until you find the items starting with 'Privacy - '.

Xcode plist privacy settings selection

After that it all works as expected again.

Removing security exceptions in Firefox 44.0

Firefox warns you when you try to visit a website via HTTPS and the site does not have a valid security certificate, or the certificate is expired or missing. It's sometimes helpful to bypass this security alert by adding an exception, which can be temporarily or permanent. If you added the exception permanently it ignores the certificate forever; this could be a security risk.

You can remove permanent exception by doing the following:

  1. Open Firefox preferences and click on the Advanced page.
    Firefox preferences - Advanced
  2. Select the Certificates tab, and then click on the View Certificates button.
    Firefox preferences - Advanced - View Certificates
  3. Find the certificate you want to delete - I find the servers tab the most useful for this - click on it and then click the Delete... button at the bottom
    Firefox preferences - Advanced - View Certificates

Job done!

1 & 1 email rejection

We were having a lot of trouble with users on 1&1 not receiving emails from our server. The answer was down to the MX records pointing to a CNAME not an A record.

The bounce report looks like:

Action: failed
Status: 5.0.0
Remote-MTA: dns; mx01.1and1.co.uk
Diagnostic-Code: smtp; 550-Requested action not taken: mailbox unavailable 550
   invalid DNS MX or A/AAAA resource record

Simply, switch from CNAME to A and the problem goes!

http://jheslop.com/2009/07/31/1and1-tightens-up-email-spam-rules/