SG Carpark is a native SwiftUI iOS app that displays Singapore carpark availability on an interactive Apple Map. It fetches live availability from LTA DataMall, supports place search, highlights nearby parking, and opens Apple Maps directions from the selected carpark.
- Live carpark availability pins from LTA DataMall
CarParkAvailabilityv2 - Apple Map interface with compass, scale, pitch, and user-location controls
- Search by postal code, mall, street, or place using
MKLocalSearch - Nearest carpark selection with when-in-use location permission
- Availability overview with total available lots and visible carpark count
- Bottom detail panel with lot count, agency, lot type, distance, and directions
- Full iPhone and iPad app icon asset catalog
| Layer | Technology |
|---|---|
| App | Swift, SwiftUI |
| Maps & Location | MapKit, CoreLocation |
| Networking | URLSession, async/await |
| Data Source | LTA DataMall CarParkAvailabilityv2 |
| Project Generation | XcodeGen |
| Platform | iOS 17.0+ |
SG Carpark
├── SwiftUI App Entry
│ └── CarparkMapView
├── Presentation
│ ├── SearchBar
│ ├── OverviewStrip
│ ├── CarparkPin
│ └── BottomCarparkPanel
├── State & Coordination
│ └── CarparkMapViewModel
├── Services
│ ├── LTAClient
│ ├── SearchService
│ └── LocationService
└── Models
├── Carpark
└── LTAResponse
.
├── project.yml
├── SGCarpark.xcodeproj
├── sgcarpark
│ ├── Models
│ ├── Services
│ ├── ViewModels
│ ├── Views
│ ├── Resources
│ ├── Info.plist
│ └── SGCarparkApp.swift
├── screenshots
│ └── sgcarpark-home.png
├── AppStore
│ ├── metadata.md
│ └── screenshots
└── scripts
- macOS with Xcode installed
- iOS 17.0+ simulator or device
- XcodeGen
- LTA DataMall account key
git clone https://github.com/alfredang/sgcarparkapp.git
cd sgcarpark
xcodegen generateSet the LTA account key as a build setting before running the app:
export LTA_ACCOUNT_KEY="your-lta-datamall-account-key"
xcodebuild \
-project SGCarpark.xcodeproj \
-scheme SGCarpark \
-destination 'platform=iOS Simulator,name=iPhone 17,OS=26.5' \
LTA_ACCOUNT_KEY="$LTA_ACCOUNT_KEY" \
buildYou can also set LTA_ACCOUNT_KEY in Xcode under the target build settings for local development.
Before archiving for App Store Connect:
- Set
DEVELOPMENT_TEAMinproject.ymlor in Xcode Signing & Capabilities. - Confirm the bundle identifier, display name, version, and build number.
- Regenerate the project with
xcodegen generate. - Archive from Xcode using Any iOS Device.
- Complete App Privacy answers for location usage and network calls.
The app requests location only to find nearby carparks. The location purpose string is defined in sgcarpark/Info.plist.
LTA_ACCOUNT_KEY is intentionally blank in project.yml so credentials are not committed. For production, consider moving LTA calls behind a small backend proxy because account keys embedded in iOS app bundles can be extracted.
Tertiary Infotech Academy Pte. Ltd.
Proprietary. All rights reserved.
