-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Handle requests in background from another iOS app running on the same device #544
Comments
Oh, it's iOS 14.5 by the way. |
OK, I've actually got the two apps talking to each other now, but the server, while it stays awake in the background, does not actually process any requests until it gets foregrounded. IS there a way to make it handle the requests in the background, or is this a limitation of iOS multitasking? |
Latest on the above... I've got it talking in the background, but only for about 30 seconds. Then it logs out:
Once more, just to confirm, I started the server with I do notice that GCDWebServer is not using the new(ish)
I'm wondering if that mechanism will only ever allow 30 seconds of background execution, and |
Looks like the time may have been decreased to 30 seconds in iOS 13 https://developer.apple.com/forums/thread/125162 |
On this point, I'm working on a project that uses GCDWS within an app extension. Since updating to XC 12.5, I'm now getting compile errors about the use of beginBackgroundTaskWithExpirationHandler (use of sharedApplication is no longer supported in app extensions). Is there any hope that this will be updated any time soon, or is there perhaps another fix that someone here could suggest? I'm worried I will need to switch to an alternative (assuming one exists), as I currently can't compile without stripping out key functionality. Compile errors are as follows (5 of them)
Sorry if this is slightly off topic, but this seemed close enough to negate posting a new issue. Thanks. |
I'm trying to run a GCDWebServer in an app running on an iOS device, and connect to that server from another app, so that I can communicate between the two of them. Is this supported? The server is starting successfully, but it doesn't seem to receive any connections.
My server initialisation code is:
And I'm getting the following in the console:
Then my client is sending this request:
I'm not seeing anything further in the logs on the server (I've implemented the GCDWEbServerDelegate to log out when connections are received etc), and the client never receives a response.
The text was updated successfully, but these errors were encountered: