简体   繁体   中英

connecting an iOS app to a hosted website on a local network with SQL Server backend

my scenario is as follows.. I have a completed Visual Studio Lightswitch HTML Client website hosted locally which uses SQL Server as the backend. I also have an iOS app which currently stores everything locally. (for this example lets say it saves barcodes)

when I scan a barcode it saves to the MySQL database on the Apple Device locally and cannot be taken off the device without plugging it into my machine.

this is where I need some help/advice... how can i join these both together so the app saves the information onto the server (i know it should not be done directly) but I am unsure on how to do this via web services on a local network)

Thanks guys for any help, I have a general understanding of HTML/CSS but no experience in PHP.

You'll need to create a WebAPI so that your app can post the data, take a look at this example http://blogs.msdn.com/b/lightswitch/archive/2013/04/22/create-dashboard-reports-with-lightswitch-webapi-and-serverapplicationcontext.aspx

Also keep in mind that because you are running localhost your app is going to find it difficult to see it, because your app won't be able to see http://localhost

Maybe you could publish your site to a free Windows Azure trial site so you can interact with it

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM