xmpp-messenger-ios
xmpp-messenger-ios copied to clipboard
XMPP Framework Issue in Xcode8.1 with Swift 3
I am trying implement XMPP chat functionality in Xcode8.1 with Swift 3.0, but unfortunately getting "Framework issues".
Any kind of work around solution or alternate supported framework will be a great help.
Same Here
Anybody, please, migrate this project to Swift 3! I really need!
- remove pod from your podfile
pod 'xmpp-messenger-ios'
- add following lines to your podfile
pod 'FMDB'
pod 'JSQMessagesViewController'
pod 'JSQSystemSoundPlayer', '~> 2.0'
pod 'XMPPFramework', :git => "https://github.com/robbiehanson/XMPPFramework.git", :branch => 'master'
- Add files from
/Pods/Classesto your project - Install your pod again with
pod install - Fix swift compatibility errors
- Change
body.setStringValues()tobody.stringValue= - Fix Casting errors
- in oneChat.swift file
var result: SecTrustResultType = SecTrustResultType.Deny as! SecTrustResultType
- Add an objective C category file for DDXMLNode and name it "nullable"
@interface DDXMLNode (nullable)
+ (id)namespaceWithNullableName:(nullable NSString *)name stringValue:(NSString *)stringValue;
@end
@implementation DDXMLNode (nullable)
+ (id)namespaceWithNullableName:(nullable NSString *)name stringValue:(NSString *)stringValue{
return [DDXMLNode namespaceWithName:name stringValue:stringValue];
}
@end
- in oneMessage.swift
composing.namespaces = [(DDXMLElement.namespaceWithNullableName(nil , stringValue: "http://jabber.org/protocol/chatstates")) as! DDXMLNode]
11.add thread:"" to methods that miss thread parameter
If you find a better way,please let me know
I'm trying to do it. Thank you very much! But, if not difficult, can you give the finished project which works on Swift 3? Thank you!
@MuratDeveloper xmpp-messenger-ios-master.zip
@mohammadrhemmati Thank you, it's works! You are unbelievable!
@mohammadrhemmati when i use your codes xmpp-ios-messenger-classes in my project it gives me error. looks like its not converted it swift 3 but your sample code runs without error in xcode 8. is there any setup i have to do? kindly help
@BhushaniOS Try setting "Target Setting->Build Setting->Swift Compiler - Version ->Use legacy swift language version" to "YES"
@mohammadrhemmati by doing this it gives me error in other classes code in my project which are developed in swift 3 :(
@BhushaniOS I will check it.
Any Update Above Issue @mohammadrhemmati by doing this it gives me error in other classes code in my project which are developed in swift 3 :(
Hi, Iam faceing Module libxml not found DDXMLNode.h
and Could not build Objective-C module 'XMPPFramework'.
Please Help me.
yes i did it in Swift 3
Hello I am using xcode 9 and swift 4.0 but I got error in xmpp framework semantic issue in FMDB class
HI Shravanteegala,
Can you please help on Openfire group chat issue, I have implemented group chat but sometimes users unable to send or receive the messages in the particular group.
Thanks Dayakar reddy.