I am using Swift with CocoaPods and trying to build it in AppCenter.
I kept getting this failing log
CompileSwift normal arm64 (in target 'Wundercast' from project 'Wundercast')
cd /Users/runner/runners/2.165.2/work/1/s
/Applications/Xcode_11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-bc /Users/runner/runners/2.165.2/work/1/s/Wundercast/ViewController.swift /Users/runner/runners/2.165.2/work/1/s/Wundercast/Utils/Colors.swift /Users/runner/runners/2.165.2/work/1/s/Wundercast/AppDelegate.swift /Users/runner/runners/2.165.2/work/1/s/Wundercast/Controllers/ApiController.swift /Users/runner/runners/2.165.2/work/1/s/Wundercast/Utils/Appearance.swift -supplementary-output-file-map /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/supplementaryOutputs-8c8267 -target arm64-apple-ios10.1 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode_11.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk -I /Users/runner/Library/Developer/Xcode/DerivedData/Wundercast-ermhkmlzqioflkgqqzuvbqmqczqy/Build/Intermediates.noindex/ArchiveIntermediates/Wundercast/BuildProductsPath/Release-iphoneos -F /Users/runner/Library/Developer/Xcode/DerivedData/W...
/Users/runner/runners/2.165.2/work/1/s/Wundercast/ViewController.swift:30:8: error: no such module 'RxSwift'
import RxSwift
^
** 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)
##[error]Error: /usr/bin/xcodebuild failed with return code: 65
With previous research, I have configured the project with xcworkspace, and appcenter-post-clone.sh to install CocoaPods.
Here is the test project link.
What should I do to fix this?
After a few tries with a blank project, it worked pretty well with the following appcenter-post-clone.sh
#!/usr/bin/env bash
echo "Uninstalling all CocoaPods versions"
sudo gem uninstall cocoapods --all --executables
COCOAPODS_VER=`sed -n -e 's/^COCOAPODS: \([0-9.]*\)/\1/p' Podfile.lock`
echo "Installing CocoaPods version $COCOAPODS_VER"
sudo gem install cocoapods -v $COCOAPODS_VER
cd $APPCENTER_SOURCE_DIRECTORY
pod install
However, the original project still fails in the release mode even locally. At least I now know the problem has nothing to do with AppCenter, but rather has some issues with Xcode. By dragging the project files into a new Xcode project, it worked like charm.
Related
I am getting following Error when try to run any project with React-native run-ios:
I have already tried all solutions from this and many more but nothing works.
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening proj.xcworkspace. Run CLI with --verbose flag for more details.
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace proj.xcworkspace -configuration Debug -scheme proj -destination id=13B67855-76F9-4755-A1A5-7B5AEBC6D1C5
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
Prepare build
warning: The Legacy Build System will be removed in a future release. You can configure the selected build system and this deprecation message in File > Workspace Settings.
=== BUILD TARGET glog OF PROJECT Pods WITH CONFIGURATION Debug ===
Check dependencies
Libtool /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Debug-iphonesimulator/glog/libglog.a normal x86_64
cd /Users/user/Work/weber/mobile-app/proj-mobile/ios/Pods
export IPHONEOS_DEPLOYMENT_TARGET=10.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/user/Library/Android/sdk/tools:/Users/user/Library/Android/sdk/platform-tools"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -D -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -L/Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Debug-iphonesimulator/glog -filelist /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Pods.build/Debug-iphonesimulator/glog.build/Objects-normal/x86_64/glog.LinkFileList -o /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Debug-iphonesimulator/glog/libglog.a
=== BUILD TARGET DoubleConversion OF PROJECT Pods WITH CONFIGURATION Debug ===
Check dependencies
Libtool /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Debug-iphonesimulator/DoubleConversion/libDoubleConversion.a normal x86_64
cd /Users/user/Work/weber/mobile-app/proj-mobile/ios/Pods
export IPHONEOS_DEPLOYMENT_TARGET=10.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/user/Library/Android/sdk/tools:/Users/user/Library/Android/sdk/platform-tools"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -D -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -L/Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Debug-iphonesimulator/DoubleConversion -filelist /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Pods.build/Debug-iphonesimulator/DoubleConversion.build/Objects-normal/x86_64/DoubleConversion.LinkFileList -o /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Debug-iphonesimulator/DoubleConversion/libDoubleConversion.a
=== BUILD AGGREGATE TARGET boost-for-react-native OF PROJECT Pods WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET React-Core-AccessibilityResources OF PROJECT Pods WITH CONFIGURATION Debug ===
Check dependencies
ProcessInfoPlistFile /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Debug-iphonesimulator/React-Core/AccessibilityResources.bundle/Info.plist Target\ Support\ Files/React-Core/ResourceBundle-AccessibilityResources-React-Core-Info.plist
cd /Users/user/Work/weber/mobile-app/proj-mobile/ios/Pods
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/user/Library/Android/sdk/tools:/Users/user/Library/Android/sdk/platform-tools"
builtin-infoPlistUtility /Users/user/Work/weber/mobile-app/proj-mobile/ios/Pods/Target\ Support\ Files/React-Core/ResourceBundle-AccessibilityResources-React-Core-Info.plist -expandbuildsettings -format binary -platform iphonesimulator -o /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Debug-iphonesimulator/React-Core/AccessibilityResources.bundle/Info.plist
ProcessProductPackaging "" /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Pods.build/Debug-iphonesimulator/React-Core-AccessibilityResources.build/AccessibilityResources.bundle-Simulated.xcent
cd /Users/user/Work/weber/mobile-app/proj-mobile/ios/Pods
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/user/Library/Android/sdk/tools:/Users/user/Library/Android/sdk/platform-tools"
I had different looking errors and also similar to yours given here, every time due to
'Prepare build failed, legacy build etc etc'.
I simply changed the build system to new one from legacy one and all projects ran smoothly. Try it out and let me know if it works for you too.
The setting path is : Xcode->file -> workspace settings -> build systems
I am new to iOS development and I am currently playing with Package Managers, in this case I am trying to use Carthage to import Alamofire into my app. I was able to build the application in Xcode and side load it on my device and the application works(Im able to call an API successfully so I know Alamofire is being used correctly), But when I commit my project to GitHub and build it in Visual Studio App Center the build fails on the "CompileSwift normal arm64" command. Has anyone seen this issue before or know if there is a solution?
Is it possible that Carthage is not compatible with VS App Center? or would that not matter because Carthage is only to essentially download the Framework.
`CompileSwift normal arm64
cd /Users/vsts/agent/2.140.0/work/1/s
/Applications/Xcode_9.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-bc /Users/vsts/agent/2.140.0/work/1/s/TaskManager/ViewController.swift /Users/vsts/agent/2.140.0/work/1/s/TaskManager/AppDelegate.swift -target arm64-apple-ios11.4 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode_9.4.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -I /Users/vsts/Library/Developer/Xcode/DerivedData/TaskManager-hgihqzndqrcqcahjnxfhdrfxlmns/Build/Intermediates.noindex/ArchiveIntermediates/TaskManager/BuildProductsPath/Release-iphoneos -F /Users/vsts/Library/Developer/Xcode/DerivedData/TaskManager-hgihqzndqrcqcahjnxfhdrfxlmns/Build/Intermediates.noindex/ArchiveIntermediates/TaskManager/BuildProductsPath/Release-iphoneos -F /Users/vsts/agent/2.140.0/work/1/s -g -module-cache-path /Users/vsts/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 4 -O -serialize-debugging-options -Xcc -I/Users/vsts/Library/De...
/Users/vsts/agent/2.140.0/work/1/s/TaskManager/ViewController.swift:10:8: error: module compiled with Swift 4.2 cannot be imported in Swift 4.1.2: /Users/vsts/agent/2.140.0/work/1/s/Alamofire.framework/Modules/Alamofire.swiftmodule/arm64.swiftmodule
import Alamofire
^
** ARCHIVE FAILED **
The following build commands failed:
CompileSwift normal arm64
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
[error]Error: /usr/bin/xcodebuild failed with return code: 65
[section]Finishing: Xcode build (signed)
[section]Starting: Xcode build (signed)`
I am trying to add AEXML module (https://github.com/tadija/AEXML) for XML parsing in my iOS 10 application with Xcode 8. However, I am getting this error while building dependencies with the command carthage update --platform iOS.
Swift Version: 3.0
Xcode Version: 8
Carthage Version: 0.17.2
cartfile
github "tadija/AEXML"
Error after running carthage update --platform iOS command
gsirn-021308:ApplePaySwag-Final chandeln$ swift -version
Apple Swift version 3.0 (swiftlang-800.0.46.2 clang-800.0.38)
Target: x86_64-apple-macosx10.9
gsirn-021308:ApplePaySwag-Final chandeln$ carthage update --platform iOS
*** Fetching AEXML
*** Checking out AEXML at "4.0.0"
*** xcodebuild output can be found in /var/folders/q7/bltc5kls62n2mzlvwhctctzr0000gn/T/carthage-xcodebuild.3NnOoT.log
*** Building scheme "AEXML iOS" in AEXML.xcodeproj
** BUILD FAILED **
The following build commands failed:
CompileSwift normal arm64 /Users/chandeln/Documents/ApplePaySwag-Final/Carthage/Checkouts/AEXML/Tests/AEXMLTests.swift
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
A shell task (/usr/bin/xcrun xcodebuild -project /Users/chandeln/Documents/ApplePaySwag-Final/Carthage/Checkouts/AEXML/AEXML.xcodeproj -scheme AEXML 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:
** BUILD FAILED **
The following build commands failed:
CompileSwift normal arm64 /Users/chandeln/Documents/ApplePaySwag-Final/Carthage/Checkouts/AEXML/Tests/AEXMLTests.swift
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
XCode Version: Version 7.2 (7C68)
Building for PhoneGAP IOS
Commands used:
xcodebuild -project HelloCordova.xcodeproj -scheme HelloCordova -configuration Release -sdk iphonesimulator IDENTIFIER=com.kony.SyncApp build
It used to work well before upgrading Xcode after upgrading to 7.2 , i am facing this issue. And same wokring form XCODE UI
Problem with command line build
Error Info:
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
** BUILD FAILED **
The following build commands failed:
ProcessPCH /Users/konysync/Library/Developer/Xcode/DerivedData/HelloCordova-gyroiomjvclmgtfewwtckeoypgfd/Build/Intermediates/PrecompiledHeaders/CordovaLib_Prefix-almeazhzuslzcvewimbluxlrnwby/CordovaLib_Prefix.pch.pch CordovaLib_Prefix.pch normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
ProcessPCH /Users/konysync/Library/Developer/Xcode/DerivedData/HelloCordova-gyroiomjvclmgtfewwtckeoypgfd/Build/Intermediates/PrecompiledHeaders/CordovaLib_Prefix-bvlrmrstkahcccfcihrhcdumeenk/CordovaLib_Prefix.pch.pch CordovaLib_Prefix.pch normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
found some links , but those links did not help.
Apple LLVM Compiler 3.1 error clang
Unsupported compiler 'com.apple.compilers.llvm.clang.1_0' selected for architecture 'x86_64' on Xcode 7 Beta 2
Clear the cache of pod with
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
pod setup
Change flipper version in pod file:
use_flipper!({ 'Flipper-Folly' => '2.5' })
And delete the project's Pods directory. The location of it is project directory > ios > Pods.
Then in the project directory > ios location, install pod with pod install
And
react-native run-ios
in project directory.
This is a bug introduced in Xcode 7.2 (and still not fixed as of 7.2.1), see https://openradar.appspot.com/23857648 It seems that xcodebuild is not setting correctly the ARCH and PLATFORM_NAME variables when invoked with -sdk iphonesimulator.
There are two known workarounds at the moment, both involve passing extra flags to xcodebuild:
1) Pass the -destination flag, eg:
xcodebuild [...] -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6'
2) Override the PLATFORM variable, eg:
xcodebuild [...] -sdk iphonesimulator PLATFORM_NAME=iphonesimulator
I had this error after upgrading to React Native 0.68.x
AppDelegate.m changed to AppDelegate.mm
You have to do this: https://github.com/software-mansion/react-native-reanimated/issues/841#issuecomment-636297029 open the project in XCode, then navigate to Build Phases, in Compile Sources remove the AppDelegate.m file and add AppDelegate.mm instead.
If it is not already renamed: Open XCode, rename AppDelegate.m to AppDelegate.mm in the Project Navigator
i have tried to resolve this error many times and follows multiple steps of every one but not worked for me after that i deleted my build folder from project ios directory like react-native-project>ios>Build folder
it worked for me.
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.