These packages are available as a package collection, usable in Xcode or SwiftPM.
Swift library for detecting Apple device models — iPhone, iPad, and device group classification
1 package.