During a recent app build with a camera, i encountered this error and this is the solution i was able to solve in a macbook with MacOS

Error:

Unable To Install “photo-gallery”

Domain: IXUserPresentableErrorDomain

Code: 1

Failure Reason: Please try again later.

Recovery Suggestion: Bundle at path /Users/laptop/Library/Developer/CoreSimulator/Devices/8A8BECB6-2AA0-4887-A253-E84139B2F8BA/data/Library/Caches/com.apple.mobile.installd.staging/temp.hxjBq3/extracted/Payload/App.app has missing or invalid CFBundleExecutable in its Info.plist

User Info: {

    DVTErrorCreationDateKey = "2023-09-15 12:03:15 +0000";

    IDERunOperationFailingWorker = IDELaunchiPhoneSimulatorLauncher;

}

Solution:

1. rebuild the app with these commands:

rm -rf ios

ionic build

ionic cap add ios

code ios/App/App/Info.plist

Add the following Keys:

 

	<key>NSPhotoLibraryAddUsageDescription</key>

<string>Write a good description as to why you accessing photo library</string>

    <key>NSPhotoLibraryUsageDescription</key>

    <string>Write a usage descrption about accessing photo library</string>

    <key>NSCameraUsageDescription</key>

    <string>Camera Usage description why you accessing photo library</string>

Save changes to Info.plist

ionic cap copy

ionic cap sync

ionic cap open ios

Resources:

  1. https://capacitorjs.com/docs/apis/camera#ios
  2. https://capacitorjs.com/docs/ios/configuration
  3. https://stackoverflow.com/questions/39519773/nsphotolibraryusagedescription-key-must-be-present-in-info-plist-to-use-camera-r
  4. https://stackoverflow.com/questions/53117077/swift-unable-to-open-file-in-target-xcode-10