Is it safe to put private API keys in your .m files when exporting to the appstore?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 18:42:34

问题


I have an app that uses some APIs that allow me to do tasks that cost me money (1 cent per request etc). These APIs have private keys and I'm obviously not supposed to share the keys with anyone.

How exactly are iphone apps encrypted? If I include these keys in my .m files in my app and then export to IPA and send to the AppStore are they safe or can someone potentially crack my IPA open and get my keys that are hardcoded in.

I know I shouldn't put these in my info.plist or anything because those are visible to anyone who has access to the IPA files. But is it safe to put API secrets and API keys in my .m files before exporting to the AppStore?

Edit: My API keys are being sent to the API servers across an HTTPS request, not http

来源:https://stackoverflow.com/questions/35496050/is-it-safe-to-put-private-api-keys-in-your-m-files-when-exporting-to-the-appsto

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!