Giter Club home page Giter Club logo

Comments (8)

simonsmiley64 avatar simonsmiley64 commented on May 18, 2024

Hi @Ranjith08,

Just checking you mean the XIB files and not storyboards? The Chat SDK only uses a storyboard screen for the profile view.

The social media buttons are designed to only be visible if there are detailed entered into the app plist. This means if you don't set up the social media account it will automatically not be visible.

You can see the code for this in the BLoginViewController.m:

    self.facebookButton.enabled = [[BNetworkManager sharedManager].a.auth accountTypeEnabled:bAccountTypeFacebook];
    self.twitterButton.enabled = [[BNetworkManager sharedManager].a.auth accountTypeEnabled:bAccountTypeTwitter];
    self.googleButton.enabled = [[BNetworkManager sharedManager].a.auth accountTypeEnabled:bAccountTypeGoogle];
    self.anonymousButton.enabled = [[BNetworkManager sharedManager].a.auth accountTypeEnabled:bAccountTypeAnonymous];

If you click down into this function you can see how it works:

    -(BOOL) accountTypeEnabled: (bAccountType) accountType

Each time we check whether there is the social media API key added to the plist. For anonymous this needs to be set to NO.

Hopefully this helps.

Let me know if you continue to have issue with this,

Simon

from chat-sdk-ios.

Ranjith08 avatar Ranjith08 commented on May 18, 2024

@simonsmiley64 Thanks for the reply, I have removed the code as i only wanted the Facebook button. However, the icons are still present in the XIB files while running the simulator. I tried changing the color of the LoginViewController to see if changes are being made. But no changes are being applied to XIB files.

from chat-sdk-ios.

simonsmiley64 avatar simonsmiley64 commented on May 18, 2024

Hi @Ranjith08,

I have done a bit of testing and have managed to remove the social media buttons. There are two ways to do this:

  1. Hide the buttons:

In the BLoginViewController.m you need to comment out the below code and instead set the buttons to hidden:

    //self.twitterButton.enabled = [[BNetworkManager sharedManager].a.auth accountTypeEnabled:bAccountTypeTwitter];
    self.twitterButton.hidden = YES; 

This will hide the button effectively removing it.

  1. Remove the buttons

In the BLoginViewController.XIB you can delete the buttons. This would require you to make sure other code wasn't broken and is not a recommended solution.

Hopefully the first point solves your problem.

Simon

from chat-sdk-ios.

Ranjith08 avatar Ranjith08 commented on May 18, 2024

Hi @simonsmiley64 Thanks for the two solutions, I tried both and the first one works perfectly. However, moving the other buttons to update constraints or changing label names terminates the application when the login button is pressed. I'm trying to change the login view to look different and any changes made in the XIB files, crashes the application.

from chat-sdk-ios.

simonsmiley64 avatar simonsmiley64 commented on May 18, 2024

Hi @Ranjith08,

This shouldn't be the case. The location and label on the login button has no affect on its functionality. For example in the below image I have changed all the labels and also modified the constraints of some of the social media buttons. This still works as expected:

screen shot 2017-04-12 at 14 32 13

I would recommend the following:

  • First, find out why the app is crashing. It might be worth either downloading a new version or removing any changes you have made.
  • Next, make sure the login and register buttons are working as expected.
  • Now, move a single button, resize it and ensure the constraints are correct.
  • Rinse and repeat for all the buttons

This functionality should be easy to modify. If you are having continued trouble we do offer priority support and have experience in modifying the login page of the Chat SDK:

login-pages

If you can let me know with more detail the changes you have made I might be able to find the issue more easily.

Simon

from chat-sdk-ios.

Ranjith08 avatar Ranjith08 commented on May 18, 2024

I made changes to the title ChatSDK removed the icon and removed terms and conditions. It crashes and now linking Facebook comes up with internal error. I tried repeating the steps on fresh clone of the project and it keeps happening.

from chat-sdk-ios.

bensmiley avatar bensmiley commented on May 18, 2024

Can you lets us know the exact steps you're taking and post the error that's appearing? Generally speaking, it's better to move and hide the elements of the XIB file rather than removing them. Equally, you shouldn't remove any properties from the controller file because if the XIB has links to those outlets, the app will crash.

We can only provide limited support with this issue because it's an issue with customization rather than with the Chat SDK. If you want us to make the changes for you or if you want 1-to-1 support over Skype you should buy some support hours.

from chat-sdk-ios.

simonsmiley64 avatar simonsmiley64 commented on May 18, 2024

Hi @Ranjith08,

I loaded up version, deleted everything but the Facebook button from the XIB and changed the title and it all compiled. The problem seems like it is caused by the Facebook login.

  1. Have you changed anything else (linked the project to your own Firebase account?) if you have you'll need to configure Facebook.
  2. Have you changed the BundleID?
  3. Have you deleted any code anywhere?

I would recommend going through the steps you made one by one and testing each step. For example delete the Twitter button and check the Facebook still works. Then change the title. This should let you know which change is breaking the code.

Hope this helps,

Simon

from chat-sdk-ios.

Related Issues (20)

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.