Xamarin.iOS: Deploying to device fails with "failed to acquire command execution log" - iphone

My iOS app built in Visual Studio with a Xamarin Mac build host runs on the iOS simulator but does not deploy to the device. The Mac server log shows this:
[2013-07-30 13:28:45.7] Handling with command: [Build: CommmandUrl=Build] (20)
[2013-07-30 13:28:45.7] Attempting to acquire command execution lock, timeout set to 00:10:00
[2013-07-30 13:30:56.4] Error: Failed to acquire command execution log, the request timed out
[2013-07-30 13:30:56.4] Command [Build: CommmandUrl=Build] finished (17)
Incidentally, is that a typo in line 3 - shouldn't it read "lock" not "log"?
We are using Xamarin Studio 4.0.10 (build 7), Xamarin.iOS 6.4.0.2 (Business Edition), XCode 4.6.2 (2067.2) Build 4H1003.
What is the cause of this error, and how can we get past it?

After talking with Xamarin folks I was told that a fix was included in the Beta for Xamarin.iOS 6.4.1. I switched my Xamarin Studio to the Beta Channel (via the update dialog) and am now able to deploy as before.

Related

PrepareResourceRules task failed error while building .NET MAUI app in VS for Mac

I'm able to build my .NET MAUI app on my Windows 11 machine using VS 2022 17.4.4 but when I try to build it on a Mac using VS 2022 17.4.3 (Build 21), it fails with the following error:
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.1.1481/tools/msbuild/iOS/Xamarin.Shared.targets(3,3):
Error MSB4018: The "PrepareResourceRules" task failed unexpectedly.
System.IO.DirectoryNotFoundException: Could not find a part of the
path
'/Users/user231632/Documents/MyAppFolder/MyApp/bin/Release/net7.0-ios/ios-arm64/MyApp.app/ResourceRules.plist'.
Any idea what the problem is?

.Net7 MAUI app unable to debug/publish with iOS16/Xcode 14

I can debug on MyMac (Mac Catalyst) no problem but not on the simulator, I get the following errors in the Application Output:
xcodebuild[4480:64944] Writing error result bundle to /var/folders/wh/z7x5swm90fb6f6cxfp39760h0000gn/T/ResultBundle_2022-30-10_10-46-0020.xcresult
xcodebuild: error: SDK "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" cannot be located.
xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find simctl 2> /dev/null' failed with exit code 16384: (null) (errno=Invalid argument)
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
I'm using VS17.4 (preview 5 I think, how do I check? It just says 17.4 build 2339) and Xcode 14 for the iOS 16 SDK. I've checked in Preferences > SDK Locations > Apple and everything looks as it should... I'm a Mac noob so is there just a setting I'm missing somewhere?
If I try to build the release for publish like so VisualStudio crashes!
dotnet publish -f:net7.0-ios -c:Release
Update:
I just dropped back to net6.0 and am getting the same error. I didn't have Xamarin.Mac installed but installing it made no difference.
Below are some more component details of VS:
Xamarin.iOS Version: 16.0.0.72 (Visual Studio Community)
Xcode 14.0.1 (21336)
Xamarin.Mac Version: 8.12.0.2 (Visual Studio Community)
I can also see that the directory referenced does exist, or is it not supposed to look like that?
I had two version of Xcode installed which seems to have confused things. Uninstalling both then reinstalling 14 has fixed the issue.

Encountered an error communicating with IBAgent-iOS. Failed to boot device iPhone Xs

I am getting an Error on the top of my interface builder in Xcode 10.3 and while clicking on report bug and checking the log.txt file I found out that fails to open simulator. However I am not starting any simulator.
Here is the Error found in Log.txt
Encountered an error communicating with IBAgent-iOS. (Failure reason: IBAgent-iOS failed to launch): Failed to boot device iPhone Xs (0B8270CC-2BFB-4BB6-90A5-6BA61468A1AD, iOS 12.4, Shutdown) for context <IBCocoaTouchToolLaunchContext: 0x7fe80e754ad0> toolName = IBAgent-iOS, description = <IBCocoaTouchPlatformToolDescription: 0x7fe80e2a0290> System content for IBCocoaTouchFramework-ElevenAndLater <IBSimulatorDeviceTypeDescription: 0x7fe80fab2f90> deviceType=com.apple.CoreSimulator.SimDeviceType.iPhone-XS (Failure reason: Failed to boot iPhone Xs (0B8270CC-2BFB-4BB6-90A5-6BA61468A1AD, iOS 12.4, Shutdown)): Unable to boot the Simulator. (Failure reason: launchd failed to respond.)
Error Domain=com.apple.InterfaceBuilder Code=-1 "Encountered an error communicating with IBAgent-iOS." UserInfo={NSLocalizedFailureReason=IBAgent-iOS failed to launch, NSUnderlyingError=0x7fe80ae44440 {Error Domain=NSPOSIXErrorDomain Code=60 "Operation timed out" UserInfo={NSLocalizedFailureReason=Failed to boot iPhone Xs (0B8270CC-2BFB-4BB6-90A5-6BA61468A1AD, iOS 12.4, Shutdown), NSLocalizedDescription=Failed to boot device iPhone Xs (0B8270CC-2BFB-4BB6-90A5-6BA61468A1AD, iOS 12.4, Shutdown) for context <IBCocoaTouchToolLaunchContext: 0x7fe80e754ad0> toolName = IBAgent-iOS, description = <IBCocoaTouchPlatformToolDescription: 0x7fe80e2a0290> System content for IBCocoaTouchFramework-ElevenAndLater <IBSimulatorDeviceTypeDescription: 0x7fe80fab2f90> deviceType=com.apple.CoreSimulator.SimDeviceType.iPhone-XS, NSUnderlyingError=0x7fe80bd300f0 {Error Domain=NSPOSIXErrorDomain Code=60 "Operation timed out" UserInfo={NSLocalizedFailureReason=launchd failed to respond., NSLocalizedDescription=Unable to boot the Simulator.}}}}, NSLocalizedRecoverySuggestion=Please check Console.app for crash reports for "IBAgent-iOS" for further information., NSLocalizedDescription=Encountered an error communicating with IBAgent-iOS.}
If anyone still looking for an answer to this after Xcode 13 update, I have tried everything they mentioned on the internet and nothing worked except one. The only thing that worked is the complete re-installation of Xcode. Completely uninstall/delete Xcode first and restart the mac and reinstall Xcode then all should be good.
Delete Xcode from Applications Folder and Empty Trash.
Go to ~/Library/Developer and Delete CoreSimulator, Xcode, XCTestDevices Folder. Empty trash
Goto ~/Library/Caches and delete everything starting with com.apple.dt.Xcode, Empty trash
Then Restart your Mac and reinstall Xcode. I used my downloaded Xcode app, AppStore installation will also work, I guess.
Now it all working.
Before that, I have changed the storyboard file using Open as Source Code mode (coz I couldn't open it in Interface Builder - Xcode just hang)
I changed the storyboard design device to iPhone 13 instead of the older device version it had.
<device id="retina6_7" orientation="portrait" appearance="light"/>
I change the existing line with this line. It kinda solve another issue of Xcode hanging, when trying to open with Interface Builder, but it didn't solve Encountered an error communicating with IBAgent-iOS issue when trying to install the app. That issue only got solved when I completely reinstalled the Xcode.
I have managed to fix it just by changing preview device on interface builder
In my case it helped:
clean project
remove derived data
close Xcode
restart Mac
I used DevCleaner XC helper app:
https://apps.apple.com/us/app/devcleaner-for-xcode/id1388020431?mt=12
removed everything, and after that restarted mac. No XC reinstall needed.
This problem caused because, I deleted all directories under "Library/Developer/Xcode" for a purpose. But, I realised I also deleted wrong directories in same time. Then I put back directories from the Bin. It is solved for me.
If you have or have had multiple versions of Xcode open, you may need to reboot or completely re-install the CoreSimulatorService, an evil, globally installed background service that somehow remains online and available to many versions of Xcode despite it being compatible with only one version.
See more here: https://stackoverflow.com/a/72946533/731285
Other symptoms of this issue: Simulators not showing up in the Window > Devices and Simulators listing and simctl throwing errors and being unable to find base iOS SDKs similar to the following:
$ xcrun simctl list
...
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-15-5 --
iPhone 8 (55A90310-8202-4A0D-968B-00F440D42210) (Shutdown) (unavailable, runtime profile not found)
See also:
Command CompileAssetCatalog failed with a nonzero exit code
Xcode device Unavailable, runtime profile not found
In my case, I just had to set team in
Project > Targets > Signing & Capabilities > Team > Personal Team

Titanium Appcelerator Running error on iOS 9.2

Device: iPhone 5 (Model A1429)
iOS version: 9.2 (13C75)
Titanium SDK: 4.0.0.GA
When I tried to run/distribute my app, I faced this error messages
[ERROR] : ** BUILD FAILED **
[ERROR] : The following build commands failed:
[ERROR] : Ld build/iVirtue.build/Debug-iphoneos/iVirtue.build/Objects-normal/arm64/iVirtue normal arm64
[ERROR] : (1 failure)
The warning in TiApp Editor > Deployment Targets said
iOS development requires [5.0, 9.0) but you have 9.2
Initially, when I haven't updated my Titanium Studio and my iOS version, the app was running perfectly. Please help.
I didn't clearly explain it before. The app i made was made on Titanium Studio, so installed the Appcelerator Studio and have the app exported. Now, it's working well. Thank you all, now i can close this matter.
Try to update the Titanium SDK to the latest 5.1.2.GA & all other components as well, because as you said that the app was working fine before so it is something related to the updates.
Use Titanium Studio to update everything available.
This seems to be a problem in your run configuration (or tiapp.xml). I suggest you first delete the run configuration, run the app again to define a new run configuration. Also check tiapp.xml to see if you have any references to iOS version?
You should also clean your project prior to running it after having deleted the run configuration :-)
/John

