From 3df1b78c882a640c7dab84955f11df4abe10494b Mon Sep 17 00:00:00 2001 From: GitHub Date: Tue, 16 Jul 2024 11:14:07 +0000 Subject: [PATCH 1/2] chore: update flutter/scripts/update-cocoa.sh to 8.31.1 --- CHANGELOG.md | 8 ++++++++ flutter/ios/sentry_flutter.podspec | 2 +- flutter/lib/src/native/cocoa/binding.dart | 23 +++++++++++++---------- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fb91afe8b..89874508d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## Unreleased + +### Dependencies + +- Bump Cocoa SDK from v8.30.1 to v8.31.1 ([#2174](https://github.com/getsentry/sentry-dart/pull/2174)) + - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8311) + - [diff](https://github.com/getsentry/sentry-cocoa/compare/8.30.1...8.31.1) + ## 8.4.0 ### Features diff --git a/flutter/ios/sentry_flutter.podspec b/flutter/ios/sentry_flutter.podspec index 8a3e66c809..6631df761f 100644 --- a/flutter/ios/sentry_flutter.podspec +++ b/flutter/ios/sentry_flutter.podspec @@ -16,7 +16,7 @@ Sentry SDK for Flutter with support to native through sentry-cocoa. :tag => s.version.to_s } s.source_files = 'Classes/**/*' s.public_header_files = 'Classes/**/*.h' - s.dependency 'Sentry/HybridSDK', '8.30.1' + s.dependency 'Sentry/HybridSDK', '8.31.1' s.ios.dependency 'Flutter' s.osx.dependency 'FlutterMacOS' s.ios.deployment_target = '12.0' diff --git a/flutter/lib/src/native/cocoa/binding.dart b/flutter/lib/src/native/cocoa/binding.dart index 62afabb4cf..869b6a0b8d 100644 --- a/flutter/lib/src/native/cocoa/binding.dart +++ b/flutter/lib/src/native/cocoa/binding.dart @@ -37663,7 +37663,8 @@ class ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool extends _ObjCBlockBase { ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( SentryCocoa lib, ffi.Pointer< - ffi.NativeFunction< + ffi + .NativeFunction< ffi.Bool Function(ffi.Pointer arg0, ffi.UnsignedLong arg1, ffi.Pointer arg2)>> ptr) @@ -42107,15 +42108,17 @@ class ObjCBlock_bool_ObjCObject_bool extends _ObjCBlockBase { ffi.Pointer arg1)>> ptr) : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock_bool_ObjCObject_bool_fnPtrTrampoline, false) - .cast(), - ptr.cast()), + lib + ._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock_bool_ObjCObject_bool_fnPtrTrampoline, + false) + .cast(), + ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; From 8d70997e4493d27c76670eae8a4e3defe434facc Mon Sep 17 00:00:00 2001 From: Ivan Dlugos Date: Tue, 16 Jul 2024 23:54:35 +0200 Subject: [PATCH 2/2] format generated binding --- flutter/lib/src/native/cocoa/binding.dart | 23 ++++++++++------------ flutter/scripts/generate-cocoa-bindings.sh | 8 +++++--- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/flutter/lib/src/native/cocoa/binding.dart b/flutter/lib/src/native/cocoa/binding.dart index 869b6a0b8d..62afabb4cf 100644 --- a/flutter/lib/src/native/cocoa/binding.dart +++ b/flutter/lib/src/native/cocoa/binding.dart @@ -37663,8 +37663,7 @@ class ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool extends _ObjCBlockBase { ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( SentryCocoa lib, ffi.Pointer< - ffi - .NativeFunction< + ffi.NativeFunction< ffi.Bool Function(ffi.Pointer arg0, ffi.UnsignedLong arg1, ffi.Pointer arg2)>> ptr) @@ -42108,17 +42107,15 @@ class ObjCBlock_bool_ObjCObject_bool extends _ObjCBlockBase { ffi.Pointer arg1)>> ptr) : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock_bool_ObjCObject_bool_fnPtrTrampoline, - false) - .cast(), - ptr.cast()), + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock_bool_ObjCObject_bool_fnPtrTrampoline, false) + .cast(), + ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; diff --git a/flutter/scripts/generate-cocoa-bindings.sh b/flutter/scripts/generate-cocoa-bindings.sh index 722a52fb32..9af4cb2084 100755 --- a/flutter/scripts/generate-cocoa-bindings.sh +++ b/flutter/scripts/generate-cocoa-bindings.sh @@ -33,7 +33,9 @@ subdir="Sentry.xcframework/macos-arm64_x86_64/Sentry.framework" unzip -q $temp/Sentry.xcframework.zip "$subdir/*" -d $temp mv "$temp/$subdir" $temp/Sentry.framework +binding="lib/src/native/cocoa/binding.dart" dart run ffigen --config ffi-cocoa.yaml -sed -i.bak 's|final class|class|g' lib/src/native/cocoa/binding.dart -sed -i.bak 's|static int startProfilerForTrace_(SentryCocoa _lib, SentryId? traceId)|static int startProfilerForTrace_(SentryCocoa _lib, SentryId1? traceId)|g' lib/src/native/cocoa/binding.dart -rm lib/src/native/cocoa/binding.dart.bak +sed -i.bak 's|final class|class|g' $binding +sed -i.bak 's|static int startProfilerForTrace_(SentryCocoa _lib, SentryId? traceId)|static int startProfilerForTrace_(SentryCocoa _lib, SentryId1? traceId)|g' $binding +rm $binding.bak +dart format $binding