It's complicated. Original UNIX by AT&T was newer open-sourced. BSD (Berkley Software Distribution) was opensource distribution of user programs for UNIX (like TCP/IP stack, vi editor, etc.), used by original UNIX, with proportions 20% of AT&T code and 80% of BSD code. So technically, BSD is(0.8) not(0.2) UNIX. FreeBSD is branched from BSD code, so it is(0.8) not(0.2) UNIX too.
Apple MacOS X is based on FreeBSD code (and lot of other code), and it certified as UNIX compatible, so MacOS X can be named as UNIX. iOS is based on MacOS X, so iOS is UNIX too.