Hello,
I used the code there to register our custom URI Let Your OS X Desktop App React to Custom URIs – Xojo Programming Blog
It was working for a while since we implemented it but I just found that it’s no longer working for my app or maybe I do something bad.
There is nothing written in the Info.plist anymore
Here is the code for my App in the build settings, it’s coming right after the Build step,
This script applies to Both (Release and Debug) and on Any architecture
Dim appPath As String = CurrentBuildLocation + "/" + CurrentBuildAppName +".app"
call DoShellCommand("/usr/libexec/PlistBuddy -c ""add :CFBundleURLTypes array"" " + appPath + "/Contents/Info.plist")
call DoShellCommand("/usr/libexec/PlistBuddy -c ""add :CFBundleURLTypes:0 dict"" " + appPath + "/Contents/Info.plist")
call DoShellCommand("/usr/libexec/PlistBuddy -c ""add :CFBundleURLTypes:0:CFBundleURLName string 'Laby'"" " +appPath + "/Contents/Info.plist")
call DoShellCommand("/usr/libexec/PlistBuddy -c ""add :CFBundleURLTypes:0:CFBundleURLSchemes array"" " + appPath + "/Contents/Info.plist")
call DoShellCommand("/usr/libexec/PlistBuddy -c ""add :CFBundleURLTypes:0:CFBundleURLSchemes:0 string 'laby'"" " + appPath + "/Contents/Info.plist")
When I try to extract (manually) the command and enter them in iTerm, it’s working fine but not through the Build settings.
/usr/libexec/PlistBuddy -c "add :CFBundleURLTypes array" /Users/julien/Documents/Sources/laby/Laby.debug.app/Contents/Info.plist
- Is there a way to print to the system log the output of the command executed in the build setting?
- Is using defaults prefered over PlistBuddy?
- Am I doing something wrong?
Xojo: 2022r1
macOS: 11.5.1
Thank you,
Julien