Support Topics Documentation Slack YouTube Blog

Create a user account in iOS

Backendless Version

backendless_sdk: 1.0.0

Client SDK

Flutter 1.17.3

Application ID

79616ED6-B9BE-C7DF-FFAF-1A179BF72500

Expected Behavior

After we create the user account and log in the new user, we update the info of the user, and after backendless confirm the update, we use a CupertinoPageRoute to navigate to a other view.

Actual Behavior

it’s doesnt work any .save clause in iOS, for example, we have the issue that the operation of creating an user isn’t returning any answer in iOS, there isn’t any error message in the console but when we call the await Backendless.data.of(“Users”).save(userMap).then(® backendless doesnt return anything for that reason the app never entry in the .then clause.

In android its works without any issue.

Reproducible Test Case

this is the example for creating an user, but we have the issue with any .save fuction.

void _register(BuildContext context, String name, String email, String password) async {

/// Registro en Backendless
BackendlessUser userToCreate = BackendlessUser();
userToCreate..email = email;
userToCreate..password = password;

await Backendless.userService.register(userToCreate).then((registeredUser) async {
  await Backendless.userService.login(email, password, true).then((loggedUser) async {
    String objectId = await loggedUser.getObjectId();

    Map userMap = {
      "objectId": objectId,
      "name": name,
    };
    

    await Backendless.data.of("Users").save(userMap).then((r) {
      Navigator.push(
        context,
        CupertinoPageRoute(
          builder: (context) => TerminosPage(),
        ),
      );

    }).catchError((error) {
      if (error is PlatformException) {
        print("issue saving the name of the user");
      }
    });
  }).catchError((error) {
    if (error is PlatformException) {
      print("issue login the new user");
    }
  });
}).catchError((error) {
  if (error is PlatformException) {
    print("issue creating the new user");
  }
});

}

It looks like .save should work on ios. Are you able to attach a debugger and see if the result is being called in the swift implementation?

hello, thanks for help but our method is contructed in the same way that the example you bring, we made the proove and the debbuger only return this.


image

it’s still the same problem that doesn’t work the .save clause in iOS

Hi @Santiago_Gallo

Please update your Flutter SDK version. The version 1.0.0 is outdated. The current version is 1.1.8:

Update this line in your pubspec.yaml

 backendless_sdk: ^1.1.8

Best Regards,
Maksym