Xcode 10 Buildscript not running anymore - ios

I have a Buildscript integrated in my build settings. With Xcode 9 it was running smoothly. But since XCode 10 its not running anymore and gives me the following error:
error: unable to attach DB: error: accessing build database ".../build/XCBuildData/build.db": database is locked Possibly there are two concurrent builds running in the same filesystem location.
I already tried the solution which I found here:
Xcode 10: unable to attach DB error
But this didnt help me. Still having the issue...
UPDATE: If I switch to "Legacy Build Settings" I get this error:
Prepare build
note: Using legacy build system
Build Preparation
Couldn't update module cache session file'/var/folders/xh/zc0g0hp13j982ws3qhlr09nm0000gn/C/com.apple.DeveloperTools/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/10.0-10A255/Xcode/ModuleCache.noindex/Session.modulevalidation': The item couldn’t be saved because the file name “Session.modulevalidation” is invalid.
** BUILD FAILED **
Command /bin/sh failed with exit code 65

Related

Android Studio KMM Application project - Build for ios platform failing

I am a first timer on KMM and have just created a new KMM application project on Macbook M1 Pro. No code changes, this is just the hello world app that I am using. I have been able to successfully build the project for android platform, and it runs fine on the android emulator. However, when I try to build it for the ios platform, it is failing with the below error message:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':shared'.
> The project must have a target for at least one of the following platforms: ios_simulator_arm64.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 553ms
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution [CP-User]\ Build\ shared /Users/manajit/Projects/Learning/App/KMMExperiment/build/ios/Pods.build/Debug-iphonesimulator/shared.build/Script-4552119A071AC6BAB7327E6434237EC3.sh (in target 'shared' from project 'Pods')
(1 failure)
Command PhaseScriptExecution failed with a nonzero exit code.
Currently, the base application created by the KMM plugin has commented out support for the ARM simulator because there are some libraries that do not yet support it. This is most likely due to Ktor, which only recently added its support.
Go to shared/build.gradle.kts and uncomment all lines containing iosSimulatorArm64.

Xcode 11.6 Command PhaseScriptExecution failed with a nonzero exit code

I'm trying to Archive my build in Xcode 11.6 running on macOS 10.15.5 and every time I get the same error "Command PhaseScriptExecution failed with a nonzero exit code".
In Signing & Capabilities option I've chosen Distribution provisioning profile on both tabs Debug and Release and I've disabled automatic signing.
I have 2 certificates: one for development and one for distribution.
Here is the error:
I've already tried Keychain lock and unlock. On Xcode 10 and macOS 10.14 this worked without any problems.
Can you help me please,
Robert
According to the error message, it seems there is a build script that tries to run another script called copy-www-build-step.sh, and gets a "Permission Denied" error. The most likely cause is simply that the script file does not have execute permissions (no files have this permission by default, and permissions are often lost when e.g. unzipping an archive).
This can be easily solved by running the following command in Terminal to enable execute permissions:
chmod +x /path/to/copy-www-build-step.sh

running command "xcodebuild" exited with error code 65

I have written a project with react-native and it works on Android. Now I want to run it on ios. When I build my project in Xcode it is okay and I have the "Build succeed" message. But when I run the project in my IDE I have the following Error:
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 MyProjectName.xcodeproj
** BUILD FAILED **
The following build commands failed:
myProjectDirectory/ios/build/MyProjectName/Build/Products/Debug-iphonesimulator/ReactNativeNavigationTests.xctest/ReactNativeNavigationTests normal x86_64
(1 failure)
....
I have tried bellow solutions, but none of them worked for me:
1- I removed the build folder from ios and rebuild the project again.
2- I ran "npm dedupe"
3- I built a simple new project and I could see "Welcome to React Native..." page on iphone.Then I installed wix v2 library in this project and I could see the page again. It means my problem is not about xcode version or wix installation steps.
4- I have clean and rebuild my project in xcode.
I searched a lot on the internet. But I couldn't find any helpful solution.
Any suggestion will be helpful.
It seems your tests are failing.
Try to run tests from Xcode and see if they are ok because my bet is they will fail.

Cordova remote ios build fail with macincloud error:65

