Cordova iOS Remote Build Release Mode fail - ios

Building Cordova app via Visual Studio using Remote build.
Was using Cordova version 5.3.1, tried updating to the latest version of Cordova too - 6.2.1-nightly.2016.5.23.6e87c71a.
Both times it works in Debug mode but does not work in Release Mode:
Errors - misleading and say nothing whatsoever:
http://imgur.com/TdSfuso
Part of the Output:
ERROR building one of the platforms : error : /Users/Jurgen/.taco_home/remote-builds/taco-remote/builds/66415/cordovaApp/platforms/ios/cordova/build: Command failed with exit code 2
1> You may not have the required environment or OS to build this project (TaskId:10)
1> Failed to build app for buildNumber 66415: /Users/Jurgen/.taco_home/remote-builds/taco-remote/builds/66415/cordovaApp/platforms/ios/cordova/build: Command failed with exit code 2 (TaskId:10)
1>22:57:03.377 1>
1>Error : Remote build error from the build server Build failed with error /Users/Jurgen/.taco_home/remote-builds/taco-remote/builds/66415/cordovaApp/platforms/ios/cordova/build: Command failed with exit code 2: {1}
1> Done executing task "MdaVsCli" -- FAILED. (TaskId:10)
1>22:57:03.393 1>
1>Done building target "BuildMDA" in project "MobileAppNew.jsproj" -- FAILED.: (TargetId:11)
Full Output:
https://www.wetransfer.com/downloads/b9a4e2e932f98bb2286fbb6602c8dfc020160523210524/48dffd
We are planning to send the app to iOS to be released on the App Store but cannot do the .ipa file. Any help would be appreciated

How I solved this problem:
First of all I didn't manage to build and deploy on a device when using the App Store Production Certificate. I did manage however with the Ad hoc certificate, which is a production certificate with the only difference that you still have to specify the UDID of the devices you will deploy on in the developer account.
I then updated my Cordova version from 5.3.1 to 6.2.0. I updated 2 outdated plugins: Inappbrowser and Phonegap-plugin-push and voila; the app suddenly started to deploy in release mode (via a taco remote build). Weird bit is that I had been using the old version of cordova and never had to update the plugins when running in Debug mode - which was why it took me a bit more time to figure it out! Good luck :)

Related

Deploying to iOS device from Unreal fails

I'm attempting to build and deploy an Unreal project to an iPhone, but it's failing to deploy on two errors. Xcode v11.3.1, Unreal v4.22.
LogShaderCompilers: Error: /tmp/3689_966125236.metal(0): Xcode's metal shader compiler was not found, verify Xcode has been installed on this Mac and that it has been selected in Xcode > Preferences > Locations > Command-line Tools.
LogOutputDevice: Warning: Script Stack (0 frames):
LogMac: Error: appError called: Assertion failed: [File:/Users/build/Build/++UE4/Sync/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp] [Line: 4523]
Failed to compile global shader TSlateElementPSFonttruetrueA . Enable 'r.ShaderDevelopmentMode' in ConsoleVariables.ini for retries.
and
[DD] ... Error: Failed to connect to bundle 'com.dock10.FACE'
So far I've:
Verified the metal compiler location using xcrun -sdk macosx -find metal
Verified Xcode has been installed and that it has been selected in Xcode > Preferences > Locations > Command-line Tools.
Successfully packaged and deployed a simple swift project to the iPhone through xcode
Tried pretty much every suggestion I can find on Google
Delete Binaries, Build, Intermediate, Saved folders in project folder, then Generate Xcode project
Entered r.ShaderDevelopmentMode into UE4 commandline
I don't have an apple dev license, do I need one to build and deploy my unreal project to one local iPhone?
Thanks!
So installing XCode 10.1, as mentioned in the iOS Development Requirements for 4.22 seems to have fixed the shader error, great!

App iOS stuck on blank white screen when build release React Native

