Run using the Flutter VSCode extension and select the macOS as device
Experience the exceptions as build fails
Expected Result
To work with macOS Flutter 3.24.3 without any exception and crash
Actual Result
Fails to build (debug/release) and throws these exceptions
Launching lib/main.dart on macOS in debug mode...
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:, name:My Mac }
{ platform:macOS, arch:x86_64, id:, name:My Mac }
<project dir>/macos/Pods/PostHog/PostHog/PostHogSwiftUIViewModifiers.swift:19:45: error: 'View' is only available in macOS 10.15 or newer
func body(content: Content) -> some View {
^
func body(content: Content) -> some View {
^
struct PostHogSwiftUIViewModifier: ViewModifier {
^
<project dir>/macos/Pods/PostHog/PostHog/PostHogSwiftUIViewModifiers.swift:32:76: error: 'View' is only available in macOS 10.15 or newer
_ properties: [String: Any]? = nil) -> some View
^
func postHogScreenView(_ screenName: String? = nil,
^
public extension View {
^
<project dir>/macos/Pods/PostHog/PostHog/PostHogSwiftUIViewModifiers.swift:41:74: error: 'View' is only available in macOS 10.15 or newer
_ properties: [String: Any]? = nil) -> some View
^
func postHogViewSeen(_ event: String,
^
public extension View {
^
<project dir>/macos/Pods/PostHog/PostHog/PostHogSwiftUIViewModifiers.swift:30:22: error: 'View' is only available in macOS 10.15 or newer
public extension View {
^
public extension View {
^
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Flutter Assemble' from project 'Runner')
** BUILD FAILED **
Error: Build process failed
Exited (1).
Sorry, this was due to our deployment target being set to 10.14 in xcproject where in macos/Podspec it's 10.15 which confused us thinking may be the plugin has something below 10.15 set
Version
4.5.0
Steps to Reproduce
posthog_flutter: ^4.5.0
as dependencyExpected Result
To work with macOS Flutter 3.24.3 without any exception and crash
Actual Result
Fails to build (debug/release) and throws these exceptions