An iOS trivia game built with UIKit. Questions are pulled live from the Open Trivia Database API — answer a round, see your score, and restart for a fresh set.
Live questions — Each round fetches a new set of questions from the Open Trivia Database, decoded from JSON into native models.
Smart answer options — Multiple-choice questions display a full set of options, while True/False questions correctly show only two.
Score and restart — Your score is shown after submitting all answers, and restarting the game fetches a completely new question set.
- Language: Swift
- UI: UIKit
- Networking: URLSession with Codable for JSON decoding
- API: Open Trivia Database
git clone https://github.com/yarmout/trivia.gitOpen the .xcodeproj in Xcode and run on a simulator or device. No API key required — the Open Trivia Database is free and unauthenticated.
Apache License 2.0
Copyright [2025] [Yezen Armout]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.