Coder Social home page Coder Social logo

chat-sdk / chat-sdk-ios Goto Github PK

View Code? Open in Web Editor NEW
909.0 46.0 273.0 228.07 MB

Chat SDK iOS - Open Source Mobile Messenger

Home Page: http://sdk.chat

License: Other

Objective-C 68.03% Ruby 1.31% C 0.48% Swift 30.17% Shell 0.01%
chat-sdk firebase messaging instant-messaging messenger sdk iphone xmpp xmpp-client messenger-client ipad ios objective-c swift

chat-sdk-ios's Introduction

Chat SDK for iOS v5

Open Source Messaging framework for iOS

Chat SDK is a fully featured open source instant messaging framework for iOS. Chat SDK is backend agnostic and supports Firebase and XMPP. Chat SDK is fully featured, scalable and flexible and follows the following key principles:

  • Free.
  • Open Source.
  • Full control of the data. You have full and exclusive access to the user's chat data
  • Quick integration. Chat SDK is fully featured out of the box
  • Scalable. Supports millons of daily users [1, 2]
  • Backend agnostic. Supports Firebase and XMPP (ejabberd, Prosody, MongooseIM, Tigase, OpenFire)

Features

Pro Features

Sponsor us on either Github sponsors or Paetron and get these features. For full details visit our Modules page.

Full breakdown is available on the features page.

Licensing

This project is covered by multiple different licenses. Use the flowchart to determine which license you can use.

Standard modules

  • ChatK!t
  • ChatSDKCore
  • ChatSDKCoreData
  • ChatSDKExtras
  • ChatSDKFirebase
  • ChatSDKUI
  • DemoChatKit
  • DemoObjC
  • DemoSwift

License:

Monthly Active Users
Less than 1 million Apache 2.0
More than 1 million GPLv3 or Commercial License

Pro modules

  • DemoXMPP
  • ChatSDKProXMPP
  • ChatSDKProModules

License:

Monthly Active Users
Any GPLv3 or Commercial License

Commercial Licensing

For commercial licensing, you have several options:

  1. Pay monthly: Patreon or Github Sponsors
  2. Buy a one-off license
  3. If your project has over 1m MAU or XMPP contact [[email protected]](mailto: [email protected])

Quick Start

About Us

Learn about the history of Chat SDK and our future plans in this post.

Scalability and Cost

People always ask about how much Chat SDK costs to run. And will it scale to millions of users? So I wrote an article talking about just that.

Community

  • Discord: If you need support, join our Server
  • Support the project: Patreon or Github Sponsors πŸ™ and get access to premium modules
  • Upvote: our advert on StackOverflow
  • Contribute by writing code: Email the Contributing Document to [email protected]
  • Give us a star on Github ⭐
  • Upvoting us: Product Hunt
  • Tweet: about your Chat SDK project using @chat_sdk
  • Live Stream Join us every Saturday 18:00 CEST for a live stream where I answer questions about Chat SDK. For more details please join the Discord Server

You can also help us by:

  • Providing feedback and feature requests
  • Reporting bugs
  • Fixing bugs
  • Writing documentation

Email us at: [email protected]

We also offer development services we are a team of full stack developers who are Firebase experts. For more information check out our consulting site.

Running the demo project

This repository contains a fully functional version of the Chat SDK which is configured using our Firebase account. This is great way to test the features of the Chat SDK before you start itegrating it with your app.

  1. Clone Chat SDK
  2. Run pod install in the Xcode directory
  3. Open the Chat SDK Firebase.xcworkspace file in Xcode
  4. Compile and run

Swift Version

We are currently updating the Chat SDK to use Swift, this will happen gradually. In the meantime, the Chat SDK API is fully compatible with Swift projects.

The Chat SDK is fully compatible with Swift projects and contains a Swift demo project.

  1. Clone Chat SDK
  2. Run pod install in the XcodeSwift directory
  3. Open the ChatSDKSwift.xcworkspace file in Xcode
  4. Compile and run

Adding the Chat SDK to your project

Quick start guide - it takes about 10 minutes!

Adding the Chat SDK to your project

  1. Add the Chat SDK development pods to your Podfile
use_frameworks!
pod "ChatSDK"
pod "ChatSDKFirebase/Adapter"
pod "ChatSDKFirebase/Upload"
pod "ChatSDKFirebase/Push"

Optional

pod "ChatSDK/ModAddContactWithQRCode"
  1. Run pod update to get the latest version of the code.

  2. Open the App Delegate add the following code to initialise the chat

Swift

AppDelegate.swift

import ChatSDK

Add the following code to the start of your didFinishLaunchingWithOptions function:

let config = BConfiguration.init();
config.rootPath = "test"
// Configure other options here...
config.allowUsersToCreatePublicChats = true

// Define the modules you want to use. 
var modules = [
    FirebaseNetworkAdapterModule.shared(),
    FirebasePushModule.shared(),
    FirebaseUploadModule.shared(),
    // Optional...
    AddContactWithQRCodeModule.init(),
]

BChatSDK.initialize(config, app: application, options: launchOptions, modules: modules)

    
self.window = UIWindow.init(frame: UIScreen.main.bounds)
self.window?.rootViewController = BChatSDK.ui().splashScreenNavigationController()
self.window?.makeKeyAndVisible();

Then add the following methods:

  func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
      BChatSDK.application(application, didRegisterForRemoteNotificationsWithDeviceToken: deviceToken)
  }

  func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
      BChatSDK.application(application, didReceiveRemoteNotification: userInfo)
  }

  func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
      return BChatSDK.application(application, open: url, sourceApplication: sourceApplication, annotation: annotation)
  }

  func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
      return BChatSDK.application(app, open: url, options: options)
  }