BlackBerry Android Runtime ADB failed

I try to Packaging project with Android Runtime For BlackBerry I done every thing
-Simulator, ADT- for eclipse .. when i test the app i got this error :
[2013-04-13 13:16:04 - BlackBerryTest] Packaging project BlackBerryTest
[2013-04-13 13:16:11 - BlackBerryTest] Launching BlackBerry Android Runtime...
[2013-04-13 13:16:20 - BlackBerryTest] Connecting to ADB...
[2013-04-13 13:17:23 - BlackBerryTest] Status ERROR: net.rim.ajde code=4 Connecting 192.168.72.128 to ADB failed! null children=[Status ERROR: net.rim.ajde code=0 Please check if the Android player was fully started when you got this error. If not, you can either increase the Android player launch timeout on the BlackBerry->BlackBerry Android Development Tools preference page or wait until the Android player is fully started and try again. null]
in the Simulator there is splash screen contain blackberry 10 logo start about 2 sec and then close and eclipse still Connecting to ADB... about a minute then I got error to connect.
**
UPDATE :
**
Now I got this message
04-25 12:01:15.539: I/navigatorshell(17789061): no app URI, just launch AP and exit
Any Idea ?
This is usually caused by the Android Runtime taking a very long time to load, and in some cases, never actually loading.
The root cause is that the simulator is running very slowly. If you haven't already, enable virtualisation in your BIOS, this makes a massive difference to simulator performance and solved this issue for me.
There's a video about this here: http://devblog.blackberry.com/2012/08/performance-increase-blackberry-10-simulator/