ExifTool Forum

ExifTool => Developers => Topic started by: Joanna Carter on August 19, 2018, 10:02:07 AM

Title: Launch path not accessible
Post by: Joanna Carter on August 19, 2018, 10:02:07 AM
Greetings.

I am in the process of trying to create a Swift wrapper for macOS development and to test it, I'm trying to embed ExifTool in a macOS app.

I have tried to copy the deployment location that I found in ExifEditor so, inside the app bundle, I end up with the following hierarchy:

Contents
- Resources
-- exif
--- lib (folder with File and Image inside it)
--- exiftool (executable)

I am able to execute exiftool -ver in order to get the version but, when I try to run it with arguments that obviously invoke one or more of the scripts, I end up with an exception and a log message that the launch path isn't accessible.

I am trying to run: exiftool -a -u -g1 fileURL.path , as per one of the examples from the site.

Since this will be a sandboxed app, I was wondering whether the ownership/permissions of the scripts, etc: were a factor?

Inside ExifEditor, they are root|wheel; inside my app, they are joannacarter|admin

Anyone got any ideas?
Title: Re: Launch path not accessible
Post by: Phil Harvey on August 19, 2018, 09:18:40 PM
If exiftool -ver works, then the application can at least load the lib/Image/ExifTool.pm library properly, so it should be able to load all others as well if they have the same permissions.

So it is probably loading of the image file that isn't accessible, and someone who knows about Swift would be better suited to answer this.

- Phil
Title: Re: Launch path not accessible
Post by: Joanna Carter on August 20, 2018, 05:38:49 AM
OK Phil

It was obviously one of those days when I couldn't see the wood for the trees  :o

My only problem was:

    let task = Process()
   
    task.executableURL = appURL <- I'd forgotten to type this line  :-[ ::) 8)
   
    task.arguments = arguments
   


I shall go back to bed now  ;)