I am trying to make a remote ios build for my one of my cordova apps, and I am always getting error.
1- Create a new cordova project in visual studio.
2- Deleted all plugins. (include Whitelist)
3- Build solution.
4- Then got error 65 .
/cordova/build/tasks/22262/log line get a error and visual studio compiler with macincloud.
Secure mode is false.
1> Check dependencies
1> Signing for "BlankCordovaApp3" requires a development team. Select a development team in the project editor.
1> Code signing is required for product type 'Application' in SDK 'iOS 10.0'
1> ** BUILD FAILED **
1>
1>
1> The following build commands failed:
1> Check dependencies
1> (1 failure)
1> Failed to build app for buildNumber 22262: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/user120288/.taco_home/remote-builds/taco-remote/builds/22262/cordovaApp/platforms/ios/cordova/build-release.xcconfig,-project,BlankCordovaApp2.xcodeproj,ARCHS=armv7 arm64,-target,BlankCordovaApp2,-configuration,Release,-sdk,iphoneos,build,VALID_ARCHS=armv7 arm64,CONFIGURATION_BUILD_DIR=/Users/user120288/.taco_home/remote-builds/taco-remote/builds/22262/cordovaApp/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/user120288/.taco_home/remote-builds/taco-remote/builds/22262/cordovaApp/platforms/ios/build/sharedpch
1>MSBUILD : cordova-build error : Error: Remote build error from the build server Build failed with error Error code 65 for command: xcodebuild with args: -xcconfig,/Users/user120288/.taco_home/remote-builds/taco-remote/builds/22262/cordovaApp/platforms/ios/cordova/build-release.xcconfig,-project,BlankCordovaApp2.xcodeproj,ARCHS=armv7 arm64,-target,BlankCordovaApp2,-configuration,Release,-sdk,iphoneos,build,VALID_ARCHS=armv7 arm64,CONFIGURATION_BUILD_DIR=/Users/user120288/.taco_home/remote-builds/taco-remote/builds/22262/cordovaApp/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/user120288/.taco_home/remote-builds/taco-remote/builds/22262/cordovaApp/platforms/ios/build/sharedpch - 1
1> Error Remote build error from the build server Build failed with error Error code 65 for command: xcodebuild with args: -xcconfig,/Users/user120288/.taco_home/remote-builds/taco-remote/builds/22262/cordovaApp/platforms/ios/cordova/build-release.xcconfig,-project,BlankCordovaApp2.xcodeproj,ARCHS=armv7 arm64,-target,BlankCordovaApp2,-configuration,Release,-sdk,iphoneos,build,VALID_ARCHS=armv7 arm64,CONFIGURATION_BUILD_DIR=/Users/user120288/.taco_home/remote-builds/taco-remote/builds/22262/cordovaApp/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/user120288/.taco_home/remote-builds/taco-remote/builds/22262/cordovaApp/platforms/ios/build/sharedpch - {1}
You need to do some additional configuration to make Cordova work with Xcode 8 and iOS 10. I wrote about the workaround I used to resolve this:
https://dpogue.ca/articles/cordova-xcode8.html
To recap, you need to specify your developer team ID. In the next version of Cordova-iOS, you can do this with developerTeam in your build.json file. I have a hook available in the meantime.
You also need to set your code signing identity to "iPhone Developer", even for release builds. Do this with codeSignIdentity in your build.json.
You should not need to specify a provisioning profile, Xcode will automatically handle that when it has the team ID.
Hope that helps!

Creating a build file with Shenzhen and Xcode 6 fails

I'm trying to setup a Jenkins job which will allow me to automatically create and upload an .ipa file to Itunes Connect. I'm using Shenzhen for this but it fails and I get the following output:
xcodebuild build/workspace/Mobile-IOS/AdminPanel/AdminPanel.xcworkspace
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
I use the following command in terminal:
$ ipa build --workspace build/workspace/Mobile-IOS/AdminPanel/AdminPanel.xcworkspace --scheme AdminPanel --config DEBUG
ps: I tried both debug and release configs.
I know this is not a direct answer to your question, however, I've had problems with Shenzhen in the past as well. I since switched over to the fastlane toolset. They have a tool called GYM. You should check it out. It's incredibly easy to use.

Resources