Deploying to iOS device from Unreal fails - ios

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!

Related

Flutter iOS build failure in Xcode

I am using a mac to build the Flutter app using the real device iPhone X (14.7), In android studio application build in iOS but the same application field is in Xcode. I get this build error and can't figure out why it won't go away. I am missing a script of some sort. Does anybody else know why?
> /bin/sh: /packages/flutter_tools/bin/xcode_backend.sh: No such file or
> directory Command PhaseScriptExecution failed with a nonzero exit code
More Details
Mac configuration deatils
Xcode error run into real device
Project's 'Build Phases' screenshot
after a lot of builds around, I set these two settings and the build run on to my physical device.
Open xcode project
Left side runner
Top info tab
Configurations
Change configurations for debug
The image is below for further reference
image

Xcode 12.5 (12E262) "Command CodeSign failed with a nonzero exit code" after a .scn file added to ARKit project

I have this anoying build fail with an error: Command CodeSign failed with a nonzero exit code
I am using Xcode 12.5 (12E262).
This happened when I converted a .dae file to .scn and added it to my ARKit project (instead of a default ship.scn).
The error appears only when I trying to run the project on my physical device(iPhone 11 pro) but it runs successfully on a simulated device.
I don't use pods or any external frameworks in this project.
I tried this solutions with no success:
Stack1 and Stack2.
Apple documentation wasn't helpful.
Sorry for bad Eng. I am trying my best to improve both ways - non-native language and a programming language :)
Please - do your magic!
Actually - I'm finally found a solution! To be more precise - a combination of solutions!
Work's for me when I followed exact sequence:
(Optional) Go to Xcode Preferences -> Locations tab and make sure that the Command Line Tools is set (to Xcode 12.5 (12E262) in my case).
Open a terminal and run:
​rm -rf Users/yourUserFolder/Library/Developer/Xcode/DerivedData/*
then cd to your project folder and run xattr -cr
Open a Keychain Access and delete all items from a "login" keychain.
Go to Xcode Product -> Clean Build Folder and close the Xcode.
Reboot the PC (was very important in my case!)
Build\Run your project.
Since this steps were made - I haven't had this error anymore.

Xcode fails to build flutter code for ios 13.3.1 device but runs code on 13.3 ios simulator

below is what I am getting on Xcode 11.3.1 and ios 13.3.1. what shall I do?
the code works on the ios simulator and builds for it is always successful. so where is the issue? what's wrong here, or am I missing some thing here?
I did try the clear / install pods method but nothing has been working for me.
iMac:x me$ flutter build ios
The plugin `device_id` is built using an older version of the Android plugin API which assumes that it's running in a full-Flutter environment. It may have undefined
behaviors when Flutter is integrated into an existing app as a module.
The plugin can be updated to the v2 Android Plugin APIs by following https://flutter.dev/go/android-plugin-migration.
Building com.x.demo for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: MHUCCU5SX2
Running pod install... 5.9s
Running Xcode build...
├─Building Dart code... 61.5s
├─Generating dSYM file... 1.0s
├─Stripping debug symbols... 0.9s
├─Assembling Flutter resources... 1.9s
└─Compiling, linking and signing... 20.5s
Xcode build done. 239.8s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
The plugin `device_id` is built using an older version of the Android plugin API which assumes that it's running in a full-Flutter environment. It may have
undefined behaviors when Flutter is integrated into an existing app as a module.
The plugin can be updated to the v2 Android Plugin APIs by following https://flutter.dev/go/android-plugin-migration.
Building AOT snapshot in release mode (ios-release)...
Building App.framework for arm64...
Building App.framework for armv7...
Building AOT snapshot in release mode (ios-release)... 60.1s
Built to build/aot/.
warning: parsing line table prologue at offset 0x6f697463 found unsupported version 0x00
warning: line table parameters mismatch. Cannot emit.
note: while processing /Users/me/AndroidStudioProjects/x/build/aot/armv7/snapshot_assembly.o
The plugin `device_id` is built using an older version of the Android plugin API which assumes that it's running in a full-Flutter environment. It may have
undefined behaviors when Flutter is integrated into an existing app as a module.
The plugin can be updated to the v2 Android Plugin APIs by following https://flutter.dev/go/android-plugin-migration.
Project /Users/me/AndroidStudioProjects/x built and packaged successfully.
ld: warning: ignoring file /Users/me/AndroidStudioProjects/x/ios/Flutter/App.framework/App, building for iOS-armv7 but
attempting to link with file built for iOS Simulator-x86_64
ld: warning: ignoring file /Users/me/AndroidStudioProjects/x/ios/Flutter/App.framework/App, building for iOS-arm64 but
attempting to link with file built for iOS Simulator-x86_64
error: the following command failed with exit code 0 but produced no further output
Ld
/Users/me/Library/Developer/Xcode/DerivedData/Runner-axlithrrzxajtgfxqkefalkhujgj/Build/Intermediates.noindex/Runner.build/Release-iphoneos/Runner.build/Objec
ts-normal/arm64/Binary/Runner normal arm64
/* com.apple.actool.document.warnings */
/Users/me/AndroidStudioProjects/x/ios/Runner/Assets.xcassets:./AppIcon.appiconset/(null)[2d][Icon-App-50x50#1x.png]: warning:
The app icon set "AppIcon" has 6 unassigned children.
/Users/me/AndroidStudioProjects/x/ios/Runner/Assets.xcassets:./AppIcon.appiconset/(null)[2d][Icon-App-50x50#1x.png]: warning:
The app icon set "AppIcon" has 6 unassigned children.
/* com.apple.actool.compilation-results */
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon20x20#2x.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon20x20#3x.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon29x29.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon29x29#2x.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon29x29#3x.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon40x40#2x.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon40x40#3x.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon60x60#2x.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon60x60#3x.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon20x20~ipad.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon20x20#2x~ipad.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon29x29~ipad.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon29x29#2x~ipad.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon40x40~ipad.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon40x40#2x~ipad.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon76x76~ipad.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon76x76#2x~ipad.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/AppIcon83.5x83.5#2x~ipad.png
/Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/Assets.car
/Users/me/Library/Developer/Xcode/DerivedData/Runner-axlithrrzxajtgfxqkefalkhujgj/Build/Intermediates.noindex/Runner.build/Release-iphoneos/Runner.build/asset
catalog_generated_info.plist
Non-fat binary /Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/Frameworks/App.framework/App is not
armv7. Running lipo -info:
Non-fat file: /Users/me/AndroidStudioProjects/x/build/ios/Release-iphoneos/Runner.app/Frameworks/App.framework/App is
architecture: x86_64
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Planning build
note: Constructing build description
This is a known issue with iOS 13.3.1 signing. It has no solution at this point in time. Current options include:
Use simulated device (rather than physical iPhone)
Use device with older iOS version
Use paid developer account (not personal team)
See this discussion that has up to date info:
https://github.com/flutter/flutter/issues/49504
For me the solution was to move to legacy mode buildfromNew Build` and everything worked properly !
It has been confirmed that the issue is fixed in iOS 13.4 beta 3 (17E5241d) release.

iOS remote build fails in Visual Studio TACO

I develop cordova app with Visual Studio 2015 in Windows7.
Node version on Mac is v5.1.0.
While running remotebuild on Mac, start building from Visual Studio.
In emulator mode, it seems to build correctly (msk.test.build.app is created in 'platforms/ios/build/emulator'.)
In device mode, build fails with error below.
I found 'platforms/ios/build/device' is not created, but don't know how to fix.
Submitting new build request to: https://Macintosh.local:3000/cordova/build/tasks?command=build&vcordova=5.4.0&cfg=debug&options=--device&buildNumber=1403&loglevel=warn
------ new build: {"command":"build","vcordova":"5.4.0","cfg":"debug","options":"--device","buildNumber":"1403","loglevel":"warn","status":"Uploaded","buildCommand":"build","buildPlatform":"ios","configuration":"debug","buildLang":"ja-JP","buildDir":"/Users/User/.taco_home/remote-builds/taco-remote/builds/1403","logLevel":0,"submissionTime":"2015-11-18T21:38:43.650Z","changeList":null,"buildSuccessful":false,"messageArgs":null,"message":"Uploaded build request payload.","tgzFilePath":"/Users/User/.taco_home/remote-builds/taco-remote/builds/1403/upload_1403.tgz","appDir":"/Users/User/.taco_home/remote-builds/taco-remote/builds/1403/cordovaApp","statusTime":"2015-11-18T21:38:43.652Z"}
error - Build failed with error Command failed: /bin/sh -c xcrun -v -sdk iphoneos PackageApplication platforms/ios/build/device/msk.test.build.app -o /Users/User/.taco_home/remote-builds/taco-remote/builds/1403/cordovaApp/platforms/ios/build/device/BuildTest2.ipa
xcrun: note: PATH = '/Users/User/.taco_home/node_modules/taco-remote-lib/1.2.0/node_modules/taco-remote-lib/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:”/Applications/Adobe'
xcrun: note: SDKROOT = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk'
xcrun: note: TOOLCHAINS = ''
xcrun: note: DEVELOPER_DIR = '/Applications/Xcode.app/Contents/Developer'
xcrun: note: XCODE_DEVELOPER_USR_PATH = ''
xcrun: note: xcrun_db = '/var/folders/_4/x16l03kx0mxbgd6w_5zp0y5w0000gn/T/xcrun_db'
xcrun: note: xcrun via PackageApplication (xcrun)
xcrun: note: database key is: PackageApplication|/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk||/Applications/Xcode.app/Contents/Developer|
xcrun: note: lookup resolved in '/var/folders/_4/x16l03kx0mxbgd6w_5zp0y5w0000gn/T/xcrun_db' : '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication'
MDAVSCLI : error : Specified application doesn't exist or isn't a bundle directory : 'platforms/ios/build/device/msk.test.build.app'
-------------------------------------
I tried node#0.12.7 on Mac, it works better thanks!
Building works fine and .ipa is created both on Windows/Mac, but stops installing app to my iphone connected by USB to Windows.
Visual Studio output console shows below( the words may be different because mine is Japanese).
:
:
1> ------ copying to project: iOS
2>------ start configuration: project: MSK App, composition:Debug iOS ------
There is a compatibility issue between your version of Node and Cordova 5.4. We are working on fixes both to remote build and Visual Studio to address some of these, but in the meantime I suggest you downgrade to Cordova 5.3 and also take an earlier version of Node (4.2.2 should be OK). That should fix the issue.
(Disclosure: I work on the Tools for Apache Cordova in Visual Studio at Microsoft)
There are known issues with Node version > 4 and Cordova <= 5.3.3 that have been documented here. Also we are seeing issues with Cordova 5.4 and are recommending to downgrade as Michael suggests.
Look Specifically at -
Build not executing when using Cordova with Node.js 5.0.0+ and Cordova 5.3.3 and below
Build hangs or does not execute when building for iOS with Cordova < 5.3.3 and Node.js 4.0.0+
Subhag Oak
(Microsoft)

Cordova command-line build fails in /tmp on Mac

I get a linker error building a brand-new PhoneGap app from the command line. It creates a bunch of files, and if I open the created .xcodeproj in Xcode, it builds just fine. So what's wrong with my command-line environment?
$ phonegap create /tmp/buildtest-ios
$ cd /tmp/buildtest-ios
$ phonegap -V build ios
[phonegap] detecting iOS SDK environment...
[phonegap] Checking iOS requirements...
[phonegap] using the local environment
[phonegap] compiling iOS...
[phonegap] Generating config.xml from defaults for platform "ios"
[phonegap] Compiling app on platform "ios" via command "/private/tmp/buildtest-ios/platforms/ios/cordova/build"
[error] An error occurred while building the ios project.** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
** BUILD FAILED **
The following build commands failed:
Ld /private/tmp/buildtest-ios/platforms/ios/build/emulator/HelloWorld.app/HelloWorld normal i386
(1 failure)
If I run the offending Ld command myself from the command line, I get "file not found". Does that mean the compiler failed and the linker error is just a red herring?
This is PhoneGap 3.3.0-0.18.0 on Mac OS X 10.9. I can create and build an Android app with this installation, no trouble. I get the exact same behavior if I use cordova directly. I've tried it on two Macs with the same symptom.
I finally discovered the answer using the cordova command-line tools. Cordova has a -d flag which is way more verbose than PhoneGap's -V flag. The linker was failing with a bunch of errors like
duplicate symbol _OBJC_METACLASS_$_CDVTimer in:
/private/tmp/buildtest-ios/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
/tmp/buildtest-ios/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
Note that /tmp on Mac is a symlink to /private/tmp, so these are pointing to the same file. No wonder they're duplicate symbols! So why is it trying to include the same file twice?
I tried creating a new test project in an empty folder /private/my-new-tmp2/buildtest-ios. Building it failed with the same error. So apparently something is weird with Cordova's iOS projects and the Ld linker in the /private directory on Mac OS X 10.9, and I'm the only person who's ever tried this. (As I said, building for Android works fine.)
In case someone else ever runs into the same problem, the solution is to build the project in /Users/me/some/directory rather than anywhere in /tmp or /private. Problem solved.
This may be because your framework references are corrupted or point to nowhere. In the left of XCode under 'Frameworks' and 'Resources' try re-adding anything you added yourself. Chances are with Cordova its a plugin SDK you are using that has been updated or deleted.
I had a similar issue while placing my project under /var/www/PROJECT on mac. I was getting the duplicate errors along with "../cordova/build: Command failed with exit code 65".
I was getting the duplicate errors because /var/www/ is also /private/var/www/
Solution was to move my project as described above to /Users/username/some-other-dir/...
I then ran phonegap run ios and all worked!

Resources