There's nothing in the SDK and App Store terms, as far as I know, that prohibits it. But I don't believe you'll be able to detect other iPhones around you in any way. Perhaps one could use a multiplayer server which would connect nearby players by geolocating them.