The problem that you have is that Cordova relies on a bridge between your app code written in Javascript and the underlying native code in order to function.
By obfuscating all of the Objective C code, the Javascript layer is unaware of this, and can no longer find the native class names it is looking for.
For example, let's suppose you have included cordova-plugin-device in your app.
Its <feature>
definition for iOS maps the Device
feature name to the CDVDevice
class.
Let's suppose your Cordova app calls the plugin method device.getInfo()
.
This in turn invokes a call to cordova.exec()
which calls the Device
feature with the getDeviceInfo
action.
Under the hood, Cordova looks up Device
to find the native class name it's mapped to (CDVDevice
) and then on the iOS platform it attempts to call the getDeviceInfo()
member function on this class.
However, by running the PPiOS-Rename tool, you have obfuscated both the class name (CDVDevice
) and the function name (getDeviceInfo()
) so Cordova cannot find the class or function to invoke, so will throw an error.
In this case you'd need to exclude the CDVDevice
using the filter option provided by PPiOS-Rename, for example:
ppios-rename --analyze -F 'CDVDevice' /path/to/program.app/program
If you wish to proceed with obfuscating the Objective C layer of your Cordova app, you will have to add exclusions for all of the class and function names which Cordova calls explicitly from the Javascript layer.
This includes any Cordova plugin interface classes in your project, and possibly classes belonging to the Cordova framework itself (as cordova-plugin-proguard
does for ProGuard on Android.