Actively disconnect when the GSView goes away.

This commit is contained in:
Jeremy Rand 2022-03-27 23:43:16 -04:00
parent cdd4a8ea82
commit b9dc17aef4
2 changed files with 3 additions and 1 deletions

View File

@ -90,6 +90,8 @@ struct GSView: View {
}
.alert(item: $connection.errorMessage) { errorMessage in
Alert(title:Text(errorMessage.title), message: Text(errorMessage.message))
}.onDisappear {
connection.disconnect()
}
Text(connection.textHeard)

View File

@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>780</string>
<string>785</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSRequiresIPhoneOS</key>