question

qtoppler avatar image
qtoppler asked

Proguard and in-app purchase

In the IAP docs discussing obfuscation, it's suggested to specify "-dontoptimize" -- this is a brute force approach, are there particular optimizations we can specify to avoid instead? Thanks
iap
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Samuel@Amazon avatar image
Samuel@Amazon answered
Hi qtoppler, you can also include exceptions for Amazon Appstore SDK code. Please find them below, -dontwarn com.amazon.** -keep class com.amazon.** {*;} -keepattributes *Annotation* To know more about obfuscation of code, please refer to the below link, https://developer.amazon.com/sdk/in-app-purchasing/sample-code/code-obfuscation.html Thank you.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

qtoppler avatar image
qtoppler answered
Samuel, that's the document I'm referring too... It says In addition, you will also need to skip Proguard's optimization step. -dontoptimize Note: Make sure to remove any other flags dealing with optimization, or any flag that may conflict with the above settings. In proguard, you can specify which optimization a to skip, as opposed to all of them-- hence my question, is it really necessary to skip all of them?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Samuel@Amazon avatar image
Samuel@Amazon answered
Hi qtoppler, it is not mandatory to turn off all optimization in the pro guard config but it is advised.  We have seen unexpected app behavior caused by pro guard's optimization passes which resulted in IAP not working properly.  This will cause the app submission to be rejected therefore we advise disabling optimization. Thank you.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.