Ios 在基于Cordova的Salesforce混合应用程序中未找到SFLoginViewController?
我对Salesforce混合应用程序有点陌生 最近,我更新了Salesforce mobile SDK 但是,在IOS模拟器上运行时,Salesforce Mobile SDK添加了一个用于更改服务器的附加导航栏 我想把那个条子去掉 我尝试的是: 我尝试了下面链接中描述的步骤 但是,这给了我一个错误:Ios 在基于Cordova的Salesforce混合应用程序中未找到SFLoginViewController?,ios,xcode,cordova,salesforce,hybrid-mobile-app,Ios,Xcode,Cordova,Salesforce,Hybrid Mobile App,我对Salesforce混合应用程序有点陌生 最近,我更新了Salesforce mobile SDK 但是,在IOS模拟器上运行时,Salesforce Mobile SDK添加了一个用于更改服务器的附加导航栏 我想把那个条子去掉 我尝试的是: 我尝试了下面链接中描述的步骤 但是,这给了我一个错误: Receiver 'SFLoginViewController' for class message is a forward declaration 欢迎任何帮助 提前感谢在“SFLogin
Receiver 'SFLoginViewController' for class message is a forward declaration
欢迎任何帮助
提前感谢在“SFLoginViewController”中有一个隐藏导航栏和设置按钮的属性 您需要在主appDelegate.m文件中的
init
方法中编写以下代码,如果该方法不存在,您可能需要添加init
该方法
[[SFLoginViewController sharedInstance] setShowSettingsIcon:FALSE];
[[SFLoginViewController sharedInstance] setShowNavbar:NO];
不要忘记在appDelegate.m中导入“SFLoginViewController.h”
但现在,正如您所提到的,“SFLoginViewController.h”在您的项目中不可用,您只需创建名为SFLoginViewController
的新文件,并在该文件中添加以下代码:
/** The Salesforce login screen view.
*/
@interface SFLoginViewController : UIViewController
/** Returns a shared singleton of `SFLoginViewController` class.
*/
+(_Nonnull instancetype)sharedInstance;
/**
* Outlet to the OAuth web view.
*/
@property (nonatomic, strong, nullable) IBOutlet UIView* oauthView;
/** Specify the font to use for navigation bar header text.*/
@property (nonatomic, strong, nullable) UIFont * navBarFont;
/** Specify the text color to use for navigation bar header text. */
@property (nonatomic, strong, nullable) UIColor * navBarTextColor;
/** Specify navigation bar color. This color will be used by the login view header.
*/
@property (nonatomic, strong, nullable) UIColor *navBarColor;
/** Specify visibility of nav bar. This property will be used to hide/show the nav bar*/
@property (nonatomic) BOOL showNavbar;
/** Specifiy the visibility of the settings icon. This property will be used to hide/show the settings icon*/
@property (nonatomic) BOOL showSettingsIcon;
/** Applies the view's style attributes to the given navigation bar.
@param navigationBar The navigation bar that the style is applied to.
*/
- (void)styleNavigationBar:(nullable UINavigationBar *)navigationBar;
@end
希望这有帮助 我的AppDelegate.m文件中没有didFinishLaunch方法:(我尝试了它,但仍然不起作用,尽管也没有得到任何错误:(.any other suggestions.Ohh,那么您应该尝试在init函数中添加它。