Repository navigation
docs: current Flutter iOS add-to-app setup and sample module names - #751
Conversation
AbhishekDoshi26
left a comment
There was a problem hiding this comment.
Round 1: 9 findings to fix (finding 6 below is already done).
- ios.mdx:31, android.mdx:27: the module name now matches the sample, but the app names in the same sentences don't. shorebirdtech/samples
add_to_app/hasIosAddToAppDemoandAndroidAddToAppDemo, and the guide's own screenshothybrid_ios_embed_frameworks.pngshowsIosAddToAppDemo. NeitherIosCodePushDemonorandroid_appexists. Also "you have already have". - flutter-concepts/add-to-app.mdx:332-337: the SPM summary skips Flutter's step that adds
FlutterNativeIntegrationto the target's Frameworks, Libraries, and Embedded Content, so a reader following it never links the package. - flutter-concepts/add-to-app.mdx:309-310: "Flutter offers two ways" is wrong for iOS. The legacy page documents CocoaPods (
#method-a), frameworks (#method-b) and frameworks with a Flutter podspec (#method-c), and CocoaPods is still in maintenance mode. - ios.mdx:46-47 (nit): "that Flutter recommends since Flutter 3.44" should be "has recommended".
- PR description (nit): "the snippets ... use
my_flutter_module": only the Android guide and qa-builds.mdx have snippets. It should also mention the app names once 1 is fixed. - PR description (nit): the CLI follow-up should also mention
ShorebirdFlutter.frameworkin the post-release message. Already done: the description now links shorebirdtech/shorebird#4154, which fixes both.
Nits in the same files, outside the diff:
- ios.mdx:68: "run the following the root directory" should be "run the following in the root directory".
- ios.mdx:112: "nearly identically" should be "nearly identical".
- ios.mdx:134: the heading says
Flutter.xcframework, but the body and screenshot useShorebirdFlutter.xcframework. - ios.mdx:137: "
ShorebirdFlutter.xcframeworkfrom to the" should be "... to the".
Checked and correct: Flutter's #integrate-with-swiftpm and legacy #method-b anchors and titles, flutter build swift-package --platform ios and its build/ios/SwiftPackages/FlutterNativeIntegration output (build_swift_package.dart at 3.44.0, absent at 3.41.0), the CLI's release ios-framework output and lack of SPM support, the sample's androidPackage, no other dead anchors in the repo, shorebird#1198 and flutter#168015 still open, Prettier/cspell/Vale, no em-dashes.
AbhishekDoshi26
left a comment
There was a problem hiding this comment.
Round 2: 1 finding (nit).
- src/content/docs/flutter-concepts/add-to-app.mdx:309 and :326: the recommendation is stated twice. The intro says "Flutter recommends adding a module to an iOS app as a Swift package", and the Swift package subsection opens with "Since Flutter 3.44, Flutter recommends Swift Package Manager (SPM)". Move the version and the SPM term into the intro and start the subsection with the command.
All round-1 fixes landed: app and module names match the sample and all three iOS screenshots (IosAddToAppDemo, my_flutter_module), the SPM summary includes adding the package to the target, the intro covers the legacy page's CocoaPods and frameworks methods, "has recommended", the description, and the four iOS typos. Re-checked Flutter's live #integrate-with-swiftpm steps and legacy #method-b, build_swift_package.dart at 3.44.0 vs 3.41.0, the CLI's release output, no links to the old anchors, agent-readiness files unaffected, Prettier/cspell/Vale clean.
AbhishekDoshi26
left a comment
There was a problem hiding this comment.
Round 3: 2 findings (nits), both from one naming fact.
- src/content/docs/code-push/guides/add-to-app/android.mdx:26-28:
AndroidAddToAppDemois only the sample's directory. The app isAddToAppDemo(settings.gradle:rootProject.name = "AddToAppDemo";strings.xml:app_nameisAddToAppDemo), and the guide's own screenshothybrid_android_screenshot.pngshows "AddToAppDemo". On iOS,IosAddToAppDemois both the directory and the project, so that sentence is right. - PR description: "the iOS guide's own screenshots use
IosAddToAppDemo,AndroidAddToAppDemoandmy_flutter_module" mixes an Android name into iOS screenshots and calls a directory the app name.
Round 2's fix landed: the 3.44 SPM recommendation is now stated once, in the intro. Everything else re-checked clean (Flutter anchors and steps, build_swift_package.dart at 3.44.0, CLI output, sample names, screenshots, no stale references, agent-readiness files, flow of all three pages, Prettier/cspell/Vale).
AbhishekDoshi26
left a comment
There was a problem hiding this comment.
Round 4: 1 finding (nit).
- src/content/docs/flutter-concepts/add-to-app.mdx:309-310: "Since Flutter 3.44, Flutter recommends" pairs "since" with the present tense. Round 1 fixed the same thing in ios.mdx ("has recommended since Flutter 3.44"), so the two pages don't match. Use "Since Flutter 3.44, Flutter has recommended adding a module to an iOS app as a Swift package with Swift Package Manager (SPM)."
Round 3's fixes landed (AddToAppDemo in the sample's AndroidAddToAppDemo directory, matching settings.gradle, strings.xml and the Android screenshot; description updated). Everything else re-checked clean.
AbhishekDoshi26
left a comment
There was a problem hiding this comment.
Round 5: no findings.
Full diff at b217a02 plus the description. Round 4's fix landed: the concepts page now says "has recommended since Flutter 3.44", matching ios.mdx. Re-checked against Flutter's live project-setup (#integrate-with-swiftpm, the swift-package build and its five integration steps, SPM as of 3.44) and legacy page (#method-a/b/c), build_swift_package.dart at 3.44.0 vs 3.41.0, the CLI's release output, shorebird#4154's link to the unchanged #embed-the-flutter-module-in-your-ios-app heading, the sample's directory, app and module names, all screenshots, no stale references anywhere in src or public, and the prose of all three changed sections. Prettier, cspell and Vale are clean; CI is green.
Dependencies
shorebird release ios-frameworkpost-release message linkshttps://docs.flutter.dev/add-to-app/ios/project-setup#option-b---embed-frameworks-in-xcode, a section Flutter's page no longer has (ios_framework_releaser.dart,postReleaseInstructions). Fixed in fix(shorebird_cli): point ios-framework release instructions at a section that exists shorebird#4154, which links the Shorebird iOS add-to-app guide instead and correctsShorebirdFlutter.frameworktoShorebirdFlutter.xcframework.Description
Flutter 3.44 rewrote its iOS add-to-app page around Swift Package Manager and moved the frameworks method to a legacy page (
/add-to-app/ios/project-setup-legacy, "Link and Embed frameworks in Xcode",#method-b). Three of our add-to-app pages were out of step with that or with the sample.flutter build ios-frameworkand then added the output as a local package, which isn't Flutter's flow. The section now says Flutter recommends a Swift package and its legacy docs cover CocoaPods and prebuilt XCFrameworks, then gives the caution, a short Swift package section (flutter build swift-package --platform ios, theFlutterNativeIntegrationpackage, a link to Flutter's SPM steps, including adding the package to the app target) and a prebuilt XCFrameworks section for releases and patches.#option-b---embed-frameworks-in-xcode. Neither exists on Flutter's page now; both point to the legacy page's#method-b. The note also says Shorebird doesn't support the SPM integration.IosCodePushDemoandandroid_appand the moduleflutter_module, but the reference sample and the guides' screenshots useIosAddToAppDemo(iOS project),AddToAppDemo(Android app, in theAndroidAddToAppDemodirectory) andmy_flutter_module(the Android snippets already usedmy_flutter_module, from the sample'sandroidPackage: com.example.my_flutter_module). The prose now matches. The iOS guide also gets four typo fixes, and its embedding heading now saysShorebirdFlutter.xcframework, as its body does.Checked against Flutter's live pages (headings and anchors), flutter/flutter (
build_swift_package.dartis new in 3.44.0, absent in 3.41.0), and the shorebird CLI'sios_framework_releaser.dart. Prettier, cspell and Vale pass.Screenshots
No layout change beyond two new subheadings in the concepts page's iOS section.
Landing
As soon as approved.