Objective C

Check the demo project.

The Root Path

The root path variable allows you to run multiple Chat SDK instances on one Firebase account. Each different root path will represent a completely separate set of Firebase data. This can be useful for testing because you could have separate test and prod root paths.

  1. The Chat SDK is now added to your project

Firebase Setup

  1. Go to the Firebase website and sign up
  2. Go to the Firebase console and make a new project
  3. Click Add project
  4. Choose a name and a location
  5. Click Settings (the gear icon). On the General tab, click Add Firebase to your iOS app
  6. Enter your bundle ID
  7. Download the GoogleServices file and add it to the root of your Xcode project

Note:
It is worth opening your downloaded GoogleService-Info.plist and checking there is an API_KEY field included. Sometimes Firebase's automatic download doesn’t include this in the plist. To rectify, just re-download the plist from the project settings menu.

  1. Copy the following rows from the demo ChatSDK Info.plist file to your project's Info.plist

  2. App Transport Security Settings

  3. URL types

  4. Make sure that the URL types are all set correctly. The URL type for your app should be set to your bundle id

  5. All the privacy rows. These will allow the app to access the camera, location and address book

  6. In the Firebase dashboard click Authentication -> Sign-in method and enable all the appropriate methods

  7. Add the security rules. The rules also enable optimized user search so this step is very important!

  8. Enable file storage - Click Storage -> Get Started

  9. Enable push notifications

  10. Enable location messages. Get a Google Maps API key. Then add it during the Chat SDK configuration

Objective C

config.googleMapsApiKey = @"YOUR API KEY";

Swift

config.googleMapsApiKey = "YOUR API KEY"

Push Notifications

The Push Notification module allows you to send free push notifications using Firebase Cloud Messaging.

  1. Setup an APN key.
  2. Inside your project in the Firebase console, select the gear icon, select Project Settings, and then select the Cloud Messaging tab.
  3. In APNs authentication key under iOS app configuration, click the Upload button.
  4. Browse to the location where you saved your key, select it, and click Open. Add the key ID for the key (available in Certificates, Identifiers & Profiles in the Apple Developer Member Center) and click Upload.
  5. Enable the push notifications Capability in your Xcode project Project -> Capabilities -> Push Notifications
  6. In Xcode open the Capabilities tab. Enable Push Notifications and the following Background Modes: Location updates, Background fetch, Remote notifications.
Setup Firebase Cloud Functions

Follow the instructions on our Chat SDK Firebase repository

Security Rules

Firebase secures your data by allowing you to write rules to govern who can access the database and what can be written. The rules are also needed to enable user search. To enable the rules see the guide Enabling Security Rules.

Conclusion

Congratulations! πŸŽ‰πŸŽ‰ You've just turned your app into a fully featured instant messenger! Keep reading below to learn how to further customize the Chat SDK.

To go deeper, checkout the API Guide for help with:
  1. Interacting with the Firebase server
  2. Creating and updating entities
  3. Custom authentication
  4. Common code examples
  5. Customizing the user interface

View the API documentation here.

Next Steps

Documentation

Configuration

There are a number of configuration options available. Check out the BConfiguration class. Using this class you can do things like:

  • Changing the chat bubble colors
  • Changing the default user name
  • Enable or disable different types of login
  • Show or hide empty chats
  • etc...

Customize the UI

To customize the UI, you can register subclasses for different views. You can do that using the UI service BChatSDK.ui. For example, to register a new login view controller you would use:

BChatSDK.ui.loginViewController = [[YourViewController alloc] initWithNibName:Nil bundle: Nil];

To modify the chat view you would register a provider:

[BChatSDK.ui setChatViewController:^BChatViewController *(id<PThread> thread) {
        return [[YourChatViewController alloc] initWithThread:thread];
}];

Every view controller in the app can be customized this way.

Use Chat SDK views in your app

Any of the Chat SDK views can be added into your app. Checkout the PInterfaceFacade for options. You can add a any view using the following pattern. Here we are using the interface service to get the particular view.

Objective-C

UIViewController * privateThreadsViewController = [BChatSDK.ui privateThreadsViewController];

Swift

let privateThreadsViewController = BChatSDK.ui().a.privateThreadsViewController()

Integrate the Chat SDK with your existing app

To do that, you can take advantage of the BIntegrationHelper class. This makes provides some helper methods to make it easier to integrate the Chat SDK with your app.

At the most basic level, you need to do the following:

  1. Authenticate the Chat SDK when your app authenticates. The best way to do this is to generate a custom token on your server following this guide. Then use this method to initialize the Chat SDK:

Objective-C

[BIntegrationHelper authenticateWithToken:@"your token"];

Swift

BIntegrationHelper.authenticate(withToken: "your token")
  1. Update the Chat SDK user's name and image whenever your user's name or image changes. You can do this using the following method:

Objective-C

[BIntegrationHelper updateUserWithName:@"Name" image: image url: imageURL];

Swift

BIntegrationHelper.updateUser(withName: "Name", image: image, url: imageURL)
  1. Logout of the Chat SDK whenever your app logs out. A good place to do this is whenever your login screen is displayed:

Objective-C

[BIntegrationHelper logout];

Swift

BIntegrationHelper.logout()
  1. Now the Chat SDK is integrated with your app.

Module Setup

There are a number of free and premium extensions that can be added to the Chat SDK.

Firebase Modules

For the following modules:

The free modules are located in the chat-sdk-ios/ChatSDKFirebase folder. The premium modules can be purchased and downloaded from the links provided above.

To install a module you should use the following steps:

  1. Copy the module code into your Xcode source code folder and add the files to your project from inside Xcode. If you are using a symlink you can use the symlink script (mentioned above) and then just add a link to the ChatSDKFirebase folder to Xcode.
  2. Add any necessary dependencies to your Podfile
  3. Add the modules to the array of modules during configuration.

