質問

To get a data feed from Transport for London (TfL) the registration form has a mandatory field that wants the IP address of the server requesting the data. But for an iPhone app that uses NSURLConnection, it is the phone that does the downloading so there is no server involved.

I emailed TfL but have had no reply. Local IP addresses are rejected:

(127.0.0.1, 192.168., 10. or in the range 172.16.* - 172.31.*) cannot be accepted

Has anyone got round this and how?

役に立ちましたか?

解決

Your app is not supposed to connect directly to the server, instead you should use your own server which acts as a proxy to TfL's server.

From TfL's Developer Guidelines:

You should take our data and proxy it, you shouldn’t allow all your clients to hit our service driectly. This is intended to reduce TfL’s cost liability for hosting and content delivery.

他のヒント

Looking at the TfL application form you have to specify a range of ip addresses you'll be making calls to the TfL api from.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top