Cocoapods headers not found when building application - ios

For the past few days I've been attempting to build an application, which keeps failing and gives the message "file not found". My friend is able to build the application on his computer, but I've tried on 3 computers and all 3 have been giving me the same error. I've tried uninstalling & reinstalling the cocoapods gem, deleting the pods and podfile.lock and reinstalling & upgrading pods without any luck. When I go into the pods folder, I see all the files, and it even autocompletes the file name in the prefix.pch file (Where the issue occurs). I'm using the same cocoapods as my friend (v0.34.4) & Xcode v6.1.
Also worth noting - the XCTest.framework, Tests.xctest and the libpods (but not the expanded pods folders) are all red.
Here's the error I get when compiling:
ProcessPCH /Users/name/Library/Developer/Xcode/DerivedData/app-dojnoizofbzbmmeascbukgzbsthh/Build/Intermediates/PrecompiledHeaders/app-Prefix-ahotoqoympyvtcaartebeekroqoj/app-Prefix.pch.pch app/app-Prefix.pch normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/name/app
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c-header -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-cache-path=/Users/name/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -fexceptions -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch -mios-simulator-version-min=7.1 -iquote /Users/name/Library/Developer/Xcode/DerivedData/app-dojnoizofbzbmmeascbukgzbsthh/Build/Intermediates/app.build/Debug-iphonesimulator/appTests.build/appTests-generated-files.hmap -I/Users/name/Library/Developer/Xcode/DerivedData/app-dojnoizofbzbmmeascbukgzbsthh/Build/Intermediates/app.build/Debug-iphonesimulator/appTests.build/appTests-own-target-headers.hmap -I/Users/name/Library/Developer/Xcode/DerivedData/app-dojnoizofbzbmmeascbukgzbsthh/Build/Intermediates/app.build/Debug-iphonesimulator/appTests.build/appTests-all-target-headers.hmap -iquote /Users/name/Library/Developer/Xcode/DerivedData/app-dojnoizofbzbmmeascbukgzbsthh/Build/Intermediates/app.build/Debug-iphonesimulator/appTests.build/appTests-project-headers.hmap -I/Users/name/Library/Developer/Xcode/DerivedData/app-dojnoizofbzbmmeascbukgzbsthh/Build/Products/Debug-iphonesimulator/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/name/Library/Developer/Xcode/DerivedData/app-dojnoizofbzbmmeascbukgzbsthh/Build/Intermediates/app.build/Debug-iphonesimulator/appTests.build/DerivedSources/x86_64 -I/Users/name/Library/Developer/Xcode/DerivedData/app-dojnoizofbzbmmeascbukgzbsthh/Build/Intermediates/app.build/Debug-iphonesimulator/appTests.build/DerivedSources -F/Users/name/Library/Developer/Xcode/DerivedData/app-dojnoizofbzbmmeascbukgzbsthh/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/Developer/Library/Frameworks -MD -MT dependencies -MF /Users/name/Library/Developer/Xcode/DerivedData/app-dojnoizofbzbmmeascbukgzbsthh/Build/Intermediates/PrecompiledHeaders/app-Prefix-ahotoqoympyvtcaartebeekroqoj/app-Prefix.pch.d -c /Users/name/app/app/app-Prefix.pch -o /Users/name/Library/Developer/Xcode/DerivedData/app-dojnoizofbzbmmeascbukgzbsthh/Build/Intermediates/PrecompiledHeaders/app-Prefix-ahotoqoympyvtcaartebeekroqoj/app-Prefix.pch.pch --serialize-diagnostics /Users/name/Library/Developer/Xcode/DerivedData/app-dojnoizofbzbmmeascbukgzbsthh/Build/Intermediates/PrecompiledHeaders/app-Prefix-ahotoqoympyvtcaartebeekroqoj/app-Prefix.pch.dia
/Users/name/app/app/app-Prefix.pch:17:13: fatal error: 'Parse/Parse.h' file not found
#import <Parse/Parse.h>
^1 error generated.

I finally managed to get the app to build.
Here's what I did:
I went to Product -> Scheme -> Edit Schemes
I subsequently unchecked the box under the Target -> Tests for "Analyze".
As the build had been previously failing at that point, so by unchecking it I was able to run it with no issues. Having spent time using it over the last few hours, I find it to be working normally, and can vouch that the issues mentioned previously by xCode have had no impact on real world usage (product is on market with many users).
Thanks for the folks that previously helped out.

Related

Brand new React Native CLI (2.0.1) project fails on build (iOS)

