reports icon indicating copy to clipboard operation
reports copied to clipboard

FB9824864: Swift Playgrounds drops additionalInfoPlistContentFilePath property when the package manifest changes

Open insidegui opened this issue 4 years ago • 1 comments

  • Date: 2021-12-28
  • Resolution: Open
  • Area: Swift Playgrounds
  • OS: iPadOS
  • Type: Incorrect/Unexpected Behavior

Details

Description

Some types of apps (see FB9824788) have the need to customize the contents in Info.plist for key functionality such as supporting opening documents of specific types or declaring user activity and scene types.

This is currently only possible in Swift Playgrounds by using a Mac to manually edit the Package.swift file and adding the additionalInfoPlistContentFilePath to the iOSApplication product, pointing to a property list file with the contents that should be appended to the app’s Info.plist during the build process.

The manual modification works, even when building in Swift Playgrounds on iPad. Unfortunately, the app will remove the additionalInfoPlistContentFilePath for some modifications done to the manifest, such as changing the app’s icon or attempting to upload a new version from Swift Playgrounds (presumably because that increments the build number).

Please list the steps you took to reproduce the issue:

  • Open the sample project in Swift Playgrounds for iPad
  • Build and run the app
  • You can create new documents and open existing documents, because the app’s Info.plist is having the contents of MoreInfo.plist merged into it, declaring the app’s document type
  • Go back to Swift Playgrounds and change something that causes the manifest to be modified, such as the app icon or name
  • Build and run again

What did you expect to happen?

  • The app should still work as it did before the change

Ideally, Swift Playgrounds would offer a way to set the additionalInfoPlistContentFilePath property without requiring us to open the project on the Mac and edit the Package.swift file. At a minimum, it should preserve this modification so that a continuous workflow can be achieved in Swift Playgrounds for iPad, for apps that require changes to Info.plist that are not covered by the Swift Playgrounds app editor.

What actually happened?

  • You can no longer create new documents or open existing documents because the additionalInfoPlistContentFilePath property was dropped from Package.swift, so the app’s Info.plist no longer contains the necessary keys

Files

DocPlaygroundsApp.swiftpm.zip

insidegui avatar Dec 28 '21 18:12 insidegui

@insidegui I think this problem is solved it on Swift Playgtounds 4.1.

crane-hiromu avatar Sep 06 '22 14:09 crane-hiromu