Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1 Record groceries list in iOS #4

Merged
merged 30 commits into from
May 11, 2020

Conversation

LaloLoop
Copy link
Owner

@LaloLoop LaloLoop commented May 4, 2020

Accounts for #1 description. Implementation based on SwiftUI state management + AVFoundation Recorder and player. Code based mostly in the following references:

Modifications were made to separate the Recorder logic from the view.

Unit tests are missing, planning on working on them before closing and integrating with a CI pipeline.

LaloLoop added 5 commits May 2, 2020 17:47
Starging #1 development
* Changed default view's name to RecordingView
* Added Recorder class
* Added required permissions to record audio
* Add delegate methods for recording
* Add recording logic with AVARecorder
* Add view logic for button to record
* Add Player inside Recorder with delegates
* Add view logic to manage buttons depending on recording and playing
* Add documentation on basic app description
* Add references to sources for code
@LaloLoop LaloLoop added enhancement New feature or request iOS Everything related to the iOS mobile App labels May 4, 2020
@LaloLoop LaloLoop added this to the v0.1.0 - Eggplant milestone May 4, 2020
@LaloLoop LaloLoop self-assigned this May 4, 2020
@LaloLoop LaloLoop linked an issue May 4, 2020 that may be closed by this pull request
6 tasks
@LaloLoop
Copy link
Owner Author

LaloLoop commented May 4, 2020

Unit testing can be done with many available libraries to manage mock generation automatically for Swift, but instead, I will be using manual mocking of the stuff I think services as interactions with the actual framework. I am taking the approach described in Mocking with protocols in Swift, I think a clean implementation can be achieved with this, with too many dependencies added to the project. I like the fact that dependencies can be wrapped in Interactions, making it an easy term to remember when adding more.

* Added AudioSessionProtocol to mock interactions with the AudioSession
* Added RecorderProtocol for future testing
* Add basic mock classes for this case
@LaloLoop
Copy link
Owner Author

LaloLoop commented May 4, 2020

First tests added with the help of many resources:

@LaloLoop
Copy link
Owner Author

Found issues while configuring semaphoreci to use the monorepo setup, as the agent can not be changed in a block basis, but per task, which is not ideal but works. Commented in the issue. Will continue adding more test tomorrow to close this 😄.

@LaloLoop
Copy link
Owner Author

Removing the playback interaction solved the Semaphore CI issue with the testPermissionGrantedOnFirstTimeUsage test case, which is not so important, will have to report it to the semaphore team to see what can be the cause, also, the run: when part is not working in the monorepo configuration.
This should account for the requirements described in #1 , so I will be closing this to make some more progress next weekend 🙌🏾.

@LaloLoop LaloLoop merged commit 76f36d5 into develop May 11, 2020
@LaloLoop LaloLoop deleted the feat/1-record-groceries-list-in-iOS branch May 11, 2020 06:42
@LaloLoop LaloLoop mentioned this pull request May 11, 2020
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request iOS Everything related to the iOS mobile App
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Record Groceries list in iOS
1 participant