Swift MessageKit problems - running swift 4.2
I had just updated my code to swift 4.2 and fixed all the errors. Now I am trying to use 'MessageKit' to put a messenger into my app. Everything is updated yet I am having these problems... now it is saying for MessagesInputBarDelegate
"Use of undeclared type 'MessagesInputBarDelegate'"
and
"Use of undeclared type 'MessageInputBar'"
Also,
"Argument Labels '(type:)' do not match any available overloads"
and
"Cannot convert value of type'_?' to expected argument type 'URL?"
Use of undeclared type 'MessagesInputBarDelegate'
Use of undeclared type 'MessageInputBar'
extension CustomerChatViewController: MessagesInputBarDelegate {
func messageInputBar(_ inputBar: MessageInputBar, didPressSendButtonWith text: String) {
let message = Message(user: user, content: text)
save(message)
inputBar.inputTextView.text = ""
}
}
Argument labels '(type:)' do not match any available overloads
let cameraItem = UIBarButtonItem(type: .system)
Cannot convert value of type '_?' to expected argument type 'URL?'
let imageName = [UUID().uuidString, String(Date().timeIntervalSince1970)].joined()
storage.child(channelID).child(imageName).putData(data, metadata: metadata) { meta, error in
completion(meta?.downloadURL())
}
swift messagekit
add a comment |
I had just updated my code to swift 4.2 and fixed all the errors. Now I am trying to use 'MessageKit' to put a messenger into my app. Everything is updated yet I am having these problems... now it is saying for MessagesInputBarDelegate
"Use of undeclared type 'MessagesInputBarDelegate'"
and
"Use of undeclared type 'MessageInputBar'"
Also,
"Argument Labels '(type:)' do not match any available overloads"
and
"Cannot convert value of type'_?' to expected argument type 'URL?"
Use of undeclared type 'MessagesInputBarDelegate'
Use of undeclared type 'MessageInputBar'
extension CustomerChatViewController: MessagesInputBarDelegate {
func messageInputBar(_ inputBar: MessageInputBar, didPressSendButtonWith text: String) {
let message = Message(user: user, content: text)
save(message)
inputBar.inputTextView.text = ""
}
}
Argument labels '(type:)' do not match any available overloads
let cameraItem = UIBarButtonItem(type: .system)
Cannot convert value of type '_?' to expected argument type 'URL?'
let imageName = [UUID().uuidString, String(Date().timeIntervalSince1970)].joined()
storage.child(channelID).child(imageName).putData(data, metadata: metadata) { meta, error in
completion(meta?.downloadURL())
}
swift messagekit
add a comment |
I had just updated my code to swift 4.2 and fixed all the errors. Now I am trying to use 'MessageKit' to put a messenger into my app. Everything is updated yet I am having these problems... now it is saying for MessagesInputBarDelegate
"Use of undeclared type 'MessagesInputBarDelegate'"
and
"Use of undeclared type 'MessageInputBar'"
Also,
"Argument Labels '(type:)' do not match any available overloads"
and
"Cannot convert value of type'_?' to expected argument type 'URL?"
Use of undeclared type 'MessagesInputBarDelegate'
Use of undeclared type 'MessageInputBar'
extension CustomerChatViewController: MessagesInputBarDelegate {
func messageInputBar(_ inputBar: MessageInputBar, didPressSendButtonWith text: String) {
let message = Message(user: user, content: text)
save(message)
inputBar.inputTextView.text = ""
}
}
Argument labels '(type:)' do not match any available overloads
let cameraItem = UIBarButtonItem(type: .system)
Cannot convert value of type '_?' to expected argument type 'URL?'
let imageName = [UUID().uuidString, String(Date().timeIntervalSince1970)].joined()
storage.child(channelID).child(imageName).putData(data, metadata: metadata) { meta, error in
completion(meta?.downloadURL())
}
swift messagekit
I had just updated my code to swift 4.2 and fixed all the errors. Now I am trying to use 'MessageKit' to put a messenger into my app. Everything is updated yet I am having these problems... now it is saying for MessagesInputBarDelegate
"Use of undeclared type 'MessagesInputBarDelegate'"
and
"Use of undeclared type 'MessageInputBar'"
Also,
"Argument Labels '(type:)' do not match any available overloads"
and
"Cannot convert value of type'_?' to expected argument type 'URL?"
Use of undeclared type 'MessagesInputBarDelegate'
Use of undeclared type 'MessageInputBar'
extension CustomerChatViewController: MessagesInputBarDelegate {
func messageInputBar(_ inputBar: MessageInputBar, didPressSendButtonWith text: String) {
let message = Message(user: user, content: text)
save(message)
inputBar.inputTextView.text = ""
}
}
Argument labels '(type:)' do not match any available overloads
let cameraItem = UIBarButtonItem(type: .system)
Cannot convert value of type '_?' to expected argument type 'URL?'
let imageName = [UUID().uuidString, String(Date().timeIntervalSince1970)].joined()
storage.child(channelID).child(imageName).putData(data, metadata: metadata) { meta, error in
completion(meta?.downloadURL())
}
swift messagekit
swift messagekit
edited Nov 20 '18 at 9:19
Julien Kode
1,656518
1,656518
asked Nov 19 '18 at 16:27
Lukas Bimba
18014
18014
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Have you install MessageInputBar ? You can install it like that
pod 'MessageInputBar'
Since MessageKit 2.0.0 you have to install MessageInputBar
If theMessageInputBar
pod is required to use theMessageKit
pod, it seems like the podspec ofMessageKit
should be updated to reflect that dependency. Manually adding a dependency to your ownPodfile
seems like a workaround rather than a real solution.
– Dávid Pásztor
Nov 19 '18 at 16:46
@DávidPásztor you're right, I'll take a look at this more closely
– Julien Kode
Nov 19 '18 at 20:32
Hi there, I'm doing the review rounds and I see you want to remove theMessageData
part from the question. Why, is it unrelated to the other errors in the question? Next time just comment to the author and ask them to remove it!
– Maarten Bodewes
Nov 20 '18 at 2:43
The error of message data cames because of a wrong import of another module. In addition there are another stack overflow post for that
– Julien Kode
Nov 20 '18 at 6:48
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53378904%2fswift-messagekit-problems-running-swift-4-2%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Have you install MessageInputBar ? You can install it like that
pod 'MessageInputBar'
Since MessageKit 2.0.0 you have to install MessageInputBar
If theMessageInputBar
pod is required to use theMessageKit
pod, it seems like the podspec ofMessageKit
should be updated to reflect that dependency. Manually adding a dependency to your ownPodfile
seems like a workaround rather than a real solution.
– Dávid Pásztor
Nov 19 '18 at 16:46
@DávidPásztor you're right, I'll take a look at this more closely
– Julien Kode
Nov 19 '18 at 20:32
Hi there, I'm doing the review rounds and I see you want to remove theMessageData
part from the question. Why, is it unrelated to the other errors in the question? Next time just comment to the author and ask them to remove it!
– Maarten Bodewes
Nov 20 '18 at 2:43
The error of message data cames because of a wrong import of another module. In addition there are another stack overflow post for that
– Julien Kode
Nov 20 '18 at 6:48
add a comment |
Have you install MessageInputBar ? You can install it like that
pod 'MessageInputBar'
Since MessageKit 2.0.0 you have to install MessageInputBar
If theMessageInputBar
pod is required to use theMessageKit
pod, it seems like the podspec ofMessageKit
should be updated to reflect that dependency. Manually adding a dependency to your ownPodfile
seems like a workaround rather than a real solution.
– Dávid Pásztor
Nov 19 '18 at 16:46
@DávidPásztor you're right, I'll take a look at this more closely
– Julien Kode
Nov 19 '18 at 20:32
Hi there, I'm doing the review rounds and I see you want to remove theMessageData
part from the question. Why, is it unrelated to the other errors in the question? Next time just comment to the author and ask them to remove it!
– Maarten Bodewes
Nov 20 '18 at 2:43
The error of message data cames because of a wrong import of another module. In addition there are another stack overflow post for that
– Julien Kode
Nov 20 '18 at 6:48
add a comment |
Have you install MessageInputBar ? You can install it like that
pod 'MessageInputBar'
Since MessageKit 2.0.0 you have to install MessageInputBar
Have you install MessageInputBar ? You can install it like that
pod 'MessageInputBar'
Since MessageKit 2.0.0 you have to install MessageInputBar
answered Nov 19 '18 at 16:29
Julien Kode
1,656518
1,656518
If theMessageInputBar
pod is required to use theMessageKit
pod, it seems like the podspec ofMessageKit
should be updated to reflect that dependency. Manually adding a dependency to your ownPodfile
seems like a workaround rather than a real solution.
– Dávid Pásztor
Nov 19 '18 at 16:46
@DávidPásztor you're right, I'll take a look at this more closely
– Julien Kode
Nov 19 '18 at 20:32
Hi there, I'm doing the review rounds and I see you want to remove theMessageData
part from the question. Why, is it unrelated to the other errors in the question? Next time just comment to the author and ask them to remove it!
– Maarten Bodewes
Nov 20 '18 at 2:43
The error of message data cames because of a wrong import of another module. In addition there are another stack overflow post for that
– Julien Kode
Nov 20 '18 at 6:48
add a comment |
If theMessageInputBar
pod is required to use theMessageKit
pod, it seems like the podspec ofMessageKit
should be updated to reflect that dependency. Manually adding a dependency to your ownPodfile
seems like a workaround rather than a real solution.
– Dávid Pásztor
Nov 19 '18 at 16:46
@DávidPásztor you're right, I'll take a look at this more closely
– Julien Kode
Nov 19 '18 at 20:32
Hi there, I'm doing the review rounds and I see you want to remove theMessageData
part from the question. Why, is it unrelated to the other errors in the question? Next time just comment to the author and ask them to remove it!
– Maarten Bodewes
Nov 20 '18 at 2:43
The error of message data cames because of a wrong import of another module. In addition there are another stack overflow post for that
– Julien Kode
Nov 20 '18 at 6:48
If the
MessageInputBar
pod is required to use the MessageKit
pod, it seems like the podspec of MessageKit
should be updated to reflect that dependency. Manually adding a dependency to your own Podfile
seems like a workaround rather than a real solution.– Dávid Pásztor
Nov 19 '18 at 16:46
If the
MessageInputBar
pod is required to use the MessageKit
pod, it seems like the podspec of MessageKit
should be updated to reflect that dependency. Manually adding a dependency to your own Podfile
seems like a workaround rather than a real solution.– Dávid Pásztor
Nov 19 '18 at 16:46
@DávidPásztor you're right, I'll take a look at this more closely
– Julien Kode
Nov 19 '18 at 20:32
@DávidPásztor you're right, I'll take a look at this more closely
– Julien Kode
Nov 19 '18 at 20:32
Hi there, I'm doing the review rounds and I see you want to remove the
MessageData
part from the question. Why, is it unrelated to the other errors in the question? Next time just comment to the author and ask them to remove it!– Maarten Bodewes
Nov 20 '18 at 2:43
Hi there, I'm doing the review rounds and I see you want to remove the
MessageData
part from the question. Why, is it unrelated to the other errors in the question? Next time just comment to the author and ask them to remove it!– Maarten Bodewes
Nov 20 '18 at 2:43
The error of message data cames because of a wrong import of another module. In addition there are another stack overflow post for that
– Julien Kode
Nov 20 '18 at 6:48
The error of message data cames because of a wrong import of another module. In addition there are another stack overflow post for that
– Julien Kode
Nov 20 '18 at 6:48
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53378904%2fswift-messagekit-problems-running-swift-4-2%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown