Preliminary use of Bmob

Source: Internet
Author: User

Register Bmob Account

Enter www.bmob.cn in the URL field or in the Baidu input bmob to search, open Bmob official website, click on the top right corner of the "registration", in the jump page fill in your name, email, set the password, confirm to your mailbox activation Bmob account, you can use bmob easy to develop the application


Site Background Create app

After entering the Bmob backstage, click "Create App" in the upper left corner of the background screen, enter the name of your app in the pop-up box, then confirm that you have an app waiting to be developed.


Get the app key and download the SDK

Select the app you want to develop and click on the app key below the app




After the import effect is as follows:


Set the Bmobkey for your app


A test: Upload a test of a name password and a picture

Create a button associated event:

  UIButton *button = [UIButton Buttonwithtype:uibuttontypesystem];    [Button settitle:@ "send" forstate:uicontrolstatenormal];    Button.bounds = CGRectMake (0, 0, +);    Button.center = Self.view.center;    [Button addtarget:self action: @selector (buttonpressed:) forcontrolevents:uicontroleventtouchupinside];    [Self.view Addsubview:button];

-(void) buttonpressed: (UIButton *) Sender {    [self createbmobobject];//    [self adduserinfo];}

-(void) createbmobobject{//Toward Gamescore table add a playername for Xiaoming, score 78 for data Bmobobject *    Gamescore = [Bmobobject objectwithclassname:@ "userinformation"];    [Gamescore setobject:@ "Your name" forkey:@ "name"];    [Gamescore setobject:@ "123" forkey:@ "password"]; [Gamescore saveinbackgroundwithresultblock:^ (BOOL issuccessful, Nserror *error)                    {if (issuccessful) {NSLog (@ "Success");        }else {NSLog (@ "failed");    }    }];    NSBundle *bundle = [NSBundle mainbundle];    Local picture NSString *filestring = [NSString stringwithformat:@ "%@/image1.jpg", [bundle Bundlepath]];    Bmobfile *file = [[Bmobfile alloc] initwithfilepath:filestring]; [File saveinbackground:^ (BOOL issuccessful, Nserror *error)            {if (issuccessful) {[Gamescore setobject:file forkey:@ "Logimage"];            [Gamescore Updateinbackground];        NSLog (@ "Success"); }} withprogressblock:^ (float progress) {}];} 

Effect:




Preliminary use of Bmob

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.