4677. [port] Split up the main function in dig to better support
the iOS app version. [RT #45508]
(cherry picked from commit 6640e00924)
4677. [port] Split up the main function in dig to better support
the iOS app version. [RT #45508]
(cherry picked from commit 6640e00924)