SysCFG_Sample is an example project which let you read and write the serial number of your idevice in DiagsMode.
Maybe someone can learn from it or finds it useful in some kind of way. The project is partly just copy paste from magicCFG, the read and writing technique is exactly the same.
If you're a professional swift developer and you see some bugs in my code, feel free to contribute and fork.
All my knowledge in Swift I got through learning by doing, so some lines of code may be shitty written haha.
The project is under MIT license