But that's not necessary. There is open source code at the base of macOS and iOS, and it's only that being used currently. Even to go further and create a full clone of iOS would be fine, if (and only if) a "clean room" implementation were made.
They denied the original appeal over copyrightable APIs. There was a second trial over Google's fair use argument and the jury ruled for Google. Oracle appealed and the Federal Circuit ruled against Google again. That decision was appealed to SCOTUS on January 24, 2019. Google's petition challenged both decisions by the Federal Circuit: APIs are copyrightable and Google's use of the Java API wasn't fair use. Certiorari was granted November 15, 2019 and arguments were planned for October 7, 2020.
Traditionally emulators are distributed without any infringing code; it's up to the user to extract what they want to emulate from devices they own. For example, 3DS emulators don't ship with a copy of Nintendo's system software, they instead require you to buy a 3DS, hack it, and use some GodMode9 scripts to extract the relevant files. Similarly, one could have developed an iPhone emulator that requires the user buy and jailbreak a phone, and dump the relevant OS files (or extract it from an IPSW available from Apple, etc). This would have most likely been legal.
Projects like Darling are a step removed from even that. Instead of providing a tool that lets the user run Apple's OS in emulation, you instead write your own OS that provides all of the relevant APIs/ABIs necessary to allow software dependent on Apple's OS to run. This tool can then be distributed entirely freely with zero Apple ownership involved. This approach is entirely legal, at least for another week or two, depending on if the Supreme Court understands what an "API" is better than the Federal Circuit.