-
Notifications
You must be signed in to change notification settings - Fork 440
[NEW] Support sending audio records #1061
[NEW] Support sending audio records #1061
Conversation
… into feature/record_audio_messages.735
… into feature/record_audio_messages.735
…m/falcaoaugustos/Rocket.Chat.iOS into feature/record_audio_messages.735
… into feature/record_audio_messages.735
…m/falcaoaugustos/Rocket.Chat.iOS into feature/record_audio_messages.735
… into feature/record_audio_messages.735
… into feature/record_audio_messages.735
class AudioMessageRecorder: NSObject, AVAudioRecorderDelegate { | ||
|
||
private var recorder: AVAudioRecorder? | ||
private var recorderDelegate: AVAudioRecorderDelegate? = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weak Delegate Violation: Delegates should be weak to avoid reference cycles. (weak_delegate)
Redundant Optional Initialization Violation: Initializing an optional variable with nil is redundant. (redundant_optional_initialization)
@luismachado Looks like this one have conflicts? 🤔 |
@rafaelks Yeah also noticed that. Looking into it now. |
Codecov Report
@@ Coverage Diff @@
## develop #1061 +/- ##
===========================================
- Coverage 44.6% 44.08% -0.53%
===========================================
Files 252 254 +2
Lines 14078 14307 +229
Branches 785 785
===========================================
+ Hits 6280 6307 +27
- Misses 7335 7537 +202
Partials 463 463
Continue to review full report at Codecov.
|
… into feature/AudioMessage # Conflicts: # Rocket.Chat.xcodeproj/project.pbxproj # Rocket.Chat/Controllers/Chat/ChatViewController.swift
@rafaelks should be without conflicts now. Let me know what you think :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some testing on the app, is looking good! Will test a few more later and give you some feedbacks on the UI/usage. In the meantime, there's a few things to be changed on the code of the PR.
Thank you very much @luismachado!
@@ -1691,7 +1700,7 @@ | |||
TargetAttributes = { | |||
41DF76DE1D2C50710028DBF8 = { | |||
CreatedOnToolsVersion = 7.3.1; | |||
DevelopmentTeam = S6UPZG7ZR3; | |||
DevelopmentTeam = MJHBLUH3VK; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this change?
@@ -2543,12 +2555,12 @@ | |||
CODE_SIGN_ENTITLEMENTS = Rocket.Chat/Rocket.Chat.entitlements; | |||
CODE_SIGN_IDENTITY = "iPhone Developer"; | |||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | |||
DEVELOPMENT_TEAM = S6UPZG7ZR3; | |||
DEVELOPMENT_TEAM = MJHBLUH3VK; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this change?
INFOPLIST_FILE = Rocket.Chat/Info.plist; | ||
IPHONEOS_DEPLOYMENT_TARGET = 10.0; | ||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | ||
OTHER_SWIFT_FLAGS = "$(inherited) -D DEBUG \"-D\" \"COCOAPODS\""; | ||
PRODUCT_BUNDLE_IDENTIFIER = chat.rocket.ios; | ||
PRODUCT_BUNDLE_IDENTIFIER = chat.rocket.ios11; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to remove this change.
@@ -2565,11 +2577,11 @@ | |||
CODE_SIGN_ENTITLEMENTS = Rocket.Chat/Rocket.Chat.entitlements; | |||
CODE_SIGN_IDENTITY = "iPhone Developer"; | |||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | |||
DEVELOPMENT_TEAM = S6UPZG7ZR3; | |||
DEVELOPMENT_TEAM = MJHBLUH3VK; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this change?
INFOPLIST_FILE = Rocket.Chat/Info.plist; | ||
IPHONEOS_DEPLOYMENT_TARGET = 10.0; | ||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | ||
PRODUCT_BUNDLE_IDENTIFIER = chat.rocket.ios; | ||
PRODUCT_BUNDLE_IDENTIFIER = chat.rocket.ios11; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this change?
|
||
"alert.audio_message.error.title" = "Ooops!"; | ||
"alert.audio_message.error.message" = "An error has occurred. Please, record your message again."; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've to add this strings to the other localizable files (in English is fine if you don't know the other languages). Is just to keep it in sync.
@rafaelks Okay, just addressed your remarks. Regarding the translation, I was going to add the PT version but it looks like it was already there :P Therefore I just added the lines for the other 3 but left a TODO tag near each one, as I don't trust google translate with longer phrases... |
…feature/AudioMessage
…Chat.iOS into feature/AudioMessage
Looking good, but I noticed something curious... always, the first time I send the audio, it doesn't work, stays with 00:00 after the upload. Can you also reproduce this issue? |
Yeah, also just noticed that. It's also happening in @falcaoaugustos branch. Going to try to find out what's happening. |
Okay, the issue seems now seems to be fixed. Would you care to check it on your end @rafaelks ? Thanks. |
…Chat.iOS into feature/AudioMessage
…Chat.iOS into feature/AudioMessage
Thank you @luismachado & @falcaoaugustos!!! 🚀 |
Thank you very much @luismachado . I had a few problems fixing it but I will read your code in order to learn how to do so. I must say that I am still studying this case. |
@RocketChat/ios
I forked #762 (as no update was given since a month ago) so credit also to @falcaoaugustos (maybe it's best to update his PR with this one?)
Changes since the fork:
delayTouchesBegan
was also removed)