This is a simple iOS app built using SwiftUI that acts as a directional pointer to a specific location based on the user's phone orientation and current location.
Follow the instructions below to clone and set up the project on your local machine.
- Xcode (minimum version Xcode 14)
- An iOS device or simulator running iOS 14 or later
-
Open Terminal.
-
Change the current working directory to the location where you want to clone the project.
-
Run the following command to clone the repository:
git clone https://github.com/Armand-OW/ios-directional-pointer.git
-
Open Xcode.
-
Click on "Open a project or file."
-
Navigate to the directory where you cloned the repository and select the ios-directional-pointer.xcodeproj file.
-
Open the Info.plist file in the project navigator.
-
Add the following entries to the Info.plist file to request the necessary permissions:
- NSLocationWhenInUseUsageDescription: Provide a description of why you need location access.
- NSMotionUsageDescription: Provide a description of why you need motion access.
-
Connect your iOS device to your Mac or choose a simulator in Xcode.
-
Select the target device/simulator from the scheme dropdown in the Xcode toolbar.
-
Click the "Run" button (or press Cmd + R) to build and run the app on your selected device/simulator.
- Update the SearchLatitude and SearchLongitude placeholders in the LocationManager class to your desired latitude and longitude.
- The app will display the calculated direction angle and a rotating arrow icon. *The direction angle is calculated based on the user's phone orientation and the target location.
- The arrow icon will rotate to point in the direction of the target location.
This project is licensed under the MIT License.
This project is a simplified example and might require further enhancements for production use.