I was at the point where I needed a UI solution for Outwitters, and I had a few options: Now run a dev_appserver with the commands that you usually run with (the –address flag), but add a –datastore_path pointing to the datastore file you used in step 2.Ībout two weeks ago I mentioned I was looking into using the open source library, gameswf to integrate into our little 2D engine for iOS.Once uploaded you can now shut down that server.Now that you have a dev server running on localhost with a defined datastore file, upload your data to your dev server with appcfg.py (by using the –url option pointed to localhost).Also run it with a –default_partition of “” (empty string), to mirror production’s data. Now launch dev_appserver.py, but this time declare a datastore path as a command line argument.
Download the data as per the documentation.So after banging my head on the keyboard for a couple hours, and not being able to find any answers as to why upload_data only works to a local dev server if you’re running on localhost, I found a round-about way of getting production data into my own iOS friendly dev server: Without the address option, the dev server would launch with localhost as being it’s address, and no other device could connect to it.
It worked as advertised! I had all the data frolicking about inside my dev server, but I couldn’t access it with any of my iOS devices. Then I launched a clean dev server with no command line options. I downloaded the production data as documented. I then decided to go back to basics, and follow their instructions exactly. I used all sorts of combinations of my local address and ports for the –url flag for appcfg.py and tried countless combinations of any of my known logins for both appengine and my local dev machine. It would ask for credentials, and no matter what I put, it would fail.
Now this is where I ran into problems, and I couldn’t find a clear cut answer as to why uploading data to my local dev server was simply not working. Uploading it is pretty straightforward to if you use the –url option with “appcfg.py upload_data”.
We’re in business, awesome! So you want to download the data from your hosted application over at ? Pretty simple. Now in your iOS app you can send requests to a local server. That’s a pretty easy fix too:ĭev_appserver.py –address 192.168.1.x pathToCode The dev server is no longer at localhost but on some local LAN IP. The problem comes in when you’re developing for a mobile device. Now if you want to access it on your machine you simply do an http request to localhost:8080. So when you run a local dev server the command is pretty simple: With each build I always find some sort of issue that the alpha testers stumble across that may not be server-related but the gamestate that the “production” server is holding is something I want to grab and debug with locally. You can only go so far with creating ‘mock user’ accounts, and fake data populating your local server. It’s a multiplayer game, and as such, requires multiple users to function. The problem arises from the nature the game. I’m currently working on Outwitters and debugging turn-based games on the local dev server (dev_appserver.py) is really quick and painless. This following post is probably going to be useful to an extremely niche audience: anyone developing a multi-user iOS app that has a GAE backend.