iOS Sample App error


#1

I’m trying to run the iOS Sample App from DreamFactory but I’m not even successful in logging in the sample app in which I believe I have entered the exact credentials required.

I’m having this error in Xcode -> Error registering new user data: Error Domain=swagger Code=404 “The operation couldn’t be completed. (swagger error 404.)”

Please help me fix this. Thank you in advance guys.


#2

Did you follow the steps in the GitHub README? There are some things you have to set up like enabling CORS, creating a role, and enabling open registration.

Also you can’t log in to the iOS app as an admin user. See if you have anything listed under the Users tab in the admin console. If so try one of those users.


#3

Thank you! I think I have missed on one of those things.


#4

Hi todd.

Just upgraded to the latest version of dreamfactory. I followed the steps in the readme file in Github but still when I’m trying to register a new user in the app it yields this error again --> Error registering new user: Error Domain=swagger Code=404 "The operation couldn’t be completed. Thank you in advance.


#5

What version of DreamFactory are you running?

The iOS example app on GitHub is upgraded for 2.0 and is not backwards compatible with 1.x.


#6

I’m already in the 2.0 version. Still something’s wrong… I guess it’s my configuration but still can’t figure it out right now.


#7

Here are a few things to check.

In the admin console edit the user you are trying to log in as. Remember it has to be a non-admin user.

Check that the proper role is assigned to that user for the iOS app.

In the main Roles tab make sure the role is active and has full access to the contact* db tables.


#8

Thanks todd. gonna check the configuration again. :+1:


#9

hi todd,

I tried to implement the things that you’ve suggested but it still hasn’t work. I got a question regarding the source code, the ones that I need to change on the MasterViewcontroller.h class are the api key and the instance url, right? Thanks


#10

That’s correct. Rather than registering a new user, try creating a user in the admin console and then logging in to the app as that user. When you create the user be sure to set a password.