Using Old iPhone 3G for testing, remove the sim card?
I just got an old iPhone 3G for testing. It doesn't have a plan attached to it, but I just put in the sim card and it said it will take a while to activate.
When everyone has test devices, do you just leave the sim card out? Wh开发者_高级运维at about when testing location based services that need to find cell towers? What do we do in situations like this? I don't want to pay for service.
You won't get anything out of the cell towers without a valid SIM card. I use my wife's old iPhone 3G for testing, and it still has the old AT&T sim card, but of course there is no service because that sim card is not on our account anymore. I always leave it in Airplane mode.
The main thing I'm verifying with the physical device is performance, UI responsiveness, and memory issues that present no problems in the simulator, but choke on this old device. The iPhone 3G is great to have on hand as a minimum baseline for that stuff.
The location-based stuff you should be able to mock up without needing any "real" data. Do a google search for "iphone" "mock location" and see what that turns up.
This looks promising: http://rssv2.blogspot.com/2010/03/mocking-core-location.html
You don't want to have to develop with real, live data until you are in the beta stage anyways. Using real, live data during development is a huge hassle, not easily repeatable, and very time consuming. And this makes it impossible to write effective integration tests.
The iPhone has a GPS receiver, you don't need cell towers they just help speed up the process of acquiring the GPS satellites and finding your location. WiFi service will do the same thing but is not required. With no cell data and no wifi it can take several minutes to acquire GPS satellites, download ephemeris from the satellites and get a good location, but it works.
I use a 3G running 3.1.3 with no sim card for 3.1.3 testing and it works fine even for using location services, but I have wifi here.
I also use a CoreLocation simulator which allows me to simulate and repeat motion scenarios without going anywhere, it can simulate acquisition time, varying horizontal accuracy and motion. The simulator is available on github.
精彩评论