Contents

ChrisMash/ProvisioningProfile

A Swift package to read your app’s provisioning profile

Adding to your project

Follow Apple's guidance to add the package to your project.

Usage

In your source code

import ProvisioningProfile
let profileName = ProvisioningProfile.profile()?.name
let profileExpiry = ProvisioningProfile.profile()?.expiryDate
let profileExpiryFormatted = ProvisioningProfile.profile().formattedExpiryDate

Customisation

The ProvisioningProfile class has the following customisation points:

  • The static property dateFormatter can be used to set a custom DateFormatter for use in generating the formattedExpiryDate

property, if the default formatting is not suitable.

  • The static property logger can be used to provide a delegate that receives information about errors or warnings

that have occurred during loading and parsing of the provisioning profile. See the Logger protocol for more information.

Example apps

See the test apps in the Examples folder for runnable example usage.

In your build phases

You can add the check_provisioning_expiry.sh shell script as a Run Script build phase to provide a warning or error if the profile will expire soon.

Copy the script file out of the package/repo and add it to your own project's files. See the build phases of the test apps in Examples for an example of how to make use of the script.

Contributions

If you wish to make any contributions to this project, feel free to make a fork and then submit a pull request back with your proposed changes/additions (maybe reach out to me first with your plans to gauge my willingness to accept the contribution).

Make sure any changes or additions are covered with unit tests and the test apps are updated as appropriate.

Bear in mind that breaking changes should be avoided where possible!

SwiftLint

The project is setup with SwiftLint to check code quality a little. It's configured by the .swiftlint.yml file in the root of the project.

Run a scan with the following command in the root of the project: swiftlint

Jazzy docs

API documentation can be generated with Jazzy. Whilst this isn't published it's useful for pointing out parts of the API that aren't documented correctly (check the undocumented.json file for any warnings after the documentation is generated), so you can be sure the API documentation available within Xcode will be correct and useful to users.

Generate the documentation using the following command in the root of the project: jazzy

Package Metadata

Repository: ChrisMash/ProvisioningProfile

Stars: 5

Forks: 4

Open issues: 0

Default branch: main

Primary language: swift

License: MIT

Topics: ios, macos, swift, swift-library, swift-package, tvos, watchos

README: README.md