In my application, I was implemented pull-to-refresh feature and custom loading icon. In IPhone which has dynamic island, It was overlapsed my loading icon.
I want to detect device which has dynamic island or not. If it has, I will add some top space to it.
Currently, as far as I know, dynamic island is will included in
ActivityKit
on late of 2022. You can check from this link for ActivityKit and Apple's thread about it. And Apple doesn't provide way to check dynamic island is on device or not.But there is a workaround for you to get the thing you want. Currently dynamic island only available on
iPhone 14 Pro
andiPhone 14 Pro Max
. So just need to check this both device.Update: Thanks to this link for type model, name model type of
iPhone 14 Pro
andiPhone 14 Pro Max
isiPhone15,2
andiPhone15,3
so we just need to check these case.Code will be like this
Usage