1

I have followed the directions in Hiding the Settings Icon for my hybrid remote app by modifying the AppDelegate.m class generated by Cordova as follows (added lines prefixed with a plus):

#import "AppDelegate.h"
#import "MainViewController.h"
+ #import "SFLoginViewController.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
  self.viewController = [[MainViewController alloc] init];
  + SFLoginViewController *loginViewController = [SFLoginViewController sharedInstance];    
  + loginViewController.showNavbar = NO;
  + loginViewController.showSettingsIcon = NO;

  return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

@end

I removed the app from the simulator but the navbar and gear icon are still present. What else needs to be done to remove the gear icon from login page?

2
  • Maybe this question belongs to stackoverflow? Jul 21, 2017 at 15:40
  • Why migrate? This is specifically about SF and an SDK they provide.
    – Mike Chale
    Jul 21, 2017 at 15:41

1 Answer 1

0

The problem turned out to be that I modified the wrong AppDelegate file. I had to modify AppDelegate+SalesforceHybridSDK.m instead of AppDelegate.m. Once SFLoginViewController.h was imported and the "loginViewController" lines were added the status bar and settings icon were hidden as desired.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .