Hi Aditya,
Greetings!!!!
VirtualUser is a concept where you can create a bot user on AppwarpS2 so than if there is a single player you can play a game or do communication.
As Its the concept of AppWarpS2 Server where you can create the same using the code snippet you have shared with us. AppWarpS2 server is written in Java language and you can override the same.
It supports will process all the request coming across multiple client SDK platform like Android, iOS, windows,Unity etc.
For iOS App you need only client iOS SDK and do write your game business logic on server in java language.So you can create VirtualUser irrespective of client platform.
Let me know if it helps.
Thanks
Vishnu Garg