I am getting this error when I export adhoc build from XCode 10.2
Failed to verify bitcode in BarcodeScannerFramework.framework/BarcodeScannerFramework:
error: Bundle only contains bitcode-marker /var/folders/fj/0lbn1q2s38943yr8x40lsycc0000gn/T/IDEDistributionOptionThinning.~~~SI1oYn/Payload/eslnativescript.app/Frameworks/BarcodeScannerFramework.framework/BarcodeScannerFramework (armv7)
This error is not related to bitcode. It appeared when the framework contained simulator slices (i386 x86_64)
Adding a run script phase to build phases of the target with following code helped in getting rid of the error.
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
# This script loops through the frameworks embedded in the application and removes unused architectures.
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
EXTRACTED_ARCHS=()
for ARCH in $ARCHS
do
echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done
echo "Merging extracted architectures: ${ARCHS}"
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[#]}"
rm "${EXTRACTED_ARCHS[#]}"
echo "Replacing original executable with thinned version"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"
done
Credits: http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/
Related
I have a github action for macos that needs to download a dmg archive, extract binaries
and re-configure binaries so that they can run and link to the downloaded .dylib library. Below is the script I am using.
Unfortunately, when I run the binary (kdu_expand) I get an error
/Users/runner/work/_temp/92b88adb-5bec-4d13-a51d-85fdf4e84e8d.sh: line 16: 1603 Killed: 9 ./kdu_expand -version
Error: Process completed with exit code 137.
Is this the correct way of re-configuring the binary to link to the dynamic library ?
wget -q http://kakadusoftware.com/wp-content/uploads/KDU805_Demo_Apps_for_MacOS_200602.dmg_.zip
mkdir kdu && mv KDU805_Demo_Apps_for_MacOS_200602.dmg_.zip kdu && cd kdu
7z e KDU805_Demo_Apps_for_MacOS_200602.dmg_.zip
7z e KDU805_Demo_Apps_for_MacOS_200602.dmg 2>/dev/null || true
7z e Payload~ 2>/dev/null || true
chmod +x kdu_expand
chmod +x kdu_compress
install_name_tool -id ${PWD}/libkdu_v80R.dylib libkdu_v80R.dylib
install_name_tool -change /usr/local/lib/libkdu_v80R.dylib ${PWD}/libkdu_v80R.dylib kdu_compress
install_name_tool -change /usr/local/lib/libkdu_v80R.dylib ${PWD}/libkdu_v80R.dylib kdu_expand
echo "${{ github.workspace }}/kdu" >> $GITHUB_PATH
./kdu_expand -version
Killed: 9 more often than not hints at a codesigning error.
That is, by changing install names you modified the binaries, thus invalidating their code signatures (and in my case, install_name_tool warns me about this).
To fix it, run the following command against each binary you modified:
codesign -s - -f path/to/binary
I'm trying to install the OpenSSL Cocoapod in Xcode 9.4 and I get the following:
[!] /bin/bash -c set -e VERSION="1.0.2h" SDKVERSION=xcrun --sdk
iphoneos --show-sdk-version 2> /dev/null
MIN_SDK_VERSION_FLAG="-miphoneos-version-min=7.0"
BASEPATH="${PWD}" CURRENTPATH="/tmp/openssl" ARCHS="i386 x86_64 armv7
armv7s arm64" DEVELOPER=xcode-select -print-path
mkdir -p "${CURRENTPATH}" mkdir -p "${CURRENTPATH}/bin"
cp "file.tgz" "${CURRENTPATH}/file.tgz" cd "${CURRENTPATH}" tar -xzf
file.tgz cd "openssl-${VERSION}"
for ARCH in ${ARCHS} do CONFIGURE_FOR="iphoneos-cross"
if [ "${ARCH}" == "i386" ] || [ "${ARCH}" == "x86_64" ] ; then
PLATFORM="iPhoneSimulator"
if [ "${ARCH}" == "x86_64" ] ;
then
CONFIGURE_FOR="darwin64-x86_64-cc"
fi else
sed -ie "s!static volatile sig_atomic_t intr_signal;!static volatile intr_signal;!" "crypto/ui/ui_openssl.c"
PLATFORM="iPhoneOS" fi
export
CROSS_TOP="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer"
export CROSS_SDK="${PLATFORM}${SDKVERSION}.sdk"
echo "Building openssl-${VERSION} for ${PLATFORM} ${SDKVERSION}
${ARCH}" echo "Please stand by..."
export CC="${DEVELOPER}/usr/bin/gcc -arch ${ARCH}
${MIN_SDK_VERSION_FLAG}" mkdir -p
"${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk"
LOG="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/build-openssl-${VERSION}.log"
LIPO_LIBSSL="${LIPO_LIBSSL}
${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/lib/libssl.a"
LIPO_LIBCRYPTO="${LIPO_LIBCRYPTO}
${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/lib/libcrypto.a"
./Configure ${CONFIGURE_FOR}
--openssldir="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" > "${LOG}" 2>&1 sed -ie "s!^CFLAG=!CFLAG=-isysroot ${CROSS_TOP}/SDKs/${CROSS_SDK} !" "Makefile"
make >> "${LOG}" 2>&1 make all install_sw >> "${LOG}" 2>&1 make
clean >> "${LOG}" 2>&1 done
echo "Build library..." rm -rf "${BASEPATH}/lib/" mkdir -p
"${BASEPATH}/lib/" lipo -create ${LIPO_LIBSSL} -output
"${BASEPATH}/lib/libssl.a" lipo -create ${LIPO_LIBCRYPTO} -output
"${BASEPATH}/lib/libcrypto.a"
echo "Copying headers..." rm -rf "${BASEPATH}/opensslIncludes/" mkdir
-p "${BASEPATH}/opensslIncludes/" cp -RL "${CURRENTPATH}/openssl-${VERSION}/include/openssl"
"${BASEPATH}/opensslIncludes/"
cd "${BASEPATH}" echo "Building done."
echo "Cleaning up..." rm -rf "${CURRENTPATH}" echo "Done."
cp: file.tgz: No such file or directory
This is the command I'm using in the podfile:
pod 'OpenSSL', '~> 1.0'
I've tried installing the Xcode Command Line Tools but this did not fix the problem.
Anyone have any idea what the problem is?
First things first: If you can, try to switch to a different POD. That one is no longer maintained.
Workaround if you cannot switch:
curl https://www.openssl.org/source/openssl-<your-version>.tar.gz > file.tgz
cp file.tgz /tmp/openssl #create directory if needed
sed 's/cp \\"file.tgz\\" \\"${CURRENTPATH}\/file.tgz\\"//' `find ~/.cocoapods|grep "OpenSSL/<your-version>/OpenSSL.podspec.json"`
pod install
"< your version >" would be e.g. "1.0.2j" for the URL and "1.0.210" for the grep
I am seeing this issue also. Have not been able to resolve. Frustratingly this is happening on a Jenkins slave machine - whereas my own Mac has no issue with 'pod update' and seems to get OpenSSL without problem...
I since found out that the cocoapod-downloader had to be downgraded...for this to install...
https://github.com/FredericJacobs/OpenSSL-Pod/issues/49
I went around with several of the possible solutions, the one that worked for me was to downgrade cocoapods and the downloader. After OpenSSL is installed the pod install is done its fine to go back to the current ones. Exact steps:
sudo gem uninstall cocoapods-downloader
sudo gem install cocoapods-downloader -v 1.2.0
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.5.3
pod deintegrate
rm -rf /tmp/openssl
pod install
While I was trying to install a different cococapod, I got the same error. For me the solution was to downgrade cococapods downloader. This is the commands I used:
sudo gem uninstall cocoapods-downloader
sudo gem install cocoapods-downloader -v 1.2.0
Thnx
Patric's answer works for me. But to make the answer a little bit more clear here:
rm -rf /tmp/openssl; mkdir /tmp/openssl && cd /tmp/openssl;
curl https://www.openssl.org/source/openssl-1.0.2j.tar.gz > file.tgz
cd -;
sed -i 's/cp \\"file.tgz\\" \\"${CURRENTPATH}\/file.tgz\\"//' `find ~/.cocoapods|grep "OpenSSL/1.0.210/OpenSSL.podspec.json"`
pod install
Note:
The pod install spent about 10 minutes on my mac air.
Replace 1.0.2j and 1.0.210 with your proper version if needed.
If you want to try, downgrade the cocoapods and cocoapods-downloader is another solution, please refer here.
update:
just use
pod 'OpenSSL', :git => 'https://github.com/isee15/OpenSSL.git'
replace pod OpenSSL with OpenSSL-XM
or
replace "prepare_command" in find ~/.cocoapods|grep "OpenSSL/1.0.2j/OpenSSL.podspec.json"
with https://github.com/CocoaPods/Specs/blob/3b17051d7e0bbb5c97420a7a6d3aa9b1f6b601db/Specs/3/2/e/OpenSSL-XM/1.0.210.1/OpenSSL-XM.podspec.json
I have been able to compile a specific version of OpenSSL for iOS devices, and I am now trying to compile for Mac OSX. However, when I run my bash script (provided below) I am getting the following error:
ar r ../../libcrypto.a o_names.o obj_dat.o obj_lib.o obj_err.o obj_xref.o
ar: ../../libcrypto.a is a fat file (use libtool(1) or lipo(1) and ar(1) on it)
ar: ../../libcrypto.a: Inappropriate file type or format
When I run lipo -info libcrypto.a I get the following result:
Architectures in the fat file: libcrypto.a are: i386 x86_64
This does not make any sense, as my bash script is only configuring OpenSSL for i386 (I was looping to do both, but removed x86_64 once I started getting these problems).
I have tried following the answers for similar SO questions here and here. However, those yielded the same results. Additionally, the Mac installation instructions on the OpenSSL Wiki were of no help either.
My scripts:
Build.sh
projectDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ARCHS=("i386")
FIPS_VERSION="2.0.12"
OPENSSL_VERSION="1.0.2g"
rm -rf openssl* fips*
if [ -d "out" ]; then
rm -rf out
fi
mkdir out
source ./Build-FIPS.sh
cd $projectDir
source ./Build-OpenSSL.sh
Build-OpenSSL.sh
set -e
function main() {
verifyopenssl
for ((i=0; i < ${#ARCHS[#]}; i++))
do
makeopenssl "${ARCHS[i]}"
done
}
function verifyopenssl() {
gpg --verify $projectDir/../Source/openssl-$OPENSSL_VERSION.tar.gz.asc
tar -zxf $projectDir/../Source/openssl-$OPENSSL_VERSION.tar.gz
cd openssl-$OPENSSL_VERSION
}
function makeopenssl() {
BUILD_ARCH=$1
SDK_NAME="macosx"
GCC=$(xcrun -sdk ${SDK_NAME} -find gcc)
SDK_PATH=$(xcrun -sdk ${SDK_NAME} --show-sdk-path)
MACHINE="darwin-i386-cc"
# BSD_ARCH="BSD-generic32"
CONFIG_ARGS="$MACHINE \
$BSD_ARCH \
--openssldir=$projectDir/out/openssl_${BUILD_ARCH} \
fips \
--with-fipsdir=${projectDir}/out/fips_${BUILD_ARCH} \
no-idea \
no-cast \
no-seed \
no-md2 \
no-sha0 \
no-whirlpool \
-DL_ENDIAN"
export CC="${GCC} -arch ${BUILD_ARCH}"
export CFLAGS="-isysroot ${SDK_PATH} -I ${projectDir}/out/fips_${BUILD_ARCH}/include"
export LDFLAGS="-arch $BUILD_ARCH"
./Configure ${CONFIG_ARGS}
make depend
make
# make install
# make clean && make dclean
}
main $#
Following #jww's answer, I found that changing the following line (around line 69) in the main Makefile (the one in the root folder) solved the ar linking problem that #jww mentioned:
AR= ar $(ARFLAGS) r to AR= libtool -o
Making this change did get me further along in the process. However, I began having other problems. Further "research" led me to the OpenSSL FAQ page which had a question talking about OpenSSL failing to build on Mac. It pointed me to the PROBLEMS file in the root directory of the OpenSSL source code. That file said that there is a MAC ld problem:
This is really a misfeature in ld, which seems to look for .dylib
libraries along the whole library path before it bothers looking for
.a libraries. This means that -L switches won't matter unless OpenSSL
is built with shared library support.
The workaround may be to change the following lines in apps/Makefile
and test/Makefile:
LIBCRYPTO=-L.. -lcrypto
LIBSSL=-L.. -lssl
to:
LIBCRYPTO=../libcrypto.a
LIBSSL=../libssl.a
With this information, I created a patch file for the root Makefile and the Makefile in the apps folder. I also found that I had to comment out the instructions in the main Makefile and the apps/Makefile to build the openssl binary / executable. This should only be necessary if you want to run make install.
The patch files exists at the same level as the Build.sh script. And after fiddling around with my Build-OpenSSL.sh script I was finally able to get it to build for both i386 and x86_64.
For future reference, I am including the complete contents of the two patch files, and the original two script files below.
Build.sh
#!/bin/bash
#
projectDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ARCHS=("i386" "x86_64")
FIPS_VERSION="2.0.12"
OPENSSL_VERSION="1.0.2g"
rm -rf openssl*
if [ -d "out" ]; then
rm -rf out
fi
mkdir out
source ./Build-FIPS.sh
source ./Build-OpenSSL.sh
Build-OpenSSL.sh
#!/bin/bash
#
set -e
function main() {
verifyopenssl
for ((i=0; i < ${#ARCHS[#]}; i++))
do
makeopenssl "${ARCHS[i]}"
done
}
function verifyopenssl() {
gpg --verify $projectDir/../Source/openssl-$OPENSSL_VERSION.tar.gz.asc
tar -zxf $projectDir/../Source/openssl-$OPENSSL_VERSION.tar.gz
cd openssl-$OPENSSL_VERSION
}
function makeopenssl() {
BUILD_ARCH=$1
SDK_NAME="macosx"
GCC=$(xcrun -sdk ${SDK_NAME} -find gcc)
SDK_PATH=$(xcrun -sdk ${SDK_NAME} --show-sdk-path)
if [[ $BUILD_ARCH = "i386" ]]; then
MACHINE="darwin-i386-cc"
NISTP=""
elif [[ $BUILD_ARCH = "x86_64" ]]; then
MACHINE="darwin64-x86_64-cc"
NISTP="enable-ec_nistp_64_gcc_128"
else
exit
fi
CONFIG_ARGS="$MACHINE \
$NISTP \
--openssldir=$projectDir/out/openssl_${BUILD_ARCH} \
fips \
--with-fipsdir=${projectDir}/out/fips_${BUILD_ARCH} \
no-idea \
no-cast \
no-seed \
no-md2 \
no-sha0 \
no-whirlpool \
-DL_ENDIAN"
./Configure ${CONFIG_ARGS}
patch Makefile < ../MainMake.patch
patch apps/Makefile < ../AppMake.patch
make depend
make build_libcrypto build_libssl
make install_sw
make clean && make dclean
patch -R Makefile < ../MainMake.patch
patch -R apps/Makefile < ../AppMake.patch
}
main $#
AppMake.patch
--- apps/Makefile 2016-03-01 06:36:53.000000000 -0700
+++ ../Makefile 2016-05-06 13:00:16.000000000 -0600
## -26,8 +26,8 ##
DLIBCRYPTO=../libcrypto.a
DLIBSSL=../libssl.a
-LIBCRYPTO=-L.. -lcrypto
-LIBSSL=-L.. -lssl
+LIBCRYPTO=../libcrypto.a
+LIBSSL=../libssl.a
PROGRAM= openssl
## -101,24 +101,24 ##
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
install:
- #[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
- #set -e; for i in $(EXE); \
- do \
- (echo installing $$i; \
- cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
- chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
- done;
- #set -e; for i in $(SCRIPTS); \
- do \
- (echo installing $$i; \
- cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
- chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
- mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \
- done
- #cp openssl.cnf $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \
- chmod 644 $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \
- mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf
+ # #[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
+ # #set -e; for i in $(EXE); \
+ # do \
+ # (echo installing $$i; \
+ # cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
+ # chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
+ # mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
+ # done;
+ # #set -e; for i in $(SCRIPTS); \
+ # do \
+ # (echo installing $$i; \
+ # cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
+ # chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
+ # mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \
+ # done
+ # #cp openssl.cnf $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \
+ # chmod 644 $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \
+ # mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf
tags:
ctags $(SRC)
MainMake.patch
--- Makefile 2016-05-06 13:06:11.000000000 -0600
+++ ../Makefile 2016-05-06 13:06:44.000000000 -0600
## -602,8 +602,8 ##
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
- cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
- chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
+ # cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
+ # chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
install_html_docs:
here="`pwd`"; \
ar r ../../libcrypto.a o_names.o obj_dat.o obj_lib.o obj_err.o obj_xref.o
ar: ../../libcrypto.a is a fat file (use libtool(1) or lipo(1) and ar(1) on it)
ar: ../../libcrypto.a: Inappropriate file type or format
ar, libtool and -arch is the reason the answer says "... supplying -arch x86_64 -arch i386 will result in a build failure because of the way OpenSSL's build system forms commands" at Build Multiarch OpenSSL on OS X.
You need to use Apple's libtool, and stop using ar. Apple's libtool knows about architectures, ar does not.
Another small wrinkle is the makefile does something like this, if I recall correctly. It makes it difficult to simply use Apple's libtool, and stop using ar:
$(AR) $(ARFLAGS) $# ...
In many makefiles you can simply make AR="libtool -o", but this case is different because the command comes out libtool -o r libcrypto.a or similar. I also seem to recall something like make AR="libtool" ARFLAGS="r -o $#" does not work well either.
I used to patch the makefile after config to do it.
This is my first time downloading the Haskell Platform on my Mac OS X 10.8.5
I downloaded the Haskell Platform for Mac OS X is 7.10.3 I ran it, but it says:
There are older versions of GHC and/or Haskell Platform on this
system. Run the command line tool uninstall-hs to find out which and
how to remove them.
So I did uninstall-hs, but it says:
Failed. Reason: EroorMissingBundle.
I've also tried
sudo rm -rf /Library/Frameworks/GHC.framework
sudo rm -rf /Library/Frameworks/HaskellPlatform.framework
sudo rm -rf /Library/Haskell
rm -rf ~/.cabal
rm -rf ~/.ghc
rm -rf ~/Library/Haskell
find /usr/bin /usr/local/bin -type l | \
xargs -If sh -c '/bin/echo -n f /; readlink f' | \
egrep '//Library/(Haskell|Frameworks/(GHC|HaskellPlatform).framework)' | \
cut -f 1 -d ' ' > /tmp/hs-bin-links
sudo rm -f `cat /tmp/hs-bin-links`
But I am still getting the same results.
Any suggestions?
It does no harm to leave the older versions around.
The missing bundle stuff looks like it may have to do with new mac security features by the way.
To find out what the commands to run by hand are, you can run uninstall-hs only VERSION --script and that may work.
I want to Install Xcode Project in to iOS Device thru Terminal.I know how to Build Application using xcodebuild clean install this command.I want to launch app in device.Please can any body help me in this task?
I have tried some commands which executes successfully as well but now i am getting the following error when i tried to execute the following command.
xcodebuild -target "GoldenGate" -sdk "iOS 6.1" -configuration Release
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer/
PROJECT="GoldenGate"
SIGNING_IDENTITY="iPhone Developer: Deepak Shukla"
PROVISIONING_PROFILE="${WORKSPACE}/E6FD2816-7827-41AA-AC7E-2DC4833E637C.mobileprovision"
ARCHIVE="$(ls -dt ~/Library/Developer/Xcode/Archives//${PROJECT}.xcarchive|head -1)"
IPA_DIR="${WORKSPACE}"
DSYM="${ARCHIVE}/dSYMs/${PROJECT}.app.dSYM"
APP="${ARCHIVE}/Products/Applications/${PROJECT}.app"
/bin/rm -f "${IPA_DIR}/${PROJECT}.ipa"
/usr/bin/xcrun -sdk iphoneos PackageApplication \
-o "${IPA_DIR}/${PROJECT}.ipa" \
-verbose "${APP}" \
-sign "${SIGNING_IDENTITY}" \
--embed "${PROVISIONING_PROFILE}"
Embedding '/E6FD2816-7827-41AA-AC7E-2DC4833E637C.mobileprovision'
/bin/rm -rf /var/folders/wv/kv98qhfj6v36b2h0fkf_l66w0000gn/T/ouA93u702I/Payload/GoldenGate.app/embedded.mobileprovision
Program /bin/rm returned 0 : []
/bin/cp -rp /E6FD2816-7827-41AA-AC7E-2DC4833E637C.mobileprovision /var/folders/wv/kv98qhfj6v36b2h0fkf_l66w0000gn/T/ouA93u702I/Payload/GoldenGate.app/embedded.mobileprovision
Program /bin/cp returned 1 : [cp: /E6FD2816-7827-41AA-AC7E-2DC4833E637C.mobileprovision: No such file or directory
]
error: Unable to copy '/E6FD2816-7827-41AA-AC7E-2DC4833E637C.mobileprovision' to '/var/folders/wv/kv98qhfj6v36b2h0fkf_l66w0000gn/T/ouA93u702I/Payload/GoldenGate.app/embedded.mobileprovision'
Please help me in this task.
#!/bin/sh
# build.sh
#
# Created by iOSRider on 27/01/2014.
APPLICATION_NAME=MyApp
PROJDIR=/Users/iOSRider/Desktop/MyApp
PROJECT_NAME= MyApp
TARGET_SDK="iphoneos"
PROJECT_BUILDDIR="${PROJDIR}/build/Release-iphoneos"
TARGET_TEST_NAME="MyApp"
BUILD_HISTORY_DIR="/Users/iOSRider/Desktop/MyApp"
DEVELOPPER_NAME="iPhone Distribution: iOSRider India Limited (R8UAKS2M7L)"
PROVISONNING_PROFILE="/Users/iOSRider/Desktop/MyApp/iOS.mobileprovision"
# compile project echo Building Project cd "${PROJDIR}" xcodebuild -target "${PROJECT_NAME}" -sdk "${TARGET_SDK}" -configuration Release
#Check if build succeeded
if [ $? != 0 ] then exit 1 fi
/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${PROJECT_BUILDDIR}/${APPLICATION_NAME}.app" -o "${BUILD_HISTORY_DIR}/${APPLICATION_NAME}.ipa" --sign "${DEVELOPPER_NAME}" --embed "${PROVISONNING_PROFILE}"