I'm setting up a new project using React Native like this tutorial: https://facebook.github.io/react-native/docs/getting-started.html and build iOS release but it does not work, the blank white screen showed after LaunchScreen run.
The app works if build in Debug(react-native run-ios) but does not work in Release(build release by Xcode or terminal).
react-native v0.53.0
react-native-cli v2.0.1
node v8.10.0
Xcode 9.2
The log show in Xcode:
2018-02-06 15:55:14.464233+0700 MyApp[306:35863] [Accessibility] ****************** Loading GAX Client Bundle ****************
2561-02-06 15:55:14.697 [error][tid:main][RCTCxxBridge.mm:423] Failed to load bundle(file:///var/containers/Bundle/Application/4FAF82CD-9EA4-4E73-800A-A2ABC9313405/MyApp.app/main.jsbundle) with error:(Error reading bundle /var/containers/Bundle/Application/4FAF82CD-9EA4-4E73-800A-A2ABC9313405/MyApp.app/main.jsbundle (null))
2018-02-06 15:55:14.706782+0700 Shiip[306:35863] Failed to load bundle(file:///var/containers/Bundle/Application/4FAF82CD-9EA4-4E73-800A-A2ABC9313405/MyApp.app/main.jsbundle) with error:(Error reading bundle /var/containers/Bundle/Application/4FAF82CD-9EA4-4E73-800A-A2ABC9313405/MyApp.app/main.jsbundle (null))
I use many node version so the Xcode not using the node version which I used in my Terminal, it's make my app build crashed. Let's do this to solved my problem
Open The Script Build Phases in Xcode:
Now, using with the node version path exactly (use command: which node to get your node version path)
And my problem was solved
In my case,
Xcode v14.1
React native 0.69.5
I found out that the error source is due to the node version which system use for running release build. credits to this answer Stack overflow
I had to add the following lines in Xcode ==> Project ==> Build phases ==> Build react native code and images
export NODE_BINARY="/Users/<UserName>/.nvm/versions/node/v14.17.0<Your_Version>/bin/node"
../node_modules/react-native/scripts/react-native-xcode.sh
change UserName and Node version in this line accordingly
If you need to test in release build before uploading to testflight
for review
Go to Xcode ==> product ==> Scheme ==> edit scheme ==> Select Run ==> change build configuration to release
to run a release build from terminal
you just only need to type the following command:
npx react-native run-ios --configuration Release
If you want run your project on a real device use --device parameter:
npx react-native run-ios --configuration Release --device "Your Device Name"
The reason this is happening is because debug mode runs on the chrome javascript engine where as release mode runs on the device javascript engine. Some javascript features that work on chrome don’t work on the engines that mobile devices use. Please see mdn for more information there must be some js function you’re using that is undefined and causing the white screen.

Cordova iOS - Build App Error 65

I developed an App on a Windows Machine (For Android).
I also want the App for iOS. So I installed Xcode, node.js and cordova.
There are no errors, when I run my App on a Emulator.
When I run the App on Device with the command cordova run ios --device, I get the following Errors:
Check dependencies
Signing for "HelloCordova" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.2'
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -
xcconfig,/Users/milkogrieger/Woow2/platforms/ios/cordova/build-
debug.xcconfig,- workspace,HelloCordova.xcworkspace,-scheme,HelloCordova,-
configuration,Debug,-
destination,generic/platform=iOS,-
archivePath,HelloCordova.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/milkogri
eger/Woow2/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/milkogrieger/Woow2/platforms/ios/build/sharedpch
I found the following Solutions and tried them:
remove all plugins
add plugins
remove platforms
add platforms
But the error is still there.
I hope someone can help me
Thanks
You need to specify your development team as the message indicates. You can do this easily by configuring build.json, as described in the docs and further clarified here.

Build Xcode app using Jenkins

I have searched many websites regarding the below issue when building iOS app using Jenkins and its been said to remove resourceRules.plist mentioned in PackageApplication. My problem is I am not able to edit or save PackageApplication file as suggested below sites and stack overflow:
Solution to the issue in the below error - 1
Solution to the issue in the below error - 2
I want to automate Xcode build. I followed the below tutorial to automate the app building process using Jenkins: Tutorial to automate the app building process using Jenkins I am using Xcode 8.1 and Mac OS 10.12.
I am getting the below error in Jenkins:
error: /usr/bin/codesign –force
–preserve-metadata=identifier,entitlements,resource-rules –sign iPhone
Distribution: Company Name (XXXXXXXXXX)
–resource-rules=/var/folders/24/fw6633nj7l310dlqcd3r67600000gp/T/HPngq5Ljzg/Payload/AppName.app/ResourceRules.plist
–entitlements
/var/folders/24/fw6633nj7l310dlqcd3r67600000gp/T/HPngq5Ljzg/entitlements_plistUgkTGfaE
/var/folders/24/fw6633nj7l310dlqcd3r67600000gp/T/HPngq5Ljzg/Payload/AppName.app
failed with error 1. Output: Warning: usage of –preserve-metadata with
option “resource-rules” (deprecated in Mac OS X >= 10.10)! Warning:
–resource-rules has been deprecated in Mac OS X >= 10.10!
/var/folders/24/fw6633nj7l310dlqcd3r67600000gp/T/HPngq5Ljzg/Payload/AppName.app/ResourceRules.plist:
cannot read resources
Failed to build
/Users/iosdeveloper/.jenkins/workspace/appname_ios_app/build-dir/${PROJECT_DIR_NAME}-11.ipa
Build step ‘Xcode’ marked build as failure Finished: FAILURE

Issue with building iOS on AppseleratorStudio [ERROR]: Invalid "--device-id" value ""

AppseleratorStudio (Titanium), build: 4.6.0.201605201934
MacBook Pro
iPad mini, OS 8.1.
Seen similar questions being asked, but not many answers were given and most of the questions were Android related. Willing to provide more info needed if necessary.
2016-08-22T08:48:24.385Z | DEBUG | getTiDefaultPath /Users/at/Library/Application Support/Titanium
2016-08-22T08:48:24.386Z | DEBUG | active sdk install path /Users/at/Library/Application Support/Titanium
2016-08-22T08:48:26.476Z | DEBUG | to download {"modules":[{"oses":["linux","win32","osx"],"platforms":["iphone","android"],"required":true,"partner_id":"A0B129A418829127EC551EB8ADB0D1CC","partner_name":"Appcelerator","name":"Hyperloop","description":"Gain complete access to native APIs in your Titanium mobile applications.","id":"hyperloop","guid":"99a136cd-4e51-40da-bcdb-d514f5895fb5","version":"1.2.6","url":"http://appcelerator-modules.s3.amazonaws.com/hyperloop-1.2.6.zip","min_mobilesdk_version":"5.4.0"}],"components":[]}
[ERROR] : Invalid "--device-id" value ""
Available iOS Devices:
814afcb29c793aea10b182b53f3f629b73ed1a39 iPad mini
itunes iTunes Sync
For help, run: titanium.js help build
Upd1. Added device id in build command, here is the result:
[INFO] Invoking xcodebuild
[ERROR] BUILD FAILED
[ERROR] The following build commands failed:
[ERROR] CodeSign build/Products/Debug-iphoneos/Anna-inzicht.app
[ERROR] (1 failure)
Also tried to clean project - no help.
Upd2. It works ok on emulator, fail is with real device only.
The simplest fix is to go to "Debug Configurations..." and delete the config for your project. Studio will automatically rebuild it or maybe ask you for which Provisioning Profile you want to use.
While Goltsev Eugene works it's a bit much, as creating a new project makes you loose all history, analytics, push, etc. on appcelerator platform.
Try adding --device-id 814afcb29c793aea10b182b53f3f629b73ed1a39 to your titanium build command.
Finally, the solution was easy - created new project, moved all files from app folder.Build works now.
For those still having this issue in 2019.
If you aren't able to locate your device in the device list, follow these simple steps.
Update NodeJS at https://nodejs.org/#download. Then rebuilding modules with by typing into the command-line: appc ti info -t ios.
You should see the following:
"You are attempting to run appc 7.1.0 which was compiled for node 8.9.1 but you are now running node v10.16.3
Rebuilding package modules ...
Package modules rebuilt!"
After that, my device popped up on my device list.
This took a while to figure out and I could not find this straight-forward solution anywhere.

Resources