I am developing ionic application using mfp 7.1. I have to obfuscate theapplication, for that I have refer the following link,
https://www.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.deploy.doc/admin/t_pg_creating_obfus_cli.html
Using the above link I have done with the following steps:
1) In the project.properties file uncommented the line
proguard.config=proguard-project.txt.
2) Created keystore file and its added in the "ant.properties" file.
3) finally, we build the application.
We unable to get the "mapping.txt" file in the project
& also not able to get obfuscate code.*
Can any one tell me how to obfuscate it??
Anyone help will be Appreciated!!!
Proguard obfuscation will work on native code. You mention an Ionic application. As such you should try Javascript obfuscators for your application:
Google Closure
Compiler YUI Compressor
UgifyJS
More details here.
Within MFP, the options available are to perform JS and CSS concatenation and minification. The other options are outside of MFP and needs to be done using the respective tools.
Related
I am using sencha sdk tool 2 to build my extjs 4 application. Build is working fine and it generated two files -
app-all.js - minified
all-classes.js - non-minified
But when I am using minified app-all.js with ext.js in my index-mini.html page it is not working and giving me the error "Cannot read property 'get' of undefined" at Ext.util.Cookies.get()
My application is working fine when I am using ext-all.js instead of ext.js.
I saw that my application is using some util classes(like - Ext.util.Cookies) that are not present in ext.js. Also for development we are using ext-all.js in our index.html but for deployment we want to use ext.js.
Questions -
How can I run my application using ext.js & app-all.js?
-
Thanks in advance.
The problem is that ext-all.js (and the un-minified ext-debug.js) only provide the minimum number of core ExtJS classes needed to get up and running. Any additional classes should be dynamically loaded as separate files
Section 2.2 of Getting Started describes this, and also explains that you should dynamically load any additional classes.
Basically, you need to include a requires statement in your application as shown below.
requires:[
'Ext.util.Cookies'
],
I have an extJs 4 app that is extending 3rd party non-extJs classes. I just can't seem to build the app. It keeps giving me the error below. Objective is to minify the app with appropriate dependencies since it is taking longer time to load both libraries and slowing down the application.
I am using Sencha Cmd v4.0.4.84.
/*********************************************/
C2008: Requirement had no matching files
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExBuild: Failed to find any files
/*********************************************/
Any help is truly appreciated.
So far I have tried:
1) modified app/.sencha/app/sencha.cfg classpath to include the external library. No luck.
2) Added to section of the index.html. No luck.
3) Added loaders and set path of the external library. No luck.
External library is already on my local machine inside of the app folder.
Anyone out there?
I take you out for a lunch if you help me resolve this issue. No seriously!
This is really a showstopper for me.
Thank you,
Ritesh
Issue is resolved in the Sencha Forum post below.
http://www.sencha.com/forum/showthread.php?285252-Sencha-Cmd-build-ExtJs-with-external-library&p=1043385#post1043385
If you can't get to the link then....
If a testing build works and production build does not you might try disabling optimizations. If you look in ".sencha/app/production.defaults.properties" you will see the various settings that make production builds unique.
Try adding this setting:
build.optimize=${build.optimize.disable}
Hope this will help someone.
Thanks,
Ritesh
You cannot extend a 3rd party class as Ext.define expects that all classes inherit from Ext.Base what is unlikely for non-ext 3rd party lib.
Of course, you can use a third party lib by including its javascript outside of <x-compile> block in your index.html
I was unable to find any open source video recorder that can be integrated with an angularjs app. I came across Youtube-direct-lite but I have no idea how to integrate this with an angular app. I am trying to host my own instance of youtube-direct-lite
I have already configured the config.js as been told in this doc. Should I just copy paste all the js, css files to my project and use the index.html as a partial to display the recorder?
about configuring direct lite:
in config.js enter your developer-key and client-id.
then read the README file
download nodejs console
browse to the folder with the source in it
run this command : node r.js -o app.build.js
and it'll build the minified source for you, then copy and paste that source into your website and use the index.html & admin.html as the
and i'll work just fine.
about angular with direct lite:
I've seen so far only one implementation for it that is in youtube/dev/demos
http://www.youtube.com/yt/dev/demos.html#/upload
if you opened the sources, you'll find that it is uses angular, and it applies ytdirectlite, but I don't know how to use it and I still cannot find the opensource for it.
I am new to EXT JS environment. I am working on a dynamic java project in eclipse indigo where i want to use ext-js calendar in one of my jsp.I saw the EXT_JS calendar demo from downloaded 'ext-4.1.1' sdk(index.html file in ext-4.1.1a\examples\calendar).
I want to create a .js file as like ext-js calendar page. So for that i followed the path given in
http://loianegroner.com/2010/11/spket-setting-up-eclipse-ide-for-ext-js-and-jquery-development/ to integrate ext-js in eclipse.
But now when i copy index.html to my webcontent folder then it is not working(Originally it is showing nothing). But when i copy the entire ext-js source code to my workspace web content then running the index.html file in example/calendar folder of ext-4.1.1a giving me required result.But I don't think this as a solution.
I could not find any way also how to start to do my task.
So Pls anybody help me here...
Regards :
Dev
When nothing shows up on the screen, it is commonly a case where the ExtJS library isn't loaded. Without seeing the code, it's hard to pinpoint the issue.
Using Chrome Dev tools or Firebug for Firefox, take a look at the console and/or network output.
The files you're looking for will be included in the <head> section of your index.html. There should be ext-all.js or possibly ext-all-debug.js at a minimum, plus the style sheets.
If this is your issue, then you need to include the proper paths to the ExtJS library. This can be the local installation, or you can use a CDN. For example:
<script src="http://cdn.sencha.com/ext-4.1.1-gpl/ext-all.js"></script>
Using Cmd 3.0.0.141, I have successfully generated a workspace and an Ext app in that workspace. The application builds correctly until I attempt to integrate the Bryntum Scheduler, where I encounter an error when I try to build:
"Failed to resolve dependency Sch.panel.SchedulerTree for file ExtCalendar.view.Tree"
the app is very simple at this point, uses Ext.application and follows the MVC pattern where I have a view defined "ExtCalendar.view.Tree" that extends 'Sch.panel.SchedulerTree". I also have models and stores that extend Bryntum classes as well, so I assume the compiler will trip over those as well, since it can't see the Sch namespace.
I've added a 'js' path to my app.json that points to the bryntum js file where 'Sch.panel.SchedulerTree' comes from. I've tried to run the 'refresh' command with the same results (Failed to resolve...). I've regenerated the bootstrap.js file manually using 'compile', but nothing from the Sch namespace ever gets added to it, despite the Brytum lib file being in the classpath.
What do I need to do in order to successfully run the 'build' command with libs like this?
Or, do I need to take a more granular approach using the 'compile' command?
With the help of the nice folks on the Sencha forums, I was able to resolve my build issues. The solution, for me, involved a shim. I added an external shim.js file to my index with as many //#require and //#define directives as needed in order to resolve the dependency issues.
According to the nice folks at Bryntum, once I upgrade from the free-trial version of the Bryntum Scheduler, I will be able to get rid of the shim and simply rely on the sencha.cfg classpath pointing at the Bryntum src.
Also, as an aside, the app.json file is not used in ExtJS apps, its inclusion in the generated files was a bug in build 141 of Cmd v3.
See this thread for more detail.