I'm trying to build a literal brand-new just-initialized project with React Native CLI (latest version) and I get the below avalanche of error messages and the build fails. It's such a massive clump of error messages that my Terminal can't even show the whole thing. Just initialized with npx react-native init, didn't touch it otherwise. Older projects that I built previously build just fine but any new projects I try to build give the same result. I've tried to initialize four new projects and gotten the same result. MacOS Catalina 10.15.7, XCode 11.7, React 16.13.1, React Native 0.63.4, React Native CLI 2.0.1.
Not sure how to produce a minimum reproducible result as this literally is happening with a brand new project.
Have tried restarting my machine, creating five separate brand new RN CLI projects, looking in the XCode derived data folder, seeing if there are any logs.
This started after I tried to fix another error by deleting project files in the DerivedData folder, that's the only thing I can think of that might have caused this.
Here's the first part of the error messages, I can't post the whole thing because of the character limit. The rest of it is in this Google Doc: https://docs.google.com/document/d/1kQ7Wg8EK26ivOqEdz4XIM2dm5Xe33zCvU6kQ7vWyHRw/edit?usp=sharing
noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/Flipper-DoubleConversion-project-headers.hmap -I/Users/owenwexler/Library/Developer/Xcode/DerivedData/WillItBuild-blcmrlwkxskfhxcgewqpvkcvjpxh/Build/Products/Debug-iphonesimulator/Flipper-DoubleConversion/include -I/Users/owenwexler/code/tuts/WillItBuild/ios/Pods/Headers/Private -I/Users/owenwexler/code/tuts/WillItBuild/ios/Pods/Headers/Private/Flipper-DoubleConversion -I/Users/owenwexler/code/tuts/WillItBuild/ios/Pods/Headers/Public -I/Users/owenwexler/code/tuts/WillItBuild/ios/Pods/Headers/Public/Flipper-DoubleConversion -I/Users/owenwexler/Library/Developer/Xcode/DerivedData/WillItBuild-blcmrlwkxskfhxcgewqpvkcvjpxh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/DerivedSources-normal/x86_64 -I/Users/owenwexler/Library/Developer/Xcode/DerivedData/WillItBuild-blcmrlwkxskfhxcgewqpvkcvjpxh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/DerivedSources/x86_64 -I/Users/owenwexler/Library/Developer/Xcode/DerivedData/WillItBuild-blcmrlwkxskfhxcgewqpvkcvjpxh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/DerivedSources -F/Users/owenwexler/Library/Developer/Xcode/DerivedData/WillItBuild-blcmrlwkxskfhxcgewqpvkcvjpxh/Build/Products/Debug-iphonesimulator/Flipper-DoubleConversion -Wno-unreachable-code -include /Users/owenwexler/code/tuts/WillItBuild/ios/Pods/Target\ Support\ Files/Flipper-DoubleConversion/Flipper-DoubleConversion-prefix.pch -MMD -MT dependencies -MF /Users/owenwexler/Library/Developer/Xcode/DerivedData/WillItBuild-blcmrlwkxskfhxcgewqpvkcvjpxh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/Objects-normal/x86_64/bignum.d --serialize-diagnostics /Users/owenwexler/Library/Developer/Xcode/DerivedData/WillItBuild-blcmrlwkxskfhxcgewqpvkcvjpxh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/Objects-normal/x86_64/bignum.dia -c /Users/owenwexler/code/tuts/WillItBuild/ios/Pods/Flipper-DoubleConversion/double-conversion/bignum.cc -o /Users/owenwexler/Library/Developer/Xcode/DerivedData/WillItBuild-blcmrlwkxskfhxcgewqpvkcvjpxh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/Objects-normal/x86_64/bignum.o
CompileC /Users/owenwexler/Library/Developer/Xcode/DerivedData/WillItBuild-blcmrlwkxskfhxcgewqpvkcvjpxh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/Objects-normal/x86_64/bignum-dtoa.o /Users/owenwexler/code/tuts/WillItBuild/ios/Pods/Flipper-DoubleConversion/double-conversion/bignum-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'Flipper-DoubleConversion' from project 'Pods')
cd /Users/owenwexler/code/tuts/WillItBuild/ios/Pods
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target x86_64-apple-ios8.0-simulator -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu++14 -stdlib=libc++ -fmodules -fmodules-cache-path=/Users/owenwexler/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/owenwexler/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DPOD_CONFIGURATION_DEBUG=1 -DDEBUG=1 -DCOCOAPODS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/owenwexler/Library/Developer/Xcode/DerivedData/WillItBuild-blcmrlwkxskfhxcgewqpvkcvjpxh/Index/DataStore -iquote /Users/owenwexler/Library/Developer/Xcode/DerivedData/WillItBuild-blcmrlwkxskfhxcgewqpvkcvjpxh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/Flipper-DoubleConversion-generated-files.hmap -I/Users/owenwexler/Library/Developer/Xcode/DerivedData/WillItBuild-blcmrlwkxskfhxcgewqpvkcvjpxh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/Flipper-DoubleConversion-own-target-headers.hmap -I/Users/owenwexler/Library/Developer/Xcode/DerivedData/WillItBuild-blcmrlwkxskfhxcgewqpvkcvjpxh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/Flipper-DoubleConversion-all-non-framework-target-headers.hmap -ivfsoverlay /Users/owenwexler/Library/Developer/Xcode/DerivedData/WillItBuild-blcmrlwkxskfhxcgewqpvkcvjpxh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/all-product-headers.yaml -iquote /Users/owenwexler/Library/Developer/Xcode/DerivedData/WillItBuild-blcmrlwkxskfhxcgewqpvkcvjpxh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/Flipper-DoubleConversion-project-headers.hmap

