Reply to Instance member 'present' cannot be used on type 'Service' This is due to your function showError() being static (so a Class function), but present() from UIViewController is an instance method. The showError() function should not be static. Try removing the static keyword, then it should work. Programming Languages Swift Jun ’22