I'm developing an application that get access to the iPhone address book.
The simulator contains only a few sample entries.
I'd like to find a sample address book with thousands of entries with various
character set (English, Chinese, Arabic, etc) to fully test my app.
Filling the address book myself will take for ever.
Basically I need a AddressBook.sqlitedb file with as much data as possible
A csv would probably do just fine if there is a way to transfer it into a sqlitedb file
Good question, I'll have to give this a go myself later, but just from combining a few things I found around the web the following might work for you:
Install Sun OpenDS and fill it with test data using the checkbox provided
Connect your Mac's address book app to this directory server on localhost and sync (will fill your local address book with the same sample data)
as described here: http://blogs.oracle.com/treydrake/entry/mac_address_book_and_opends
Sync to a real iPod/iPhone
Extract the resulting files from your iPhone/iPod's
/User/Library/AddressBook/
and copy into:
/Users/[your user name]/Library/Application Support/iPhone Simulator/[iOS version]/Library/AddressBook/
if your device is jailbroken 'Phone Disk' from macroplant.com is a convenient way to do this (but there are of course many others including SCP etc)
(if your device isn't jailbroken, you can extract the database from a backup using the shell script here: http://0xced.blogspot.com/2009/01/using-your-own-address-book-in-iphone.html just note you'll need to change the path it copies it to to the one above, or your home folder or something and copy manually, as the simulator path in that post is for the previous version of the SDK)
As a minor aside but related to address book testing, I'd highly recommend also adding an Exchange account on a real device (as you can't do that in the simulator) and testing with that - it threw up some bugs in our app (crash on attempting to access the address book).
Related
I'm going to release an app in the UK and US App Stores. I would like to have two different data sources according to the store my application is downloaded from. Basically I would like my app to connect to my US servers when downloaded from the US store and to the UK servers when downloaded from the british one.
I was thinking of including the origin URL in the as localised string but I don't think this is a stable solution.
Any idea?
thanks a lot
Claus
I'm not sure, but I don't think the app has knowledge from where it was downloaded from.
You could create two apps, one for UK and one for US, and make the apps only available in their respective local App Stores.
However, depending on the amount of apps you would have to produce (if you intend to distribute your app in more than 2 countries in the future), it might be easier to just ask the user which data source to use on startup, or let him define one in the settings etc.
Or use the iPhone's current language or even location to select the data source.
I have an iPhone app that reads barcodes. I want to transfer that data to a program I have written on my PC. Is this possible?
The easiest way to do this is to have a web server which the app transfers the barcode to and the application on the computer grabs it from. You could probably have each user make an account which they log in to on both the phone and the computer.
EDIT: This document: http://developer.apple.com/library/ios/#technotes/tn2152/_index.html describes various methods for transferring data between an iphone and a computer.
This is just a suggestion, haven't tried it myself: You can use the iTunes filesharing feature Apple introduced for iOS. This seems to be a good tutorial on how to use it in your App http://www.raywenderlich.com/1948/how-integrate-itunes-file-sharing-with-your-ios-app
The only thing is that it requires the user to import/export the files to share on their own via iTunes, if you're cool with that it sounds like a good strategy to use built-in features of iOS.
Everytime I get a call my old wallpaper shows even though I have a new one. I'm trying to find it on my iOS but I cannot seem to figure out where. So I'm trying to track down what folders gets backed up when i backup my iPhone since I have restored it and it's still there.
(I'm using a jailbroken device)
I know this isn't the actual folder names and etc but it will give you an idea what it's backing up though. Good Luck.
With iOS 1.1 and later
Safari bookmarks, cookies, history,
and currently open pages
Map bookmarks, recent searches, and
the current location displayed in
Maps
Application settings, preferences,
and data
Address Book and Address Book
favorites
Calendar accounts
Wallpapers
Notes
Call history
Mail accounts
YouTube bookmarks
SMS messages
Saved suggestion corrections (these
are saved automatically as you reject
suggested corrections)
Camera Roll (photos and screenshots
taken by the iPhone)
Voicemail token (This is not the
Voicemail password, but is used for
validation when connecting. This is
only restored to a phone with the
same phone number on the SIM card.)
Web clips
Network settings (saved Wi-Fi
hotspots, VPN settings, network
preferences)
Paired Bluetooth devices (which can
only be used if restored to the same
phone that created the backup)
Keychain (this includes email account
passwords, Wi-Fi passwords, and
passwords you enter into websites and
some other applications. The keychain
can only be restored from backup to
the same iPhone or iPod touch. If you
are restoring to a new device, you
will need to fill in these passwords
again.)
With iOS 2.0 and later (in addition to the above)
Managed Configurations/Profiles
List of External Sync Sources (Mobile Me, Exchange ActiveSync)
Microsoft Exchange account configurations
Nike + iPod saved workouts and settings
App Store application data (except the application itself, its tmp and caches folder).
With iOS 3.0 and later (in addition to the above)
Videos in Camera Roll
Per app preferences allowing use of location services
Offline web application cache/database
Voice Memos
Autofill for webpages
Trusted hosts having certificates that cannot be verified
Websites approved to get the location of the device
In-app purchases
New with iOS 3.1: Videos in the Camera Roll that are 2 GB or larger are not backed up (iOS 4 and later will back up videos 2 GB and larger)
All user documents and settings get backed up, Application settings as well as system settings.
Applications each have a Documents folder that user data can be saved to, so thats pretty much what gets backed up for applications, including app preferences.
These are the Wallpaper locations:
/private/var/mobile/Library/SpringBoard/HomeBackground.jpg
/private/var/mobile/Library/SpringBoard/HomeBackgroundPortrait.jpg
/private/var/mobile/Library/SpringBoard/LockBackground.jpg
/private/var/mobile/Library/SpringBoard/LockBackgroundPortrait.jpg
I have manually managed to find out what gets backed up and managed to solve the problem :)
I downloaded the trial of iphone packup extractor http://www.iphonebackupextractor.com/ and found what I was looking for.
Also it seems like I just had to change the lockscreen in the iPhone since the file called LockScreen.jpg was the picture I was looking for but since I had another lockscreen using winterboard I didnt think of this.
Good luck to anyone else who has problems similar to this.
Regarding In App Purchases, I can find a lot of information on all the technicalities of actually making purchases and interacting with the store (how to retrieve product information, verify receipts, etc), but I can't seem to find information on guidelines or special instructions for preparing the actual "apps" or "components," whatever they're to be considered, which will act as the In App Purchases.
For instance, once a component is downloaded into an app, where does it exist in the overall architecture of the app? How do they combine to join forces? How do they know about one another. If I have a game, and using In App Purchases I allow users to both download new levels, but also download new game play modes that can affect any of the built-in or downloaded levels, how do I prepare all of these assets so that they integrate?
I'm not looking for a tutorial, per se, but would love to know if anyone has had experience with In App Purchases or knows of a useful reference besides Apple's In App Purchase programming guide which only speaks to the specifics of making the actual download transaction.
The things you download aren't really "apps", they're just data files like anything else your app can download.
Sometimes, they're not really that, they're just effective "switches", i.e. all of the functionality and data is there in your code already, but it's just protected by a line of code like
if (user has purchased extra levels)
add extra items to menu/list
You aren't allowed to download new executable code; I admit I'm not sure how carefully Apple works to prevent you from downloading scripts that control your program's behavior, since it would be very difficult for them to tell what is intrinsic to your original app or not.
In my own programs, I've put the control logic and tables into the main application, and separated out big resource files into a separate ZIP file. When the user buys the add-on pack, they do download that ZIP file of images which keeps the original application size down, and the program just uses those images out of the documents directory instead of the application bundle like it would if they were built in.
I am using the Urban Airship in-app purchase support, which insulates you from running your own server or learning most details of the StoreKit, at the cost of a slice of your revenue.
You can let the levels be in the app from the beginning and just let them become available when the user pays an in-app level. This is by far the most simple solution.
If you want to have downloadable levels you will need to set up an own server that will deliver and check correct purchase transactions with apples servers. You will also need to create all the download and architecture to load and use these levels into your app.
But, you can have a look here http://urbanairship.com/in-app-purchase/ for help in creating downloadable items.
This code will get you going: works on the simulator too: https://github.com/boxerab/InAppPurchase
I have gone through following link
http://zachwaugh.com/2009/03/programmatically-retrieving-ip-address-of-iphone/
and I have also tried this one (but this isn't recognized by Apple).
http://appsamuck.com/day4.html
I just want that when user tap on "wifi" button.
Reports stored in documents directory can be accessed by other pc using wifi using the IP that I display on my iPhone application. How is it possible?
In my apps, I use CocoaHTTPServer to get local info into and off of the phone. You run the server and out-of-the-box, it indexes all the files in the documents directory.
To do what you want, you will need to edit the code to return some other kind of data format (xml probably is the easiest) the call this from inside your app to get that data. CocoaHTTPServer easily take POST right out of the box too, so you can post an xml response as well.
After thinking about it, CocoaHTTPServer is best run on the computer side behind the scenes. the iphone can then send info to the computer where handling the code should be easier and you have more options.
I can't point to any specific examples but the way to do this would be the ZeroConf protocol - both the iPhone and PC would have to be on the same network to have this work.