Encrypting Core ML models
One of the new features of iOS 14 Core ML is the ability to encrypt your machine learning models on users' devices. Xcode 12 has a new tool that will help you to create a private key that you will deploy to the Apple servers. Your app will download that key and store it securely on the users' devices, and will use the key to decrypt the local (encrypted) model, load that decrypted version into memory (so it is not stored insecurely), and have it ready for use in your app.
The steps to create the key and deploy it to the Apple servers are very straightforward. First, you select your model in the project explorer; in our case, open the TextAnalyzerCloud project, and click on the SentimentPolarity.mlmodel
file. Then, click on the Utilities tab:
Now, click on Create Encryption Key. In the popup that appears, select the proper development account for your app: