Question on offline mode and security

So I have been working on designing a native app that has an offline mode to it. However, security is a high must as this idea is one that could potentially be used in a medical scenario and thus security is an absolute requirement. So my question is how do you create a local/native app that can be used in an offline mode setting but the data and the communication between the app and data to be encrypted? And on top of that that the encryption doesn’t mean the encryption and deception keys aren’t truly stored on the device?

One article I found was the following, but I wanted to see if anyone else had any good reference material or suggestions to achieve this.

Further information you might need is I am not sure if I will be fully coding this in the native JAVA/XCode or whether I might be coding the native app in html/css/javascript and anything else a normal website might be designed in but wrapped in a shell on the phone that makes it look like a fully native app but yet it is a website. So the design has yet to be 100% determined since I am not sure what would be the best choice based on the security necessity mentioned above.

Thanks for all the help.