when i tried to run ionic app in ios real device or make archive then this happen. in (https://i.sstatic.net/y1dnu.png) simulator its working fine
I'm developing an Ionic app and I've encountered a build issue when running it on a real iOS device or attempting to make an archive. While the app runs fine in the simulator, it fails with a linker command error on a real device.
Here is the error that appears:
Assertion failed: (aliasSectionNum == sectionNum && "alias and its target must be located in the same section"), function assignAliasAtomOffsetInSection, file Layout.cpp, line 3248. The full error output can be seen in this screenshot: y1dnu.png
Based on research and suggestions from other developers, I tried enabling core device support using the following terminal command:
defaults write com.apple.dt.Xcode DVTEnableCoreDevice enabled Additionally, I attempted to resolve the issue by modifying the build settings in Xcode as follows:
Navigated to Build Settings. Located Other Linker Flags. Added -ld64 flag. Despite these attempts, the issue persists.
What I Have Tried:
Cleaning the build folder in Xcode and rebuilding. Updating and reinstalling all project dependencies, including CocoaPods. Searching for any instances of duplicate symbols or conflicting libraries. Verifying that no outdated or incompatible versions of libraries are linked. Environment:
Xcode Version: 15 Questions:
Has anyone successfully resolved a similar Xcode linker command error? Could this issue be related to specific project settings that differ between simulator builds and device/archive builds? Is there an alternative approach to the -ld64 linker flag that could be more effective? Any help or insight from those who have faced and conquered this issue would be immensely appreciated.