How can i update the url and bundle-identifier for the below plist using fastlane ?
While using the update_info_plist command from fastlane its asking for a block , i dont understand what it is.
<?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>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>https://server/cache/app.ipa</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.demo</string>
<key>bundle-version</key>
<string>1.0</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>CavionNovus</string>
</dict>
</dict>
</array>
</dict>
</plist>
Related
I am having troubles making a Launchd script. It is fairly simple, all it needs to do is launch an application - the location is: /Library/Desktop Pictures/wallpaper
I've loaded the file using terminal, and terminal gives no errors but the script does not execute. I need the script to execute every 1 hour.
The plist file:
<?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>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>wallpaper.restart</string>
<key>ProgramArguments</key>
<array>
<string>/Library/Desktop Pictures/wallpaper.wallpaperapp.app</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>1</integer>
</dict>
</dict>
</plist>
Please Help.
Thanks,
Devansh
EDIT:
Below is the next better version of the above code, but still not much luck :(
<?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>KeepAlive</key>
<dict>
<key>AfterInitialDemand</key>
<true/>
</dict>
<key>Label</key>
<string>com.plisterine.backgroundchanger</string>
<key>LowPriorityIO</key>
<false/>
<key>Nice</key>
<integer>0</integer>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/osascript</string>
<string>/Library/Desktop Pictures/wallpaper/wallpaper.scpt</string>
</array>
<key>StartInterval</key>
<integer>3600</integer>
</dict>
</plist>
StartCalendarInterval runs the script at a specific time every day, in your case at 01:00 (1 am)
To run it every hour you have to write
<key>StartInterval</key>
<integer>3600</integer>
Here she comes...
<?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>Label</key>
<string>Titan Server</string>
<key>ProgramArguments</key>
<array>
<string>/Users/Ian/Titan/bin/titan.sh</string>
<string>start</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>/Users/Ian/Titan</string>
</dict>
</plist>
If I go into terminal and do...
launchctl load "Titan Server.plist"
... it says ...
/Library/LaunchAgents/Titan Server.plist: Operation already in
progress
Huh?
If I navigate to the working directory manually and type the command it works ok.
I want to create a LaunchDaemon on OSX Mavericks for my Gitblit, this is my file (org.gitblit.plist):
<?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>KeepAlive</key>
<true/>
<key>Label</key>
<string>org.gitblit.plist</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/java</string>
<string>--baseFolder</string>
<string>data</string>
<string>-jar</string>
<string>/Applications/gitblit/gitblit.jar</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
It's not working, but when I try java -jar gitblit.jar --baseFolder data on /Applications/gitblit everything works fine. Am I missing something?
The Gitblit GO distribution comes with a shell script gitblit.sh that will work for this purpose. This is the version of the LaunchAgent plist ~/Library/LaunchAgents/org.gitblit.plist I used.
Note the addition of the WorkingDirectory key, as well as log files in case of errors.
<?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>KeepAlive</key>
<true/>
<key>Label</key>
<string>org.gitblit.plist</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Applications/gitblit/gitblit.sh</string>
</array>
<key>WorkingDirectory</key>
<string>/Applications/gitblit/</string>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/Applications/gitblit/stdout.txt</string>
<key>StandardErrorPath</key>
<string>/Applications/gitblit/sterr.txt</string>
</dict>
</plist>
So I finally ended up cheating like this:
I saved this script on /opt/scripts/start_gitblit.sh:
#!/bin/bash
cd /Applications/gitblit/
java -jar gitblit.jar --baseFolder data
Then I stored this property list on ~/Library/LaunchAgents/org.gitblit.plist:
<?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>KeepAlive</key>
<true/>
<key>Label</key>
<string>org.gitblit.plist</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/opt/scripts/start_gitblit.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Everything is working now.
I have the following in my Cordova.plist
<?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>KeyboardDisplayRequiresUserAction</key>
<true/>
<key>SuppressesIncrementalRendering</key>
<false/>
<key>UIWebViewBounce</key>
<false/>
<key>TopActivityIndicator</key>
<string>gray</string>
<key>EnableLocation</key>
<false/>
<key>EnableViewportScale</key>
<false/>
<key>AutoHideSplashScreen</key>
<true/>
<key>ShowSplashScreenSpinner</key>
<true/>
<key>MediaPlaybackRequiresUserAction</key>
<false/>
<key>AllowInlineMediaPlayback</key>
<false/>
<key>OpenAllWhitelistURLsInWebView</key>
<false/>
<key>BackupWebStorage</key>
<string>cloud</string>
<key>ExternalHosts</key>
<array/>
<key>item 0</key>
<string>*</string>
<key>Plugins</key>
<dict>
<key>NavigationBar</key>
<string>NavigationBar</string>
<key>EmailComposer</key>
<string>EmailComposer</string>
<key>Device</key>
<string>CDVDevice</string>
<key>TabBar</key>
<string>TabBar</string>
<key>Logger</key>
<string>CDVLogger</string>
<key>Compass</key>
<string>CDVLocation</string>
<key>Accelerometer</key>
<string>CDVAccelerometer</string>
<key>Camera</key>
<string>CDVCamera</string>
<key>NetworkStatus</key>
<string>CDVConnection</string>
<key>Contacts</key>
<string>CDVContacts</string>
<key>Debug Console</key>
<string>CDVDebugConsole</string>
<key>Echo</key>
<string>CDVEcho</string>
<key>File</key>
<string>CDVFile</string>
<key>FileTransfer</key>
<string>CDVFileTransfer</string>
<key>Geolocation</key>
<string>CDVLocation</string>
<key>Notification</key>
<string>CDVNotification</string>
<key>Media</key>
<string>CDVSound</string>
<key>Capture</key>
<string>CDVCapture</string>
<key>SplashScreen</key>
<string>CDVSplashScreen</string>
<key>Battery</key>
<string>CDVBattery</string>
<key>Globalization</key>
<string>CDVGlobalization</string>
</dict>
</dict>
</plist>
I have added * as an external host which previously has always worked without issue, I am using Cordova 2.2.0 and when trying to make AJAX calls I am getting the White-list error.
I don't see where I am going wrong!
I have changed this part of the XML -
<array/>
<key>item 0</key>
<string>*</string>
To this -
<key>ExternalHosts</key>
<array>
<string>*</string>
</array>
I have an application which i want to run as service on MacOS X. I used JSVC as wrapper and currently it starts in console just fine, shutdown process is correct, etc. So now i have to register it as service. Found some manuals, wrote .plist file. Next i executed
sudo launchctl load /Library/LaunchDaemons/my.service.plist
sudo launchctl start my.service
And nothing happened. Service didn't started.
plist contents:
<?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>Label</key>
<string>my.service</string>
<key>ProgramArguments</key>
<array>
<string>/servertest/MYService</string>
<string>-jvm</string>
<string>server</string>
<string>-outfile</string>
<string>out.txt</string>
<string>-errfile</string>
<string>err.txt</string>
<string>-verbose</string>
<string>-debug</string>
<string>-home</string>
<string>/System/Library/Frameworks/JavaVM.framework/Home</string>
<string>-cp</string>
<string>./lib/hsqldb.jar:./lib/my-wrapper.jar:./lib/commons-daemon-1.0.8.jar</string>
<string>my.service.DaemonMac</string>
</array>
<key>WorkingDirectory</key>
<string>/servertest</string>
<key>StandardOutPath</key>
<string>/servertest/stdout.log</string>
<key>StandardErrorPath</key>
<string>/servertest/stderr.log</string>
<key>KeepAlive</key>
<false/>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
What am i doing wrong?
Okay, nobody knows, i guess. Anyway, i handled it myself. Here's example which worked for me:
<?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>KeepAlive</key>
<false/>
<key>Label</key>
<string>myserver</string>
<key>OnDemand</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/opt/MYServer/MYServer</string>
<string>-server</string>
<string>-outfile</string>
<string>/opt/MYServer/out.txt</string>
<string>-errfile</string>
<string>/opt/MYServer/err.txt</string>
<string>-verbose</string>
<string>-debug</string>
<string>-nodetach</string>
<string>-home</string>
<string>/System/Library/Frameworks/JavaVM.framework/Home</string>
<string>-cp</string>
<string>/opt/MYServer/lib/hsqldb.jar:/opt/MYServer/lib/my-wrapper.jar:/opt/MYServer/lib/commons-daemon-1.0.8.jar</string>
<string>my.service.DaemonMac</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/opt/MYServer/stderr.log</string>
<key>StandardOutPath</key>
<string>/opt/MYServer/stdout.log</string>
<key>WorkingDirectory</key>
<string>/opt/MYServer</string>
</dict>
</plist>