Current Location in iPhone and iPad
In this article I will explain process of implementing map and show Current location in iPhone or iPad.
In this article I will create a Single View application. Here I use map view from xib and write code to determine the current location of the device where. Using this app we determine our current location.
To understand it we use the following.
Open XCode by double-clicking on it.
Create a New XCode Project via click on it.
Now Select Single View Application and click on Next.
Now provide your Product Name and Company Identifier.
Select the location where you want to save your project and click on Create.
Here first add the framework MkMapkit which is required to show location.
To import this framework we use the following.
Click on project and select Build Phase.
Click on the "+" icon to add a framework.
Select framework which you want to add write on search bar and click on add button.
Now we write code and add mapview from xib.
Click on the run button to show the output.
Output show in the output Window of Xcode.
The current location doesn't show in the iPhone Simulator to determine the current location's latitude and longitude values when we run this application in the device.