Comments (8)
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.
@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.
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:
- 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.
- 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.
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.
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:
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:
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.
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.
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.
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.
- Have you changed anything else (linked the project to your own Firebase account?) if you have you'll need to configure Facebook.
- Have you changed the BundleID?
- 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)
- Chat SDK for ios not adding users to firebase after login with gmail HOT 2
- New way of changing bubble and text colors HOT 1
- +[BChatSDK application:openURL:options:]: unrecognized selector sent to class
- unread message counter not reset in new Device login HOT 8
- ChatSDK Leave thread throwing error - 1. Is the bug present in the demo Chat SDK project? - Yes 2. What modifications have you made to the Chat SDK? - Leave thread function call 3. iOS Version? Device or simulator? - Simulator iPhone 13 pro max 4. Steps taken to reproduce the problem: call leave thread BChatSDK.thread().leave(thread) - current user to leave the thread in a group 5. Expected result: leave the group 6. Actual result: Error Domain=RXPromise Code=-1000 "" UserInfo={NSLocalizedFailureReason=} 7. Comments: HOT 5
- ChatSDK Leave thread issue HOT 10
- get role for user in a group and change role HOT 1
- Converted admin can't change role HOT 2
- could not join a group HOT 8
- iOS 15 upgrade
- [Assert] Error in UIKit client: -[UIWindow setScreen:]
- When a sender sends message(when receiver is in background or killed state) and kills the app. When receiver reads the message and kills the app after this when sender opens the hatbox read receipts is not working.
- support for firebase 9.5.0
- Help On including Google-Mobile-Ads-SDK
- UX and UI within Chat SDK : Customise
- ios unable to send image message from gallery or camera HOT 4
- IPhone app crash HOT 5
- Any updated instructions for implementing in existing Firebase project?
- Messages wont decrypt after using the method EncryptionHandler.importKeyPair(keyPairString
- '(child:) Must be a non-empty string and not contain '.' '#' '$' '[' or ']'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chat-sdk-ios.