plist

In BASH, how do I use defaults write on a plist for a existing element in an array?

假如想象 提交于 2021-02-18 19:14:10
问题 I want to change the value of DEFAULT_VALUE_PLACEHOLDER in the following plist using the command line tool defaults <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>PreferenceSpecifiers</key> <array> <dict> <key>DefaultValue</key> <string>DEFAULT_VALUE_PLACEHOLDER</string> <key>Type</key> <string>PSTitleValueSpecifier</string> <key>Title</key> <string>Version</string>

Associate a shell script (starting a Java JAR) with a file extension in a Mac application bundle

北慕城南 提交于 2021-02-08 11:48:42
问题 To run a Java8-JAR archive on Macs with a higher Java version I pack the jar into an APP bundle (stuff.app) together with a bash-script, let's call it stuff.sh (edit: removed "-cp" argument, inserted echoing command line arguments): #!/bin/bash VM_ARGS_A="--add-modules=java.xml.bind" # Set the working directory DIR=$(cd "$(dirname "$0")"; pwd) APP_JAR="some-java-stuff.jar" APP_NAME="Some Java Stuff" APP_ICNS="stuff.icns" #test: set command line args STUFF_TITLE="Launching $APP_NAME" STUFF

Associate a shell script (starting a Java JAR) with a file extension in a Mac application bundle

荒凉一梦 提交于 2021-02-08 11:48:04
问题 To run a Java8-JAR archive on Macs with a higher Java version I pack the jar into an APP bundle (stuff.app) together with a bash-script, let's call it stuff.sh (edit: removed "-cp" argument, inserted echoing command line arguments): #!/bin/bash VM_ARGS_A="--add-modules=java.xml.bind" # Set the working directory DIR=$(cd "$(dirname "$0")"; pwd) APP_JAR="some-java-stuff.jar" APP_NAME="Some Java Stuff" APP_ICNS="stuff.icns" #test: set command line args STUFF_TITLE="Launching $APP_NAME" STUFF

Mac OS In App Sandbox Entitlements Directory Read Issue

余生颓废 提交于 2021-02-08 08:54:23
问题 I am having an issue with my App Sandbox entitlements. My Mac OS app allows a user to open an XML file. When that file is parsed it reads a image file in the same directory as XML file. If App Sandbox is False, the image loads just fine. If App Sandbox is True, the image fails to load. (The XML file is still read) The App Sandbox must be True to push to the App Store. I have tried com.apple.security.files.user-selected.read-write = TRUE com.apple.security.temporary-exception.files.home

App name in Finder not matching app name in Terminal

半城伤御伤魂 提交于 2021-02-08 08:24:39
问题 It's shown as nwjs.app in Finder but nw-demo.app in Terminal. If I rename the app using mv nw-demo.app nw-demo2.app , it shows correctly in Finder. If I then rename it back using mv nw-demo2.app nw-demo.app , it shows as nwjs.app again. Strange. The name should be nw-demo.app , that's what I want, but it's nwjs.app . I don't see anything in nw-demo.app/Contents/Info.plist or anywhere that would set it to nwjs . Here's the Info.plist : 回答1: All I had to do was delete nw-demo.app/Contents

Sharing a plist file using iCloud

眉间皱痕 提交于 2021-02-06 09:12:59
问题 I have a relativley simple app which persists data to a plist file located in the documents folder. The data loads into a UITableView at startup. The user can then edit, delete or add records and any changes get saved back to the plist file. Now I would like to share this data (the plist file) across devices using iCloud. I have looked at the documentation and my understanding is that I need to create a UIDocument to "manage" the plist file. I have looked at several iCloud tutorials however

Sharing a plist file using iCloud

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-06 09:12:34
问题 I have a relativley simple app which persists data to a plist file located in the documents folder. The data loads into a UITableView at startup. The user can then edit, delete or add records and any changes get saved back to the plist file. Now I would like to share this data (the plist file) across devices using iCloud. I have looked at the documentation and my understanding is that I need to create a UIDocument to "manage" the plist file. I have looked at several iCloud tutorials however

Editing plist file using shell script

為{幸葍}努か 提交于 2021-02-05 20:03:46
问题 I have used pkgbuild to create a default Component Property List file. The file looks like: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList- 1.0.dtd"> <plist version="1.0"> <array> <dict> <key>BundleHasStrictIdentifier</key> <true/> <key>BundleIsRelocatable</key> <true/> <key>BundleIsVersionChecked</key> <true/> <key>BundleOverwriteAction</key> <string>upgrade</string> <key>RootRelativeBundlePath</key> <string

Editing plist file using shell script

纵饮孤独 提交于 2021-02-05 20:00:59
问题 I have used pkgbuild to create a default Component Property List file. The file looks like: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList- 1.0.dtd"> <plist version="1.0"> <array> <dict> <key>BundleHasStrictIdentifier</key> <true/> <key>BundleIsRelocatable</key> <true/> <key>BundleIsVersionChecked</key> <true/> <key>BundleOverwriteAction</key> <string>upgrade</string> <key>RootRelativeBundlePath</key> <string

Editing plist file using shell script

孤街浪徒 提交于 2021-02-05 20:00:29
问题 I have used pkgbuild to create a default Component Property List file. The file looks like: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList- 1.0.dtd"> <plist version="1.0"> <array> <dict> <key>BundleHasStrictIdentifier</key> <true/> <key>BundleIsRelocatable</key> <true/> <key>BundleIsVersionChecked</key> <true/> <key>BundleOverwriteAction</key> <string>upgrade</string> <key>RootRelativeBundlePath</key> <string