27 Commits

Author SHA1 Message Date
cb5b4743f2 Implemented the "persistence" and "remote" properties of the DependencyService service in the Dependency+Keys extension. 2023-04-11 23:52:52 +02:00
83ed85b755 Renamed the LocationsService service and LocationsClient client in the Remote library as RemoteService and RemoteClient respectively. 2023-04-11 23:50:42 +02:00
b73a8e1010 Implemented the coordinator flow for LocationsList and LocationAdd screens. 2023-04-11 23:34:07 +02:00
b9417244a4 Work done so far in the app architecture setup. 2023-04-11 21:36:16 +02:00
9b14b79ea2 Defined the LocationsListCoordinable protocol and conformed the LocationsListCoordinator coordinator to it. 2023-04-11 21:12:03 +02:00
5e5653bbe2 Removed the View and ViewModel protocols from the Core library. 2023-04-11 20:47:58 +02:00
c16b40652f implemented the ModalNavigationRouter router in the Core library that inherits from the BaseNavigationRouter class. 2023-04-11 20:36:53 +02:00
0d824637ae Renamed the NavigationRouter router in the Core library as PushNavigationRouter router and implemented the inheritance from the BaseNavigationRouter class. 2023-04-11 20:36:12 +02:00
8a0c7d95e0 Implemented the BaseNavigationRouter class in the Core library. 2023-04-11 20:34:51 +02:00
8deadffe2a Created the LocationsAddViewController view controller. 2023-04-11 19:36:55 +02:00
2d068de8ed Created the LocationsAddViewModel view model. 2023-04-11 19:36:36 +02:00
0dfbe62603 Moved the LocationsListViewModel view model and LocationsListViewController view controller into its own folder inside the Screens group. 2023-04-11 19:35:23 +02:00
b4b99dfa87 Integrated a WindowRouter router and a LocationsListCoordinator coordinator into the AppDelegate delegate to present the coordinator at launch time. 2023-04-11 19:24:58 +02:00
a55ba672da Implemented a bare-bone LocationsListsCoordinator coordinator. 2023-04-11 19:23:12 +02:00
229bd1b878 Renamed the ViewController view controller as LocationsListViewController and conformed it to the View protocol from the Core library. 2023-04-11 19:21:52 +02:00
0fe40095c7 Created the LocationsListViewModel view model. 2023-04-11 19:20:25 +02:00
30bb62e795 Implemented the WindowRouter router in the Core library. 2023-04-11 18:14:20 +02:00
c3fc42d724 Removed the SceneDelegate delegate. 2023-04-11 18:11:57 +02:00
d51cc97aa4 [Bugfix] Location library naming (#8)
This PR contains a bugfix that appeared while I started working on the app itself. Basically, the app was not building as the compiler was complaining about duplicated files in the project, but given that I couldn't find any, then I found out that the compiler doesn't like that a library name and an app target share the same name.

So I renamed the `Locations` library in the **Libraries** package as `Remote` (for the lack of a better word...) to fix this issue that was stopping me from continue working on implementing the app.

Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Reviewed-on: rock-n-code/deep-linking-assignment#8
2023-04-11 15:57:38 +00:00
9172827b8b [Libraries] Core (#7)
This PR contains the work that implements the Core library, which is used to define the architecture of the app.

To give further details on what was done:
- [x] created the `Core` library into the **Libraries** package;
- [x] defined the `Router` protocol;
- [x] defined the `Coordinator` protocol;
- [x] defined the `View` protocol;
- [x] defined the `ViewModel` protocol;
- [x] implemented the `NavigationRouter` router.

Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Reviewed-on: rock-n-code/deep-linking-assignment#7
2023-04-11 13:59:08 +00:00
cb90b3730d [Libraries] Dependency (#6)
This PR contains the work that implements the Dependency service, which is used as a dependency injection mechanism in the application.

To give further details on what was done:
- [x] created the `Dependency` library into the **Libraries** package;
- [x] defined the `DependencyKey` protocol;
- [x] implemented the `DependencyService` service;
- [x] implemented the `Dependency` property wrapper.

Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Reviewed-on: rock-n-code/deep-linking-assignment#6
2023-04-11 00:41:07 +00:00
4210df9eb6 [Libraries] Persistence (#5)
This PR contains the work that implements the Persistence service, which is used to store and serve the data of the application.

To give further details on what was done:
- [x] created the `Persistence`library into the **Libraries** package;
- [x] defined the `Location` model into the **Model** core data model;
- [x] implemented the `PersistenceService` service;
- [x] removed the core data stack boilerplate code from the `AppDelegate` and `SceneDelegate` delegates in the *Locations* target.

Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Reviewed-on: rock-n-code/deep-linking-assignment#5
2023-04-10 22:59:58 +00:00
6da2e946ce [Libraries] Locations (#4)
This PR contains the work that implements the Locations service, which is used to retrieve location data from a remote server.

To give further details on what was done:
- [x] created the `APICore` and `Locations` libraries into the **Libraries** package;
- [x] defined the `Endpoint` and `Client` protocols;
- [x] implemented the `MakeURLRequestUseCase` use case;
- [x] implemented the `MockURLProtocol` protocol and the `MockURLResponse` models;
- [x] implemented the `Location` model;
- [x] implemented the `GetLocationsEndpoint` endpoint;
- [x] implemented the `LocationsClient` client;
- [x] implemented the `LocationsService` service.

Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Reviewed-on: rock-n-code/deep-linking-assignment#4
2023-04-10 15:31:22 +00:00
14e39a40ae [Setup] Locations app (#3)
This PR contains the work done to setup the Locations app and lay the basis to start working on it.

To give further details on what was done:
- [x] defined the app icon asset;
- [x] defined the color and image assets to use on the **Launch** screen;
- [x] implemented the **Launch** screen on storyboard due to the issues encountered while trying to define the launch screen directly from the `Info.plist`;
- [x] removed the **Main** storyboard from the `Locations` target;
- [x] implemented the manual loading of the `ViewController` view controller from the `SceneDelegate` delegate;
- [x] fixed the product bundle identifier of the `Locations` target.

Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Reviewed-on: rock-n-code/deep-linking-assignment#3
2023-04-09 18:47:10 +00:00
6d76ba467c [Feature] Enhance the places deep linking support in the Wikipedia app to support coordinates (#2)
This PR contains the work done to add support to the **Wikipedia** app to show a custom location in the map of the *Places* view coming from a places deep link.

To provide further details about the work:
- [x] implemented the handling of location coordinates coming from a URL inside the function that generates a `NSUSerActivity` instance out of *places* deep links;
- [x] added the `wmf_locationFromURL` property to the `NSUSerActivity` via an extension that returns a `CLLocation` instance with latitude and longitude coordinates if provided;
- [x] implemented the "centerMap(onLocation:)" function in the `PlacesViewController` view controller that, essentially, center the map of this view controller to a given location;
- [x] improved the handling of a *places* user activity in the `WMFAppViewController` view controller to center the map in case a location has been provided via a deep link;
- [x] fixed some duplicated code that was blocking the test from compiling.

Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Reviewed-on: rock-n-code/deep-linking-assignment#2
2023-04-09 16:27:53 +00:00
9bcdaa697b [Setup] Basic project structure (#1)
This PR contains all the work related to setting up this project as required to implement the [Assignment](https://repo.rock-n-code.com/rock-n-code/deep-linking-assignment/wiki/Assignment) on top, as intended.

To summarise this work:
- [x] created a new **Xcode** project;
- [x] cloned the `Wikipedia` app and inserted it into the **Xcode** project;
- [x] created the `Locations` app and also, its `Libraries` package;
- [x] created the `Shared` package to share dependencies between the apps;
- [x] added a `Makefile` file and implemented some **environment** and **help** commands.

Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Reviewed-on: rock-n-code/deep-linking-assignment#1
2023-04-08 18:37:13 +00:00
365387ae0c Initial commit 2023-04-07 09:16:48 +00:00