Ld linker fails with absolute addressing error even though PIE is enabled

For the past few days I've dealing with an issue I couldn't get my head around. I'm trying to build an old (6 years!) iOS game project of mine and the linker fails with the following error:
Absolute addressing not allowed in arm64 code but used in '-[Snip snap]' referencing '_NSFileModificationDate' for architecture arm64
The referred class does call NSDictionary -objectForKey: with NSFileModificationDate as parameter. It's an Objective-C++ source file since it does include C++ code.
So as I far as I understand, the linker considers that I compiled my sources to be position-dependent and fails, as intended with arm64. But why is that?
What I've tried or checked so far:
Build settings:
Linking > Generate Position-Dependent Executable: NO
Linking > Other Linker Flags: -all_load -ObjC
Apple Clang - Code Generation > Generate Position-Dependent Code: NO
do clean and delete DerivedData folder before rebuilding after any changes
removed all third-party both static and dynamic libraries. I'm just using a few Apple frameworks
removed any source files which were including asm code
looked for any unknown-to-me preprocessor directives
recreated the whole project from scratch and copying my source files in it, to make sure my older project has broken settings
any .m or .mm source files which includes a constant just like that NSFileModificationDate will fail at linking
otool -hv gives:
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC_64 ARM64 ALL 0x00 OBJECT 4 3000 SUBSECTIONS_VIA_SYMBOLS
Here is the compilation command for the faulty file (sorry, that's verbose):
CompileC SNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/Objects-normal/arm64/Snip.o SNIPDesktop/SNIP/SNIP/Classes/App/Snip.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target: SNIP)
cd SNIPDesktop/SNIP/SNIP
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c++ -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu++14 -stdlib=libc++ -fmodules -gmodules -fmodules-cache-path=SNIPLibrary/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=SNIPLibrary/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -Wno-c++11-extensions -DDEBUG=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -miphoneos-version-min=12.0 -g -fvisibility-inlines-hidden -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -fembed-bitcode-marker -index-store-path SNIP/Index/DataStore -iquote SNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/SNIP-generated-files.hmap -ISNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/SNIP-own-target-headers.hmap -ISNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/SNIP-all-target-headers.hmap -iquote SNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/SNIP-project-headers.hmap -ISNIP/Build/Products/Debug-iphoneos/include -ISNIPDesktop/SNIP/SNIP/External -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/include/libxml2 -ISNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/DerivedSources/arm64 -ISNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/DerivedSources -FSNIP/Build/Products/Debug-iphoneos -include SNIP/Build/Intermediates.noindex/PrecompiledHeaders/SharedPrecompiledHeaders/12134743132148408221/SNIP_prefix.pch -MMD -MT dependencies -MF SNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/Objects-normal/arm64/Snip.d --serialize-diagnostics SNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/Objects-normal/arm64/Snip.dia -c SNIPDesktop/SNIP/SNIP/Classes/App/Snip.mm -o SNIP/Build/Intermediates.noindex/SNIP.build/Debug-iphoneos/SNIP.build/Objects-normal/arm64/Snip.o
What am I missing? What other clues should I look for? Is there any warning messages I should check?
Thanks for your much-appreciated help!

iRate Compile Error with Swift

