Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
madkristoff
Posts: 58
Registered: ‎11-30-2012
My Device: BlackBerry Z10
My Carrier: Telus

Re: QML obfuscation

Yet. There probably will be eventually and BlackBerry should provide an obfuscation option before that happens.
__________________________________________________________

If my post helped, click the like button!

Developer of Reader|YC , an open source Hackernews client
Please use plain text.
Trusted Contributor
Brennan12325
Posts: 204
Registered: ‎05-15-2012
My Device: None
My Carrier: Telus

Re: QML obfuscation

[ Edited ]

If you "compile" your QML, as described here:

 

https://developer.blackberry.com/native/documentation/cascades/getting_started/tools/compiling.html

 

It can't be browsed as easily. It may not be browsable at all, but I haven't checked (I'm just doing it for apparent speed gains). Basically, if you unzip the .bar as a zip file (as you regularly would to browse all the assets including the QML), you will see all the project assets, but the QML won't be shown there.

 

I could look into it further, later, if you're interested.

----------------------
Check out my app, Alien Flow for reddit

And of course, like my post if you found it helpful or informative!
Please use plain text.
Trusted Contributor
Brennan12325
Posts: 204
Registered: ‎05-15-2012
My Device: None
My Carrier: Telus

Re: QML obfuscation

I've taken a look at my .bar, unzipped it, filtered through it, and I can say that it does not appear possible to lift any QML from files compiled using the method described here:

 

https://developer.blackberry.com/native/documentation/cascades/getting_started/tools/compiling.html#...

 

This appears to be a valid method of obfuscation, as far as I can tell. I would scrutinize it yourself, if it is mission critical, for you, but from what I can tell, it's impossible to grab any QML from the .bar if the QML resources are compiled.

----------------------
Check out my app, Alien Flow for reddit

And of course, like my post if you found it helpful or informative!
Please use plain text.
Contributor
beat84
Posts: 14
Registered: ‎06-24-2013
My Device: Blackberry Z10 Developer Edition
My Carrier: Wind

Re: QML obfuscation

Thanks Brennan12325!

I read about it but I didn't think to.

 

The only issue I have now is that with qrc, the app cannot recognize some Types anymore.

In fact, when i use this qml code:

Page{

    HP{

        id: myHPComp

    }

}

where HP is a reference to HP.qml I receive the following message: "HP is not a type".

Is there a way to solve?

Please use plain text.
Contributor
beat84
Posts: 14
Registered: ‎06-24-2013
My Device: Blackberry Z10 Developer Edition
My Carrier: Wind

Re: QML obfuscation

I solved the latest issues using alias in qrc file.

Please use plain text.
Developer
BBSJdev
Posts: 5,986
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: QML obfuscation

This method comes at too high a penalty for exactly the problem it is trying to solve.

 

I have a huge amount of QML files in my app, having to replace all the C++ links is fairly trivial but the only work around to supporting different devices and screen dimensions is to have a separate project for each.

 

With currently three different screen sizes therefore producing three bundles this alone triples the testing time to get the app out the door.

 

Until I hear that it's possible to view QML files from a downloaded BAR file this is a non-runner for me.

 

 


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
xnike
Posts: 58
Registered: ‎11-04-2011
My Device: PlayBook, DAC, STL100-1, STL100-2
My Carrier: MTS RUS

Re: QML obfuscation

You can get a bar file of a free application, because there is no connection encryption. Just set up http proxy server, install an application on the phone, find in the proxy server logs an url and then download bar file using a desktop brouser.

 

But, paid applications are downloaded via encrypted channel, so your code in bar file is safe.

Please use plain text.
Developer
slashkyle
Posts: 800
Registered: ‎10-16-2012
My Device: Red Z10, Dev Alpha C
My Carrier: Telus

Re: QML obfuscation

[ Edited ]

That's bad news, especially for developers who develop using moslty qml because the qml files are visible when the .bar is changed to a .zip

 

*following the qrc method described above does appear to solve the visiblity of qml files

 

Can this be applied to images as well?

Please use plain text.
Developer
BBSJdev
Posts: 5,986
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: QML obfuscation

@xnike thanks for that, what about in-app purchase apps how are they handled?


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
Zmey
Posts: 1,510
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

Re: QML obfuscation

[ Edited ]

QRC doesn't offer any protection AFAIK, the files are stored "as is" inside of binary file. An experienced developer should be able to extract them easily.

 


Andrey Fidrya, @zmeyc on twitter
Please use plain text.