07-01-2022 11:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-01-2022 11:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
so the same app and specifically a line which does a fetch request, works on android phones and simulator, but on ios fitbit app I get this error thrown
the data couldn't be read because it isn't in the correct format
anyone has any idea ? I saw in some searches it's a common swift error
thank you
07-07-2022 02:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


07-07-2022 02:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Are you definitely returning the response content type as application/json? Have you tried validating the json to ensure there aren't any encoding errors?
07-14-2022 01:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-14-2022 01:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I used proxyman to track request done on ios and there was something sent differently in headers that was making the api return a bad request xml response which makes sense that json() was breaking

