Xcode path to Prefix Header - new target - ios

In my original target, for Prefix Header in build settings I have this:
AppName/Supporting Files/AppName-Prefix.pch
I added a new target, for which I want to have a different prefix header.
So I made this the path for the 2nd target:
AppNameTwo/Supporting Files/AppNameTwo-Prefix.pch
However I get build errors:
clang: error: no such file or directory: '/path/AppName/AppName2/Supporting Files/AppName-Prefix.pch
Why is it inserting "AppName" into the path, before /AppName2?
The folders AppName and AppName2 are both in the root of my project, in the same directory as the AppName.xcodeproj file.

${PROJECT_DIR}/AppNameTwo/Supporting Files/AppNameTwo-Prefix.pch has worked for me in a similar situation.

Related

Xcode10 error: can't exec (No such file or directory) for a user defined build setting

I get the "error: can't exec (No such file or directory)" when building a project with a user-defined build setting which is a path to a script. The project builds in Xcode 9.
ld = $(USER_LIBRARY_DIR)/Application\ Support/BlackBerry/Good.platform/iOS/FIPS_module/$FIPS_PACKAGE/bin/gd_fipsld
gives
error: can't exec '/Users/username/Library/Application\ Support/BlackBerry/Good.platform/iOS/FIPS_module/arm64.sdk/bin/gd_fipsld' (No such file or directory)
How to fix it?
In Xcode10 the new build system doesn’t support the tilde(~) character which is replaced with $(HOME) in the path.
Before: ~/Library/Application Support/BlackBerry/Good.platform/iOS/FIPS_module/$FIPS_PACKAGE/bin/gd_fipsld
After: $(HOME)/Library/Application Support/BlackBerry/Good.platform/iOS/FIPS_module/$FIPS_PACKAGE/bin/gd_fipsld
Note: The changes needs to be made in default.xcconfig file.

Why does React/RCTAssert.h' file remain unfound even after fixing header search paths

I am literally stuck with this error React/RCTAssert.h' file not found ,I followed other questions suggesting that the header search path could be wrong for test target.
Hence I even deleted the test target
srcroot = /Users/shyamnath/Desktop/apps/xxx/ios
//:configuration = Debug
HEADER_SEARCH_PATHS =
$(inherited)
$(SRCROOT)/../node_modules/react-native-splash-screen/ios
$(SRCROOT)/../node_modules/react-native-device-info/RNDeviceInfo
$(SRCROOT)/../node_modules/react-native/React
$(SRCROOT)/../node_modules/react-native-aes-kit/ios/RCTAesCrypto/**
//:configuration = Release
HEADER_SEARCH_PATHS =
$(inherited)
$(SRCROOT)/../node_modules/react-native-splash-screen/ios
$(SRCROOT)/../node_modules/react-native-device-info/RNDeviceInfo
$(SRCROOT)/../node_modules/react-native/React
$(SRCROOT)/../node_modules/react-native-aes-kit/ios/RCTAesCrypto/**
//:completeSettings = some
HEADER_SEARCH_PATHS
Is there anything visibly wrong with the header search paths that are shown above?
I tried cleaning the project and rebuilding it but nothing seems to solve it.
The files under the project directory are as follows,
android
index.js
package-lock.json
app
ios
package.json
app.json
node_modules
yarn.lock
Could it be because the node_modules folder is not within ios?
and the srcroot being /Users/shyamnath/Desktop/apps/xxx/ios
The same issue I had faced, Solved by adding the path to the Project target and Test Target.
$(SRCROOT)/../node_modules/react-native/React
So follow the step :
'AwesomeProject' -> AwesomeProject(Target) -> Build Settings -> Header Search
Path
`$(SRCROOT)/../node_modules/react-native/React`
And add the above path as recursive if not there.
'AwesomeProject' -> AwesomeProjectTest(Target) -> Build Settings -> Header Search
Path
`$(SRCROOT)/../node_modules/react-native/React`
And add the above path as recursive.
I have referred to the answer.
Hope this will help someone.

No such file or directory when generate framework

When I make a new framework with aggregate to generate universal framework , but a error present , as follow :
cp: build/Release-iphoneos/TEST.framework/: No such file or directory
fatal error: lipo: can't open input file: build/Release-iphoneos/TEST.framework/TEST (No such file or directory)
Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure
And here is a screenshot of the error:
This is a new target , I only want to test generate framework , but fail!
As the error message said, no TEST.framework can be found in the path <PROJECT_DIR>/build/Release-iphoneos/TEST.framework.
You need to check the script you use, or the blog post which you reference is out-date.
First you should build the target specified in xcodebuild command directly to see if it can build succeed.
Check what the actual build path is. If the path(build/) is not exist, you can try to specified the build path for xcodebuild, OBJROOT=${WRK_DIR} SYMROOT=${WRK_DIR}

Xcode 7.2 - clang: error: no such file or directory:

I keep trying to run my Xcode project titled 'Simple Calculator' and it keeps giving me the following error,
clang: error: no such file or directory:
'/Users/computerscienceyr1/Desktop/Simple Calculator/Simple
Calculator/ViewController.m'
Here is a screenshot of the whole issue Screenshot.
Each time I create a 'Simple Calculator' Directory, the error extends into: '/Users/computerscienceyr1/Desktop/Simple Calculator/Simple Calculator/Simple Calculator/ViewController.m' and goes on and on.
**UPDATED**
This is what happens when double clicked Screenshot.
Targets> Build Phases> Compile Sources - File exists.
Removed ViewController.m and others again. No changes occurred.
Try this: open the .pbxproj file, search for the file name and delete the rows where it appears, then add the file again to your project.
This post may help you as well.

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit

I am facing the following error in my application.
clang: error: no such file or directory: '/Users/madhavadudipalli/Desktop/ ios projects/Little Flower Public School /Little Flower Public School Ipad/Little Flower Public S chool HD-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 tell me what does this mean and what should I do to resolve this one. Been sometime since I have stuck on this one. Kindly Guide me where am I going wrong here.
Thanks in advance.
Following steps fixed this problem:
Issue: Compiler unable to locate Little Flower Public S chool HD-Prefix.pch file. This is because Location of Prefix Header file Little Flower Public S chool HD-Prefix-Prefix.pch in Project Target is incorrect.
The location is defined in Project Target/Build setting. You will need to go to:
Project Target -> Build Settings Tab -> Scroll down and Look for "Apple LLVM Compiler 5.1 - Language" Underneath this node -> You will find the key/value setting for Prefix Header file.
Normally Prefix header file is located under "Supporting File" Folder in your project

Resources