I am using the latest version of iRate with Swift, trying to compile my project for App Store submission.
iRate installation isn't very complicated - you drag two (optionally 3) files into your Project and then include the iRate.h file in a bridging header.
However, when I go to compile, I'm getting a Apple LLVM 6.0 Error about compiling the iRate.m file.
I've checked and the iRate.m is assigned to my project under Target Membership.
Can anyone please help?
CompileC /Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/Objects-normal/armv7/iRate.o DA/iRate.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd "/Users/Dan/Projects/learn/DA"
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-cache-path=/Users/Dan/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -fprofile-instr-use=/Users/Dan/Projects/learn/DA/OptimizationProfiles/DA.profdata -miphoneos-version-min=8.1 -iquote /Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/DA-generated-files.hmap -I/Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/DA-own-target-headers.hmap -I/Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/DA-all-non-framework-target-headers.hmap -ivfsoverlay /Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/all-product-headers.yaml -iquote /Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/DA-project-headers.hmap -I/Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/BuildProductsPath/Release-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/DerivedSources/armv7 -I/Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/DerivedSources -F/Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/BuildProductsPath/Release-iphoneos -MMD -MT dependencies -MF /Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/Objects-normal/armv7/iRate.d --serialize-diagnostics /Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/Objects-normal/armv7/iRate.dia -c /Users/Dan/Projects/learn/DA/DA/iRate.m -o /Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/Objects-normal/armv7/iRate.o
error: Could not read profile: No such file or directory
1 error generated.
As suggested by Michael Dautermann, removing the reference under the Optimization Profile File key found in Xcode > Project > Build Settings under the Apple LLVM 6.0 - Code Generation section.
I am new to Xcode and, at one point, had selected Product > Perform Action > Generate Optimization Profile menu option.
While I ended up aborting (read: I never finished generating the optimization profile), it apparently populated the Optimization Profile File key, which caused my error when I went to Archive.

Archive apple LLVM 6.0 error could not read profile

When in device test it's ok. But when I want to archive, xcode give the error like this.
error: Could not read profile: No such file or directory
it is the errors
CompileC /Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/Objects-normal/armv7/UIColor+Extension.o jinbi/Views/NavigationMenuView/UIColor+Extension.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /wikimo/project/iyoo-ios-app
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-cache-path=/Users/wikimo/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -fprofile-instr-use=/wikimo/project/iyoo-ios-app/OptimizationProfiles/jinbi.profdata -miphoneos-version-min=6.1 -iquote /Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/哎呦瘦了-generated-files.hmap -I/Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/哎呦瘦了-own-target-headers.hmap -I/Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/哎呦瘦了-all-target-headers.hmap -iquote /Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/哎呦瘦了-project-headers.hmap -I/Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/BuildProductsPath/Release-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/DerivedSources/armv7 -I/Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/DerivedSources -F/Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/BuildProductsPath/Release-iphoneos -include /Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/PrecompiledHeaders/jinbi-Prefix-gdlmasukgjdlutbqrcfgpdbwoxhr/jinbi-Prefix.pch -MMD -MT dependencies -MF /Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/Objects-normal/armv7/UIColor+Extension.d --serialize-diagnostics /Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/Objects-normal/armv7/UIColor+Extension.dia -c /wikimo/project/iyoo-ios-app/jinbi/Views/NavigationMenuView/UIColor+Extension.m -o /Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/Objects-normal/armv7/UIColor+Extension.o
because the
/Users/wikimo/Library/Developer/Xcode/DerivedData/jinbi-anvflcahmvfrbchckuahzoashzvm/Build/Intermediates/ArchiveIntermediates/jinbi/IntermediateBuildFilesPath/jinbi.build/Release-iphoneos/jinbi.build/Objects-normal/armv7/UIColor+Extension.o
can not generate. How can I generate?
Targets -> Valid Architectures has already added armv7 architecture
Here is the solution if any one want.....
Go to Project -> Build Setting -> Apple LLVM 6.0-code generation
and clear Optimization Profile File
Clean Your project.....Build your project and archive your project....and you are done....
Endorsing [El Captain][1] response using LLVM 8.0:
Go to Project → Build Setting → Apple LLVM 8.0-code generation
Clear the Optimization Profile File
Clean project
Build project
Select App targets. Right click on the test target and delete it.
Clean your project and Run.
Simply follow this steps:
Clean your project
Remove derived data
Go to Targets -> Valid Architectures & add armv7 architecture
Build & Run your project
Hope it will work for you.
Go to Project → Build Setting → Search "OptimizationProfiles"
Clear the Optimization Profile File
Clean project (Command + K)
Build project (Command + B)

apple llvm 5.1 error clang

