A simple app showing a list of orders and a detail view for each on tap. It's possible to add new locally saved order or item.
To run the app, it is simple
- Download and extract the zip
- Open the workspace with xcode
- No need to run "pod install"
- The
poddiectory is tracked
cmd+Shift+Kto clean thencmd+Rto run
- Swift 5.3
- iOS 11.0 and above
This app uses the classic Apple's MVC pattern.
-
The synchronization of the local data with the server occurs each time the app is launched. Also you can do it manually with the "Pull to refresh" feature in the home screen.
-
I assumed that if any sub entity of
Purchase Orderhas been updated thelast update dateof the order itself would be updated as well. That's how i detect if an order has been updated. Regarding the way the refresh datafunchas been coded this behavior can easily be changed to check each sub entity even if the order hasn't been updated. -
After adding a new
orderthe list of the orders is reloaded fromcore dataand the holetableViewis reloaded. This behavior could be easily be changed to only add the neworderto the list. A choice has to be done between these two options regarding the performance vs security. -
A basic form validation has been integrated assuming the following
- The
Order numberis composed only from digits - The
Order numberis unique - The
Item product IDis composed only from digits
- The
-
The app is Dark Mode compatible
-
The app is localized and supports both English and French.



