Unable to build iOS with clean install of Master-Client Firebase template (ld: warning: directory not found for option)
See original GitHub issueGetting following error upon running iOS simulator:
Executing after-prepare hook from /Users/leecocking/Dev/tns-ng-firebase-test/hooks/after-prepare/nativescript-plugin-firebase.js
Building project...
Xcode build...
=== BUILD TARGET tnsngfirebasetest OF PROJECT tnsngfirebasetest WITH CONFIGURATION Debug ===
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/FirebaseAuth'
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/FirebaseCore'
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/FirebaseDatabase'
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/FirebaseStorage'
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/GTMSessionFetcher'
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/GoogleUtilities'
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/QBImagePickerController'
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/leveldb-library'
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/nanopb'
ld: warning: Auto-Linking framework not found CoreServices
=== BUILD TARGET tnsngfirebasetest OF PROJECT tnsngfirebasetest WITH CONFIGURATION Debug ===
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/FirebaseAuth'
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/FirebaseCore'
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/FirebaseDatabase'
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/FirebaseStorage'
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/GTMSessionFetcher'
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/GoogleUtilities'
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/QBImagePickerController'
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/leveldb-library'
ld: warning: directory not found for option '-F/Users/lc/Library/Developer/Xcode/DerivedData/tnsngfirebasetest-darwhbrwnocxeldyszqeyoxotdvt/Build/Products/Debug-iphonesimulator/nanopb'
ld: warning: linking ObjC for iOS Simulator, but dylib (/Users/lc/Dev/tns-ng-firebase-test/platforms/ios/internal/NativeScript.framework/NativeScript) was compiled for MacOSX
ld: warning: linking ObjC for iOS Simulator, but dylib (/Users/lc/Dev/tns-ng-firebase-test/node_modules/nativescript-plugin-firebase/platforms/ios/TNSMLKitCamera.framework/TNSMLKitCamera) was compiled for MacOSX
ld: warning: linking ObjC for iOS Simulator, but dylib (/Users/lc/Dev/tns-ng-firebase-test/node_modules/nativescript-ui-listview/platforms/ios/TNSListView.framework/TNSListView) was compiled for MacOSX
ld: warning: linking ObjC for iOS Simulator, but dylib (/Users/lc/Dev/tns-ng-firebase-test/node_modules/nativescript-ui-core/platforms/ios/TNSCore.framework/TNSCore) was compiled for MacOSX
ld: warning: ObjC dylib (/Users/lc/Dev/tns-ng-firebase-test/node_modules/tns-core-modules-widgets/platforms/ios/TNSWidgets.framework/TNSWidgets) was compiled for iOS Simulator, but dylibs others were compiled for MacOSX
ld: warning: Auto-Linking framework not found CoreServices
tns doctor
says my environment is good:
✔ Getting environment information
No issues were detected.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 9.4.1 satisfies minimum required version 9.
✔ Getting NativeScript components versions information...
✔ Component nativescript has 5.0.3 version and is up to date.
✔ Component tns-core-modules has 5.0.5 version and is up to date.
✔ Component tns-android has 5.0.0 version and is up to date.
✔ Component tns-ios has 5.0.0 version and is up to date.
Environment nativescript-angular: ~7.0.0 nativescript-firebase-plugin: ~7.4.0 tns: 5.0.3 angular: ~7.0.0 webpack: ~7.0.0 xcode: 9.4.1 (was originally 10.1)
Steps to reproduce
- Run
tns create my-app-name --template tns-template-master-detail-ng
- Run
tns platform add ios
- Run
tns run ios --bundle
iOS always produces the same result, but Android always builds perfectly.
Troubleshooting
- Delete everything and start again
- Try
tns platform remove ios
thentns platform add ios
- Downgrade xcode from 10 to 9.4
- Ensure pod is up to date with
pod repo update
,pod update
andpod install
- Try
tns run ios --bundle --clean
- Try on a different computer (3 systems producing the same result actually)
- Open project directly with Xcode and try building
No matter what I do it’s the same result unfortunately.
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
'ld: warning: directory not found for option' - Stack Overflow
You need to do this: Click on your project (targets); Click on Build Settings. if your error includes the -L flag, then delete...
Read more >ld: warning: directory not found | Apple Developer Forums
After upgrading an existing swift project I am seeing the following warning when it builds the tests: ld: warning: directory not found for...
Read more >Authenticate Using Apple | Firebase - Google
You can let your users authenticate with Firebase using their Apple ID by using the Firebase SDK to carry out the end-to-end OAuth...
Read more >Unity IOS Xcode Build Error: directory not found for option
Coding example for the question Unity IOS Xcode Build Error: directory not found for option.
Read more >Build Failed: Cocoapods - Unity Forum
Reason: 'pod' command not found; unable to generate a usable Xcode project. ... 18656: [xcode] ld: warning: directory not found for option ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI build error may be experienced because of an upstream issue in the Firebase iOS SDK as was reported in #1061. I’ve released 7.4.4 to fix that one.
@NickIliev Exactly, but according to their release notes there’s no version between 5.12.0 and 5.13.0, and 5.12.0 seems to work just fine for me (even after a
pod repo update
). And the resolved version inplatforms/ios/Podfile.lock
is indeed5.12.0
.Btw, I just tried building with 5.13.0 and 5.14.0 and there’s a build error when Firestore is added to the firebase plugin config file, so I’ll stick to 5.12.0 until I’ve found a fix for that.