Hi @chelemen-razvan 馃憢
Ran into three gaps using grovs_flutter_plugin in production:
1. Swift Package Manager support
ios/grovs_flutter_plugin.podspec is CocoaPods-only, no Package.swift. Since
grovs-iOS itself already ships via SPM, adding
ios/grovs_flutter_plugin/Package.swift next to the podspec (Flutter auto-detects it, no
breaking change for CocoaPods users) would just be wiring:
// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "grovs_flutter_plugin",
platforms: [.iOS("13.0")],
products: [.library(name: "grovs-flutter-plugin", targets: ["grovs_flutter_plugin"])],
dependencies: [.package(url: "https://github.com/grovs-io/grovs-iOS.git", "2.3.0"..<"2.4.0")],
targets: [.target(name: "grovs_flutter_plugin", dependencies: [.product(name: "Grovs", package: "grovs-iOS")])]
)
2. Universal Links lost on cold start for Scene-based apps
GrovsPlugin only registers via registrar.addApplicationDelegate (legacy UIApplicationDelegate
plugin), never via registrar.addSceneDelegate (FlutterSceneLifeCycleDelegate). For apps using
UISceneDelegate (the current Flutter template default), Flutter's legacy-plugin shim drops
connectionOptions.userActivities when synthesizing didFinishLaunchingWithOptions from
scene:willConnectToSession:options: - so a *.sqd.link link tapped while the app is fully
closed never reaches application(_:continue:restorationHandler:), and is silently lost. Only
works today on warm resume.
Fix: conform GrovsPlugin to FlutterSceneLifeCycleDelegate and register via
registrar.addSceneDelegate(instance), forwarding scene(_:willConnectTo:options:) /
scene(_:openURLContexts:) / scene(_:continue:) to the existing Grovs.handleSceneDelegate(...)
calls. Removes the need for consuming apps to hand-write a SceneDelegate workaround.
3. No way to manually resolve a link tapped inside the app
Case: a Grovs short link rendered as a normal link inside the app's own UI (e.g. a chat message).
Tapping it should behave like a deep link, but both UIApplication.open(url, options: [.universalLinksOnly: true]) (iOS) and a plain ACTION_VIEW intent (Android) refuse to hand a
Universal Link/App Link back to the very app that's already requesting it - so it just falls
through to an in-app browser, and onDeeplinkReceived never fires.
The native SDKs already have the right entry points - Grovs.handleAppDelegate(open:options:)
on iOS, Grovs.onNewIntent(intent, activity) on Android (already used internally by
GrovsPlugin.kt's addOnNewIntentListener) - just not exposed via Dart. A Future<bool> handleUrl(String url) wired to those would cover it.
Maybe unrelated
ios/Resources/PrivacyInfo.xcprivacy doesn't look picked up by CocoaPods - s.source_files = 'Classes/**/*' doesn't cover Resources/, so it likely never ships via CocoaPods.
Hi @chelemen-razvan 馃憢
Ran into three gaps using
grovs_flutter_pluginin production:1. Swift Package Manager support
ios/grovs_flutter_plugin.podspecis CocoaPods-only, noPackage.swift. Sincegrovs-iOSitself already ships via SPM, addingios/grovs_flutter_plugin/Package.swiftnext to the podspec (Flutter auto-detects it, nobreaking change for CocoaPods users) would just be wiring:
2. Universal Links lost on cold start for Scene-based apps
GrovsPluginonly registers viaregistrar.addApplicationDelegate(legacyUIApplicationDelegateplugin), never via
registrar.addSceneDelegate(FlutterSceneLifeCycleDelegate). For apps usingUISceneDelegate(the current Flutter template default), Flutter's legacy-plugin shim dropsconnectionOptions.userActivitieswhen synthesizingdidFinishLaunchingWithOptionsfromscene:willConnectToSession:options:- so a*.sqd.linklink tapped while the app is fullyclosed never reaches
application(_:continue:restorationHandler:), and is silently lost. Onlyworks today on warm resume.
Fix: conform
GrovsPlugintoFlutterSceneLifeCycleDelegateand register viaregistrar.addSceneDelegate(instance), forwardingscene(_:willConnectTo:options:)/scene(_:openURLContexts:)/scene(_:continue:)to the existingGrovs.handleSceneDelegate(...)calls. Removes the need for consuming apps to hand-write a SceneDelegate workaround.
3. No way to manually resolve a link tapped inside the app
Case: a Grovs short link rendered as a normal link inside the app's own UI (e.g. a chat message).
Tapping it should behave like a deep link, but both
UIApplication.open(url, options: [.universalLinksOnly: true])(iOS) and a plainACTION_VIEWintent (Android) refuse to hand aUniversal Link/App Link back to the very app that's already requesting it - so it just falls
through to an in-app browser, and
onDeeplinkReceivednever fires.The native SDKs already have the right entry points -
Grovs.handleAppDelegate(open:options:)on iOS,
Grovs.onNewIntent(intent, activity)on Android (already used internally byGrovsPlugin.kt'saddOnNewIntentListener) - just not exposed via Dart. AFuture<bool> handleUrl(String url)wired to those would cover it.Maybe unrelated
ios/Resources/PrivacyInfo.xcprivacydoesn't look picked up by CocoaPods -s.source_files = 'Classes/**/*'doesn't coverResources/, so it likely never ships via CocoaPods.