The process of building an app differs between Kony Visualizer and Kony Visualizer Classic. Select the procedure for the edition that you are using.
This topic contains the following sections:
To build an SPA application for Kony Visualizer, do the following:
localhost:9989/<ProjectName>/p
localhost:9989/<ProjectName>/kdw
To save time and effort you can rebuild your app with your most recent build settings, or you can build with new or different settings.
To build an app with your most recent build settings, do the following:
To build an app with new or different settings, do the following:
Note: You can also locate the URL in the Console log.
localhost:8888/<ProjectName>/p
localhost:8888/<ProjectName>/kdw
If your SPA app is published to Kony Fabric runtime server, the URLs of the SPA app are printed on the Kony Fabric Publish section. To access the publish page, navigate to File > Publish to KonyFabric. For more details, see the images below:
Starting with Kony Visualizer V8 Service Pack 2 on Kony Cloud, the Kony Fabric Server supports a new optimized web app package format that improves the app performance and minimizes downtime during deployments. Visualizer automatically picks the right format based on the version of the selected Kony Fabric Environment. Alternatively, you can force the Compatibility Mode to build the web app package using the older format irrespective of the selected environment. You can choose Compatibility mode from the Project Settings pane.
To select compatibility mode, do the following:
Client- side attacks leave your web applications vulnerable, allowing attackers to steal data. Obfuscators protect your apps from reverse engineering and malware attacks. Using Kony Visualizer V8 SP4, you can create a post-build hook for your SPA or Desktop Web applications.
Note: Ensure that the Kony application is working before you implement obfuscation. Also, make sure that the obfuscation of the web artifact works before importing it into Kony Visualizer.
Note: When you build a Responsive Web or SPA application in Release
mode, both the obfuscation and minify features are available in the build. The presence of these two features increases the total build time of the project.
If you want to disable the minify
feature before building the Responsive Web or SPA project, create a folder named custombuild under Project Resources. You must then place the spadw.properties file with minify
as false
, in the following path: <project-loc>/custombuild/spadw.properties
.
Here is the sample code to disable minify
in Release
mode:minify=false
To implement obfuscation in your web apps, do the following:
<your workspace folder>/<appid>/
.In the build.xml file, create an ANT task, postbuild.
Here is an example of the contents of the build.xml file with the postbuild task:
<?xml version="1.0" encoding="UTF-8"?> <project name="CustomBuildTask" basedir="."> <target name="postbuild" description="post build for spa/desktopweb"> <echo message="Post Build Started for Project :: ${projname}" /> <!-- Code to generate protected artifact from chosen obfucator and replacing the existing webartifact --> <!-- App Developer Code start --> <exec executable="cmd" failonerror="true"> <arg line="${project.loc}\custombuild\somebatch.bat --app ${webartifactpath} -- ANY OTHER INPUTS FOR YOUR OBFUSCATOR" /> <redirector output="${basedir}\protected_ob.log" alwayslog="true"></redirector> </exec> <!-- start error message code - to halt the system when any error occurs --> <loadfile srcfile="${basedir}\protected_ob.log" property="errorline"> <filterchain> <linecontains> <contains value="ERROR, UNEXPECTED EXCEPTION"></contains> </linecontains> </filterchain> </loadfile> <fail message="Unable to obfuscate - ${errorline}"> <condition> <contains string="${errorline}" substring="ERROR, UNEXPECTED EXCEPTION"/> </condition> </fail> <!-- error message Code end --> <!-- replacing old artifact with protected artifact start--> <move file="${webartifactfolder}/${projname}.${webartifacttype}" tofile="${webartifactfolder}/${projname}-old.${webartifacttype}"/> <move file="${basedir}/protected_${projname}.${webartifacttype}" tofile="${webartifactfolder}/${projname}.${webartifacttype}"/> <!-- replacing old artifact with protected artifact end--> <!-- App Developer Code end --> </target> </project>
Note: Ensure that you exclude any variables with global scope from obfuscation.
Rev | Author | Edits |
7.0 | NMK | NMK |
Copyright © 2013 Kony, Inc. All rights reserved. |