I’m trying to build IPA file using Flutter through Bash. But it return error
building for 'iOS', but linking in dylib (/Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk/usr/lib/libobjc.A.tbd) built for 'macOS macCatalyst zippered(macOS/Catalyst)'
So I trie printing debug log using --verbose
Ans here is the result.
Ld /Users/tcbdevbuild/Library/Developer/Xcode/DerivedData/Techswop-hcgdxzbupbdesybvyqnrorjdyarb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/integration_test.framework/integration_test normal (in target 'integration_test' from project 'Pods')
cd /Users/tcbdevbuild/Documents/trade-in-mobile-app/ios/Pods
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -target arm64-apple-ios15.5 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk -Os -L/Users/tcbdevbuild/Library/Developer/Xcode/DerivedData/Techswop-hcgdxzbupbdesybvyqnrorjdyarb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/EagerLinkingTBDs/Release-iphoneos -L/Users/tcbdevbuild/Library/Developer/Xcode/DerivedData/Techswop-hcgdxzbupbdesybvyqnrorjdyarb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/integration_test -F/Users/tcbdevbuild/Library/Developer/Xcode/DerivedData/Techswop-hcgdxzbupbdesybvyqnrorjdyarb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/EagerLinkingTBDs/Release-iphoneos -F/Users/tcbdevbuild/Library/Developer/Xcode/DerivedData/Techswop-hcgdxzbupbdesybvyqnrorjdyarb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/integration_test -F/Users/tcbdevbuild/Documents/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64 -filelist /Users/tcbdevbuild/Library/Developer/Xcode/DerivedData/Techswop-hcgdxzbupbdesybvyqnrorjdyarb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/integration_test.build/Objects-normal/arm64/integration_test.LinkFileList -install_name @rpath/integration_test.framework/integration_test -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/tcbdevbuild/Library/Developer/Xcode/DerivedData/Techswop-hcgdxzbupbdesybvyqnrorjdyarb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/integration_test.build/Objects-normal/arm64/integration_test_lto.o -fobjc-arc -fobjc-link-runtime -framework UIKit -framework Flutter -framework Foundation -framework UIKit -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/tcbdevbuild/Library/Developer/Xcode/DerivedData/Techswop-hcgdxzbupbdesybvyqnrorjdyarb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/integration_test.build/Objects-normal/arm64/integration_test_dependency_info.dat -o /Users/tcbdevbuild/Library/Developer/Xcode/DerivedData/Techswop-hcgdxzbupbdesybvyqnrorjdyarb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/integration_test.framework/integration_test
ld: building for 'iOS', but linking in dylib (/Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk/usr/lib/libobjc.A.tbd) built for 'macOS macCatalyst zippered(macOS/Catalyst)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The issue doesn’t happen in zsh and I did made sure that both zsh and Bash use the same env PATH. Gitlab-Runner use only Bash so I kinda need a fix to run CI/CD pipeline. Anyone know how to fix it?