Relative Content

Tag Archive for iosswifthostname

How to get hostname on iOS/Swift app like in C library?

I have to migrate data that was generated from a Xamarin app into a new native Swift app. Sadly, the data was encrypted by a key that includes the hostname. In xamarin, there was a third party C library used that internally calls POSIX gethostname function. Now I need to retrieve the same value from within my Swift app.