-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
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
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 |
* Added AudioSessionProtocol to mock interactions with the AudioSession * Added RecorderProtocol for future testing * Add basic mock classes for this case
First tests added with the help of many resources: |
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 😄. |
* This fixes a bug where the Stop button action would not update the UI when hit and the sound actually stopped. * Set baseline for app launch time
* Removes unnecessary checks for existence * Checks that the fallback message for permissions does not exists
Removing the playback interaction solved the Semaphore CI issue with the |
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.