Contentful logo

Contentful Community

Problem to connect Preview API to Contentful

Hello, I transfered an app via XCode to my iPhone. The app uses the preview API to fetch resources from the CMS. But the process failed. As far as I can tell the access token is given in a separate credentials.plist. I do not understand the problem here. This is what I get back, when I start the app:

Any help is very much appreciated!
Best, Andreas

PortalEditor(332,0x101391840) malloc: recording malloc and VM allocation stacks using lite mode

:warning: Error while updating location The operation couldn’t be completed. (kCLErrorDomain error 1.)

2021-10-26 19:12:45.004122+0200 PortalEditor[332:17656] [MKCoreLocationProvider] CLLocationManager(<CLLocationManager: 0x102261270>) for <MKCoreLocationProvider: 0x1022533c0> did fail with error: Error Domain=kCLErrorDomain Code=1 "(null)"

2021-10-26 19:12:45.006000+0200 PortalEditor[332:17447] [Common] _BSMachError: port a603; (os/kern) invalid capability (0x14) "Unable to insert COPY_SEND"

2021-10-26 19:12:45.007263+0200 PortalEditor[332:17447] [Common] _BSMachError: port a603; (os/kern) invalid capability (0x14) "Unable to insert COPY_SEND"

**2021-10-26 19:12:45.478495+0200 PortalEditor[332:17658] [Contentful] Error: Errored: ‘GET’ (404) link to preview.contentful

include=10&content_type=cpStory**

Message: The resource could not be found."

2021-10-26 19:12:45.595717+0200 PortalEditor[332:17654] [Contentful] Error: Errored: ‘GET’ (404) https://preview.contentful.com/spaces//environments/master/assets?limit=1000

Message: The resource could not be found."

2021-10-26 19:12:45.641769+0200 PortalEditor[332:17658] [Contentful] Error: Errored: ‘GET’ (404) https://preview.contentful.com/spaces//environments/master/locales?limit=1000

Message: The resource could not be found."

Error fetching stories: The operation couldn’t be completed. (Contentful.APIError error 1.)

2021-10-26 19:12:45.738995+0200 PortalEditor[332:17658] [Contentful] Error: Errored: ‘GET’ (404) linkt to ://preview.contentful.com/spaces//environments/master/locales?limit=1000

Message: The resource could not be found."

Error fetching assets: The operation couldn’t be completed. (Contentful.APIError error 1.)

:warning: Error while updating location The operation couldn’t be completed. (kCLErrorDomain error 1.)

2021-10-26 19:13:45.629001+0200 PortalEditor[332:17658] [] nw_read_request_report [C1] Receive failed with error "Software caused connection abort"

2021-10-26 19:13:45.631433+0200 PortalEditor[332:17658] [] nw_read_request_report [C1] Receive failed with error "Software caused connection abort"

It was the spaceID missing . After I added the space ID resource fetching worked.