xcode - How to connect sql server with swift -
i'm working on application ios (using swift), database exist in sql server. how use , connect it? need web service that?
thanks .
it recommended use web service since having application talk directly database means need include sql credentials in binary , copy of application can them , whatever wish in database. security point of view, bad.
the correct approach have web server host "api" -- web application receive http requests app , translate them database queries , return response in format, such json.
however, need careful. web services must use https , must first validate input in order protect against attacks such sql injection.
Comments
Post a Comment