arturdev / somessaging Goto Github PK
View Code? Open in Web Editor NEWMessaging library for iOS 7.x
License: MIT License
Messaging library for iOS 7.x
License: MIT License
Hi, Can you please help in adding a user name above or below the user image or wherever its fits good.
Thanks in Advance
First of all thank you for this good component, however it doesn't feet into some of my needs. There's a datasource method, - (NSTimeInterval)intervalForMessagesGrouping
to group the messages. I've doubt that its not working upto the mark.
For e.g.
- (NSTimeInterval)intervalForMessagesGrouping {
return (24*60*60); //24 hours grouping
}
However, this isn't working with my case.
I'm sending a message at 23:58pm (today's date) and another message at 00:05am (tomorrow's date) then it'll not show grouping for the message.
I'm not sure how I can edit this and show messages in a day group.
For e.g.
for each unique dates for messages there'll be a group.
Any one have done this with SOMessaging before?
P.S. I'm using pod version of SOMessaging
in my app. I think making changes in some classes will discard my changes in future if its pod will get update.
I am having problems using this with core data fetchedResultsController would be great if you could help me out.
The problem is that the It needs an NSArray of SOMessage objects. I dont like the idea of converting fetchedResultsController to NSArray because I think when I try to reload new message obviously it will have to convert each time and if the array already has data it will crash. Any Ideas?
Hi,
I work in app who using this library. Past week Apple rejected the app because of this selector. Apparently this selector is the same of one iOS private API. To fix, I renamed and resubmitted the app, today the app was approved.
(handleMediaTapped:)
Is the UIPanGestureRecognizer
in SOMessageInputView
only for the behavior where the input view bar ducks down as the user drags the scrollview?
I'm using the SOMessageInputView
without the rest of SOMessaging
(works pretty well, thanks!) and wanting to omit that behavior. I'll make a pull request at some point that makes it an option, probably just a BOOL property in SOMessageInputView.h.
Would you like, in my pull request, to expose that option in SOMessagingDataSource
also? What should this be called, something like "shouldRetractInputViewOnDrag", "dragCanDuckInputBar"?
Note: those settings methods might be better suited for the Delegate protocol instead, that is, if following Cocoa's usual data source / delegate division of labor.
Hi Artur,
Would you add audio message type in future?
I'm getting to the SOMessagingViewController through a push segue, so I have a navigation controller at the top. How do I get the table view size to consider that?
Scrolling in type 4 is not smooth. I am feeling jerky Scrolling in iOS 8 simulator
Thank you for publishing this library, the iOS community definitely needs such a comprehensive chatting UI.
Thanks again.
---Hi I need you help ! i used it ,but i am in trouble ! i need delete chat messages ,how to do this……^^
Can you update CocoaPods so SOMessaging 1.1 can be installed via CocoaPods?
The scrolling is not at all smooth. I've updated most of the things myself but it's hardly making any difference.
Can you help me, what can I do or what changes do I need to make on the current library to make it better?
Hello,
I using your component, but i came across a problem, my message bar is not being showing properly in my ViewController, please see this image: http://jmp.sh/CULZT1A
Do you have any suggestions?
Thanks a lot
Second line was not alignment while i am using ios8 SDk
It seems that the SOMessaging directory is not located correctly in the demo
why i can't send message as image and video while i can send text message?
Hi I am using NVSlideMenuController for horizontal navigation for menu from link https://github.com/nverinaud/NVSlideMenuController but the program breaks at
will you please help me ..... I tried to run after removing the NVSlideMenuController again the app crashed in the same method giving error [UITabBarController my_shouldAutorotate]: unrecognized selector sent to instance 0x79ecd420
Hi I am working with this Library working Great But i need delete a particular row like after long press for that I am using Gestures below is my Gesture method
CGPoint p = [gestureRecognizer locationInView:self.tableView];
NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:p];
id message = self.conversation[indexPath.section][indexPath.row];
int index = (int)[[self messages] indexOfObject:message];
it is showing currenct index value but getting error like beyond the bounds exception. I thing it is problem with the section and rows in soMessaging but I am unable to delete that row can any body help me please
Hi all,
I have met a bug that sometimes may happen sometimes may not when calling [receiveMessage:]
.
I perform an async request to server to get a list of messages of 50 items. And I use a for
loop to call [self receiveMessage:message];
, and then an exception occurs as follows:
2014-08-02 17:37:08.157 Foyo[3355:4607] *** Terminating app due to uncaught exception 'NSRangeException', reason: '-[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:]: row (25) beyond bounds (25) for section (0).'
*** First throw call stack:
(0x2dc63f83 0x384deccf 0x2dc63ec5 0x306a0a41 0x306a07cb 0xf43ed 0xf4193 0xf921d 0xfea67 0xfaa9b 0x2e679f35 0x2e5a83c7 0x2e5985ab 0x2e63c76d 0x389cc293 0x389cdad7 0x389cdd29 0x38b08bd3 0x38b08a98)
libc++abi.dylib: terminating with uncaught exception of type NSException
Anyone could help me?
Hi all,
I send a message of Chinese characters more than 16 words in utf8. It is fine to see that the whole string is recorded in the database. However, when it is displayed in the table cell, only one line is displayed, all others is cut and is not displayed any more. I think it is a bug; however, I cannot find where the problem is.
Anyone can help me? Thank you very much!
How to put XMPP CoreData NSArray to SOMessages ?
Hi @arturdev, How can i use it in project using Swif
Hi when i got message it is scrolling to Bottom. I observed RefreshMessages in SOMessagingViewController. Because of this method it is showing like that so i just remove that method. i am not receiving any messages now and also faced Exception below index value
Is this possible? Would be awesome if this can be achieved! Great open source repo!
@arturdev
I wanted to know that how did you set the position of cell as per the fromMe parameter. Like if fromMe is YES then cell gets positioned to right, so how do you set the x co-ordinate? I saw the ballonImage and textview are all positioned at 0,0 which they take relative to cell. Correct me if I am wrong.
I want this because I want to have a new cell which is centered unlike right or left.
When I try to run the app.. why?
-[ContainerVC my_shouldAutorotate]: unrecognized selector sent to instance 0xb460d10
How do I add an extra view at top just below navigation bar. The messages should be follow this view. Or can I load the entire thing in a different view.
How to put ChatHistory into SOMessages Type.
Please Help Me.
I want to implement a group chat using SOMessaging, Will it be possible??
Is it compatible for multiple user?
The cocoapod is not up to date with the Github project. The issue of the 0 section is not fixed on the cocoapod.
@arturdev I see the tableView getting covered by navigation bar, because of this i can't see the top most chat. Any help as to how to resolve this?
It crashes in this line:
NSInteger row = [self.tableView numberOfRowsInSection:section] - 1;
It happens when there are no messages in the chat and when the input field is empty.
I use AMSlideMenu (left menu).
When you put SOMessaging controller as Content view (through Navigation controller where SOMessaging is a root view) the left gesture over SOMessaging controller does not present left menu.
HI How to add border to text view i tried with textview methods like below
self.textView.layer.borderColor=[UIColor redColor].CGColor;
and also tried with the image like below
self.textView.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"separator.png"]];
but it is not showing any modifications. can any body please help me how to add border to text view
like below
Error while drawing the bubbles.. no showing any bubble but showing text.
I am unable to set values to SOMessage Object (comment for my project) from my View Controller file. It gets set to nil. Here is the source code -->
//
// Message.swift
//
import UIKit
class Message: SOMessage {
// @synthesize attributes,text,date,fromMe,media,thumbnail,type;
override init() {
super.init()
self.date = NSDate()
}
}
//
// CommentsVC.swift
//
import UIKit
class CommentsVC: SOMessagingViewController {
var dataSource: NSMutableArray!
override func viewDidLoad() {
super.viewDidLoad()
self.loadMessages()
}
func loadMessages(){
var comment: Message = Message()
comment.text = "HI ! This is Sparta !!!"
comment.fromMe = false
comment.type = SOMessageTypeText
comment.date = NSDate()
dataSource.addObject(comment)
}
override func intervalForMessagesGrouping() -> NSTimeInterval {
return NSTimeInterval(0)
}
override func messages() -> NSMutableArray {
return dataSource
}
override func configureMessageCell(cell: SOMessageCell!, forMessageAtIndex index: Int) {
var message: Message = self.dataSource[index] as! Message;
println(message.fromMe)
if (message.fromMe != false) {
cell.contentInsets = UIEdgeInsetsMake(0, 3.0, 0, 0) //Move content for 3 pt. to right
cell.textView.textColor = UIColor.blackColor()
} else {
cell.contentInsets = UIEdgeInsetsMake(0, 0, 0, 3.0); //Move content for 3 pt. to left
cell.textView.textColor = UIColor.whiteColor();
}
}
override func messageInputView(inputView: SOMessageInputView!, didSendMessage message: String!) {
var msg: Message = Message()
msg.text = message
msg.fromMe = true
self.sendMessage(msg)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
If you call becomeFirstResponder
for tableView this cause crash because inputView as UIResponder interface expects it to be.
I've tested 3rd party keyboard (swiftkeyboard) with SOMessaging and it breaks the UI. If I've selected switftkeyboard then the frame of the message input view is not longer proper.
Hi, all,
I am developing a chat app to support message bubbles appear randomly of the left margin in the table cell. I find that in SOMessageCell
, the kBubbleLeftMargin
and kBubbleRightMargin
are defined as a fixed number. I wonder what is the best way to randomly generate these two values to make the messages appear more interesting. Is it in adjustCell
?
Thank you very much!
when i init UIAlertView Xcode throw the exception
closed
I added this method to my viewController
Changing the font size which is in default 12 to 14. But then, the text of messages didn't fit to the size of the balloon anymore.
Should I do anything else in order to change the font size?
I want to add an extra view to background containing ImageView and Label when there are no chats i.e. when tableView is empty. And hide it when message data source contains data.
I tried using SOMessageCell's property userImageView
to set an image from URL into Chat, but found that its not working, when I do this its not showing up any image even I've a place holder image too.
Please tell me is it possible or not?
P.S. setting cell.userImage
directly is working. And I'm using UIImageView+AFNetworking
to set image from URL into userImageView
.
Thanks in advance!
I am using SOMessagging in my app and its behaving very inconsistent when images and text is showing in same thread. Some times ballonImage is not shown in text as seen in pics. Its clearly seen that text and balloonImage both are not shown but they both exist there and options are appear. Tell me how could i handle it, thanks in advance.
Hi I am developing chat app in that i want to interact with the bubbles like touch the messages so how can i achieve it i tried with the gesture but not working
HI i am using somessaging. i want to send the emoji in my app how can i add that please help me out
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.