twodayslate / claw

A lobste.rs Reader
https://apps.apple.com/us/app/id1531645542
Other
35 stars 1 forks source link

Set User-Agent string for requests #36

Open twodayslate opened 3 years ago

twodayslate commented 3 years ago

As requested by @pushcx

https://github.com/twodayslate/claw/issues/19#issuecomment-876033844

Awaiting official guidance on what the string should be

twodayslate commented 3 years ago

@pushcx wants $APP_NAME/$VERSION ($ARCH; $OS; +https://contact.link/for/the/app)

twodayslate commented 2 years ago

I'm implementing this as I convert my network calls to async. See #29

As requested this is what I was returning on the simulator:

(lldb) po ua
"claw/1.2.0 (hppa; iOS 15.5; +https://zac.gorak.us/ios)"

I don't see much value in the architecture so I'm changing it to the device model.

This is what you will then see:

(lldb) po ua
"claw/1.2.0 (iPhone10,4; iOS 15.5; +https://zac.gorak.us/ios)"

You can lookup the models here: https://www.theiphonewiki.com/wiki/Models