Fix iOS App Store archive build failures (Dart compilation errors + missing Xcode scheme + record package upgrade)#81
Conversation
Agent-Logs-Url: https://github.com/zedraxa/y2notes2/sessions/104690e8-8a0c-4175-9332-7b3e6c231ae4 Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
|
Archiving com.biscuits.app... Xcode's output: Encountered error while archiving for device. Build failed :| |
Agent-Logs-Url: https://github.com/zedraxa/y2notes2/sessions/13ee19e8-a8ec-4fbc-a226-489f0524d947 Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
The new error — Fixed in commit |
|
build_ipa_for_app_store_distribution (1).log |
…n compilation errors Agent-Logs-Url: https://github.com/zedraxa/y2notes2/sessions/6c237f52-d4f4-4106-a072-e3e6d26b7eb7 Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
The new build failure is caused by two Dart compilation errors in Fixed in commit |
…p Store rejection Agent-Logs-Url: https://github.com/zedraxa/y2notes2/sessions/fcd08267-9447-47ac-a657-f59b238a479c Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
Agent-Logs-Url: https://github.com/zedraxa/y2notes2/sessions/42199bf8-8eaf-4072-a214-862f9c45f29b Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
…nt, and go→push navigation Agent-Logs-Url: https://github.com/zedraxa/y2notes2/sessions/42199bf8-8eaf-4072-a214-862f9c45f29b Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
Agent-Logs-Url: https://github.com/zedraxa/y2notes2/sessions/42199bf8-8eaf-4072-a214-862f9c45f29b Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
…_picker camera Agent-Logs-Url: https://github.com/zedraxa/y2notes2/sessions/b5f26ecc-792b-4533-8253-8e4215ddf8dc Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
Bug 1: Search button dispatched SearchLibrary('') but isSearching checked
searchQuery.isNotEmpty which was always false for empty query. Added
isSearchMode boolean field to LibraryState so search mode activates
before any text is typed.
Bug 2: Action sheet's _ActionSheetButton called onPressed() then
Navigator.pop(). When onPressed opened a dialog (showAppleDialog),
the pop immediately dismissed the dialog instead of the sheet. Fixed
by popping the sheet first, then invoking the callback via
addPostFrameCallback.
Bug 3: Scanner page used Navigator.of(context).pop(scanResult) but was
pushed via GoRouter's context.push<ScanResult>(). Switched to GoRouter's
context.pop() for proper result propagation.
Agent-Logs-Url: https://github.com/zedraxa/y2notes2/sessions/760a31fc-415a-45ca-bbb4-bedfa1a462c7
Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
- Add optional `id` parameter to CreateNotebook event so the notebook ID can match the library item ID. - Change OpenNotebook to create a new blank notebook as fallback when one is not found in storage, instead of showing an error. - Wire up _submitCreateItem to dispatch CreateNotebook to DocumentBloc before navigating, so the notebook document exists when opened. - Wire up _importDocument to dispatch CreateNotebook + ImportPdfFromPath or ImportImageFromPath to actually import the file contents. - Wire up _scanDocument to dispatch CreateNotebook + ImportScannedDocument to actually import scanned pages. Agent-Logs-Url: https://github.com/zedraxa/y2notes2/sessions/ef4f7943-95ee-4e7e-9ec8-dd35f38eabcb Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
Agent-Logs-Url: https://github.com/zedraxa/y2notes2/sessions/ef4f7943-95ee-4e7e-9ec8-dd35f38eabcb Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
Add JSON serialization/deserialization methods to: - ShapeElement - MathVariable - MatrixData - GraphFunction - GraphElement Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
Remove redundant identity mapping on the values list. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
…to-save on mutations
- DocumentRepository: multi-notebook storage with per-ID keys (document_notebook_{id}),
serializes all page element types (shapes, stickers, graphs, media, annotations, richTexts, audioRecordings)
- DocumentBloc: added _persistNotebook() helper, called after every notebook mutation
(create, open-fallback, close, add/delete/duplicate/move page, update strokes/config,
rename, description, cover, page title, bookmark, import, scan, annotations, media,
audio, shapes, stickers, graphs, richTexts)
- Added toJson/fromJson to ShapeElement, GraphElement, GraphFunction, MathVariable, MatrixData
- Legacy single-key fallback preserved for backward compatibility
Agent-Logs-Url: https://github.com/zedraxa/y2notes2/sessions/647b569e-34c6-4659-aeb8-4755961152a9
Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
|
43s Show command Xcode's output: Encountered error while archiving for device. Build failed :| 43s Show command Xcode's output: Encountered error while archiving for device. Build failed :| |
…licatePage, _onUpdatePageStrokes, _onUpdatePageConfig) Agent-Logs-Url: https://github.com/zedraxa/y2notes2/sessions/ae2cc6cc-2772-4199-8c74-ad616dcaf809 Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
... The full error log shows 4 missing handler method signatures in Fixed in |
- Add CanvasPageLoaded event to CanvasBloc to load page strokes/shapes/config - Handle CanvasPageLoaded in CanvasBloc._onCanvasPageLoaded - Convert NotebookPageView to StatefulWidget with sync logic: - Document→Canvas: load page data when notebook/page changes - Canvas→Document: auto-save strokes/shapes/config on every change" Agent-Logs-Url: https://github.com/zedraxa/y2notes2/sessions/b6afbb05-0af7-433b-9e78-4e4af264381b Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
…t event - Use List.from() in _onCanvasPageLoaded to prevent shared list mutation - Add UpdatePageCanvasContent batch event to DocumentBloc (single state emit + persist) - Update NotebookPageView to use UpdatePageCanvasContent instead of 3 separate events" Agent-Logs-Url: https://github.com/zedraxa/y2notes2/sessions/b6afbb05-0af7-433b-9e78-4e4af264381b Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
…lback When CreateNotebook runs synchronously before navigation, DocumentBloc already has the notebook in state when NotebookPageView mounts. The BlocListener never sees a state change, so _syncDocumentToCanvas was never called and the canvas stayed blank. The post-frame callback in initState handles this by syncing whatever notebook is already loaded at mount time. Agent-Logs-Url: https://github.com/zedraxa/y2notes2/sessions/ba863baf-7bcc-41b6-8c78-05089bf2e897 Co-authored-by: zedraxa <70697858+zedraxa@users.noreply.github.com>
Original prompt
The iOS App Store archive build (
flutter build ipa) is failing with 7 Dart compilation errors. All fixes are needed to unblock the build.Errors and Required Fixes
1.
lib/features/documents/engine/image_import_engine.dart:101—Recttype not foundThe file imports
dart:ui as uibut uses bareRecton line 101. ChangeRect cropRect,toui.Rect cropRect,.2 & 3.
lib/app/theme/app_theme.dart:49, 224—CardTheme→CardThemeDataIn the current Flutter SDK, the
cardThemeproperty onThemeDatanow expectsCardThemeDatainstead ofCardTheme. ReplaceCardTheme(withCardThemeData(on lines 49 and 224.4 & 5.
lib/app/theme/app_theme.dart:176, 352—DialogTheme→DialogThemeDataSame pattern:
dialogThemenow expectsDialogThemeData. ReplaceDialogTheme(withDialogThemeData(on lines 176 and 352.6.
lib/features/canvas/domain/entities/tools/utility/lasso_tool.dart:14—Icons.lassodoes not existThere is no
Icons.lassoin Flutter's Material icons set. ReplaceIcons.lassowithIcons.gesture(or another valid icon likeIcons.select_all).7.
lib/features/effects/engine/easing_curves.dart:104—numcan't be returned asdoublemath.powreturnsnum, but the method return type isdouble. Change line 104 from:to:
8.
lib/features/documents/engine/pdf_export_engine.dart:73— Non-exhaustive switch onPageTemplateThe
PageTemplateenum (inlib/features/canvas/domain/models/canvas_config.dart) has these values:blank,lined,grid,dotted,chalkboard,narrowRuled,wideRuled,isometric,musicStaff,hexagonal,calligraphy. The switch statement at line 73 ofpdf_export_engine.dartonly handlesblank,chalkboard,lined,grid, anddotted. The new enum values must be handled. Suggested mapping:narrowRuledandwideRuled→ group with thelinedcase (they are line-based templates)isometricandhexagonal→ group withgridcase (grid-based)musicStaffandcalligraphy→ group withlinedcase (line-based) or fall through toblank/break as a TODOAll of these are compilation errors that must be fixed for the build to succeed.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: fix
Assistant: Your iOS build has 7 Dart compilation errors across 5 files that are causing the
ARCHIVE FAILED. The warnings from third-party pods (SDWebImage, DKPhotoGallery, file_picker, etc.) are non-fatal — only the errors matter. Here's the breakdown and fixes:Root Cause: Flutter SDK + dependency API changes
You're building with Xcode 26.2 and a recent Flutter SDK. Several of your Dart files use APIs that have been renamed/changed in newer Flutter and dependency versions.
All 7 Errors and Fixes
1.
image_import_engine.dart:101—Recttype not foundThe
Rectclass fromdart:uiisn't imported with that name because the file usesimport 'dart:ui' as ui;.Rect cropRect,Fix: Change
Rect→ui.Rect(line 101), sincedart:uiis imported asui:ui.Rect cropRect,2 & 3.
app_theme.dart:49, 224—CardTheme→CardThemeDataIn recent Flutter versions, the
cardThemeproperty onThemeDatanow expectsCardThemeDatainstead ofCardTheme.Fix (lines 49 and 224): Replace
CardTheme(withCardThemeData(:4 & 5.
app_theme.dart:176, 352—DialogTheme→DialogThemeDataSame pattern:
dialogThemenow expectsDialogThemeData.Fix (lines 176 and 352): Replace
DialogTheme(withDialogThemeData(:6.
lasso_tool.dart:14—Icons.lassodoes not existThere is no
Icons.lassoin Flutter's Material icons set.Fix: Use an existing icon, e.g.:
7.
easing_curves.dart:104—numcan't be returned asdoublemath.powreturnsnum, but the method return type isdouble.