https://www.sacattorneys.com/san-jose-intellectual-property-...
The relevant quote is: "It is legal to require an employee to assign intellectual property created in the employee’s own time if it required any of the employer’s tools, facilities, or intellectual property, or if that intellectual property relates to the employer’s business or research and development."
Since Apple operates in a wide swath of the IT world, it is very likely that most OSS developed by Apple employees could reasonably be considered "relate[d] to the employer's business". That is certainly the position that Apple takes in most case (source: I am a former Apple employee).