Bug 43373 - [iOS]Unable to upload application to device due to an error "Could not load the framework 'libswiftos.dylib' (path: /Applications/Xcode8-beta6.app/Contents/Frameworks/libswiftos.dylib)" with Xcode8-beta6 update
Summary: [iOS]Unable to upload application to device due to an error "Could not load...
Alias: None
Product: iOS
Classification: Xamarin
Component: General (show other bugs)
Version: XI 9.99 (iOS 10 previews)
Hardware: PC Mac OS
: High blocker
Target Milestone: Xcode8 (iOS10)
Assignee: Bugzilla
: 43403 (view as bug list)
Depends on:
Reported: 2016-08-15 21:24 UTC by GouriKumari
Modified: 2016-10-27 22:08 UTC (History)
7 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description GouriKumari 2016-08-15 21:24:07 UTC
## Steps to reproduce:

Update Xcode8 to Xcode8-beta6 and devices to iOS8-beta6.
Update System to builds from alpha channel.
Build and deploy an iOS app on device.

## Actual Behaviour:
App fails to upload with an error: 
"/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/AddIns/MonoDevelop.IPhone/mlaunch.app/Contents/MacOS/mlaunch -sdkroot "/Applications/Xcode8-beta6.app/Contents/Developer" -installdev "/Users/gouri/Projects/TestiOSXcode86/bin/iPhone/Debug/build-iphone6.1-10.0/TestiOSXcode86.app" "--devname=XQAiPhone5Sd"
error HE0004: Could not load the framework 'libswiftos.dylib' (path: /Applications/Xcode8-beta6.app/Contents/Frameworks/libswiftos.dylib): dlopen(/Applications/Xcode8-beta6.app/Contents/Frameworks/libswiftos.dylib, 1): Library not loaded: @rpath/libswiftXPC.dylib
  Referenced from: /Applications/Xcode8-beta6.app/Contents/Frameworks/libswiftos.dylib
  Reason: image not found

Application could not be uploaded to the device."

Build Log: https://gist.github.com/GouriKumari/67ee8c70d3950a00c1ccf2d23135fbf2
Error Log: https://gist.github.com/GouriKumari/6dc89ba9060d6d80b4472173d177c559

## Test Env:
=== Xamarin Studio Enterprise ===

Version 6.1 (build 5338)
Installation UUID: fafd3486-1aec-4f9c-ab77-08bf4a000708
	Mono 4.6.0 (mono-4.6.0-branch/e571108) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406000138

=== NuGet ===


=== Xamarin.Profiler ===

Version: 0.29.99
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 8.0 (11239.2)
Build 8S201h

=== Xamarin.iOS ===

Version: (Visual Studio Enterprise)
Hash: 40db5d1
Branch: cycle8
Build date: 2016-08-11 18:59:56-0400

=== Xamarin.Android ===

Version: (Visual Studio Enterprise)
Android SDK: /Users/gouri/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
		6.0   (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.1

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Android Designer EPL code available here:

=== Xamarin Android Player ===

Not Installed

=== Xamarin.Mac ===

Version: (Visual Studio Enterprise)

=== Build Information ===

Release ID: 601005338
Git revision: 860f5d2e358077f913badaf7b14c5532888bf12c
Build date: 2016-08-11 16:20:43-04
Xamarin addins: 8bea879bcb4de08213fff5812fd54323d79889d6
Build lane: monodevelop-lion-cycle8

=== Operating System ===

Mac OS X 10.11.5

iPhone6S beta5 
iPad4 beta6
Comment 1 GouriKumari 2016-08-15 21:42:25 UTC
## Update to STEPS
>>Update Xcode8 to Xcode8-beta6 and devices to iOS8-beta6.
  iOS8-beta6 should be iOS10-beta6 and any devices with stable or older iOS versions.
Comment 2 Sebastien Pouliot 2016-08-16 02:06:59 UTC
Fixed in xamarin-macios/xcode8 9fe13aaa580e76997778c0ca7945718dba4dd323

This solves both the simulator and device support issue.

It's possible to download a newer `mlaunch` from [1] and replace it inside XS to get device support working, e.g.

> cp mlaunch "/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/AddIns/MonoDevelop.IPhone/mlaunch.app/Contents/MacOS"

[1] http://bosstoragemirror.blob.core.windows.net/public-builder/mlaunch-ade5bd316053a4f747df13fd1e0386544ad223c
Comment 3 Vincent Dondain [MSFT] 2016-08-16 09:01:14 UTC
@sebastien looks like you pasted the old mlaunch address (link is broken). Here's the new one: http://bosstoragemirror.blob.core.windows.net/public-builder/mlaunch-307d345a06bd3f13994877ee5a4f316f5e6a7940
Comment 4 Sebastien Pouliot 2016-08-16 11:55:47 UTC
@Vincent, yes I pasted the wrong/old link. That's for updating :)
Comment 5 Sebastien Pouliot 2016-08-16 14:49:37 UTC
*** Bug 43403 has been marked as a duplicate of this bug. ***
Comment 6 Mohit Kheterpal 2016-08-17 16:56:17 UTC
Today, I have checked this issue with XamarinStudio- fc3ab7c0cc891ef8c9867558d026257fc4654758 and /xamarin.ios- 9eca87665af46375758b14e3b2622122b9cb6032 with Xcode 8 Beta 6 and observed that this issue is fixed, now we are able to build and deploy application on device and simulator successfully.

Hence closing this issue.

Comment 7 Mike Berlin 2016-10-27 22:08:14 UTC
With Xcode 8.1 release this is also happening. I get the following error when trying to deploy to device or run the simulator (I have tried Stable, Beta, and Alpha channels all with the same error):

/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/AddIns/MonoDevelop.IPhone/mlaunch.app/Contents/MacOS/mlaunch -sdkroot "/Applications/Xcode.app/Contents/Developer" -installdev "<path to my bin directory for the project>" --device ios "--devname=iPad"

error HE0003: Could not load the framework 'libswiftos.dylib' (path: /Applications/Xcode.app/Contents/Frameworks/libswiftos.dylib): not found.

Application could not be uploaded to the device.


Let me know if I can provide any further info.