Getting started with iOSUILabelChange Status Bar ColorPassing Data between View ControllersManaging the KeyboardUIButtonUILocalNotificationUIImageViewChecking for Network ConnectivityAccessibilityUITableViewAuto LayoutUIViewUIAlertControllerMKMapViewUIColorNSAttributedStringCAAnimationUITextViewUINavigationControllerConcurrencyCAGradientLayerUIGestureRecognizerCustom UIViews from XIB filesSafari ServicesUIStackViewUIImageUIWebViewCALayeriOS - Implementation of XMPP with Robbie Hanson frameworkSwift and Objective-C interoperabilityNSDateCustom fontsAVSpeechSynthesizerUIBarButtonItemUIScrollViewLocalizationNSNotificationCenterUITextFieldAlamofireUIViewControlleriBeaconCLLocationNSURLSessionUISwitchChecking iOS versionUniversal LinksUICollectionViewPDF Creation in iOSIn-App PurchaseNSTimerCGContext ReferenceUITabBarControllerUISearchControllerUIActivityViewControllerCore LocationFacebookSDKAFNetworkingCTCallCenterUIImagePickerControllerNSUserDefaultsUIControl - Event Handling with BlocksUIBezierPathUIPageViewControllerUIAppearancePush NotificationsKey Value Coding-Key Value ObservationInitialization idiomsStoryboardBackground Modes and EventsFastlaneCAShapeLayerWKWebViewUUID (Universally Unique Identifier)CategoriesHandling URL SchemesRealmARC (Automatic Reference Counting)UIPickerViewDynamic TypeNSURLSWRevealViewControllerSnapshot of UIViewDispatchGroupGCD (Grand Central Dispatch)Size Classes and AdaptivityUIScrollView AutoLayoutIBOutletsAWS SDKDebugging CrashesUISplitViewControllerUISplitViewControllerUIDeviceCloudKitGameplayKitXcode Build & Archive From Command LineXCTest framework - Unit TestingNSDataAVPlayer and AVPlayerViewControllerDeep Linking in iOSApp Transport Security (ATS)Core GraphicsSeguesUIDatePickerNSPredicateEventKitNSBundleSiriKitContacts FrameworkDynamically updating a UIStackViewiOS 10 Speech Recognition APINSURLConnectionStoreKitCode signingCreate .ipa File to upload on appstore with ApplicationloaderResizing UIImageSize Classes and AdaptivityMKDistanceFormatter3D TouchGameCenter LeaderboardsKeychainHandle Multiple Environment using MacroSet View BackgroundBlockContent Hugging/Content Compression in AutolayoutiOS Google Places APINavigation BarUITextField DelegateApp wide operationsUILabel text underliningCut a UIImage into a circleMake selective UIView corners roundedConvert HTML to NSAttributed string and vice verseConvert NSAttributedString to UIImageCoreImage FiltersFace Detection Using CoreImage/OpenCVMPMediaPickerDelegateGraph (Coreplot)NSHTTPCookieStorageFCM Messaging in SwiftCreate a Custom framework in iOSCustom KeyboardAirDropSLComposeViewControllerAirPrint tutorial in iOSUISliderCarthage iOS SetupHealthkitCore SpotLight in iOSUI TestingCore MotionQR Code Scannerplist iOSNSInvocationUIRefreshControl TableViewWCSessionDelegateAppDelegateApp Submission ProcessMVVMUIStoryboardBasic text file I/OiOS TTSMPVolumeViewObjective-C Associated ObjectsPassing Data between View Controllers (with MessageBox-Concept)UIPheonix - easy, flexible, dynamic & highly scalable UI frameworkChain Blocks in a Queue (with MKBlockQueue)SimulatorBackground ModesNSArrayOpenGLUIScrollView with StackView childCache online imagesMVP ArchitectureUIKit DynamicsConfigure Beacons with CoreBluetoothCore DataExtension for rich Push Notification - iOS 10.Profile with InstrumentsApplication rating/review requestMyLayoutUIFontSimulator BuildsSimulating Location Using GPX files iOSCustom methods of selection of UITableViewCellsCustom methods of selection of UITableViewCellsUISegmentedControlSqlCipher integrationCustom UITextFieldSecurityGuideline to choose best iOS Architecture PatternsUIFeedbackGeneratorUIKit Dynamics with UICollectionViewMulticast DelegatesUsing Image AseetsUITableViewCellRuntime in Objective-CModelPresentationStylesCydiaSubstrate tweakCreate a video from imagesCodableFileHandleNSUserActivityRich NotificationsLoad images asyncADDING A SWIFT BRIDGING HEADERCreating an App IDSwift: Changing the rootViewController in AppDelegate to present main or login/onboarding flowattributedText in UILabelUITableViewController