Firebase UI

The File UI module allows you to use the native Firebase user interface for authentication.

After adding the files to your Xcode project, add the following to the App Delegate to enable the module.

Objective C

AppDelegate.m -> application: didFinishLaunchingWithOptions:

 #import "BFirebaseUIModule.h"

[[[BFirebaseUIModule alloc] init] activateWithProviders: @[]];

Swift

[YourProject]-Bridging-Header.h

 #import "BFirebaseUIModule.h"

AppDelegate.swift

BFirebaseUIModule.init().activate(withProviders: []);

You should pass in array of the FUIAuthProvider objects you want to support.

Also add the following to your Podfile depending on which authentication methods you want to support:

pod 'FirebaseUI/Facebook', '~> 4.0'
pod 'FirebaseUI/Google', '~> 4.0'
pod 'FirebaseUI/Twitter', '~> 4.0'
pod 'FirebaseUI/Phone', '~> 4.0'

Then run pod install.

Note If you want to Firebase Auth UI make sure you comment out the following line:

BNetworkManager.shared().a.auth().setChallenge(BLoginViewController.init(nibName: nil, bundle: nil));

Other Modules

For the following modules:

These modules are distributed as development pods. After you've downloaded the module, unzip it and add it to the ChatSDKModules folder. Then:

  1. Open your Podfile
  2. Add the line:
pod "ChatSDKModules/[ModuleName]", :path => "[Path to ChatSDKModules folder]"
  1. Run pod install
  2. The module is now active

Using the Chat SDK API

The Chat SDK API is based around the network manager and a series of handlers. A good place to start is by looking at the handlers Pods/Development Pods/ChatSDK/Core/Core/Classes/Interfaces. Here you can review the handler interfaces which are well documented. To use a handler you would use the following code:

Objective C

[[BChatSDK.handler_name function: to: call:]

Swift

BNetworkManager.shared().a.handler_name() function: to: call:]
Searching for a user

For example, to search for a user you could use the search handler:

-(RXPromise *) usersForIndexes: (NSArray *) indexes withValue: (NSString *) value limit: (int) limit userAdded: (void(^)(id<PUser> user)) userAdded;

Here you pass in a series of indexes to be used in the search i.e. name, email etc... and a value. It will then return a series of user objects.

You can also see example implementations of these handlers by looking at the BFirebaseSearchHandler class. And also seeing how the method is used in the Chat SDK.

Starting a chat

To start a chat you can use the core handler.

-(RXPromise *) createThreadWithUsers: (NSArray *) users
                       threadCreated: (void(^)(NSError * error, id<PThread> thread)) thread;

When this method completes, the thread will have been created on Firebase and all the users will have been added. You could then open the thread using the interface adapter.

UIViewController * chatViewController = [BChatSDK.ui chatViewControllerWithThread:thread];

So a more complete example would look like this:

-(void) startChatWithUser {
    MBProgressHUD * hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
    hud.label.text = [NSBundle t:bCreatingThread];
    
    [[BChatSDK.core createThreadWithUsers:@[_user] threadCreated:^(NSError * error, id<PThread> thread) {
        if (!error) {
            [self pushChatViewControllerWithThread:thread];
        }
        else {
            [UIView alertWithTitle:[NSBundle t:bErrorTitle] withMessage:[NSBundle t:bThreadCreationError]];
        }
        [MBProgressHUD hideHUDForView:self.view animated:YES];
    }];
}

-(void) pushChatViewControllerWithThread: (id<PThread>) thread {
    if (thread) {
        UIViewController * chatViewController = [BChatSDK.ui chatViewControllerWithThread:thread];
        [self.navigationController pushViewController:chatViewController animated:YES];
    }
}

Troubleshooting Cocoapods

  1. Always open the .xcworkspace file rather than .xcodeproj
  2. Check CocoaPod warnings - make sure to fix any warnings before proceeding
  3. Make sure that your base configuration isn’t set: Project -> project name -> Info -> Configuration
  4. Make sure that the β€œBuild Active Architecture Only” setting is the same for both the main project and the pods project.
  5. Check the build settings in the Xcode project and check which fields are in bold (this means that their value has been overridden and CocoaPods can't access them). If you press backspace while selecting those fields, their values will be set to the default value.

The license

We offer a choice of two license for this app. You can either use the Chat SDK license or the GPLv3 license.

Most Chat SDK users either want to add the Chat SDK to an app that will be released to the App Store or they want to use the Chat SDK in a project for their client. The Chat SDK license gives you complete flexibility to do this for free.

Chat SDK License Summary

  • License does not expire.
  • Can be used for creating unlimited applications
  • Can be distributed in binary or object form only
  • Commercial use allowed
  • Can modify source-code but cannot distribute modifications (derivative works)

If a user wants to distribute the Chat SDK source code, we feel that any additions or modifications they make to the code should be contributed back to the project. The GPLv3 license ensures that if source code is distributed, it must remain open source and available to the community.

GPLv3 License Summary

  • Can modify and distribute source code
  • Commerical use allowed
  • Cannot sublicense or hold liable
  • Must include original license
  • Must disclose source

What does this mean?

Please check out the Licensing FAQ for more information.

chat-sdk-ios's People

Contributors

angelolloqui avatar bensmiley avatar ddvd233 avatar denniszxxc avatar ealeksandrov avatar ibobo avatar kykrueger avatar martpiet avatar pepebecker avatar sanjom avatar simonsmiley64 avatar simonsmileyandrews avatar yadidl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chat-sdk-ios's Issues

How to init a group discussion?

Hello -

Have chat working and exploring. Now I need to have a group chat discussion. Basically I want to make a chat room for each of my brands. How do I pop open a chat with the group already initialized say with the brand code?

Thanks

How to set the background colors?

So my app instantiates everything using BAppTabBarController with my own views in there and it is working fine. Now, how do I change the tab bar color, etc? Thanks.

DeleteThread to remove observers for Private Thread with more than 2 users

Hi Ben, Simon,
ChatSDK seems to have a bug in the following code; when there is a Private Thread with more than 2 users, the following methods will not be called:

  • [self off];
  • [self messagesOff];

It is understandable that, it is robust handling to make sure if this is a Private thread with 2 users, the observers must be maintained for thread "Details" and "Messages", however when there are more than 2 users, the method to remove the observers seems to be accidentally left out.

Code pasted below as a reference:

    if (_model.type.intValue & bThreadTypePrivate && _model.users.allObjects.count == 2) {
        // Rather than delete the thread we just set the status as deleted
        [currentThreadUser setValue:@{bNameKey: currentUser.name, bDeletedKey: [FIRServerValue timestamp]}
                withCompletionBlock:^(NSError * error, FIRDatabaseReference * ref) {
                    if (!error) {
                        [promise resolveWithResult:Nil];
                    }
                    else {
                        [promise rejectWithReason:error];
                    }
                }];
        
        return promise.thenOnMain(^id(id success)
                                  {
                                      [[BStorageManager sharedManager].a save];
                                      // We can keep listening to the thread. That way, if a new message comes in,
                                      // it get's regenerated
                                      //[self off];
                                      //[self messagesOff];
                                      [[NSNotificationCenter defaultCenter] postNotificationName:bNotificationThreadDeleted object:Nil];
                                      
                                      return Nil;
                                      
                                  }, ^id(NSError * error)
                                  {
                                      [[BStorageManager sharedManager].a undo];
                                      return error;
                                  });
    }
    else {
     // Otherwise we just remove the user
        return [self removeUser:[CCUserWrapper userWithModel:currentUser]];
    }

Thanks,
Calvin

Private Threads coming up empty with no messages in it

Hello Ben, Simon,
I have noticed this behavior recently that after login my app would fetch all the chat threads but for some reason would not fetch any messages inside the chat and would show "No messages" label although i know that there are messages. If i logout and log in again then it would work fine. this scenario only happens sometimes and i was not able to catch this case.
Do you guys know any possibility of error here ?
Thanks
Sachin

General UX issues

  1. I noticed with Facebook login you're not pulling in the user's email. It would be awesome to have my email in the profile pulled in from my profile.

  2. I noticed if I register with email, then sign in with Google, and they're the same email, you're not merging the accounts. That would be cool so I don't have duplicate accounts: https://firebase.google.com/docs/auth/ios/account-linking

  3. In the contacts screen, when I tap "From Phonebook" and then grant it permission, I get a "No users returned - click to refresh" message. I've tried it on two phones (7+ and 4s) both with lots of contacts.

  4. If I am signed in as User A, then sign in as User B and go to my profile page, I see User A's profile picture flash briefly before it's updated with User B's profile picture.

  5. When I send an audio message, and I click play to hear it, it comes out of the ear piece, rather than the speaker.

Some general UX suggestions:

  1. The registration asks for "username" and "password" but it really requires an email. The hint should be changed to "Email"

  2. The registration screen should probably be its own page. I would add either a confirm password field OR a "show password" checkbox or button to show what they're typing.

  3. For ChatCat contacts it would be cool if they were automatically added to my contacts when I initiate a chat with them. Not public chats, but if I search out a user and message them privately, or a group of users privately, I'd want to see them in my contacts. I've already made an effort to reach out to them, therefore it's safe to assume I know them or want to know them. So the workflow would be: Tap on Conversations --> tap the + button --> search for a user --> initiate a private chat --> go to Contacts, see that user

  4. In the Conversations screen, I noticed you're using 24 hour time, and using dd/mm/yy. I think it would be more user friendly it only showed the date if the message was sent prior to today, and if it was sent today, then just show the clock time it was sent. Example:

Sent today: show: 10:15 AM
Sent sometime this week: show: Wed
Sent last week: show: Mar 15

Thread 1: Signal SIGBRT

when running the app and doing this after downloading from git this is what i get: first part is step to re-perform and second is the location of the error screen shot also there and then the actual error log.
Step A:(REPERFORMANCE STEPS)
1.) Search for contact and add to contact
2.) Chat with that contact you added (Note-> for some reason creating a chat thread takes a bit more time)
3) When you open the app after few hours --> you will see the chat thread of conversation but the contact that was added disappears.
Besides this while testing I noted 2 additional things: when you click on Chat from the added contacts the app crashes and all the contacts disappear( i think it kinda re-sets as new) Note also that I have noticed that when you flag also app crashes.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.

LOCATION OF CODE CRASH: BCOREDATAMANAGER.M

-(void) beginUndoGroup {
[self.managedObjectContext.undoManager beginUndoGrouping];
}

-(void) endUndoGroup {
[self.managedObjectContext.undoManager endUndoGrouping];
}
screen shot 2017-03-03 at 3 02 38 pm

