-
Notifications
You must be signed in to change notification settings - Fork 240
fix(macos): show file picker by adding user-selected read-only entitlement #3111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ement - Add com.apple.security.files.user-selected.read-only to DebugProfile and Release entitlements to enable file_picker dialog on macOS.\n- Bump iOS deployment target to 13.0 (project settings and AppFrameworkInfo.plist) to align with plugin requirements.\n- Update file_picker to ^10.3.2 and refresh lockfiles (iOS/macOS).\n\nRefs: https://github.com/miguelpruivo/flutter_file_picker/wiki/Setup
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
DeckerSU
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The web build using flutter build web --no-pub -v failed with:
alance * overallReturn[mode]!) / ohlcvData.first.close;
^
lib/bloc/cex_market_data/mockup/generate_demo_data.dart:100:61:
Error: The getter 'closeTime' isn't defined for the type 'Ohlc'.
- 'Ohlc' is from 'package:komodo_cex_market_data/src/models/coin_ohlc.dart' ('../../../.pub-cache/hosted/pub.dev/komodo_cex_market_data-0.0.3+1/lib/src/models/coin_ohlc.dart').
fromTradeAmount(coinId, tradeAmount, isBuy, ohlcv.closeTime);
^^^^^^^^^
lib/bloc/cex_market_data/mockup/generate_demo_data.dart:108:17:
Error: The getter 'closeTime' isn't defined for the type 'Ohlc'.
- 'Ohlc' is from 'package:komodo_cex_market_data/src/models/coin_ohlc.dart' ('../../../.pub-cache/hosted/pub.dev/komodo_cex_market_data-0.0.3+1/lib/src/models/coin_ohlc.dart').
ohlcv.closeTime + 100,
^^^^^^^^^
lib/bloc/cex_market_data/mockup/generate_demo_data.dart:158:24:
Error: 'CexCoinPair' isn't a type.
final ohlcvData = <CexCoinPair, List<Ohlc>>{};
^^^^^^^^^^^
lib/bloc/cex_market_data/mockup/generate_demo_data.dart:160:16:
Error: 'CexCoinPair' isn't a type.
for (final CexCoinPair coin in coinPairs) {
^^^^^^^^^^^
lib/bloc/cex_market_data/mockup/generate_demo_data.dart:172:38:
Error: Too few positional arguments: 3 required, 2 given.
await _ohlcRepo.getCoinOhlc(coin, interval, startAt: startAt);
^
lib/bloc/cex_market_data/mockup/generate_demo_data.dart:177:25:
Error: Too few positional arguments: 3 required, 2 given.
.getCoinOhlc(coin, GraphInterval.oneHour, startAt: twoWeeksAgo)
^
lib/bloc/cex_market_data/profit_loss/profit_loss_calculator.dart:69:45:
Error: The argument type 'String' can't be assigned to the parameter type 'AssetId'.
- 'AssetId' is from 'package:komodo_defi_types/src/assets/asset_id.dart' ('../../../.pub-cache/hosted/pub.dev/komodo_defi_types-0.3.2+1/lib/src/assets/asset_id.dart').
return _cexRepository.getCoinFiatPrices(cleanCoinId, dates);
^
lib/bloc/cex_market_data/profit_loss/profit_loss_calculator.dart:69:27:
Error: A value of type 'Future<Map<DateTime, Decimal>>' can't be returned from an async function with return type 'Future<Map<DateTime, double>>'.
- 'Future' is from 'dart:async'.
- 'Map' is from 'dart:core'.
- 'DateTime' is from 'dart:core'.
- 'Decimal' is from 'package:decimal/decimal.dart' ('../../../.pub-cache/hosted/pub.dev/decimal-3.2.1/lib/decimal.dart').
return _cexRepository.getCoinFiatPrices(cleanCoinId, dates);
^
lib/bloc/fiat/fiat_onramp_form/fiat_form_state.dart:31:44:
Error: 'FiatCurrency' is imported from both 'package:komodo_cex_market_data/src/models/quote_currency.dart' and 'package:web_dex/bloc/fiat/models/i_currency.dart'.
: selectedFiat = CurrencyInput.dirty(FiatCurrency.usd()),
^^^^^^^^^^^^
lib/views/wallet/coin_details/coin_details_info/charts/coin_sparkline.dart:17:41:
Error: The argument type 'String' can't be assigned to the parameter type 'AssetId'.
- 'AssetId' is from 'package:komodo_defi_types/src/assets/asset_id.dart' ('../../../.pub-cache/hosted/pub.dev/komodo_defi_types-0.3.2+1/lib/src/assets/asset_id.dart').
future: repository.fetchSparkline(abbr2Ticker(coinId)),
^
Error: Compilation failed.
Command: /Users/builder/development/flutter/bin/cache/dart-sdk/bin/dart compile js --platform-binaries=/Users/builder/development/flutter/bin/cache/flutter_web_sdk/kernel --invoker=flutter_tool -Ddart.vm.product=true -DFLUTTER_VERSION=3.35.2 -DFLUTTER_CHANNEL=stable -DFLUTTER_GIT_URL=https://github.com/flutter/flutter.git -DFLUTTER_FRAMEWORK_REVISION=05db968908 -DFLUTTER_ENGINE_REVISION=a8bfdfc394 -DFLUTTER_DART_VERSION=3.9.0 -DFLUTTER_WEB_USE_SKIA=true -DFLUTTER_WEB_USE_SKWASM=false -DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/a8bfdfc394deaed5c57bd45a64ac4294dc976a72/ --native-null-assertions --no-source-maps -O4 --minify -o /Users/builder/jenkins/workspace/komodo-wallet-macos/.dart_tool/flutter_build/1c1f1ce47170f43fa468d87a74f171be/app.dill --packages=/Users/builder/jenkins/workspace/komodo-wallet-macos/.dart_tool/package_config.json --cfe-only /Users/builder/jenkins/workspace/komodo-wallet-macos/.dart_tool/flutter_build/1c1f1ce47170f43fa468d87a74f171be/main.dart
#0 RunResult.throwException (package:flutter_tools/src/base/process.dart:118:5)
#1 _DefaultProcessUtils.run (package:flutter_tools/src/base/process.dart:344:19)
<asynchronous suspension>
#2 Dart2JSTarget.build (package:flutter_tools/src/build_system/targets/web.dart:204:5)
<asynchronous suspension>
#3 _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:873:9)
<asynchronous suspension>
#4 Future.wait.<anonymous closure> (dart:async/future.dart:525:21)
<asynchronous suspension>
#5 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:811:32)
<asynchronous suspension>
#6 Future.wait.<anonymous closure> (dart:async/future.dart:525:21)
<asynchronous suspension>
#7 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:811:32)
<asynchronous suspension>
#8 FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:631:16)
<asynchronous suspension>
#9 WebBuilder.buildWeb (package:flutter_tools/src/web/compile.dart:90:34)
<asynchronous suspension>
#10 BuildWebCommand.runCommand (package:flutter_tools/src/commands/build_web.dart:282:5)
<asynchronous suspension>
#11 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1581:27)
<asynchronous suspension>
#12 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
<asynchronous suspension>
#13 CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#14 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:503:9)
<asynchronous suspension>
#15 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
<asynchronous suspension>
#16 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:438:5)
<asynchronous suspension>
#17 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:98:11)
<asynchronous suspension>
#18 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
<asynchronous suspension>
#19 main (package:flutter_tools/executable.dart:101:3)
<asynchronous suspension>
[ +2 ms] Compiling lib/main.dart for the Web... (completed in 10.3s)
[ ] "flutter web" took 10,640ms.
[ +4 ms] executing: sw_vers -productName
[ +13 ms] Exit code 0 from: sw_vers -productName
[ ] macOS
[ ] executing: sw_vers -productVersion
[ +13 ms] Exit code 0 from: sw_vers -productVersion
[ ] 15.5
[ ] executing: sw_vers -buildVersion
[ +11 ms] Exit code 0 from: sw_vers -buildVersion
[ ] 24F74
[ ] executing: uname -m
[ +5 ms] Exit code 0 from: uname -m
[ ] x86_64
[ +12 ms] Error: Failed to compile application for the Web.
[ ]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:34:3)
#1 WebBuilder.buildWeb (package:flutter_tools/src/web/compile.dart:132:7)
<asynchronous suspension>
#2 BuildWebCommand.runCommand (package:flutter_tools/src/commands/build_web.dart:282:5)
<asynchronous suspension>
#3 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1581:27)
<asynchronous suspension>
#4 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
<asynchronous suspension>
#5 CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#6 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:503:9)
<asynchronous suspension>
#7 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
<asynchronous suspension>
#8 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:438:5)
<asynchronous suspension>
#9 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:98:11)
<asynchronous suspension>
#10 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
<asynchronous suspension>
#11 main (package:flutter_tools/executable.dart:101:3)
<asynchronous suspension>
[ ] Running 1 shutdown hook
[ +1 ms] Shutdown hooks complete
[ +24 ms] exiting with code 1
I guess it is a komodo_defi_framework version incompatibility.
|
It seems the build error is related to #3113 / #3110 (review). But in any case, it can’t be reviewed until the build errors are resolved. |
…into fix/macos-file-picker # Conflicts: # ios/Podfile.lock # macos/Podfile.lock
|
Visit the preview URL for this PR (updated for commit 46a55e6): https://walletrc--pull-3111-merge-x7mlzln6.web.app (expires Mon, 08 Sep 2025 11:07:22 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc |
|
The seed import phrase (file open) dialog appeared, so the problem described in the initial issue seems resolved. However, I found another similar bug with the "Download seed phrase file" (file save) dialog - it doesn’t appear. I’ve attached a video. I think the best approach would be to fix this within the same PR. Monosnap.screencast.2025-09-01.09-29-51.mp4 |
|
Currently the app only includes the entitlement: <key>com.apple.security.files.user-selected.read-only</key>
<true/>This works for the file open dialog, but it prevents the save dialog ( <key>com.apple.security.files.user-selected.read-write</key>
<true/>We should update both |
…te entitlement - Replace com.apple.security.files.user-selected.read-only with read-write in DebugProfile and Release entitlements to allow NSSavePanel. Refs: https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_files_user-selected_read-write, #3111 (comment)
DeckerSU
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now. I can confirm that the Export and Import seed dialogs work as expected on macOS. Thanks for the prompt fix.
This PR fixes the macOS seed import file picker not showing (#3054).
Changes
com.apple.security.files.user-selected.read-onlytomacos/Runner/DebugProfile.entitlementsandmacos/Runner/Release.entitlementsto enable system file picker access.ios/Runner.xcodeproj/project.pbxprojandios/Flutter/AppFrameworkInfo.plist.file_pickerto^10.3.2and refresh lockfiles.References