Autogenerated acknowledgements in iOS settings bundle

Based on an article on howto create iOS settings bundles and a stackoverflow solution that takes .license files to display acknowledgements as child panel, I managed to integrate a project‘s acknowledgement list nicley.

Inspired by said stackoverflow solutions (Perl/python2) I created little python script and integrated it to my XCode setup as build phase. The script will create a acknowledement.plist file inside the settings.bundle folder. That file can then be displayed as child pane node. (Source)

import os
import sys
import plistlib
from pathlib import Path
plist = {'PreferenceSpecifiers': [], 'StringsTable': 'Acknowledgements'}
for filename in os.listdir("."):
    if filename.endswith(".license"):
        current_file = open(filename, 'r')
        title = filename.split(".license")[0]
        file_content =
        group = {'Type': 'PSGroupSpecifier', 'Title': title, 'FooterText': file_content} #noqa
filepath = Path('../Settings.bundle/Acknowledgements.plist')
with open(filepath.absolute(), "wb") as outfile:
    plistlib.dump(plist, outfile)

The snippet can be registered as Xcode build phase as explained on stackoverflow:

  1. Go to your project file
  2. Select the target
  3. Click the Build Phases tab
  4. In the lower right corner of that pane, click on 'Add Build Phase'
  5. Select 'Add Run Script'
  6. Modify to look something like this:
cd $SRCROOT/Licenses