ERROR LOG:
(
"<NSLayoutConstraint:0x17094850 V:[UITextField:0x17272190(30)]>",
"<NSLayoutConstraint:0x170ae7e0 V:|-(8)-[UILabel:0x170d2ab0'No new users found for th...'] (Names: '|':UIView:0x17004050 )>",
"<NSLayoutConstraint:0x170b1e00 V:[UILabel:0x170d2ab0'No new users found for th...']-(375)-| (Names: '|':UIView:0x17004050 )>",
"<NSLayoutConstraint:0x15f11e30 V:|-(85)-[UITextField:0x17272190] (Names: '|':UIView:0x171ea5c0 )>",
"<NSLayoutConstraint:0x15f05240 V:[UIButton:0x17277480'Button']-(20)-[UIView:0x17004050]>",
"<NSLayoutConstraint:0x15fdca30 V:[UIView:0x17004050]-(0)-| (Names: '|':UIView:0x171ea5c0 )>",
"<NSLayoutConstraint:0x15f03e70 UIButton:0x17277480'Button'.bottom == UITextField:0x17272190.bottom>",
"<NSLayoutConstraint:0x1716a380 'UIView-Encapsulated-Layout-Height' V:[UIView:0x171ea5c0(480)]>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x170b1e00 V:[UILabel:0x170d2ab0'No new users found for th...']-(375)-| (Names: '|':UIView:0x17004050 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2017-03-03 14:46:59.525 ChatSDKSwift[735:377471] Creating: CDUser
2017-03-03 14:46:59.610 ChatSDKSwift[735:377471] Creating: CDUser
2017-03-03 14:47:11.084 ChatSDKSwift[735:377471] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '_endUndoGroupRemovingIfEmpty:: NSUndoManager 0x17032980 is in invalid state, endUndoGrouping called with no matching begin
'
*** First throw call stack:
(0x225f791b 0x21d92e17 0x225f7861 0x22db13f5 0x15a0eb 0x169429 0x37374b 0x1479b7f 0x1479b6b 0x147e655 0x225b9b6d 0x225b8067 0x22507229 0x22507015 0x23af7ac9 0x26bdb189 0xf8270 0x221af873)
libc++abi.dylib: terminating with uncaught exception of type NSException
warning: could not load any Objective-C class information. This will significantly reduce the quality of type information available.
(lldb)

How can I install manually

I have a problem with cocoapods and I want to use this SDK as it suits my needs.
How can I install the project manually?
Can you please specify which headers I need to drag into my project?
Thanks,
Esme

iOS Objective-C Google+ login fails

Hi,

this is the log I am seeing when I try to log in with Google+ option:

2017-03-11 13:38:54.433330 HeyYapp[11061:4063335] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'uiDelegate must either be a |UIViewController| or implement the |signIn:presentViewController:| and |signIn:dismissViewController:| methods from |GIDSignInUIDelegate|.'
*** First throw call stack:
(0x181a351b8 0x18046c55c 0x181a35100 0x100493114 0x10049562c 0x100492288 0x1000aab40 0x10009e6c8 0x1000b2a38 0x1000fba88 0x18791fd30 0x18791fcb0 0x18790a128 0x18791f59c 0x18791f0c4 0x18791a328 0x1878eada0 0x1880d475c 0x1880ce130 0x1819e2b5c 0x1819e24a4 0x1819e00a4 0x18190e2b8 0x1833c2198 0x1879557fc 0x187950534 0x100023fbc 0x1808f15b8)
libc++abi.dylib: terminating with uncaught exception of type NSException

Any hint on this issue?

Video message order incorrect

If we send a video message and then quickly send another message, that message will appear before the video message

iOS Objective-C How to remove contact?

Hello, I have found this method:

-(RXPromise *) deleteContact: (id<PUser>) user

I wonder if you can give me any hint to use it, or I have to implement on my own.
Thanks.

use_frameworks_2

The sample project XCodeSwift won't compile.

This is the culprit and is causing me conflicts with my other regular firebase references when I add to my pod file.

ChatSDKFirebaseAdapter

Customize BAppTabBar ?

I tried this and it had no effect.

let vc1 = UIStoryboard(name: "Main", bundle: nil) .instantiateViewController(withIdentifier: "DashboardViewController") as! DashboardViewController
    let vc2 = UIStoryboard(name: "Main", bundle: nil) .instantiateViewController(withIdentifier: "MainNewsViewController") as! MainNewsViewController
    
    BInterfaceManager.shared().a .addTabBarViewController(vc1, at: 0)
    BInterfaceManager.shared().a .addTabBarViewController(vc2, at: 1)

How do I customize, change, etc the tab bar controller? Otherwise I do have login to chat!!!

Obj-C to Swift issue

Hi!
I'm writing my own code in Swift using this SDK.
But I have lots of problems with Objective-C code on the page of here.
I found some code in Swift from Demo example (AppDelegate.swift), but the rest of code, I can't translate.
Could you guide me how to do it?

Add contacts in iPad fails

Hello,

I am receiving this fail when running the app in an iPad:

2017-03-15 17:13:42.898 HeyYapp[1552:390067] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'Your application has presented a UIAlertController (<UIAlertController: 0x1592bc00>) of style UIAlertControllerStyleActionSheet. The modalPresentationStyle of a UIAlertController with this style is UIModalPresentationPopover. You must provide location information for this popover through the alert controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem.  If this information is not known when you present the alert controller, you may provide it in the UIPopoverPresentationControllerDelegate method -prepareForPopoverPresentation.'
*** First throw call stack:
(0x248fb91b 0x24096e17 0x29767485 0x291c7e93 0x291c5db3 0x2911f4c9 0x2912b7db 0x28e69b1d 0x248bd6c9 0x248bb9cd 0x248bbdff 0x2480b229 0x2480b015 0x25dfbac9 0x28edf189 0xc5de9 0x244b3873)
libc++abi.dylib: terminating with uncaught exception of type NSException

The problem seems to be the way the uialert is showed so it has to be changed to popover using this method: UIModalPresentationPopover

Easy to fix, so I think it has to be fixed in order to keep the app universal.

[XMPP ChatSDK] Can't re-login with a different account in the same session

How to reproduce:

  1. Login with a new or existing user
  2. Logout with user
  3. Enter new details and register or login
  4. The login then fails

We can fix this by re-building the project, this will re-load the login page and the user can now successfully login. The issue seems to be coming from doing this in the same session.

Possibility: ChatSDK API + JSQMessagesViewController

May I use ChatSDK API with JSQMessagesViewController? How do you think?
Project on Swift.

I have runed test project with ChatSDK API.
Project is using BPublicThreadsViewController and BChatViewController2 with my other view controllers now.
I assume I can use JSQMessagesViewController.
But maybe I don't know something?

My new Group Public Chat... where did my messages go?

OK -

It seems I have everything sync'd and sort of working. Amazing! Anyway, my group chat again. When I went into it from a detail page, it dutifully created a new CHAT in Firebase! I typed myself a message. Next I went out. Then I went back in expecting so see my message, but it was empty again. Hmmm, so I checked Firebase and no new Thread was created so that part seemed to work.

So the question is... how is this supposed to work. Shouldn't a user see the the last X messages or such of the public thread?

Thanks for all the help so far.

Editing Storyboards

I'm trying to remove social media login functions from the storyboards but they keep appearing on the simulator even after removing them. Tried deleting and running the project again no luck.

Message bubbles incorrectly set

When loading a chat sometimes the bubble are not being set correctly. This seems to be when logging in with a user, logging out then logging back in with another user.

To clarify the problem the see attached image:

photo jan 12 11 45 10

The problem goes away when the app is reloaded

Pod install issue

Trying to get the ChatSDK working but keep getting error when using pod install and i get this [!] No podspec found for ChatSDKFirebase in ../../ChatSDK/ChatSDKFirebase
any help on this please. Tried using the framework beta branch but no luck there aswell.

FirebaseUI conflicts with ChatSDKFirebaseAdapter podspecs

I cannot get these two to coexist:

The 'Pods-TwoBitTrader' target has frameworks with conflicting names: firebaseanalytics.framework, firebaseauth.framework, firebasecore.framework, firebasedatabase.framework, firebaseinstanceid.framework, and firebasestorage.framework.

Pod installation issue "target has transitive dependencies"

Dear When i tried to install pod for the chat on my project i get bellow error

[!] The 'Pods-Chat' target has transitive dependencies that include static binaries: (/Users/../Pods/Google/Frameworks/GGLCore.framework, /Users/../Pods/Google/Frameworks/GGLSignIn.framework, and /Users/../Pods/TwitterKit/TwitterKit.framework)

Master branch pod install

Hi,

Following the readme tutorial in the master branch yields an error that ChatSDK is not found. There isn't a podspec in master for ChatSDK too so I ended up having to use the master_no_framework branch for installation.

Can't add Backendless notifications

Project on Swift.

  1. Added the folder Backendless to ChatSDK/ChatSDKModules

  2. My podfile:

source 'https://github.com/CocoaPods/Specs.git'

target 'chattest' do
  
  pod "ChatSDK", :path => "../"
  pod "ChatSDKModules/Backendless", :path => "../ChatSDKModules"
  
end
  1. Run pod install
  2. Reopen Xcode

But in *-Bridging-Header.h :

#import <ChatSDK/ChatCore.h>
#import <ChatSDK/ChatUI.h>
#import <ChatSDK/ChatCoreData.h>
#import <ChatSDK/ChatFirebaseAdapter.h>
#import "BTwitterHelper.h"
#import <ChatSDKModules/BBackendlessPushHandler.h> //<------ 'ChatSDKModules/BBackendlessPushHandler.h' file not found

What do I wrong?

SDWebImage is at 4

Need to update the pods that references this to 4. Otherwise it also conflicts with my FirebaseAuthUI

SDWebImage (~> 3.0) required by ChatSDKUI (4.2.5)

Should be 4.0

FirebaseAuthUI and chat?

Ok - So I successfully integrated FirebaseAuthUI and was wondering how I could tie this in to chat. Is there a convenience method to set the "current user" from the FirebaseAuthUI credentials?

How to use/extend the UI; for instance Login

What is the proper integration strategy for using your UI elements? If we modify the elements won't they be overridden from subsequent updates?

So, in the first use case, what do I do to modify the login? I am running Swift3. thanks

Android to iOS Chat issue

  1. iOS device receiving blank message from android Device.

  2. Android device receiving Multiple copies of single message from iOS device.

Typing indicator retrieving instruction

Hi Guys, have posted the crash here on github as requested. Also please note that i have done all my updated & have been waiting on you guys to send the instructions for where to retrieve the typing indicator (Ben you are my contact through the e-mail commuication) and if you know the solution for this crash on the latest code.
Thanks,

Backendless Push Notification not working for Swift version

Noticed that the bakcendless push setup for swift not working( pod installation no issue)

  • however after doing all the things to setup the swift noticed that unless i am missing something the push notification not working for swift version. I am thinking maybe i am missing something in the code insertion part as the setup guide you guys have is for Objective -C. So please give some guidance
    thanks

Little Swift Help with Promise please

OK -

I am writing my app with Swift. However, I have never used Promises before let alone figure out how to bridge them. For instance the createPublicThread returns an RXPromise. How do I get the thread from the promise in Swift? Been driving me crazy all day

No pod spec in chatsdk

I notice there is no pod spec file in ChatSDK in latest release, any reason?

Best

Dave

screen shot 2017-04-26 at 17 05 20

Can we get SDWebImage dependency fixed?

Still trying to get a build. Though I have been examining the code and docs a lot because of these struggles. Anyway in the ChatSDKUI.podspec I think it needs to be:

s.dependency 'SDWebImage', '> 3.0'
s.dependency 'SDWebImage-ProgressView', '
> 0.4'

JUST:
s.dependency 'SDWebImage', '~> 4.0'

I didn't see SDWebImage-ProgressView being used in the code.

User Block/Unblock Issue

Hello Ben, Simon
Hope you guys are doing good.
I am trying to Block/Unblock user in private 1-on-1 chat thread.
In BThreadsViewController.m table cell I have added Edit actions for Block Unblock like bellow
//Block Action
UITableViewRowAction *blockAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:@"Block" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath)
{
id thread = _threads[indexPath.row];
[[BNetworkManager sharedManager].a.blocking blockUser:thread.otherUser].thenOnMain(^id(id result) {
NSLog(@"user Blocked Success");
return Nil;
}, ^id(NSError * error) {
NSLog(@"user Blocked Error");
return Nil;
});
}];

