Repository: beeware/toga

Issue:
iOS app not showing content with Rubicon ObjC 0.4.4
### Describe the bug

When running an iOS app with Toga 0.3.0dev39 and Rubicon 0.4.4, the app isn't successfully started, and the main app content is never displayed. When the app runs, you'll see the following in the log:
 
```
2023-01-24 12:14:13.871494+0800 Hello World[94057:4239245] Running app module: helloworld
2023-01-24 12:14:14.399629+0800 Hello World[94057:4239245] /Users/rkm/Library/Developer/CoreSimulator/Devices/84FC86CA-1D89-46EF-9349-29DDCF840143/data/Containers/Bundle/Application/7038F3CE-2212-4C60-9067-1978A80DEC8D/Hello World.app/app_packages/toga_iOS/app.py:95: DeprecationWarning: There is no current event loop
2023-01-24 12:14:14.399738+0800 Hello World[94057:4239245]   self.loop = asyncio.get_event_loop()
```

This is a warning, not an error; the app will continue to run.

### Steps to reproduce

1. Run `examples/tutorial0` on iOS
2. See error

The app won't crash; but the app window will remain black.

### Expected behavior

The app should run and window content should be displayed.

### Screenshots

_No response_

### Environment

- Operating System: iOS
- Python version: All
- Software versions:
  - Briefcase: All
  - Toga: <=0.3.0.dev39
  - Rubicon-objc 0.4.4


### Logs

N/A

### Additional context

The error has been caused because Toga-iOS 0.3.0.dev39 [included a shim](https://github.com/beeware/toga/blob/v0.3.0.dev39/src/iOS/src/toga_iOS/app.py#L112) that reproduced the implementation of `run_forever_cooperatively()`. This was done when the iOS implementation was originally created, with the expectation that this shim would be replaced with the actual call once Rubicon 0.3 was released. This didn't happen, but the old shim continued to work as it matched the implementation in Rubicon.

However, Rubicon 0.4.4 altered the implementation of `run_forever_cooperatively()`. As a result, the shim in Toga-iOS 0.3.0.dev39 no longer does everything it needs to in order to start the app. 

The issue has already been [fixed in the main branch](https://github.com/beeware/toga/blob/main/iOS/src/toga_iOS/app.py#L117) - the shim has been replaced with the actual call to `run_forever_cooperatively()`.

Two workarounds exist:
1. Use the `main` branch of Toga in your app.
2. Block the use of rubicon-objc 0.4.4. If you add `rubicon-objc!=0.4.4` to the requires list in your iOS configuration, this will prevent toga-iOS from using the new version.



Discussion:
If this breaks all existing iOS apps, I think it's serious enough to justify yanking Rubicon 0.4.4 until we're ready to release Toga 0.3.0 final.

And to make it easier to deal with similar situations in future, we could release Toga 0.3.0 with a requirement on Rubicon `~= 0.4.4`. That way, any future incompatible releases of Rubicon can be released as 0.5.x, without breaking any existing apps which are still on Toga 0.3.0.
Yeah... it's annoying, but I think you're right.

So - I've just yanked the Rubicon 0.4.4 release, which will resolve this issue for normal "pip install" usage of Toga and Rubicon. This will cause CI failures for the current mainline, as there now isn't a version of Rubicon that matches the ">=0.4.4" specifier being used by toga-cocoa and toga-iOS. 

I'll release a rubicon-objc 0.4.5rc1 tomorrow, and update Toga to reflect that.

Resolving patch:
diff --git a/cocoa/setup.py b/cocoa/setup.py
--- a/cocoa/setup.py
+++ b/cocoa/setup.py
@@ -18,7 +18,7 @@
 setup(
     version=version,
     install_requires=[
-        "rubicon-objc>=0.4.4",
-        f"toga-core=={version}",
+        "rubicon-objc >= 0.4.5rc1, < 0.5.0",
+        f"toga-core == {version}",
     ],
 )
diff --git a/iOS/setup.py b/iOS/setup.py
--- a/iOS/setup.py
+++ b/iOS/setup.py
@@ -18,7 +18,7 @@
 setup(
     version=version,
     install_requires=[
-        "rubicon-objc>=0.4.4",
-        f"toga-core=={version}",
+        "rubicon-objc >= 0.4.5rc1, < 0.5.0",
+        f"toga-core == {version}",
     ],
 )


Test patch: