3
votes

my app-builder ant task is like that:

<target name="build.app" depends="eval.dev.params, prepare.app, install.plugin.pay">
    <exec executable="/usr/sbin/ipconfig" outputproperty="ip.addr" osfamily="mac">
        <arg value="getifaddr"/>
        <arg value="en0"/>
    </exec>
    <condition property="current.ip" value="${server.path}">
        <not>
            <equals arg1="${build.env}" arg2="dev"/>
        </not>
    </condition>
    <condition property="current.ip" value="http://${ip.addr}:${server.port}">
        <equals arg1="${build.env}" arg2="dev"/>
    </condition>
    <echo message="${current.ip}"/>

    <app-builder applicationFolder="${build.path}/${context.root}"
                 nativeProjectPrefix="${context.root}" outputFolder="${build.path}"
                 worklightserverhost="${worklight.server.host}"/>
</target>

The problem is that after this step I get two xcodeprojects instead of one and the ios build then fails and I don't know how to inspect "app-builder" work.

The two resulting xcode projects are named this way:

  • /workspace/kWallet/build/myAppEnv/iphone/native/myAppMyAppIphone.xcodeproj
  • /workspace/kWallet/build/myAppEnv/iphone/native/myAppEnvMyAppIphone.xcodeproj
2
The structure of the app-builder section is peculiar. Can you try with a fresh ant task following the Worklight user documentation for ant-builder, and if it properly works only then add the rest of the conditions? See user documentation here: www-01.ibm.com/support/knowledgecenter/SSZH4A_6.1.0/…Idan Adar

2 Answers

0
votes

Are you sure that they both are being build by ant??? The myAppMyAppIphone.xcodeproj, by looking at name format, is the one built by the ant utility and the other myAppEnvMyAppIphone.xcodeproj was built by eclipse.

When you use eclipse to build the ios env it uses the format

<project><app><env>.xcodeproj  

where as ant uses the format

<app><app><env>.xcodeproj
0
votes
<app-builder applicationFolder="${build.path}/${context.root}"
                 nativeProjectPrefix="${context.root}" outputFolder="${build.path}"
                 worklightserverhost="${worklight.server.host}"/>

If you provide the nativeProjectPrefix to be the projectname then we get the xcode file name as same.