LaunchAgents Mac OS X - objective-c

So I need to create a LaunchAgent plist file for my program to run on startup. I have the following text for my plist file but when I try to open the plist file it xCode tells me that the files data isn't in the correct format. Also my program doesn't run on startup and I would assume that the incorrect data format is the problem.
I have looked at everything and it follows my file follows Apples documentation on LaunchAgents.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.coremanager.webhelper</string>
<key>KeepAlive</key>
<true/>
<key>RunAtLoad</key>
<true/>
<key>Program</key>
<string>/Users/schmidt73/Library/Developer/Xcode/DerivedData/Linux-dfoidphusbtywcgykdsujjvymczr/Build/Products/Debug/Linux</string>
</dict>
</plist>
What could I be doing wrong?

Related

Can not start rabbitmq on MacOS Big Sur

I installed rabbitmq using brew install rabbitmq. Then started rabbitmq with brew start rabbitmq. Then I listed services but rabbitmq showed errored status
$: brew services list
Name Status User Plist
rabbitmq error riyad /Users/tecbackup/Library/LaunchAgents/homebrew.mxcl.rabbitmq.plist
unbound stopped
then i went to cat /Users/tecbackup/Library/LaunchAgents/homebrew.mxcl.rabbitmq.plist. It showed me to configure rabbitmq enviroments.
bitmq.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.rabbitmq</string>
<key>Program</key>
<string>/usr/local/opt/rabbitmq/sbin/rabbitmq-server</string>
<key>RunAtLoad</key>
<true/>
<key>EnvironmentVariables</key>
<dict>
<!-- need erl in the path -->
<key>PATH</key>
<string>/usr/local/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/bin</string>
<!-- specify the path to the rabbitmq-env.conf file -->
<key>CONF_ENV_FILE</key>
<string>/usr/local/etc/rabbitmq/rabbitmq-env.conf</string>
</dict>
<key>StandardErrorPath</key>
<string>/usr/local/var/log/rabbitmq/std_error.log</string>
<key>StandardOutPath</key>
<string>/usr/local/var/log/rabbitmq/std_out.log</string>
</dict>
</plist>
i understand that it wants me set the env file but i dont know how to do it properly...
my rabbitmq-env.conf file is ->
CONFIG_FILE=/usr/local/etc/rabbitmq/rabbitmq
NODE_IP_ADDRESS=127.0.0.1
NODENAME=rabbit#localhost
RABBITMQ_LOG_BASE=/usr/local/var/log/rabbitmq
As i am new to rabbitmq, please be kind and give me a proper guide to start and maintain it perfectly...

Insert a source file in programlisting with xinclude in docbook

I've the following file tree
mainfolder
|-assembly.xml
|
|-chapters
| |-introduction.xml
|
|-source
|-example01
|-main.cpp
assembly.xml is the assembly file of my docbook. It contains a reference to introduction.xml.
This is the assembly:
<?xml version="1.0" encoding="UTF-8"?>
<assembly version="5.1"
xmlns="http://docbook.org/ns/docbook">
<resources xml:base="chapters/">
<resource href="introduction.xml" xml:id="introduction" />
</resources>
<structure xml:id="main-book">
<info>
<description>Book chapters</description>
</info>
<output renderas="book"/>
<module resourceref="introduction"/>
</structure>
</assembly>
introduction.xml is docbook chapter. I want to insert in it an example including the main.cpp.
<?xml version="1.0" encoding="UTF-8"?>
<chapter version="5.1"
xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:trans="http://docbook.org/ns/transclusion"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:m="http://www.w3.org/1998/Math/MathML"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:db="http://docbook.org/ns/docbook">
<info>
<title>Introduction</title>
</info>
<section>
<info>
<title>Chapter title</title>
</info>
<para>
You can see an example:
</para>
<example>
<title>main example</title>
<programlisting language="c++">
<xi:include href="./../source/example01/maiin.cpp" parse="text" />
</programlisting>
</example>
</section>
</chapter>
Anyway, when I build the book (I'm using personal edition of XMLMind), I don't see anything. In the PDF the example is printed, but instead of the source code inside the main.cpp I see
<xi:include></xi:include>
What I'm doing wrong? How can I include the source code from the file?
I've reproduced your situation in a different ways and got things working in a both cases.
You didn't mention the exact steps you make to build a book using XMLMind XML Editor (XXE for short), but the following steps certainly worked well.
None 1: I've used XXE Professional Edition, but as I know the difference between versions is only in putting random character within text if generating PDF from Personal Edition.
Note 2: XXE says that <description>Book chapters</description> element is not allowed within you context. Despite that fact, the assembly can be generated successfully.
1. Getting things working within XXE
Open an assembly file in XXE.
Select Convert > Convert document > Convert to PDF.
Select a path to save pdf file and press OK button.
2. Getting things working manually in command line
Use your exact files and DIR structure (I included my own .c file sample for my own test).
Use XXE assembly processor: http://www.xmlmind.com/xmleditor/assembly.shtml - it has the same codebase that XXE used for working with assemblies from XXE GUI.
Get docbook book file from assembly:assembly-1_0_2_01/bin/assembly -v assembly.xml docbook_book.xml In my test I've got the .c sample file included - that proves that assembly utility works well with XInclude.
Get .pdf manually: fop -c <config_file> -xsl <path_to_docbook_ns_stylesheets>/fo/docbook.xsl -xml docbook_book.xml -pdf docbook_book.pdf
I've got the final result with .c sample included in both cases.

How to add xml file during installation using wix

I want to create the following xml during the installation created by wix 3.9.
<?xml version="1.0" encoding="utf-8"?>
<MappedUsers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UsersList>
<LyncUserID>
<CustomUserName>John.Smith</UcaUserName>
</LyncUcaUserID>
</UsersList>
</MappedUsers>
Tried creating the file using following code but got the error message during installtion that file doesn't exists.
<?define UserNameFile="[AppDataFolder]ThirdParty\LyncUcaUserMapping.XML" ?>
<util:XmlFile Id="UserMapping" Value="[USER_NAME]" ElementPath="/UsersList/LyncUserID/add[\[]#key='UcaUserName'[\]]" Action="setValue" File="$(var.UserNameFile)" Name="value" Sequence="7" />
Since I could not create the file during the installation I created the file manually and placed in my appdata folder. But then above code didn't work either as it says "failed to find the following node".
What am I missing?
Best method to do this is first you copy a sample xml file as below.
<?xml version="1.0" encoding="utf-8"?>
<MappedUsers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
</MappedUsers>
Then edit it using a custom action.
Here is a link which shows how to edit xml files using c#
http://support.microsoft.com/kb/301233
Following link shows how to add custom actions to a wix project.
http://wixtoolset.org/documentation/manual/v3/wixdev/extensions/authoring_custom_actions.html

Even after lowering the ios version in tiapp.xml , still throwing an error

I'm trying to check my application on my device but I have iOS 5.1.1. So I've set as 5.0 in tiapp.xml.
It is still throwing an error when I try to run it.
Error:
The device is running `iOS 5.1.1`, however the app's the minimum iOS version is set to 6.0
In order to install this app on this device, lower the <min-ios-ver> to 5.1 in the **tiapp.xml**:
[ERROR] : This app does not support the device "XXXXXX’s iPhone"
<ti:app xmlns:ti="http://ti.appcelerator.org">
<ios>
<min-ios-ver>5.0</min-ios-ver>
</ios>
</ti:app>
I have already added the "min-ios-version" tag still throwing the same error.
tiapp.xml:
<ti:app xmlns:ti="http://ti.appcelerator.org">
<id>com.XXXXXXXX</id>
<name>Taxi</name>
<version>1.0</version>
<publisher>XXXXXX</publisher>
<url>http://</url>
<description>not specified</description>
<copyright>2014 by XXXXX</copyright>
<icon>appicon.png</icon>
<fullscreen>false</fullscreen>
<navbar-hidden>false</navbar-hidden>
<analytics>true</analytics>
<guid>e7914e57-5b00-4ade-8254-1044c0c65b67</guid>
<property name="ti.ui.defaultunit" type="string">dp</property>
<ios>
<min-ios-ver>5.0</min-ios-ver>
<plist>
<dict>
<key>UISupportedInterfaceOrientations~iphone</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIRequiresPersistentWiFi</key>
<false/>
<key>UIPrerenderedIcon</key>
<false/>
<key>UIStatusBarHidden</key>
<false/>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleDefault</string>
</dict>
</plist>
</ios>
<android xmlns:android="http://schemas.android.com/apk/res/android"/>
<mobileweb>
<precache/>
<splash>
<enabled>true</enabled>
<inline-css-images>true</inline-css-images>
</splash>
<theme>default</theme>
</mobileweb>
<modules>
<module platform="commonjs">ti.cloud</module>
<module platform="iphone">ti.map</module>
<module platform="android">ti.map</module>
</modules>
<deployment-targets>
<target device="android">true</target>
<target device="blackberry">false</target>
<target device="ipad">true</target>
<target device="iphone">true</target>
<target device="mobileweb">true</target>
<target device="tizen">false</target>
</deployment-targets>
<sdk-version>3.2.1.GA</sdk-version>
</ti:app>
try to set min version in xcode before creating ipa

IBM Worklight 5.0.x - Changing the main HTML filename

I want my main html file to have a different name than my project.
I have found that Worklight will not reconnect if I don't use the same name. I have tried changing the mainFile tag in the application-descriptor.xml and changing the wlMainFile entry in worklight.plist on iOS.
Direct Update does not work. More importantly the application does not reconnect and I get a grey screen (presumably because iOS is trying to launch using the wrong file).
For example:
Project name: MyProject
main file: home.html
application-descriptor.xml: <mainFile>home.html</mainFile>
worklight.plist: <wlMainFile>home.html</wlMainFile>
The above does not work.
[Edited later to add my application-descriptor.xml]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Licensed Materials - Property of IBM
5725-G92 (C) Copyright IBM Corp. 2006, 2012. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or
disclosure restricted by GSA ADP Schedule Contract with IBM Corp. -->
<!-- Attribute "id" must be identical to application folder name -->
<application xmlns="http://www.worklight.com/application-descriptor" id="agent" platformVersion="5.0.6">
<displayName>My app</displayName>
<description>My application description </description>
<author>
<name>Redacted</name>
<email>redacted#foo.com</email>
<homepage>http://redacted.com</homepage>
<copyright>(c) redacted LLC</copyright>
</author>
<height>748</height>
<width>1024</width>
<mainFile>home.html</mainFile>
<thumbnailImage>common/images/ipad-app-icon.png</thumbnailImage>
<!-- -->
<ipad bundleId="com.redacted.myproject" version="1.0">
<worklightSettings include="true"/>
<security>
<encryptWebResources enabled="false"/>
<testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
</security>
</ipad>
<!-- -->
<android version="1.0">
<worklightSettings include="true"/>
<security>
<encryptWebResources enabled="false"/>
<testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
<publicSigningKey>Replace this text with the public key of the certificate with which you sign the APK.
For details see the Worklight Developer's Reference Guide.</publicSigningKey>
</security>
</android>
<worklightServerRootURL>http://${local.IPAddress}:8080</worklightServerRootURL>
</application>
So, to be clear, if I have encountered an issue with my mainFile being a name other than the project name. Worklight does not always call the filename specified by mainfile, especially after the initial use of the application.
If changing the HTML filename, make sure to also change:
The application folder name
In application-descriptor.xml:
id attribute in the application element
mainFile element value
All should match each other.
Make sure to delete the native folder and re-build the project.
Application will continue loading after the first time, and Direct Update will continue to function.
The only solution I have found is to name my main file the same name as the application within the project. My application runs fine when I do this.
[Note that this has been edited to match #Idan Adar's recommendation above. It's not the PROJECT that must match the mainFile, but the APPLICATION name]
The following works fine:
Project name: MyProject
main file: MyProject.html
application-descriptor.xml: <mainFile>MyProject.html</mainFile>
worklight.plist: <wlMainFile>MyProject.html</wlMainFile> (this is a generated file)
It appears that Worklight launches the iOS application properly the first time using the file specified in wlMainFile. Then when it has to resume or restart, it's looking for the application name rather than the value specified in wlMainFile.