Unfortunately this returns Crash of application without any messages except Regular EXCEC_BAD_Exception with no error stack
The crash is on this line
[[BNetworkManager sharedManager].a.blocking blockUser:thread.otherUser].thenOnMain(^id(id result) { }

On the other hand , If i execute this without "thenOnMain" Block then it works without any exception but it seems to have no effect on user states and user is not blocked , like this
[[BNetworkManager sharedManager].a.blocking blockUser:thread.otherUser];

Can you please help me finding out what i am doing wrong.
Thanks
Sachin

Video image not filling the entire image view

When a video message is sent the background image is currently smaller than the coverImageView. This is meaning the corners are not rounded so the UI is not as smooth.

Checkout the size of the image is correctly being sent and the imageView is being formatted correctly

pod install

Hello there is a issue when i'm trying to instal the cocopods:
Result of pod install:
Downloading dependencies
Installing AFNetworking (3.1.0)
Installing Bolts (1.8.4)
Installing ChatSDK (4.2.5)
Installing CountryPicker (1.3)
Installing DateTools (1.7.0)
Installing Fabric (1.6.11)
Installing Facebook-iOS-SDK (4.1.0)
Installing Firebase (3.14.0)
Installing FirebaseAnalytics (3.7.0)
Installing FirebaseAuth (3.1.1)
Installing FirebaseCore (3.5.1)
Installing FirebaseDatabase (3.1.2)
Installing FirebaseInstanceID (1.0.9)
Installing FirebaseMessaging (1.2.2)
Installing FirebaseStorage (1.1.0)
Installing FrameAccessor (1.3.2)
Installing GTMOAuth2 (1.1.4)
Installing GTMSessionFetcher (1.1.8)
Installing Google (3.0.3)
Installing GoogleSignIn (4.0.2)
Installing GoogleToolboxForMac (2.1.1)
Installing MBProgressHUD (1.0.0)
Installing Protobuf (3.2.0)
Installing RXPromise (1.0.5)
Installing Reachability (3.2)
Installing SDWebImage (3.7.6)
Installing SDWebImage-ProgressView (0.5.0)
Installing StaticDataTableViewController (2.0.5)
Installing TOCropViewController (2.0.12)
Installing TwitterCore (1.15.3)
Installing TwitterKit (1.15.3)
Installing VENTokenField (2.5.2)
Generating Pods project

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Command

/usr/local/bin/pod install

Report

  • What did you do?

  • What did you expect to happen?

  • What happened instead?

Stack

   CocoaPods : 1.2.0
        Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
    RubyGems : 2.0.14.1
        Host : Mac OS X 10.12.3 (16D32)
       Xcode : 8.2.1 (8C1002)
         Git : git version 2.10.1 (Apple Git-78)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 8c7965281c1a71bcba4154139d1c4878a755307d

Plugins

cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.1.2
cocoapods-try         : 1.1.0

Podfile

source 'https://github.com/CocoaPods/Specs.git'

target 'ChatSDK Demo' do
  
  pod "ChatSDK", :path => "../"
  #pod "ChatSDKModules/Backendless", :path => "ChatSDKModules"
	
end

Error

LoadError - cannot load such file -- cfpropertylist
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/plist.rb:25:in `read_from_path'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object/helpers/file_references_factory.rb:143:in `block in new_xcdatamodeld'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object/helpers/file_references_factory.rb:138:in `each'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object/helpers/file_references_factory.rb:138:in `new_xcdatamodeld'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object/helpers/file_references_factory.rb:27:in `new_reference'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object/group.rb:222:in `new_reference'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/project.rb:190:in `add_file_reference'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:187:in `block (2 levels) in add_file_accessors_paths_to_pods_group'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:185:in `each'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:185:in `block in add_file_accessors_paths_to_pods_group'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:180:in `each'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:180:in `add_file_accessors_paths_to_pods_group'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:108:in `block in add_resources'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/user_interface.rb:142:in `message'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:106:in `add_resources'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:42:in `install!'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/xcode/pods_project_generator.rb:148:in `install_file_references'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/xcode/pods_project_generator.rb:63:in `generate!'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:179:in `block in generate_pods_project'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/user_interface.rb:64:in `section'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:178:in `generate_pods_project'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:115:in `install!'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/command/install.rb:37:in `run'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0@global/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/lib/cocoapods/command.rb:52:in `run'
/Users/alexbalyaev/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.2.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=cannot+load+such+file+--+cfpropertylist&type=Issues

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...

and 2 more at:
https://github.com/cocoapods/cocoapods/search?q=cannot%20load%20such%20file%20--%20cfpropertylist&type=Issues&utf8=βœ“

I'm installing a lot of pods and this is the first project when i have this issue.

Thanks

Fatal Error When sending Images or Selecting User Avatar

2017-04-14 22:52:00.889 ChatSDK Demo[13311:1128306] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'URL must be in the form of http[s]://firebasestorage.googleapis.com/v0/b/<bucket>/o/<path/to/object>[?token=signed_url_params]'
*** First throw call stack:
(
	0   CoreFoundation                      0x0000000103a81b0b __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x000000010700a141 objc_exception_throw + 48
	2   CoreFoundation                      0x0000000103aea625 +[NSException raise:format:] + 197
	3   ChatSDK Demo                        0x0000000101beaf25 +[FIRStoragePath pathFromHTTPURL:] + 475
	4   ChatSDK Demo                        0x0000000101beab89 +[FIRStoragePath pathFromString:] + 137
	5   ChatSDK Demo                        0x0000000101be645f -[FIRStorage referenceForURL:] + 41
	6   ChatSDK Demo                        0x0000000101759a84 -[BFirebaseUploadHandler uploadFile:withName:mimeType:] + 244
	7   ChatSDK Demo                        0x0000000101727960 -[BAbstractUploadHandler uploadImage:thumbnail:] + 176
	8   ChatSDK Demo                        0x000000010172c333 -[BBaseImageMessageHandler sendMessageWithImage:withThreadEntityID:] + 2227
	9   ChatSDK Demo                        0x000000010173de19 -[BChatViewController2 sendImage:] + 345
	10  ChatSDK Demo                        0x00000001017abe3f -[ElmChatViewController sendImageMessage:] + 111
	11  ChatSDK Demo                        0x000000010176a7b2 -[BMediaChatOption cropViewController:didCropToImage:withRect:angle:] + 178
	12  ChatSDK Demo                        0x0000000101a17f02 __40-[TOCropViewController doneButtonTapped]_block_invoke.484 + 146
	13  libdispatch.dylib                   0x000000010927505c _dispatch_client_callout + 8
	14  libdispatch.dylib                   0x0000000109251c6e _dispatch_continuation_pop + 1020
	15  libdispatch.dylib                   0x00000001092669fc _dispatch_source_latch_and_call + 230
	16  libdispatch.dylib                   0x000000010925f4f1 _dispatch_source_invoke + 1167
	17  libdispatch.dylib                   0x000000010925669a _dispatch_main_queue_callback_4CF + 1066
	18  CoreFoundation                      0x0000000103a46909 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
	19  CoreFoundation                      0x0000000103a0cae4 __CFRunLoopRun + 2164
	20  CoreFoundation                      0x0000000103a0c016 CFRunLoopRunSpecific + 406
	21  GraphicsServices                    0x000000010a02aa24 GSEventRunModal + 62
	22  UIKit                               0x00000001075bf0d4 UIApplicationMain + 159
	23  ChatSDK Demo                        0x00000001016d647f main + 111
	24  libdyld.dylib                       0x00000001092c165d start + 1
	25  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

Facebook login not supported for iOS 9+

The current ChatSDK is using Facebook-iOS-SDK 4.0.1

If you look in the Facebook upgrade page it seems to imply that v4.6 or above is required.

In order to support iOS 9, you should upgrade your Facebook iOS SDK 4.x to 4.6.0.

The attached issue is happening below when attempting to login with Facebook:

photo jan 13 11 58 39

Question: What is the exisitng user profile image tag name on Firebase server

Hello Simon , Ben
I am managing my users from my own server and i have implemented Firebase Admin SDK using NODE.JS framework. I want to know what is the image tag name that i should pass my image link to Firebase so that my Chat SDK gets that link and downloads the user image.
Should i pass it as a meta info and if yes then what is the tag name that i should use?
OR should i pass it as main user info outside Meta dictionary?
Thanks
Sachin

Adding undo handling in createThreadWithUsers

Hi Ben, Simon,
The codes has gone through major restructuring and it does add in more robustness on top of the core codes from the previous ChatSDK (which is already good).

I wanted to feedback on the code related to createThreadWithUsers.

This codes used to be under: ChatFirebaseAdapter/ChatFirebaseAdapter/Classes/Chatcat/BChatcatNetworkAdapter.m

The codes in GitHub version is under:
/FirebaseAdapter/Classes/Handlers/BFirebaseCoreHandler.m

The feedback is as below:

When a new thread is created the database begin the UndoGroup incase there is an error found.

 [[BStorageManager sharedManager].a beginUndoGroup];
.......
 [[BStorageManager sharedManager].a endUndoGroup];

However when there is an error, it would be good to undo these database changes if there is an errors by calling the
[[BStorageManager sharedManager].a undo];
Probably good to handle it when there is an error

    },^id(NSError * error) {
        if (threadCreated != Nil) {
            threadCreated(error, Nil);
        }
        return error;
    });

Thanks,
Calvin

Creating new thread always when trying to have 1to1 chat

I am using chat sdk in my chat app, the issue is, whenever i click on "Chat" on users profile ,alway new thread is creating between current user and other user.
When i go through the code, i found that thread in firebase is successfully created alway.but not in core..so whenever i try to fetch all the thread from local database ,array of threads is always null, instead of joining that thread, always new thread is created
so i wonder why its not inserting in local database, and there is no error in creating thread,
Main issue is,
Thread gets created in Firebase,but not in local..

This is code as given

   [[BNetworkManager sharedManager].a.core createThreadWithUsers:@[_puser] threadCreated:^(NSError * error, id<PThread> thread) {
    if (!error) {
        [self pushChatViewControllerWithThread:thread];
    }
    else {
        [UIView alertWithTitle:[NSBundle t:bErrorTitle] withMessage:[NSBundle t:bThreadCreationError]];
    }
    [MBProgressHUD hideHUDForView:self.view animated:YES];
}];

Hope you understand the problem, and can help me out..
Thanks

Regards,

Gaurav

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.