author | ms.service | ms.topic | ms.date | ms.author |
---|---|---|---|---|
conceptdev |
app-service-mobile |
include |
08/23/2018 |
crdun |
-
Open the downloaded client project using Xcode.
-
Go to the Azure portal and navigate to the mobile app that you created. On the
Overview
blade, look for the URL which is the public endpoint for your mobile app. Example - the sitename for my app name "test123" will be https://test123.azurewebsites.net. -
For Swift project, open the file
ToDoTableViewController.swift
in this folder - ZUMOAPPNAME/ZUMOAPPNAME/ToDoTableViewController.swift. The application name isZUMOAPPNAME
. -
In
viewDidLoad()
method, replaceZUMOAPPURL
parameter with public endpoint above.let client = MSClient(applicationURLString: "ZUMOAPPURL")
becomes
let client = MSClient(applicationURLString: "https://test123.azurewebsites.net")
-
For Objective-C project, open the file
QSTodoService.m
in this folder - ZUMOAPPNAME/ZUMOAPPNAME. The application name isZUMOAPPNAME
. -
In
init
method, replaceZUMOAPPURL
parameter with public endpoint above.self.client = [MSClient clientWithApplicationURLString:@"ZUMOAPPURL"];
becomes
self.client = [MSClient clientWithApplicationURLString:@"https://test123.azurewebsites.net"];
-
Press the Run button to build the project and start the app in the iOS simulator.
-
In the app, click the plus (+) icon, type meaningful text, such as Complete the tutorial, and then click the save button. This sends a POST request to the Azure backend you deployed earlier. The backend inserts data from the request into the TodoItem SQL table, and returns information about the newly stored items back to the mobile app. The mobile app displays this data in the list.