I have a project which was working fine till I was working on my older MacBook. I am now working on new MacBook and the same project gives me build error. My friend also works on the new MacBook with same configuration and os but he is able to build it successfully.
Error on my system is :
<unknown>:0: error: no such file or directory: '/Users/myuser/Library/Developer/Xcode/DerivedData/MyProject-dlhksnilacudcebpmorlzpzlkbid/Build/Intermediates.noindex/MyProject.build/Debug-iphoneos/MyProject.build/DerivedSources/CoreDataGenerated/Model/Model+CoreDataModel.swift'
Command CompileSwiftSources failed with a nonzero exit code
I have navigated to the path
'/Users/myuser/Library/Developer/Xcode/DerivedData/MyProject-dlhksnilacudcebpmorlzpzlkbid/Build/Intermediates.noindex/MyProject.build/Debug-iphoneos/MyProject.build/DerivedSources/CoreDataGenerated/Model'
There I found an unknown folder named "emplate" under which the required file exists.
I have searched the whole project, build settings, build phases, scripts but nowhere I found "emplate".
The CoreData entity Codegen has been specified as "Category/Extension".
Its better if you can install new version xcode or use same version of xcode which your friend is using, i think some path issues with your current xcode
I have got the solution for this. Renamed and Moved Xcode from Desktop to Applications folder, clean the project , removed DerivedData folder. And it works.
Related
I have installed Firebase through the Swift Package Manager for my iOS project, including Crashlytics. I have followed these instructions and added the required script to build phases:
https://firebase.google.com/docs/crashlytics/get-started?platform=ios
So the path for execution is:
"${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"
On start up (iPhone simulator), the app crashes with the following error message:
/Users/[path-to-my-project]/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run: No such file or directory Command PhaseScriptExecution failed with a nonzero exit code
I don't understand why it tries to find the crashlytics script in my Xcode project folder and not in the derived data folder at runtime.
I checked the derived data folder and followed the path. Indeed, the Crashlytics run script is at the expected path.
thanks for any hints in the right direction
In the meantime I've found out that the path to the build folder is set globally in the Xcode preferences. For some reason I don't recall, my build folder has always been in my project folder for all projects I ever worked on in Xcode... I know this for sure because I always add the build folder to .gitignore.
To change the build folder to be a subfolder of your project's derived data folder, go to:
Xcode -> Preferences -> Locations -> Advanced and select the first option.
Firebase assumes that this option is selected by default (maybe it is and I'm the weirdo...).
I am trying to build a universal framework from existing source code in Xcode11.
When I Archive, it fails with following error:
/<unknown>:1:1: no such file or directory: '/Users/apple/SANDBOX/VoiceSampler/#/Users/apple/Library/Developer/Xcode/DerivedData/VoiceSampler-foeghskagbaeclezzbypkqnjnuos/Build/Intermediates.noindex/ArchiveIntermediates/BuildUniversalSDK/IntermediateBuildFilesPath/VoiceSampler.build/Release-iphoneos/UniversalSDK.build/Objects-normal/arm64/UniversalSDK.SwiftFileList'
/:1:1: no such file or directory: '/Users/apple/SANDBOX/VoiceSampler/#/Users/apple/Library/Developer/Xcode/DerivedData/VoiceSampler-foeghskagbaeclezzbypkqnjnuos/Build/Intermediates.noindex/ArchiveIntermediates/BuildUniversalSDK/IntermediateBuildFilesPath/VoiceSampler.build/Release-iphoneos/UniversalSDK.build/Objects-normal/arm64/UniversalSDK.SwiftFileList'
I was able to Archive the same in Xcode 10.3 earlier. Not sure what changed.
Please help me solve this Archive error.
I don't know if it helps, but for me it happens when I run the Swift compiler manually from inside XCode (a script which builds a separate Swift framework). XCode sets the environment variable SWIFT_RESPONSE_FILE_PATH_normal_x86_64 (variant and architecture) which points to that particular missing .SwiftFileList file. Unsetting this environmant variable solved the issue for us.
This is how we unset it in the external script:
for V in ${BUILD_VARIANTS}; do
for A in ${ARCHS}; do
unset SWIFT_RESPONSE_FILE_PATH_${V}_${A}
done
done
For me the issue was related with using the legacy build system instead of the new one (in Xcode 11). Once I switched to the New Build System (in File -> Workspace/Project Settings), these new lines started to appear in the build log:
WriteAuxiliaryFile /Users/.../XXXXXX.SwiftFileList (in target 'XXXX' from project 'XXX')
Getting compilation error in xamarin.iOS project-
/Users/gsps/Desktop/MyFolder/projectName/iOS/bin/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/projectName.iOS.app:
Error: ${ProjectDir}: No such file or directory (projectName.iOS)
I have Cleaned, Rebuild & Restarted machine but this didn't solved my problem. When I am going to the given location finding the same file that looks like deleted or corrupted(See screenshot). I have recently updated Xamarin & xCode to latest version.
Error screenshot below:
File/Directory screenshot below:
I am answering my question. After searching a lot I found that In iOS Bundle Signing, I have declared Additional Argument as ${ProjectDir}. When I removed It, I have compiled my project successfully.
I recently renamed my Xcode application and did all the changes required in Xcode settings. I manually renamed the folders. But now when I run the application, build fails. Error I get is no files found by clang. In the Build Phases, under Compile sources, the file path shown is "New_project_Name/Old_project_Name/New_project_Name/file.m" whereas it should be "New_project_Name/New_project_Name/file.m"
I have searched for many different solutions/workarounds & none have helped till now.
I have installed Xcode 4.5 (no previous phonegap version installed). I have downloaded,extracted and created project by Phonegap tutorial : http://docs.phonegap.com/en/2.1.0/guide_getting-started_ios_index.md.html#Getting%20Started%20with%20iOS
After the terminal command : ./create myproject ~/Desktop/myproject com.test.myproject I have successfly created structure.
Than i launch xcode and wanna Play this example project. Xcode build Fails and says:
Lexical or proccessor issue 'Cordova/CDVViewController.h' file not found
I tried to add this missing header in to classes folder, repaired the import syntax, but still same problem.
Does anybody solved this problem?/HOW?
After many attempts I decided to read Readme.md and solve the problem using ./update_cordova_subproject!
Create project using:
./create ~/Desktop/project com.example.project project
Update cordova subproject reference:
./update_cordova_subproject ~/Desktop/project/project.xcodeproj
Build successfull now!