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

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.

Related

build_iphone.sh: line 52: /Users/.../pocketsphinx-master/configure: No such file or directory

I'm on macOS Mojave in terminal, and I'm getting an error that says no such file or directory for the directory ".../pocketsphinx-master/configure" when I run build_iphone.sh, which I got from this repository: cmusphinx/pocketsphinx-ios-demo.
The instructions for pocketsphinx found at this repository -- cmusphinx/pocketsphinx gives these instructions to use pocketsphinx with Xcode. Here's part of what it says, which I don't understand:
Pocketsphinx uses the standard unix autogen system, you can build pocketsphinx with automake given you already built sphinxbase You just need to pass correct configure arguments, set compiler path, set sysroot and other options. After you build the code you need to import dylib file into your project and you also need to configure includes for your project to find sphinxbase headers.
Here is what my terminal on my Mac mini looks like:
Daniels-Mac-mini:pocketsphinx-master shinehah$ sh build_iphone.sh
building arm64...
build_iphone.sh: line 52: /Users/shinehah/cmusphinx/pocketsphinx-master/configure: No such file or directory
I created that directory, but I still get the same error message. What do I need to put in that directory?
In build_iphone.sh, line 52, it says:
--host="${HOST_TYPE}" \
Here is the code segment it is from:
$CWD/configure
--host="${HOST_TYPE}" // line 52
--prefix="$DEST/$ARCH"
--without-lapack
--without-python
--with-sphinxbase="$SPHINXBASE_DIR"
|| exit 1

when i build "gomobile bind" a go project with opencv4 ,error come ,how can i solve

Gomobile bind error
The array mean what, Anybody ever had this problem?
go build -tags ios -buildmode=c-archive -o/var/folders/vp/3ztk4jzn3hq35qfmp3qwrfm80000gp/T/gomobile-work135205628/faceTest-arm.a gobind failed: exit status 2
# gocv.io/x/gocv
In file included from calib3d.cpp:1:
In file included from ../../../../../gocv.io/x/gocv/calib3d.h:5:
In file included from /usr/local/Cellar/opencv/4.0.0/include/opencv4/opencv2/opencv.hpp:52:
In file included from /usr/local/Cellar/opencv/4.0.0/include/opencv4/opencv2/core.hpp:52:
/usr/local/Cellar/opencv/4.0.0/include/opencv4/opencv2/core/cvdef.h:659:10:
fatal error: 'array' file not found

use Pod instead of import Parse and Bolts framework

Currently I have a project and import Parse and Bolts framework manually.
I want to use Pod to instead of manually import. After Pod install, Build project is fine.
However, When I use simulator to run project then get below error message
fatal error: lipo: input file (/Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Bolts.framework/Bolts) must be a fat file when the -extract option is specified
fatal error: lipo: can't open input file: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Bolts.framework/Bolts-x86_64 (No such file or directory)
mv: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Bolts.framework/Bolts-merged: No such file or directory
rm: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Bolts.framework/Bolts-x86_64: No such file or directory
fatal error: lipo: input file (/Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Parse.framework/Parse) must be a fat file when the -extract option is specified
fatal error: lipo: can't open input file: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Parse.framework/Parse-x86_64 (No such file or directory)
mv: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Parse.framework/Parse-merged: No such file or directory
rm: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Parse.framework/Parse-x86_64: No such file or directory
use simulator run app will display error message, after clear and re-run will success. However, stop simulator and re-run will fail. That means, every time run simulator I have to clear first. Have any expert can help ? (xcode 7.3.1)

React Native: Bundle Identifier does not exist

I have a project in React Native that has two different build schemes and uses cocoapods. To compile it I run:
react-native run-ios --scheme="RNProject-(SCHEME_NAME)"
The resulting apps are for example:
./build/Build/Products/Debug/iphonesimulator/RNProject-customer1.app
./build/Build/Products/Debug/iphonesimulator/RNProject-customer2.app
Using the command it builds for one of the build schemes, but not for the other
Xcode always builds the project for both build schemes
Furthermore, build/Build/Products/Debug-iphonesimulator/RNProject-customer1.app/Info.plist exists in that path and the file contains valid CFBundleIdentifier (it matches General > Identity > Bundle Identifier for each of the two build schemes)
Project settings seem to be correct for both schemes (after checking ios/RNProject.xcodeproj/project.pbxproj)
Schema-specific settings are located in ios/Pods/Target Support Files/Pods-RNProject-customer1 and ios/Pods/Target Support Files/Pods-RNProject-customer2
I tried different ways to solve it:
Running sudo react-native
Restarting RN packager
Manually editing Info.plist
Changing build locations
Console:
** BUILD SUCCEEDED **
Installing build/Build/Products/Debug-iphonesimulator/RNProject.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
child_process.js:509
throw err;
^
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/RNProject.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
at checkExecSyncError (child_process.js:486:13)
at Object.execFileSync (child_process.js:506:13)
at ChildProcess.xcodeBuildProcess.on.code (node_modules/react-native/local-cli/runIOS/runIOS.js:109:36)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:852:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
The problem was with how React Native names labels the executable files.
My Xcode project created two executable files with different names based on Xcode project settings.
React Native on the other hand forms the executable filename from .xcworkspace filename in this script (./node_modules/react-native/local-cli/runIOS/runIOS.js:57):
const inferredSchemeName = path.basename(xcodeProject.name, path.extname(xcodeProject.name));
The two approaches are different and lead to two different executable file names (e.g. Xcode build/Build/Products/Debug-iphonesimulator/RNProject-customer1.app vs React Native build/Build/Products/Debug-iphonesimulator/RNProject.app).
I had set custom value for inferredSchemeNameto match the filename created by Xcode.
My solution is similar:
open ./node_modules/react-native/local-cli/runIOS.js file
change the build path from:
const getBuildPath = function(configuration = 'Debug', appName, isDevice) {
return `build/Build/Products/${configuration}-${isDevice ? 'iphoneos' : 'iphonesimulator'}/${appName}.app`;
};
to
const getBuildPath = function(configuration = 'Debug', appName, isDevice) {
return `build/Build/Products/${configuration}-${isDevice ? 'iphoneos' : 'iphonesimulator'}/${appName}.app`;
};
remove "Build" in the path.
I'm using Xcode-beta 8.2

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}

Resources