while building my app it gives me APPLE LLVM 5.1 error
The description of error is given below,
ProcessPCH /Users/ankit/Library/Developer/Xcode/DerivedData/GoogleAPIParsing-blyffdbdszklenaxwqqnwiriiqjr/Build/Intermediates/PrecompiledHeaders/GoogleAPIParsing-Prefix-gwcwubtrxmgndfbvpagazcbdlfnr/GoogleAPIParsing-Prefix.pch.pch GoogleAPIParsing/GoogleAPIParsing-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/ankit/Desktop/Projects/GoogleAPIParsing
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c-header -arch i386 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-cache-path=/Users/ankit/Library/Developer/Xcode/DerivedData/ModuleCache -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -fexceptions -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch -mios-simulator-version-min=7.1 -iquote /Users/ankit/Library/Developer/Xcode/DerivedData/GoogleAPIParsing-blyffdbdszklenaxwqqnwiriiqjr/Build/Intermediates/GoogleAPIParsing.build/Debug-iphonesimulator/GoogleAPIParsing.build/GoogleAPIParsing-generated-files.hmap -I/Users/ankit/Library/Developer/Xcode/DerivedData/GoogleAPIParsing-blyffdbdszklenaxwqqnwiriiqjr/Build/Intermediates/GoogleAPIParsing.build/Debug-iphonesimulator/GoogleAPIParsing.build/GoogleAPIParsing-own-target-headers.hmap -I/Users/ankit/Library/Developer/Xcode/DerivedData/GoogleAPIParsing-blyffdbdszklenaxwqqnwiriiqjr/Build/Intermediates/GoogleAPIParsing.build/Debug-iphonesimulator/GoogleAPIParsing.build/GoogleAPIParsing-all-target-headers.hmap -iquote /Users/ankit/Library/Developer/Xcode/DerivedData/GoogleAPIParsing-blyffdbdszklenaxwqqnwiriiqjr/Build/Intermediates/GoogleAPIParsing.build/Debug-iphonesimulator/GoogleAPIParsing.build/GoogleAPIParsing-project-headers.hmap -I/Users/ankit/Library/Developer/Xcode/DerivedData/GoogleAPIParsing-blyffdbdszklenaxwqqnwiriiqjr/Build/Products/Debug-iphonesimulator/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/ankit/Library/Developer/Xcode/DerivedData/GoogleAPIParsing-blyffdbdszklenaxwqqnwiriiqjr/Build/Intermediates/GoogleAPIParsing.build/Debug-iphonesimulator/GoogleAPIParsing.build/DerivedSources/i386 -I/Users/ankit/Library/Developer/Xcode/DerivedData/GoogleAPIParsing-blyffdbdszklenaxwqqnwiriiqjr/Build/Intermediates/GoogleAPIParsing.build/Debug-iphonesimulator/GoogleAPIParsing.build/DerivedSources -F/Users/ankit/Library/Developer/Xcode/DerivedData/GoogleAPIParsing-blyffdbdszklenaxwqqnwiriiqjr/Build/Products/Debug-iphonesimulator -F/Users/ankit/Documents/FacebookSDK --serialize-diagnostics /Users/ankit/Library/Developer/Xcode/DerivedData/GoogleAPIParsing-blyffdbdszklenaxwqqnwiriiqjr/Build/Intermediates/PrecompiledHeaders/GoogleAPIParsing-Prefix-gwcwubtrxmgndfbvpagazcbdlfnr/GoogleAPIParsing-Prefix.pch.dia -MMD -MT dependencies -MF /Users/ankit/Library/Developer/Xcode/DerivedData/GoogleAPIParsing-blyffdbdszklenaxwqqnwiriiqjr/Build/Intermediates/PrecompiledHeaders/GoogleAPIParsing-Prefix-gwcwubtrxmgndfbvpagazcbdlfnr/GoogleAPIParsing-Prefix.pch.d -c /Users/ankit/Desktop/Projects/GoogleAPIParsing/GoogleAPIParsing/GoogleAPIParsing-Prefix.pch -o /Users/ankit/Library/Developer/Xcode/DerivedData/GoogleAPIParsing-blyffdbdszklenaxwqqnwiriiqjr/Build/Intermediates/PrecompiledHeaders/GoogleAPIParsing-Prefix-gwcwubtrxmgndfbvpagazcbdlfnr/GoogleAPIParsing-Prefix.pch.pch
GoogleAPIParsing/GoogleAPIParsing-Prefix.pch'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
Please help.
Thanks in advance
I found my mistake,
i accidentally deleted my .pch and .plist files and when i added it manually xcode showed me this error , so i had to manually add those files in my project.
Probably in your project there are ‘release’ or ‘retain’ and I guess you are using ARC (Automatic Reference Counting) in your Xcode projects, but you haven't change your flags.
I also recommend you to check this link; http://blog.evanmulawski.com/?p=36

Resources