views:

89

answers:

3

I have two free apps, iSys and iSysMonitor, that report info about my iPhone. Interestingly, they disagree regarding the IP address of my cell connection. Also, neither lists the name of my WiFi connection though I can see it in the iPhone's Settings. I'd like to settle the IP argument and also learn how to get the name of my network connection. I looked at CFNetwork, but it seems to focus on how to handle communication once you know a network exists.

Going further, I'd like to dig out stuff like the ID of the cell tower that I'm talking through (when not on WiFi). I know that some of the higher level Cocoa classes probably don't give access to that detail, instead making it easy to do common tasks.

So where do I go for the low-level scoop? What info can I get my hands on?

+1  A: 

CoreTelephony is the only option you have if you don't want to use any private APIs. You can always request that Apple make some of the private APIs public, although if they agree, it may not appear until 5.x.

DysonApps
A: 

The answer to this stack overflow question about MAC addresses may also work for getting both IP addresses. It uses the ioctl Unix API.

If you need an app rather than code, the iStat app will return both IP addresses.

hotpaw2
A: 

As others have said, Core Telephony is your best bet, although I don't see anything at all in the documentation that will return cell tower identification. You're probably out of luck on this one if you want to stick with published API and distribute on the App Store.

As for differing IP addresses, that makes sense to me: you're talking about two different devices. They can't share an IP address any more than two computers on a LAN can share an IP address. Without a unique address, it's not possible for something else on the network to send data to only that device.

Steve Madsen
Let me clarify: those two apps run on my iPhone and serve essentially the same purpose: report info about my device. They agree on disk space, processes running, etc. but they disagree on the IP address. Anyway, I'll check the core telephony.
Scott Pendleton