Search code examples
app-store-connectswift-playgroundinfo.plist

Is there a way to apply ITSAppUsesNonExemptEncryption in a Swift Playground?


In Swift Playgrounds 4 you can upload apps to App Store Connect. Like in Xcode, by default App Store Connect will complain every build is missing compliance when you upload it and cannot be tested until you provide the information.

If you are building an application in Xcode that doesn't use non-exempt encryption you can set the key ITSAppUsesNonExemptEncryption in your Info.plist and App Store Connect will skip the compliance step for each build.

Swift Playgrounds don't have an info.plist, so is there a way to provide this value inside Swift Playgrounds or is this just a minor oversight?


Solution

  • If you open the .swiftpm file package, and look at the Package.swift file, you will see the .iOSApplication product. It takes an optional value, additionalInfoPlistContentFilePath. Give that a relative path to an Info.plist file you create, and values from that file will be merged into the app's final Info.plist when you build.

    (I know the Package.swift file has a comment saying you shouldn't edit it because it is generated, but Apple employees on Twitter have said they try to be good about not overwriting valid changes made. I can confirm the plist one is working for me.)

    Details here.