iOS - Implementation of XMPP with Robbie Hanson framework

Other topics

iOS XMPP Robbie Hanson Example with Openfire

SRXMPPDemo

Download the example and all the classes here - https://github.com/SahebRoy92/SRXMPPDemo

A demo on XMPP in Objective C, with various simple and complex features implemented in it. All the features of XMPP is done by "in band" xmpp functions. Few features this project contains are --

SRXMPP - A wrapper Singleton class that almost has all features needed for one-to-one chat application.

  • one to one chat
  • Core data implementation of chat (text message) thus having saving of previous messages, offline messages.
  • implementation of vCard(profile information of user, own and others too) from XML and Core Data provided by Robbie Hanson's own framework.
  • availability of friends status (online/offline/typing)

Steps to follow

You want to use this project as a reference then you can do the following--

1. Installed Openfire in a live server - Rent a server, install openfire.

2. Want to try it out without a hassle in your own computer - You need to download, install and setup 3 things to start

a. Java -

  • Download and install Java for Mac.

b. XAMPP -

  • Install XAMPP is relatively easy.
  • After installation just start the XAMPP and start Database(SQL) and Apache Server. image reference
  • Then open browser and paste this URL [http://localhost/phpmyadmin/]
  • . Create a new DB from the left hand side panel.
  • Name the DB anything but remember this name, suppose we name it ChatDB

c. Openfire -

  • Install Openfire and run the application and "Start Openfire" image reference
  • Open Browser and Paste this URL - [http://localhost:9090/setup/index.jsp](http://localhost:9090/setup/index.jsp)
  • Do normal setup
    • Select Language >
    • Server settings, leave as it is, just do continue >
    • Database Settings, leave as it is as "Standard Database Connection as selected >
    • Database Settings - Standard Connection". Now remember the name of the DB you set was ChatDB.
    • Select Database Driver Presets as *"MySQL". Leave JDBC Driver Class as it is. Now in the Database URL you can see, brackets mentioning hostname and Database Name. Just change Hostname to "localhost", and database name to "ChatDB", or any other name of DB you have set earlier, while seting up XAMPP. Leave the Username and password as blank.Fill up details like the image here image reference.
    • Next complete setup by giving a username and password and reconfirming it. Thats it your done Setting up Openfire.

Now the part comes when you have to change a tiny detail in the code.

#Important We need to go to the class - SRXMPP.m, locate the NSString extern SRXMPP_Hostname (in the top) and overwrite the value of it to the

  • IP of the server where OpenFire is installed , OR
  • if you have installed it locally, overwrite the value to - "localhost".

Thats it, you are ready to use this example project and start coding and making it into a better project of your own.

This starter pack will help you in understanding XMPP structure better as well as getting a grasp into XMPP protocols.

You can find other XMPP protocols here in this site - [https://xmpp.org/rfcs/rfc3920.html](https://xmpp.org/rfcs/rfc3920.html)

Development is still left and parts where I hope to include them later on

  1. Group Chat
  2. Image sending support

In short this example project along with the singleton has almost all features that are needed for a One-to-One chat application to have.

Contributors

Topic Id: 1475

Example Ids: 4806

This site is not affiliated with any of the contributors.