Skip to content

Commit 6a47e6b

Browse files
authored
fix: macos compilation due to cocoa SDK changes (#1602)
1 parent f370d52 commit 6a47e6b

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

.github/workflows/flutter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ jobs:
160160
steps:
161161
- uses: actions/checkout@v3
162162
# https://github.com/CocoaPods/CocoaPods/issues/5275#issuecomment-315461879
163-
- run: pod lib lint ios/sentry_flutter.podspec --configuration=Debug --skip-import-validation --allow-warnings
163+
- run: pod lib lint ios/sentry_flutter.podspec --configuration=Debug --skip-import-validation --allow-warnings --verbose
164164

165165
swift-lint:
166166
runs-on: ubuntu-latest

flutter/example/ios/Podfile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
wanted_project_target = '11.0'
2-
31
# Uncomment this line to define a global platform for your project
4-
platform :ios, wanted_project_target
2+
platform :ios, '11.0'
53

64
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
75
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@@ -37,15 +35,6 @@ target 'Runner' do
3735
end
3836

3937
post_install do |installer|
40-
# remove after https://github.com/flutter/flutter/issues/124340 getting into all channels
41-
installer.generated_projects.each do |project|
42-
project.targets.each do |target|
43-
target.build_configurations.each do |config|
44-
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = wanted_project_target
45-
end
46-
end
47-
end
48-
4938
installer.pods_project.targets.each do |target|
5039
flutter_additional_ios_build_settings(target)
5140
end

flutter/ios/Classes/SentryFlutterPluginApple.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ public class SentryFlutterPluginApple: NSObject, FlutterPlugin {
466466
}
467467

468468
private func fetchNativeAppStart(result: @escaping FlutterResult) {
469+
#if os(iOS) || os(tvOS)
469470
guard let appStartMeasurement = PrivateSentrySDKOnly.appStartMeasurement else {
470471
print("warning: appStartMeasurement is null")
471472
result(nil)
@@ -481,6 +482,10 @@ public class SentryFlutterPluginApple: NSObject, FlutterPlugin {
481482
]
482483

483484
result(item)
485+
#else
486+
print("note: appStartMeasurement not available on this platform")
487+
result(nil)
488+
#endif
484489
}
485490

486491
private var totalFrames: UInt = 0

flutter/ios/sentry_flutter.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Pod::Spec.new do |s|
66
Sentry SDK for Flutter with support to native through sentry-cocoa.
77
DESC
88
s.homepage = 'https://sentry.io'
9-
s.license = { :file => '../LICENSE' }
9+
s.license = { :type => 'MIT', :file => '../LICENSE' }
1010
s.authors = "Sentry"
1111
s.source = { :git => "https://github.com/getsentry/sentry-dart.git",
1212
:tag => s.version.to_s }

0 commit comments

Comments
 (0)