fix: raise macOS deployment target from 10.14 to 11.0#43
Closed
fix: raise macOS deployment target from 10.14 to 11.0#43
Conversation
…d Release Agent-Logs-Url: https://github.com/Starfallan/PiliNara/sessions/162569ad-0371-4f12-85c2-bf6d6e8b39ab Co-authored-by: Starfallan <36763490+Starfallan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update MACOSX_DEPLOYMENT_TARGET to 11.0 for macOS
fix: raise macOS deployment target from 10.14 to 11.0
Apr 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds produced on
macos-latest/macos-26(Xcode 16+) while targeting macOS 10.14 generate binaries that fail at launch withdyld: symbol not found in flat namespace '_OBJC_CLASS_$__TtC5swift11Application'. Xcode 16's Swift codegen assumes Swift ABI stability (macOS 11.0+), making the 10.14 target incompatible with the updated CI runner.Changes
macos/Runner.xcodeproj/project.pbxproj: BumpedMACOSX_DEPLOYMENT_TARGETfrom10.14→11.0for bothDebugandReleaseconfigurations, matching the existingProfilesetting.All three build configurations now consistently target macOS 11.0.
Original prompt
Upgrade the
MACOSX_DEPLOYMENT_TARGETfor the macOS target inmacos/Runner.xcodeproj/project.pbxprojfrom10.14to11.0for bothDebugandReleasebuild configurations. This is to resolve adyld: symbol not founderror (specifically_OBJC_CLASS_$__TtC5swift11Application) reported in issue #41, which occurs when building with newer macOS runners (likemacos-latestormacos-26) while targeting an older macOS version.Please search for all occurrences of
MACOSX_DEPLOYMENT_TARGET = 10.14inmacos/Runner.xcodeproj/project.pbxprojand update them to11.0.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: /Applications/PiliNara.app/Contents/MacOS/PiliNara
dyld[11674]: symbol not found in flat namespace 'OBJC_CLASS$__TtC5swift11Application'
[1] 11674 abort /Applications/PiliNara.app/Contents/MacOS/PiliNara
Assistant: The error
dyld[11674]: symbol not found in flat namespace '_OBJC_CLASS_$__TtC5swift11Application'typically occurs in Flutter macOS applications when there is a mismatch between the Swift runtime expected by the binary and the one available on the host system, or when the Deployment Target is set too low for certain Swift features (like the@mainattribute) to be properly resolved on older macOS versions.Analysis of the Issue
_OBJC_CLASS_$__TtC5swift11Applicationrefers to a Swift-defined class namedApplicationin a module namedswift. In a Flutter context, this often relates to how theAppDelegateor the main entry point is handled.project.pbxproj(lines 487 and 534) showsMACOSX_DEPLOYMENT_TARGET = 10.14. While 10.14 supports Swift, certain modern Swift features (like the@mainentry point used in yourAppDelegate.swift) can sometimes cause issues on older runtimes or if the app is built with a much newer Xcode but targeted at an older OS without proper backward compatibility libraries (Swift 5.0+ runtime is built into macOS 10.14.4+, but earlier versions required bundled libs).SWIFT_VERSION = 5.0(line 558). If the user is on macOS 14.7.1, they have a modern runtime, but if the binary was compiled on a different architecture or with a specific toolchain version that doesn't align with the x86_64 environment of macOS 14.7.1, this dynamic linking error occurs.Suggested Solutions
1. Raise the Deployment Target
Raising the minimum supported macOS version often resolves linking issues with modern Swift features.
10.14to11.0or higher.macos/Runner.xcodeproj/project.pbxprojand change all instances ofMACOSX_DEPLOYMENT_TARGET = 10.14to11.0.2. Verify the Main Entry Point
Your
AppDelegate.swiftuses the@mainattribute:If the deployment target is low, sometimes the linker fails to find the synthesized
mainfunction.@mainwith a manualmain.swiftfile or ensuring theNSPrincipalClassinInfo.plistis correctly set toNSApplication.3. Update CocoaPods and Build Environment
Since this is a Flutter project, the issue might be in how the native dependencies are linked.
4. Architecture Mismatch (Rosetta)
The issue reporter mentioned x86_64 macOS 14.7.1. If they are on an Intel Mac, ensure the build isn't accidentally stripping x86_64 symbols or targeting only arm64.
Action for the Maintainer
I recommend updating the
MACOSX_DEPLOYMENT_TARGETto11.0in theproject.pbxprojfile, as10.14is quite old and often triggers Swift runtime compatibility issues with modern Flutter versions (thepubspec.yamlindicates Flutter 3.41.6, which is very recent).Would you like me to create a Pull Request to update the deployment target to 11.0?
User: 中文回复
Assistant: 针对您在 issue #41 中提到的
dyld: symbol not found in flat namespace '_OBJC_CLASS_$__TtC5swift11Application'错误,这通常是由于 Swift 运行时版本不匹配 或 macOS 部署目标(Deployment Target)设置过低 导致的。在 Flutter 项目中,这类错误在 macOS 14.x 等较新系统上运行针对旧版本(如 10.14)编译的二进制文件时比较常见。
问题分析
MACOSX_DEPLOYMENT_TARGET设置为10.14。对于使用 Flutter 3.41.6 等现代版本的项目,10.14 的运行时支持可能已出现碎片化,尤其是在处理@main属性或 Swift 5.0 动态链接时。_OBJC_CLASS_$__TtC5swift11Application指向 Swift 定义的Application类。如果系统动态链接器(dyld)找不到该符号,通常是因为构建时的 SDK 版本与运行环境不完全兼容。建议解决方案
1. 提高部...
This pull request was created from Copilot chat.