I am stuck on getting a Frankified.app running on a device. When I do step 1 on the online tutorial:
xcodebuild -target Frank-Fruitstrap -xcconfig ./Frank/frankify.xcconfig -arch arm7 -configuration Debug -sdk iphoneos DEPLOYMENT_LOCATION=YES DSTROOT="~/Documents/Workspace/Frank-Fruitstrap/Frank/frankified_build/" FRANK_LIBRARY_SEARCH_PATHS="~/Documents/Workspace/Frank-Fruitstrap/Frank" clean build CODE_SIGN_IDENTITY='iPhone Developer: '
and I get this:
** CLEAN SUCCEEDED **
=== BUILD NATIVE TARGET Frank-Fruitstrap OF PROJECT Frank-Fruitstrap WITH CONFIGURATION Debug ===
Check dependencies
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm7, VALID_ARCHS=armv7 armv7s).
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
The codesign works for other apps when I run them from command line, just not a Frankified app.
Am I the only one who has problems with this?
I got help from Pete Hodgeson on this. Here is the post on this google group
This is what Pete Suggested for me:
This is a fairly common project setting issue I think. You should be able to resolve it by modifying the build settings for your Frank-Fruitstrap target. Either change "Build Active Architecture Only" to "No", or add "arm7" to the "Valid Architectures" list.
I did the latter and it worked.
Related
We have always been using the following code in our PR pipeline for years and it worked.
xcodebuild -sdk iphoneos -configuration dev -workspace MyProject.xcworkspace -scheme MyProject_Mu -destination 'platform=iOS Simulator,name=iPhone 8' test -derivedDataPath DerivedData CODE_SIGNING_ALLOWED=NO
Normally, the above code generated .profraw and .profdata at folder: DerivedData/Build/ProfileData/41E444A5-D124-4222-82C2-EB33DCDBF2FC/
Until recently, our hosted agent upgraded from XCode 12 to XCode 13, the above code generates only the .profraw and ends with the error below
warning: DerivedData/Build/ProfileData/41E444A5-D124-4222-82C2-EB33DCDBF2FC/B8590BD3-CF44-4308-95CF-20FBFFEF3568-24496.profraw: Failed to uncompress data (zlib)
error: No profiles could be merged.
We even tried to run this code hoping this would fix the issue:
xcrun llvm-profdata merge DerivedData/Build/ProfileData/*/*.profraw -output generated.profdata
But it does not work. We get the same error
warning: DerivedData/Build/ProfileData/41E444A5-D124-4222-82C2-EB33DCDBF2FC/B8590BD3-CF44-4308-95CF-20FBFFEF3568-24496.profraw: Failed to uncompress data (zlib)
error: No profiles could be merged.
Now our PR pipeline is stuck and we can't work because this script is needed to generate unit test coverage data. And the pipeline is always failing.
I solved the issue by setting GCC_INSTRUMENT_PROGRAM_FLOW_ARCS to NO. For some reason the extra code added by LLVM profiling instrumentation is interfering with the code coverage. I am not sure if this is the expected behavior; I will file a bug and follow up if I have any further information.
I'm having issues with archiving on my CI machine (Jenkins), when running the process manually on the SAME machine but with the Xcode UI, everything works just fine.
The error I get is:
<unknown>:0: error: cannot have input files with file list
** ARCHIVE FAILED **
The following build commands failed:
CompileSwift normal armv7
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
CompileSwift normal arm64
(4 failures)
The original command it's executing on failure is VERY long (68K+ characters), here it is stripped down from all pods/app info:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift #/var/folders/cc/h3hp1kt14rv3j5t_lybwwgqh0000gp/T/arguments-ece6e3.resp # -frontend -c -filelist /var/folders/cc/h3hp1kt14rv3j5t_lybwwgqh0000gp/T/sources-e4a704 -supplementary-output-file-map /var/folders/cc/h3hp1kt14rv3j5t_lybwwgqh0000gp/T/supplementaryOutputs-4e5601 -target arm64-apple-ios10.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk -g -module-cache-path / ... /ModuleCache.noindex -swift-version 4 -O -D RELEASE -serialize-debugging-options ... -module-name APPNAME -num-threads 8 -output-filelist /var/folders/cc/h3hp1kt14rv3j5t_lybwwgqh0000gp/T/outputs-3df91d
Some more info:
Using Cocoapods 1.5.3 (also reproduces with latest 1.6.0_beta.1)
Using the "Legacy Build System"
the exact command I'm running to archive is:
xcodebuild -scheme APPSCHEME -workspace APPNAME.xcworkspace -configuration Release clean build archive -derivedDataPath "../build" -archivePath "../build/APPNAME.xcarchive"
Just to make things even more interesting, when running the archive command on my local machine I see no failures... VERY strange and inconsistent.
Any help will be appreciated!
A related case in which this error appears is by running:
xcodebuild -scheme sharetec build
In my case I just had to tune up a little more the parameters like this:
xcodebuild -workspace [WP_NAME].xcworkspace -scheme [A_TARGET] -sdk iphoneos clean build
So the error disappears.
Eventually I figured it out, it's something that looks really UNRELATED, and yet it was the only thing that fixed the described issue for me.
Go to your build settings and remove any recursive search paths you have there. That's it. (any search path that ends with ** is a recursive one).
Good luck!
I had this issue when using AppCenter. I had selected a different version of xcode to that of my project's deployment target.
I had the same issue doing:
xcodebuild -workspace ABC.xcworkspace -scheme SCHEME_NAME archive -archivePath ABC.xcarchive
I solved it by stripping out the -archivePath and its parameter.
I have a possible general solution for this issue. In my case, I followed all the advices from all the possible websites, including this one, but it was no luck until I tried archiving the project on Xcode itself (I was archiving thru fastlane, and its logs didn't help me at all). When I archived in Xcode, it actually showed me where was the problem, and I was able to quickly solve the issue. So, in case nothing works, try archiving in Xcode itself if you happen to archive outside of it.
I'am making an app with material design and this package looked really nice for that purpose. I have simply set up my Cartfile like this:
github "CosmicMind/Material" ~> 1.42.9
and then run:
carthage update
which gives me the following error:
*** Building scheme "Material iOS" in Material.xcworkspace
** CLEAN FAILED **
The following build commands failed:
Check dependencies
(1 failure)
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
A shell task (/usr/bin/xcrun xcodebuild -workspace /Users/alex/TelenorApp/MyTelenor/Carthage/Checkouts/Material/Examples/Material.xcworkspace -scheme Material iOS -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build) failed with exit code 65:
** CLEAN FAILED **
The following build commands failed:
Check dependencies
(1 failure)
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
I have set up the command line tools to use XCode 8, it is possible to build using Xcode 7.3 tools (xcode-select) but it wont link with my app that is using Swift 3 if I do that.
What is the reccomended way to use Material with Swift 3? Is it possible to make Material work with Swift 3 some other way? I would prefer to use a stable version of Material if that is possible.
Thankful for answers!
The master branch supports Swift 3. So all should work in that regard :)
I am trying to build iOS projects from the command line as part of a CI system. I intend to use the xcodebuild command to get an app file, then the app file will be provided to the xcrun command to get a signed ipa file for distribution.
My projects use Cordova, which is located in the folder <project-folder>/CordovaLib.
In the project folder, I executed the following command from within an Ant script:
xcodebuild -target "<project-name>" -configuration Release clean build
The CordovaLib target was built succesfully, and it was produced the file:
<project-folder>/CordovaLib/build/Release-iphoneos/libCordova.a
This is visible by the following snippet of log:
[exec] CreateUniversalBinary build/Release-iphoneos/libCordova.a
normal armv7\ armv7s\ arm64 [exec] cd <project-folder>/CordovaLib
[exec] 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:/usr/local/bin:/Users/quake/bin:Applications/tools/apache-ant-1.8.4/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin"
[exec]/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
-static <project-folder>/CordovaLib/build/CordovaLib.build/Release-iphoneos/CordovaLib.build/Objects-normal/armv7/libCordova.a
<project-folder>/CordovaLib/build/CordovaLib.build/Release-iphoneos/CordovaLib.build/Objects-normal/armv7s/libCordova.a
<project-folder>/CordovaLib/build/CordovaLib.build/Release-iphoneos/CordovaLib.build/Objects-normal/arm64/libCordova.a
-o <project-folder>/CordovaLib/build/Release-iphoneos/libCordova.a
During the build of the target <project-name> I got the following error for three times:
ld: file not found:
/build/Release-iphoneos/libCordova.a clang: error:
linker command failed with exit code 1 (use -v to see invocation)
And finally:
The following build commands failed: Ld
build/HelloWorldProjectHelloWorldIpad.build/Release-iphoneos/HelloWorldProjectHelloWorldIpad.build/Objects-normal/armv7/HelloWorld
normal armv7 Ld
build/HelloWorldProjectHelloWorldIpad.build/Release-iphoneos/HelloWorldProjectHelloWorldIpad.build/Objects-normal/armv7s/HelloWorld
normal armv7s Ld
build/HelloWorldProjectHelloWorldIpad.build/Release-iphoneos/HelloWorldProjectHelloWorldIpad.build/Objects-normal/arm64/HelloWorld
normal arm64 (3 failures)
So the file libCordova.a was produced in the folder:
<project-folder>/CordovaLib/build/Release-iphoneos
and it was searched instead in:
<project-folder>/build/Release-iphoneos
I'm using Xcode Version 7.1 (7B91b) with iOS 9.1.
Should I set something on Xcode in addition to the parameters I have used in the xcodebuild command from the command line?
Thanks in advance, Simone.
My project comes from a MEAP IDE. I discovered that the auto-generated project file project.pbxproj had this setting for the linker:
OTHER_LDFLAGS=-force_load "$(BUILT_PRODUCTS_DIR)/libCordova.a" -Obj-C
Hence I modified this way the xcodebuild command invocation:
xcodebuild -target "<project-name>" -configuration Release clean build 'OTHER_LDFLAGS=-force_load "$SRCROOT/CordovaLib/build/Release-iphoneos/libCordova.a" -Obj-C'
That resolved my problem.
I am having one problem that is killing me. Here it is: I have and app project in xCode that goes perfect when I tried to do everything in xCode UI. Which that I mean build, run, test or whatever in all the different targets that I have (3), 2 of the App and one for the tests.
THe problem comes when I tried to install a continous integration to my system in Jenkins. I need to execute some commands in shell for it. Command like this one:
xcodebuild -project MYPROJECT -sdk iphonesimulator -scheme TESTS_SCHEME TEST_AFTER_BUILD=YES
I also have tried with this other one that in the end it does the same:
xcodebuild -project MY_PROJECT -target TEST_TARGET -sdk iphonesimulator -configuration "Debug"
Then is when the problems cames out, the terminal says the following:
....PrecompiledHeaders/MYLIBRARY-Prefix-hhjuztynfruquodlgqxroyfibfkh/MYLIBRARY-Prefix.pch.d
clang: error: invalid architecture 'arm' for deployment target '-mios-simulator-version-min=4.3'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
** BUILD FAILED **
The following build commands failed:
ProcessPCH /Users/nicoyuste/Library/Developer/Xcode/DerivedData/MY_APP-bxpgsdbefuawmiexyikbtvsatlsf/Build/Intermediates/PrecompiledHeaders/MYLIBRARY-Prefix-hhjuztynfruquodlgqxroyfibfkh/MYLIBRARY-Prefix.pch.pth MYLIBRARY-Prefix.pch normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
I´ve been looking in the Internet (almost in here) but everything what I found with same problem didn´t work for me. The xCode version is 4.5 and if you do xcodebuild -version is what I get so that´s fine.
I also have tried changing headers files and everything what I have found around but nothing fixes my problem...
any suggestions...
If you're using a custom build script, you can pass -arch i386 to xcodebuild
For instance:
xcodebuild -project MY_PROJECT -target TEST_TARGET -sdk iphonesimulator -configuration "Debug" -arch i386
(Scroll all the way to the right in the code sample above. The relevant flag is -arch i386)
Should force it to build against i386. However, you need to make sure i386 is in your VALID_ARCHS settings for the target.
In case anyone running into the same annoying problem again, I will share my script here:
Remember to run this command under the directory that has the xcodeproj file.
xcodebuild \
-project "full-path-to-your-xcodeproj-file" \
-target YOUR_TARGET \
-sdk iphonesimulator6.1 \
-arch i386 \
-configuration Debug \
VALID_ARCHS="armv6 armv7 i386" \
ONLY_ACTIVE_ARCH=NO \
TARGETED_DEVICE_FAMILY="1" \
clean install
I modified the TARGETED_DEVICE_FAMILY because I only build for iPhone. If you want to build for both iPhone and iPad, delete this line or replace with TARGETED_DEVICE_FAMILY="1, 2".
I am seeing people who is still wondering about this. I posted this question a long time ago. I stopped using xcodebuild and I am using xctool now, it works much better. This tool is developed by Facebook.
I think that the problem reside in that your are building for the simulator specifying arm as the architecture, try changing it to i386
I ran into a similar problem after upgrading to Xcode 4.5 on my build machine. In my case, I have a third-party library that can't be built for armv7s (yet) and so, I set the Architectures build setting to armv7. Worked fine for unit tests, simulator builds, and the like inside of Xcode. However, when I did the command-line build, it failed with the same message.
I changed my Architectures to armv7 i386 and now it seems to build fine at the command line for the simulator.
Despite the GUI indicating that Architectures of Standard (armv7,armv7s) includes just those two, I'm pretty sure there's an i386 hiding there when you build for the simulator.
In the end, that setting works fine now with Jenkins.
I tried below command:
xcodebuild -arch i386 -sdk iphonesimulator7.1
But failed with similar error as clang: error: invalid architecture 'arm' for deployment target '-mios-simulator-version-min=6.0'
Here is how I solved :
xcodebuild -arch i386 VALID_ARCHS="i386 armv7 armv7s" ONLY_ACTIVE_ARCH=NO -sdk iphonesimulator7.1
U need to make u set VALID_ARCHS and ONLY_ACTIVE_ARCH correctly and it will work. You can make these settings on Xcode directly too.