1. Download BMOBSDK
2. Drag the bmobsdk.framework inside the tool folder within your project.
3. Import the Class library
Corelocation.framework, Security.framework, Coregraphics.framework, Mobilecoreservices.framework, Cfnetwork.framework, Coretelephony.framework, Systemconfiguration.framework, Libz.1.2.5.tdb, Libicucore.tdb, Libsqlite.tdb, Avfoundation.framework, Mediaplayer.framework.
4. Import #import <BmobSDK/Bmob.h> Copy your application's AppID in the appdelegate of your application
-(bool) Application: (uiapplication *) application didfinishlaunchingwithoptions: ( Nsdictionary *) launchoptions { < Span class= "hljs-variable" >< Span class= "hljs-variable" > [bmob registerwithappkey:@ " Your AppID "]; return yes;}
Register button--Determine registration status
bmobuser *buser = [[Bmobuser alloc] init];
buser.username = self.text;buser.email = self.text;[ Buser setpassword:self.passworld .text]; [Buser signupinbackgroundwithblock:^ (bool issuccessful, Nserror *error) {if (issuccessful) {NSLog (@" registered successfully "); else {nslog (@ "Registration failure may have duplicate users, Error message:%@ ", error);}}];
< Span class= "hljs-built_in" >< Span class= "hljs-built_in" >< Span class= "hljs-built_in" >< Span class= "hljs-variable" >
Login page--Determine if the login is successful
[Bmobuser loginwithusernameinbackground:self. Usernumber.text password:self.passworld.text block:^ (bmobuser user, Nserror error) {
//log back after login
NSLog (@ "%@", User.email);
if (user!=nil) {
NSLog (@ "Login successful"),
//Jump controller
}else{
NSLog (@ "no user");
}
}
/span>
IOS bmob-Login Registration Mobile Verification Code, mailbox verification