You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My goal is to obfuscate my 'ionic build' output folder called www. This www folder is archived in the .ipa the iPhone executable. The source code in that www folder which mainly consists of html, css and js files. This is readable and its readability can be avoided using obfuscation.
I have made changes in my angular.json file as follows to be able to inject web Obfuscator plugin as shown as below:
Nothing fancy, angular.json file finds a custom web pack json and reads the plugin from there resulting in code obfuscation. Please refer extra-webpack.config.js contents below:
var WebpackObfuscator = require('webpack-obfuscator');
const path = require('path');
Code obfuscation is done, the output www folder code is not readable but the app throws console errors while running which is shown as below:
2023-11-28 14:11:15.575547+0530 Digital Token[9722:1028322] ERROR: Unhandled Promise rejection: undefined is not a function (near '...iamsdk[_0x52d2dd(0x1b8)]...') ; Zone: ; Task: Promise.then ; Value: TypeError: undefined is not a function (near '...iamsdk[_0x52d2dd(0x1b8)]...') @Ionic://localhost/main.js:1:15659 @Ionic://localhost/main.js:1:14925
generatorResume@[native code]
_0x312057@ionic://localhost/vendor.js:3119:210
_0x2a195e@ionic://localhost/vendor.js:3119:728 @Ionic://localhost/vendor.js:3119:960
l@ionic://localhost/polyfills.js:29:3107 @Ionic://localhost/vendor.js:3119:543
onInvoke@ionic://localhost/vendor.js:2163:3089 @Ionic://localhost/polyfills.js:14:2296 @Ionic://localhost/main.js:1:14635
generatorResume@[native code]
_0x312057@ionic://localhost/vendor.js:3119:210
_0x2a195e@ionic://localhost/vendor.js:3119:728 @Ionic://localhost/vendor.js:3119:960
l@ionic://localhost/polyfills.js:29:3107 @Ionic://localhost/vendor.js:3119:543
callbackFromNative@ionic://localhost/cordova.js:295:63 @Ionic://localhost/plugins/cordova-plugin-ionic-webview/src/www/ios/ios-wkwebview-exec.js:129:35 @Ionic://localhost/polyfills.js:14:2296 @Ionic://localhost/polyfills.js:29:2809 @Ionic://localhost/polyfills.js:14:2965
A@ionic://localhost/polyfills.js:14:10319
promiseReactionJob@[native code]
Even If we ignore these console logs in the iOS app while running the app, the navigation stack is completely broken. The app doesn't not navigate to new screen.
Any help is appreciated. I am out of ideas here.
Thanks in advance
The text was updated successfully, but these errors were encountered:
I am using
My goal is to obfuscate my 'ionic build' output folder called www. This www folder is archived in the .ipa the iPhone executable. The source code in that www folder which mainly consists of html, css and js files. This is readable and its readability can be avoided using obfuscation.
I have made changes in my angular.json file as follows to be able to inject web Obfuscator plugin as shown as below:
Nothing fancy, angular.json file finds a custom web pack json and reads the plugin from there resulting in code obfuscation. Please refer extra-webpack.config.js contents below:
var WebpackObfuscator = require('webpack-obfuscator');
const path = require('path');
module.exports = {
resolve: {},
plugins: [
new WebpackObfuscator({
rotateStringArray: true
}, ['polyfills.js'])
],
module: {
rules: [
{
test: /.js$/,
exclude: [
path.resolve(__dirname, 'excluded_file_name.js')
],
enforce: 'post',
use: {
loader: WebpackObfuscator.loader,
options: {
rotateStringArray: true
}
}
}
]
}
}
Code obfuscation is done, the output www folder code is not readable but the app throws console errors while running which is shown as below:
2023-11-28 14:11:15.575547+0530 Digital Token[9722:1028322] ERROR: Unhandled Promise rejection: undefined is not a function (near '...iamsdk[_0x52d2dd(0x1b8)]...') ; Zone: ; Task: Promise.then ; Value: TypeError: undefined is not a function (near '...iamsdk[_0x52d2dd(0x1b8)]...') @Ionic://localhost/main.js:1:15659
@Ionic://localhost/main.js:1:14925
generatorResume@[native code]
_0x312057@ionic://localhost/vendor.js:3119:210
_0x2a195e@ionic://localhost/vendor.js:3119:728
@Ionic://localhost/vendor.js:3119:960
l@ionic://localhost/polyfills.js:29:3107
@Ionic://localhost/vendor.js:3119:543
onInvoke@ionic://localhost/vendor.js:2163:3089
@Ionic://localhost/polyfills.js:14:2296
@Ionic://localhost/main.js:1:14635
generatorResume@[native code]
_0x312057@ionic://localhost/vendor.js:3119:210
_0x2a195e@ionic://localhost/vendor.js:3119:728
@Ionic://localhost/vendor.js:3119:960
l@ionic://localhost/polyfills.js:29:3107
@Ionic://localhost/vendor.js:3119:543
callbackFromNative@ionic://localhost/cordova.js:295:63
@Ionic://localhost/plugins/cordova-plugin-ionic-webview/src/www/ios/ios-wkwebview-exec.js:129:35
@Ionic://localhost/polyfills.js:14:2296
@Ionic://localhost/polyfills.js:29:2809
@Ionic://localhost/polyfills.js:14:2965
A@ionic://localhost/polyfills.js:14:10319
promiseReactionJob@[native code]
Even If we ignore these console logs in the iOS app while running the app, the navigation stack is completely broken. The app doesn't not navigate to new screen.
Any help is appreciated. I am out of ideas here.
Thanks in advance
The text was updated successfully, but these errors were encountered: