In this repository you can find an example of V2X application that show how to use the V2X-SDK in a ready to use iOS Application.
The HelloV2XWorld application demonstrates how easy it is to create a V2X application and exchange V2X messages with other road users. This application is powered by the V2X-SDK and the STEP platform developed by Vodafone. By cloning this project you will be able to create and execute your first V2X application in less than 15 minutes. The HelloV2XWorld application shows a map with all the road users close to your location. You can also use this application as a model to start developing your own application.
- Xcode version 14.1 or higher is already installed on your MacBook.
- You have some experience with developing apps using swift and swiftUI.
- You have a tool pre-installed for unarchiving RAR or Zip files like "The Unarchiver".
- Your Internet connectivity is up and running.
- You are available for 15 minutes.
- Register yourself on the STEP Web portal
-
Go to the STEP Web portal webpage and login.
- Enter your credentials:
- Navigate to the page "Documentation" and select the "SDK documentation for iOS" option.
- In the "SDK documentation for iOS" page.
- click on the "Download SDK" button for the SDK xcframework.
- click on the "Download documentation" button for the SDK documentation and user guide.
=> Your browser downloads the archive "VodafoneV2X_iOS_SDK.rar".
- Open the archive, extract the V2X-SDK library file called "VodafoneV2X.xcframework" and save it on your laptop.
- Open Xcode.
- Choose from the Xcode tab bar "Source Control" then "Clone".
- In the popup window enter the repository URL "https://github.com/Vodafone/HelloV2XWorld-iOS.git".
- Press "Clone" button to start downloading the HelloV2XWorld project.
- Wait until the completion of this operation.
- Choose "main" branch from the popup then press "Clone" then desired save location on you MacBook.
- After opening the HelloV2XWorld project.
- Go to xcodproj settings page "General".
- Scroll down to "Frameworks" and click on the "+" sign.
- Open the Portal.
- Login with your account.
- Navigate to the "Applications" tab found in the top.
- Click on "Test application".
- You will see a new popup appear.
- Follow the instructions until you reach the "Application" step.
- You will find the "Application ID" and "SDK Key".
- Copy the "Application ID" value.
- Open the "HelloV2XWorld" project in xcode.
- Open "Enums" class and paste the copied "Application ID" in the username attribute inside "credentials" enum.
- Back to the portal.
- Copy the "SDK Key" value.
- Back to the xcode project and paste it in the password attribute inside "credentials" enum.
- Click from Xcode tab bar "Product" then "Build" (or use the shortcut "Command⌘ B").
- You can run the app on any iOS Simulator or real device after providing your own Development provision profile.
- Select your iOS Simulator (for ex. iPhone 14.)
- Press the RUN button.
- Wait until the "Simulator" windows appears.
- When the App opens, read the Term and Conditions, Click on the next button to navigate till the end then click on the "Accept" button.
- Accept the location permissions to provide your own location data.
- A map is displayed centered on your current location.
- The blue icon represents yourself.
- The red icons represents the other road users close to you.
- When clicking on the blue icon, app displays you ITS information: StationID, StationType, Speed, Heading.
- When clicking on any red icon, app displays you the CAM information: StationID, StationType, Speed, Heading.
- You can change your station type by accessing the setting page
- 1.0
- Initial Release.
- 1.0.1
- Bug Fixing
- Fix connectivity after changing station type from settings.
- Fix ITS marker orientation according to the device orientation.
- Bug Fixing
- 1.0.2
- Bug Fixing
- Fix ITS marker orientation according to the device orientation.
- Bug Fixing
- 1.0.3
- Bug Fixing
- Fix map rotation according to the course value instead of heading.
- Prevent the device screen from sleeping while the app is running.
- Bug Fixing
This project is licensed under the MIT License - see the LICENSE.md file for details