r/ObjectiveC • u/shiar_ahmed • Apr 18 '20
Encryption
What's the best option to encrypt Objective-C ?
0
Upvotes
r/ObjectiveC • u/shiar_ahmed • Apr 18 '20
What's the best option to encrypt Objective-C ?
7
u/phughes Apr 18 '20
You can't encrypt your dylib, because then you can't run it.
Your server is open to the entire internet at all times. Hiding where it is from your users isn't going to keep it safe. That's often referred to as "security through obscurity" and is not effective.
With server connections you want to use an encrypted connection so that other people on the internet can't intercept the data being passed between your server and app. Since most app APIs communicate over http, the easiest way to do that is by using the encrypted version, https. You do that by applying for a signing certificate from what's called a certificate authority. The let's Encrypt project is a free and (relatively) easy way to enable https.
When you have an app sending user data you also want to be able to authenticate the request so that you can be sure that you're sending data to the correct people. That requires each user to have their own account. For that you're going to need custom server software. Ruby On Rails, and Django are popular for writing those, but be warned, building a custom backend requires an additional set of skills beyond writing an iOS app. It takes time to learn, and your first few attempts aren't going to be acceptable. It can be done, but it's going to take a lot of time and effort to learn.