How to determine whether full disk encryption is enabled in ios

I want to know whether full disk encryption is enabled on the iPhone, and what I should do with code

Hello FancyHan

Yes, unlike macOS, all data on your iPhone is encrypted by default.

https://support.apple.com/en-sg/guide/security/sece3bee0835/web

Macs with Apple silicon and Macs with Intel processors and T2 chips always use full disk encryption, irrespective of the FileVault 2 setting. Enabling FileVault 2 on a Mac with Apple silicon or with T2 changes (improves) how the keys are managed, but does not change the use of full disk encryption. Platform Security, page 92