Bug 40318 - App will not run at all in the SIM
Summary: App will not run at all in the SIM
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 9.8 (tvOS / C7)
Hardware: Macintosh Mac OS
: High blocker
Target Milestone: (C7)
Assignee: Jeffrey Stedfast
URL:
: 40572 ()
Depends on:
Blocks:
 
Reported: 2016-04-12 20:12 UTC by Neal
Modified: 2016-04-22 20:28 UTC (History)
11 users (show)

Tags:
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:
Status:
VERIFIED FIXED

Description Neal 2016-04-12 20:12:09 UTC
Hello,

I wish I had details for you.  Installed the BETA channel for C7 and my app that uses Core Data won't launch in the SIM at all.  I tried resetting the sim, no log or trace, just nothing to provide you other than something went terribly south since the last ALPHA.  My other iOS app works fine.

App requires 9.1 min and I'm using the latest xCode on a Mac running El Capitan.
Comment 1 Sebastien Pouliot 2016-04-12 20:23:53 UTC
Console.app should (command + '/' in the simulator) should show more details (sadly they can be logged in a few places, globally or in the CoreSimulator section) about that went wrong.

I'm looping QA but AFAIK this was not seen while testing for the beta nor do we have other reports similar to this. We'll be depending on you for further information.
Comment 2 Neal 2016-04-12 20:26:34 UTC
I'm going to do what I can to get you info.  Another user also reported this in the forum:  

http://forums.xamarin.com/post/quote/53121/Comment_190838
Comment 3 Neal 2016-04-12 22:03:56 UTC
Here is the last part of the console app log.  I'm using a different iOS build provided by one of your engineers from a different case and will try again with the beta build of iOS in a few:

Apr 12 17:57:51 MBPR SpringBoard[10002]: [MPUSystemMediaControls] Updating supported commands for now playing application.
Apr 12 17:57:51 MBPR calaccessd[10053]: (Error) MC: MobileContainerManager gave us a path we weren't expecting; file a radar against them
	Expected: /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
	Actual: /Users/Neal/Library/Developer/CoreSimulator/Devices/21F4CFFC-1481-4636-A4DD-05EB176C2FA1/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
	Overriding MCM with the one true path
Apr 12 17:57:51 MBPR SpringBoard[10002]: BBObserver: Unable to retrieve section parameters for <com.apple.Passbook>. Using default parameters.
Apr 12 17:57:51 MBPR itunesstored[10041]: UpdateAssetsOperation: Error downloading manifest from URL https://apps.itunes.com/files/ios-music-app/manifest.json: Error Domain=SSErrorDomain Code=109 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store, SSErrorHTTPStatusCodeKey=503}
Apr 12 17:57:51 MBPR backboardd[10003]: System app "com.apple.springboard" finished startup after 1.44s.
Apr 12 17:57:51 MBPR SpringBoard[10002]: BUG in libdispatch: 15F18c - 3192 - 0x1a843
Apr 12 17:57:52 MBPR CoreSimulatorBridge[10010]: Switching to keyboard: en
Apr 12 17:57:52 MBPR CoreSimulatorBridge[10010]: KEYMAP: Chose mode=en_US@hw=US;sw=QWERTY from match=en_US@hw=US;sw=QWERTY from language=en
Apr 12 17:57:52 MBPR SpringBoard[10002]: Simulator slow-motion animations are now off
Apr 12 17:57:52 MBPR CoreSimulatorBridge[10010]: Requesting launch of com.apdl.net with options: {
	    arguments =     (
	        "-monodevelop-port",
	        59765
	    );
	    environment =     {
	        "DYLD_INSERT_LIBRARIES" = "/Library/Frameworks/Xamarin.iOS.framework/Versions/9.8.0.241/lib/monotouch-fixes.dylib";
	        "__XAMARIN_DEBUG_PORT__" = 59765;
	    };
	}
Apr 12 17:57:52 MBPR assertiond[10006]: assertion failed: 15F18c 13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Apr 12 17:57:52 MBPR com.apple.CoreSimulator.SimDevice.21F4CFFC-1481-4636-A4DD-05EB176C2FA1.launchd_sim[9986] (UIKitApplication:com.apdl.net[0x7eea][10057]): Service exited due to signal: Killed: 9
Apr 12 17:57:52 MBPR SpringBoard[10002]: Application 'UIKitApplication:com.apdl.net[0x7eea]' exited abnormally via signal.
Apr 12 17:57:52 MBPR assertiond[10006]: assertion failed: 15F18c 13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Apr 12 17:57:54 MBPR calaccessd[10053]: table drop: 101
Apr 12 17:57:55 MBPR healthd[9995]: (Error) MC: MobileContainerManager gave us a path we weren't expecting; file a radar against them
	Expected: /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
	Actual: /Users/Neal/Library/Developer/CoreSimulator/Devices/21F4CFFC-1481-4636-A4DD-05EB176C2FA1/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
	Overriding MCM with the one true path
Apr 12 17:57:55 MBPR healthd[9995]: PairedSync, Debugging at level 0 for console and level 0 for log files
Apr 12 17:57:55 MBPR healthd[9995]: Error: Could not create service from plist at path: file:///Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PairedSyncServices/com.apple.pairedsync.healthd.plist. Returning nil PSYSyncCoordinator for service name com.apple.pairedsync.healthd.  Please check that your plist exists and is in the correct format.
Apr 12 17:57:55 MBPR healthd[9995]: Error: failed to load bundle "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Health/Plugins/CompanionHealth.bundle": Error Domain=NSCocoaErrorDomain Code=4 "The bundle “CompanionHealth.bundle” couldn’t be loaded because its executable couldn’t be located." UserInfo={NSLocalizedFailureReason=The bundle’s executable couldn’t be located., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSBundlePath=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Health/Plugins/CompanionHealth.bundle, NSLocalizedDescription=The bundle “CompanionHealth.bundle” couldn’t be loaded because its executable couldn’t be located.}
Apr 12 17:58:00 MBPR SpringBoard[10002]: Weekly asset update check did fire (force=NO)
Apr 12 17:58:00 MBPR SpringBoard[10002]: Beginning check for asset updates (force: 0
Apr 12 17:58:00 MBPR SpringBoard[10002]: Did not complete check for asset updates (force: 0, isVoiceOverRunning: 0
Apr 12 17:58:28 MBPR mstreamd[9992]: (Note ) PS: Media stream daemon stopping.
Apr 12 17:58:28 MBPR mstreamd[9992]: (Note ) AS: <MSIOSAlbumSharingDaemon: 0x7f8be2803180>: Shared Streams daemon has shut down.
Apr 12 17:58:28 MBPR mstreamd[9992]: (Warn ) mstreamd: mstreamd shutting down.
Comment 4 Neal 2016-04-12 22:10:16 UTC
Back to pure beta channel:

 Marker - Apr 12, 2016, 6:04:29 PM
Apr 12 18:05:18 MBPR CoreSimulatorBridge[10010]: Requesting installation of file:///Users/Neal/Dev/apdl-ios/APDL.iOS/bin/iPhoneSimulator/Debug/apdl.app with options: {
	    CFBundleIdentifier = "com.apdl.net";
	    PackageType = Developer;
	    SimulatorRootPath = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk";
	    SimulatorUserPath = "/Users/Neal/Library/Developer/CoreSimulator/Devices/21F4CFFC-1481-4636-A4DD-05EB176C2FA1/data";
	}
Apr 12 18:05:18 MBPR installd[9996]: 0x700000094000 -[MIClientConnection _doBackgroundInstallationForPath:withOptions:completion:]: Install of "/Users/Neal/Dev/apdl-ios/APDL.iOS/bin/iPhoneSimulator/Debug/apdl.app" type Developer (LSInstallType = (null)) requested by CoreSimulatorBridge (pid 10010)
Apr 12 18:05:18 MBPR installd[9996]: 0x700000094000 MDMCreateDeltaDirectory: calling MDMDirectoryDiff with:
	state->old_bundle: /Users/Neal/Library/Developer/CoreSimulator/Devices/21F4CFFC-1481-4636-A4DD-05EB176C2FA1/data/Containers/Bundle/Application/0178BDDB-B345-4F78-A1F4-BC9D79DA5A5F/apdl.app
	state->new_bundle: /Users/Neal/Dev/apdl-ios/APDL.iOS/bin/iPhoneSimulator/Debug/apdl.app
	state->dst_bundle: /Users/Neal/Library/Developer/CoreSimulator/Devices/21F4CFFC-1481-4636-A4DD-05EB176C2FA1/data/Library/Caches/com.apple.mobile.installd.staging/temp.1SETyr/extracted/Payload//apdl.app, binaryDiff flag: FALSE
		dst_ipa: /Users/Neal/Library/Developer/CoreSimulator/Devices/21F4CFFC-1481-4636-A4DD-05EB176C2FA1/data/Library/Caches/com.apple.mobile.installd.staging/temp.1SETyr/extracted
Apr 12 18:05:18 MBPR installd[9996]: 0x700000117000 __MDMDirectoryDiff_block_invoke37: calling writeDictToFile with: /Users/Neal/Library/Developer/CoreSimulator/Devices/21F4CFFC-1481-4636-A4DD-05EB176C2FA1/data/Library/Caches/com.apple.mobile.installd.staging/temp.1SETyr/extracted/ManifestCache.plist
Apr 12 18:05:18 MBPR installd[9996]: 0x700000117000 writeDictToFile: ==== Successfully wrote Manifest cache to /Users/Neal/Library/Developer/CoreSimulator/Devices/21F4CFFC-1481-4636-A4DD-05EB176C2FA1/data/Library/Caches/com.apple.mobile.installd.staging/temp.1SETyr/extracted/ManifestCache.plist
Apr 12 18:05:19 MBPR pkd[10030]: don't know how to check plug-in busy on this platform - assuming com.apdl.net.ScheduleImporterExt is not important
Apr 12 18:05:19 MBPR installd[9996]: 0x700000094000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundlePatch ID=com.apdl.net; Version=7.9.5, ShortVersion=DEV 7.9.5>
Apr 12 18:05:19 MBPR installd[9996]: 0x700000094000 -[MIInstallableBundlePatch applyPatchWithError:]: Attempting patch update of com.apdl.net from 7.9.5 (DEV 7.9.5) to 7.9.5 (DEV 7.9.5)
Apr 12 18:05:19 MBPR installd[9996]: 0x700000094000 -[MIInstallableBundle _refreshUUIDForContainer:withError:]: Data container for com.apdl.net is now at /Users/Neal/Library/Developer/CoreSimulator/Devices/21F4CFFC-1481-4636-A4DD-05EB176C2FA1/data/Containers/Data/Application/0F71D9EC-BB03-4647-A734-5F1B82A4C645
Apr 12 18:05:19 MBPR installd[9996]: 0x700000094000 -[MIInstallableBundle _refreshUUIDForContainer:withError:]: Data container for com.apdl.net.ScheduleImporterExt is now at /Users/Neal/Library/Developer/CoreSimulator/Devices/21F4CFFC-1481-4636-A4DD-05EB176C2FA1/data/Containers/Data/PluginKitPlugin/3A245237-41BA-4A0A-BF78-AD4363E363E6
Apr 12 18:05:19 MBPR installd[9996]: 0x700000094000 -[MIContainer makeContainerLiveReplacingContainer:reason:withError:]: Made container live for com.apdl.net at /Users/Neal/Library/Developer/CoreSimulator/Devices/21F4CFFC-1481-4636-A4DD-05EB176C2FA1/data/Containers/Bundle/Application/8079082B-668E-423D-AB19-8CA7858864FC
Apr 12 18:05:19 MBPR installd[9996]: 0x700000094000 -[MIInstaller performInstallationWithError:]: Install Successful; Staging: 1.13s; Waiting: 0.00s; Preflight/Patch: 0.37s, Verifying: 0.01s; Overall: 1.55s
Apr 12 18:05:19 MBPR pkd[10030]: releasing plug-in hold 95C94B7D-093B-490C-B7B7-41DB4534B343 at client's request
Apr 12 18:05:19 MBPR pkd[10030]: UNINSTALLED:com.apdl.net.ScheduleImporterExt com.apdl.net.ScheduleImporterExt(7.9.4) 3AD355DA-D9E9-421C-A80F-D6F0551B2FF1 /Users/Neal/Library/Developer/CoreSimulator/Devices/21F4CFFC-1481-4636-A4DD-05EB176C2FA1/data/Containers/Bundle/Application/0178BDDB-B345-4F78-A1F4-BC9D79DA5A5F/apdl.app/PlugIns/com.apdl.net.ScheduleImporterExt.appex
Apr 12 18:05:19 MBPR pkd[10030]: malformed plug-in dictionary in plug-in com.apdl.net.ScheduleImporterExt at file:///Users/Neal/Library/Developer/CoreSimulator/Devices/21F4CFFC-1481-4636-A4DD-05EB176C2FA1/data/Containers/Bundle/Application/0178BDDB-B345-4F78-A1F4-BC9D79DA5A5F/apdl.app/PlugIns/com.apdl.net.ScheduleImporterExt.appex: {
	}
Apr 12 18:05:19 MBPR pkd[10030]: INSTALLED:com.apdl.net.ScheduleImporterExt com.apdl.net.ScheduleImporterExt(7.9.4) <__NSConcreteUUID 0x7fdd3ae0f5b0> DFC7CA05-2781-4530-B81E-626976951D9E /Users/Neal/Library/Developer/CoreSimulator/Devices/21F4CFFC-1481-4636-A4DD-05EB176C2FA1/data/Containers/Bundle/Application/8079082B-668E-423D-AB19-8CA7858864FC/apdl.app/PlugIns/com.apdl.net.ScheduleImporterExt.appex
Apr 12 18:05:19 MBPR SpringBoard[10002]: Installed apps did change.
	Added: {(
	)}
	Removed: {(
	)}
	Modified: {(
	    "com.apdl.net"
	)}
Apr 12 18:05:19 MBPR searchd[10051]: tcp_connection_set_tfo 3 TFO is not yet supported on Simulator
Apr 12 18:05:19 MBPR searchd[10051]: tcp_connection_set_tfo 4 TFO is not yet supported on Simulator
Apr 12 18:05:19 MBPR searchd[10051]: Normal message received by listener connection. Ignoring.
Apr 12 18:05:19 --- last message repeated 1 time ---
Apr 12 18:05:19 MBPR SpringBoard[10002]: <CATransformLayer: 0x7fabb8d1fe90> - changing property allowsGroupBlending in transform-only layer, will have no effect
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.MobileSMS
Apr 12 18:05:19 MBPR SpringBoard[10002]: throwing out icon because it isn't visible in the model : node=<SBApplicationIcon: 0x7fabb90bfb20; nodeID: "com.apple.camera"> com.apple.camera
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.weather
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.mobiletimer
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.videos
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.mobilenotes
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.stocks
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.MobileStore
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.AppStore
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.iBooks
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.facetime
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.calculator
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.podcasts
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.Bridge
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.compass
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.tips
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.VoiceMemos
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.mobileme.fmf1
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.mobileme.fmip1
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.mobilephone
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.mobilemail
Apr 12 18:05:19 MBPR SpringBoard[10002]: could not find icon for representation -> com.apple.Music
Apr 12 18:05:19 MBPR SpringBoard[10002]: Unable to simultaneously satisfy constraints.
		Probably at least one of the constraints in the following list is one you don't want. 
		Try this: 
			(1) look at each constraint and try to figure out which you don't expect; 
			(2) find the code that added the unwanted constraint or constraints and fix it. 
	(
	    "<NSLayoutConstraint:0x7fabb96ecee0 H:|-(0)-[UIScrollView:0x7fabb9839600]   (Names: '|':UIView:0x7fabb963df50 )>",
	    "<NSLayoutConstraint:0x7fabb96ecf30 H:[UIScrollView:0x7fabb9839600]-(0)-|   (Names: '|':UIView:0x7fabb963df50 )>",
	    "<NSLayoutConstraint:0x7fabb9719b70 UIView:0x7fabb8c43690.width == UIScrollView:0x7fabb9839600.width>",
	    "<NSLayoutConstraint:0x7fabb94e3210 UIStackView:0x7fabb8d48c90.leading == UIView:0x7fabb8c43690.leadingMargin>",
	    "<NSLayoutConstraint:0x7fabb94e3260 UIView:0x7fabb8c43690.trailingMargin == UIStackView:0x7fabb8d48c90.trailing>",
	    "<NSLayoutConstraint:0x7fabb9513430 'UIView-Encapsulated-Layout-Width' H:[UIView:0x7fabb963df50(0)]>"
	)
	
	Will attempt to recover by breaking constraint 
	<NSLayoutConstraint:0x7fabb94e3260 UIView:0x7fabb8c43690.trailingMargin == UIStackView:0x7fabb8d48c90.trailing>
	
	Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
	The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Apr 12 18:05:19 MBPR SpringBoard[10002]: Unable to simultaneously satisfy constraints.
		Probably at least one of the constraints in the following list is one you don't want. 
		Try this: 
			(1) look at each constraint and try to figure out which you don't expect; 
			(2) find the code that added the unwanted constraint or constraints and fix it. 
	(
	    "<NSLayoutConstraint:0x7fabb96ecee0 H:|-(0)-[UIScrollView:0x7fabb9839600]   (Names: '|':UIView:0x7fabb963df50 )>",
	    "<NSLayoutConstraint:0x7fabb96ecf30 H:[UIScrollView:0x7fabb9839600]-(0)-|   (Names: '|':UIView:0x7fabb963df50 )>",
	    "<NSLayoutConstraint:0x7fabb9719b70 UIView:0x7fabb8c43690.width == UIScrollView:0x7fabb9839600.width>",
	    "<NSLayoutConstraint:0x7fabb94fb090 UITextView:0x7fabbb035600'You can search the web, y...'.leading == UIView:0x7fabb8c43690.leadingMargin>",
	    "<NSLayoutConstraint:0x7fabb94fb0e0 UIView:0x7fabb8c43690.trailingMargin == UITextView:0x7fabbb035600'You can search the web, y...'.trailing>",
	    "<NSLayoutConstraint:0x7fabb9513430 'UIView-Encapsulated-Layout-Width' H:[UIView:0x7fabb963df50(0)]>"
	)
	
	Will attempt to recover by breaking constraint 
	<NSLayoutConstraint:0x7fabb94fb0e0 UIView:0x7fabb8c43690.trailingMargin == UITextView:0x7fabbb035600'You can search the web, y...'.trailing>
	
	Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
	The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Apr 12 18:05:19 MBPR SpringBoard[10002]: Unable to simultaneously satisfy constraints.
		Probably at least one of the constraints in the following list is one you don't want. 
		Try this: 
			(1) look at each constraint and try to figure out which you don't expect; 
			(2) find the code that added the unwanted constraint or constraints and fix it. 
	(
	    "<NSLayoutConstraint:0x7fabb96ecee0 H:|-(0)-[UIScrollView:0x7fabb9839600]   (Names: '|':UIView:0x7fabb963df50 )>",
	    "<NSLayoutConstraint:0x7fabb96ecf30 H:[UIScrollView:0x7fabb9839600]-(0)-|   (Names: '|':UIView:0x7fabb963df50 )>",
	    "<NSLayoutConstraint:0x7fabb9719b70 UIView:0x7fabb8c43690.width == UIScrollView:0x7fabb9839600.width>",
	    "<NSLayoutConstraint:0x7fabb94fb4c0 UITextView:0x7fabba84e000'Continue'.leading == UIView:0x7fabb8c43690.leadingMargin>",
	    "<NSLayoutConstraint:0x7fabb94fb510 UIView:0x7fabb8c43690.trailingMargin == UITextView:0x7fabba84e000'Continue'.trailing>",
	    "<NSLayoutConstraint:0x7fabb9513430 'UIView-Encapsulated-Layout-Width' H:[UIView:0x7fabb963df50(0)]>"
	)
	
	Will attempt to recover by breaking constraint 
	<NSLayoutConstraint:0x7fabb94fb510 UIView:0x7fabb8c43690.trailingMargin == UITextView:0x7fabba84e000'Continue'.trailing>
	
	Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
	The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Apr 12 18:05:19 MBPR SpringBoard[10002]: Unable to simultaneously satisfy constraints.
		Probably at least one of the constraints in the following list is one you don't want. 
		Try this: 
			(1) look at each constraint and try to figure out which you don't expect; 
			(2) find the code that added the unwanted constraint or constraints and fix it. 
		(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
	(
	    "<NSAutoresizingMaskLayoutConstraint:0x7fabb96ed290 h=--& v=--& UIImageView:0x7fabb9718a30.midX == + 20>",
	    "<NSAutoresizingMaskLayoutConstraint:0x7fabb8f711e0 h=--& v=--& UIImageView:0x7fabb94dfd40.midX == + 20>",
	    "<NSAutoresizingMaskLayoutConstraint:0x7fabb96f7820 h=--& v=--& UIImageView:0x7fabb94dcf40.midX == + 20>",
	    "<NSAutoresizingMaskLayoutConstraint:0x7fabb9657eb0 h=--& v=--& UIImageView:0x7fabb92516f0.midX == + 20>",
	    "<NSAutoresizingMaskLayoutConstraint:0x7fabb96f2e50 h=--& v=--& UIImageView:0x7fabb9254ea0.midX == + 20>",
	    "<NSAutoresizingMaskLayoutConstraint:0x7fabb96eddf0 h=--& v=--& UIImageView:0x7fabb90f1c90.midX == + 20>",
	    "<NSLayoutConstraint:0x7fabb96ecee0 H:|-(0)-[UIScrollView:0x7fabb9839600]   (Names: '|':UIView:0x7fabb963df50 )>",
	    "<NSLayoutConstraint:0x7fabb96ecf30 H:[UIScrollView:0x7fabb9839600]-(0)-|   (Names: '|':UIView:0x7fabb963df50 )>",
	    "<NSLayoutConstraint:0x7fabb9719b70 UIView:0x7fabb8c43690.width == UIScrollView:0x7fabb9839600.width>",
	    "<NSLayoutConstraint:0x7fabb94d7080 H:|-(0)-[UIImageView:0x7fabb9718a30]   (Names: '|':SearchUIVibrantView:0x7fabb8cb3f80 )>",
	    "<NSLayoutConstraint:0x7fabb9471340 H:[UIImageView:0x7fabb9718a30]-(0)-|   (Names: '|':SearchUIVibrantView:0x7fabb8cb3f80 )>",
	    "<NSLayoutConstraint:0x7fabb9312830 H:|-(0)-[UIImageView:0x7fabb94dfd40]   (Names: '|':SearchUIVibrantView:0x7fabb94e1a30 )>",
	    "<NSLayoutConstraint:0x7fabb94c02a0 H:[UIImageView:0x7fabb94dfd40]-(0)-|   (Names: '|':SearchUIVibrantView:0x7fabb94e1a30 )>",
	    "<NSLayoutConstraint:0x7fabb924a580 H:|-(0)-[UIImageView:0x7fabb94dcf40]   (Names: '|':SearchUIVibrantView:0x7fabb94d99b0 )>",
	    "<NSLayoutConstraint:0x7fabb924a5d0 H:[UIImageView:0x7fabb94dcf40]-(0)-|   (Names: '|':SearchUIVibrantView:0x7fabb94d99b0 )>",
	    "<NSLayoutConstraint:0x7fabb9254b10 H:|-(0)-[UIImageView:0x7fabb92516f0]   (Names: '|':SearchUIVibrantView:0x7fabb9251580 )>",
	    "<NSLayoutConstraint:0x7fabb9254b60 H:[UIImageView:0x7fabb92516f0]-(0)-|   (Names: '|':SearchUIVibrantView:0x7fabb9251580 )>",
	    "<NSLayoutConstraint:0x7fabb9555dd0 H:|-(0)-[UIImageView:0x7fabb9254ea0]   (Names: '|':SearchUIVibrantView:0x7fabb9254d30 )>",
	    "<NSLayoutConstraint:0x7fabb90e9a50 H:[UIImageView:0x7fabb9254ea0]-(0)-|   (Names: '|':SearchUIVibrantView:0x7fabb9254d30 )>",
	    "<NSLayoutConstraint:0x7fabb8d45540 H:|-(0)-[UIImageView:0x7fabb90f1c90]   (Names: '|':SearchUIVibrantView:0x7fabb95b4c60 )>",
	    "<NSLayoutConstraint:0x7fabb8d059d0 H:[UIImageView:0x7fabb90f1c90]-(0)-|   (Names: '|':SearchUIVibrantView:0x7fabb95b4c60 )>",
	    "<NSLayoutConstraint:0x7fabb94e3210 UIStackView:0x7fabb8d48c90.leading == UIView:0x7fabb8c43690.leadingMargin>",
	    "<NSLayoutConstraint:0x7fabb94fb6e0 UIStackView:0x7fabb8d48c90.centerX == UIView:0x7fabb8c43690.centerX>",
	    "<NSLayoutConstraint:0x7fabb96beb80 'UISV-canvas-connection' UIStackView:0x7fabb8d48c90.leading == SearchUIVibrantView:0x7fabb8cb3f80.leading>",
	    "<NSLayoutConstraint:0x7fabb96c1db0 'UISV-canvas-connection' H:[SearchUIVibrantView:0x7fabb95b4c60]-(0)-|   (Names: '|':UIStackView:0x7fabb8d48c90 )>",
	    "<NSLayoutConstraint:0x7fabb96f41c0 'UISV-distributing-edge' H:[SearchUIVibrantView:0x7fabb8cb3f80]-(0)-[_UIOLAGapGuide:0x7fabb96616e0'UISV-distributing']>",
	    "<NSLayoutConstraint:0x7fabb96f4210 'UISV-distributing-edge' _UIOLAGapGuide:0x7fabb96616e0'UISV-distributing'.trailing == SearchUIVibrantView:0x7fabb94e1a30.leading>",
	    "<NSLayoutConstraint:0x7fabb965ba80 'UISV-distributing-edge' H:[SearchUIVibrantView:0x7fabb94e1a30]-(0)-[_UIOLAGapGuide:0x7fabb96f35f0'UISV-distributing']>",
	    "<NSLayoutConstraint:0x7fabb96f4b90 'UISV-distributing-edge' _UIOLAGapGuide:0x7fabb96f35f0'UISV-distributing'.trailing == SearchUIVibrantView:0x7fabb94d99b0.leading>",
	    "<NSLayoutConstraint:0x7fabb96ed110 'UISV-distributing-edge' H:[SearchUIVibrantView:0x7fabb94d99b0]-(0)-[_UIOLAGapGuide:0x7fabb96f81a0'UISV-distributing']>",
	    "<NSLayoutConstraint:0x7fabb96f47f0 'UISV-distributing-edge' _UIOLAGapGuide:0x7fabb96f81a0'UISV-distributing'.trailing == SearchUIVibrantView:0x7fabb9251580.leading>",
	    "<NSLayoutConstraint:0x7fabb96c3230 'UISV-distributing-edge' H:[SearchUIVibrantView:0x7fabb9251580]-(0)-[_UIOLAGapGuide:0x7fabb96f6800'UISV-distributing']>",
	    "<NSLayoutConstraint:0x7fabb96f37e0 'UISV-distributing-edge' _UIOLAGapGuide:0x7fabb96f6800'UISV-distributing'.trailing == SearchUIVibrantView:0x7fabb9254d30.leading>",
	    "<NSLayoutConstraint:0x7fabb96e75e0 'UISV-distributing-edge' H:[SearchUIVibrantView:0x7fabb9254d30]-(0)-[_UIOLAGapGuide:0x7fabb96c0f80'UISV-distributing']>",
	    "<NSLayoutConstraint:0x7fabb96c10f0 'UISV-distributing-edge' _UIOLAGapGuide:0x7fabb96c0f80'UISV-distributing'.trailing == SearchUIVibrantView:0x7fabb95b4c60.leading>",
	    "<NSLayoutConstraint:0x7fabb96f3990 'UISV-fill-equally' _UIOLAGapGuide:0x7fabb96f35f0'UISV-distributing'.width == _UIOLAGapGuide:0x7fabb96616e0'UISV-distributing'.width>",
	    "<NSLayoutConstraint:0x7fabb96f49f0 'UISV-fill-equally' _UIOLAGapGuide:0x7fabb96f81a0'UISV-distributing'.width == _UIOLAGapGuide:0x7fabb96616e0'UISV-distributing'.width>",
	    "<NSLayoutConstraint:0x7fabb965faf0 'UISV-fill-equally' _UIOLAGapGuide:0x7fabb96f6800'UISV-distributing'.width == _UIOLAGapGuide:0x7fabb96616e0'UISV-distributing'.width>",
	    "<NSLayoutConstraint:0x7fabb96f6df0 'UISV-fill-equally' _UIOLAGapGuide:0x7fabb96c0f80'UISV-distributing'.width == _UIOLAGapGuide:0x7fabb96616e0'UISV-distributing'.width>",
	    "<NSLayoutConstraint:0x7fabb96c32c0 'UISV-spacing' H:[SearchUIVibrantView:0x7fabb8cb3f80]-(>=15)-[SearchUIVibrantView:0x7fabb94e1a30]>",
	    "<NSLayoutConstraint:0x7fabb9513430 'UIView-Encapsulated-Layout-Width' H:[UIView:0x7fabb963df50(0)]>"
	)
	
	Will attempt to recover by breaking constraint 
	<NSLayoutConstraint:0x7fabb8d059d0 H:[UIImageView:0x7fabb90f1c90]-(0)-|   (Names: '|':SearchUIVibrantView:0x7fabb95b4c60 )>
	
	Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
	The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Apr 12 18:05:19 MBPR SpringBoard[10002]: Unable to simultaneously satisfy constraints.
		Probably at least one of the constraints in the following list is one you don't want. 
		Try this: 
			(1) look at each constraint and try to figure out which you don't expect; 
			(2) find the code that added the unwanted constraint or constraints and fix it. 
	(
	    "<NSLayoutConstraint:0x7fabb96ecee0 H:|-(0)-[UIScrollView:0x7fabb9839600]   (Names: '|':UIView:0x7fabb963df50 )>",
	    "<NSLayoutConstraint:0x7fabb96ecf30 H:[UIScrollView:0x7fabb9839600]-(0)-|   (Names: '|':UIView:0x7fabb963df50 )>",
	    "<NSLayoutConstraint:0x7fabb9719b70 UIView:0x7fabb8c43690.width == UIScrollView:0x7fabb9839600.width>",
	    "<NSLayoutConstraint:0x7fabb94fb090 UITextView:0x7fabbb035600'You can search the web, y...'.leading == UIView:0x7fabb8c43690.leadingMargin>",
	    "<NSLayoutConstraint:0x7fabb94fb7c0 UITextView:0x7fabbb035600'You can search the web, y...'.centerX == UIView:0x7fabb8c43690.centerX>",
	    "<NSLayoutConstraint:0x7fabb9513430 'UIView-Encapsulated-Layout-Width' H:[UIView:0x7fabb963df50(0)]>"
	)
	
	Will attempt to recover by breaking constraint 
	<NSLayoutConstraint:0x7fabb94fb7c0 UITextView:0x7fabbb035600'You can search the web, y...'.centerX == UIView:0x7fabb8c43690.centerX>
	
	Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
	The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Apr 12 18:05:19 MBPR SpringBoard[10002]: Unable to simultaneously satisfy constraints.
		Probably at least one of the constraints in the following list is one you don't want. 
		Try this: 
			(1) look at each constraint and try to figure out which you don't expect; 
			(2) find the code that added the unwanted constraint or constraints and fix it. 
	(
	    "<NSLayoutConstraint:0x7fabb96ecee0 H:|-(0)-[UIScrollView:0x7fabb9839600]   (Names: '|':UIView:0x7fabb963df50 )>",
	    "<NSLayoutConstraint:0x7fabb96ecf30 H:[UIScrollView:0x7fabb9839600]-(0)-|   (Names: '|':UIView:0x7fabb963df50 )>",
	    "<NSLayoutConstraint:0x7fabb9719b70 UIView:0x7fabb8c43690.width == UIScrollView:0x7fabb9839600.width>",
	    "<NSLayoutConstraint:0x7fabb94fb4c0 UITextView:0x7fabba84e000'Continue'.leading == UIView:0x7fabb8c43690.leadingMargin>",
	    "<NSLayoutConstraint:0x7fabb94fb8e0 UITextView:0x7fabba84e000'Continue'.centerX == UIView:0x7fabb8c43690.centerX>",
	    "<NSLayoutConstraint:0x7fabb9513430 'UIView-Encapsulated-Layout-Width' H:[UIView:0x7fabb963df50(0)]>"
	)
	
	Will attempt to recover by breaking constraint 
	<NSLayoutConstraint:0x7fabb94fb8e0 UITextView:0x7fabba84e000'Continue'.centerX == UIView:0x7fabb8c43690.centerX>
	
	Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
	The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Apr 12 18:05:19 MBPR SpringBoard[10002]: Unable to simultaneously satisfy constraints.
		Probably at least one of the constraints in the following list is one you don't want. 
		Try this: 
			(1) look at each constraint and try to figure out which you don't expect; 
			(2) find the code that added the unwanted constraint or constraints and fix it. 
	(
	    "<NSLayoutConstraint:0x7fabb96ecee0 H:|-(0)-[UIScrollView:0x7fabb9839600]   (Names: '|':UIView:0x7fabb963df50 )>",
	    "<NSLayoutConstraint:0x7fabb96ecf30 H:[UIScrollView:0x7fabb9839600]-(0)-|   (Names: '|':UIView:0x7fabb963df50 )>",
	    "<NSLayoutConstraint:0x7fabb9719b70 UIView:0x7fabb8c43690.width == UIScrollView:0x7fabb9839600.width>",
	    "<NSLayoutConstraint:0x7fabb94e3210 UIStackView:0x7fabb8d48c90.leading == UIView:0x7fabb8c43690.leadingMargin>",
	    "<NSLayoutConstraint:0x7fabb94fb6e0 UIStackView:0x7fabb8d48c90.centerX == UIView:0x7fabb8c43690.centerX>",
	    "<NSLayoutConstraint:0x7fabb9513430 'UIView-Encapsulated-Layout-Width' H:[UIView:0x7fabb963df50(0)]>"
	)
	
	Will attempt to recover by breaking constraint 
	<NSLayoutConstraint:0x7fabb94fb6e0 UIStackView:0x7fabb8d48c90.centerX == UIView:0x7fabb8c43690.centerX>
	
	Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
	The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Apr 12 18:05:19 MBPR searchd[10051]: tcp_connection_set_tfo 6 TFO is not yet supported on Simulator
Apr 12 18:05:20 MBPR containermanagerd[10021]: 0x700000094000 systemGroupContainerPath: com.apple.containermanagerd.internal is not entitled for system group identifier: systemgroup.com.apple.lsd
Apr 12 18:05:20 MBPR lsd[10024]: LaunchServices:(called by PID 10010) Identifiers file does not exist, creating file.
Apr 12 18:05:20 MBPR containermanagerd[10021]: 0x700000094000 systemGroupContainerPath: com.apple.containermanagerd.internal is not entitled for system group identifier: systemgroup.com.apple.lsd
Apr 12 18:05:22 MBPR CoreSimulatorBridge[10010]: Requesting launch of com.apdl.net with options: {
	    arguments =     (
	        "-monodevelop-port",
	        59863
	    );
	    environment =     {
	        "DYLD_INSERT_LIBRARIES" = "/Library/Frameworks/Xamarin.iOS.framework/Versions/9.8.0.244/lib/monotouch-fixes.dylib";
	        "__XAMARIN_DEBUG_PORT__" = 59863;
	    };
	}
Apr 12 18:05:22 MBPR assertiond[10006]: assertion failed: 15F18c 13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Apr 12 18:05:22 MBPR com.apple.CoreSimulator.SimDevice.21F4CFFC-1481-4636-A4DD-05EB176C2FA1.launchd_sim[9986] (UIKitApplication:com.apdl.net[0x8717][10194]): Service exited due to signal: Killed: 9


---

=== Xamarin Studio Business ===

Version 6.0 (build 4968)
Installation UUID: 8a21976c-2429-4ed8-b441-c348a9a0d569
Runtime:
	Mono 4.4.0 (mono-4.4.0-branch/a3fabf1) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 404000122

=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.3 (10183.3)
Build 7D175

=== Xamarin.iOS ===

Version: 9.8.0.244 (Xamarin Business)
Hash: 977921b
Branch: cycle7
Build date: 2016-04-07 14:20:17-0400

=== Xamarin.Android ===

Version: 6.1.0.37 (Xamarin Business)
Android SDK: /Users/Neal/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.3

Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Not Installed

=== Xamarin.Mac ===

Version: 2.8.0.244 (Xamarin Business)

=== Build Information ===

Release ID: 600004968
Git revision: ab7092ce63351276394f283e4f9c8646baf51fce
Build date: 2016-04-08 09:30:34-04
Xamarin addins: be0a0aef6ec8b075b4ba4690bd147d1e33c2abd7
Build lane: monodevelop-lion-cycle7

=== Operating System ===

Mac OS X 10.11.5
Darwin MBPR.local 15.5.0 Darwin Kernel Version 15.5.0
    Mon Apr  4 19:07:49 PDT 2016
    root:xnu-3248.50.20~6/RELEASE_X86_64 x86_64
Comment 5 Rolf Bjarne Kvinge [MSFT] 2016-04-13 08:59:27 UTC
From the log it seems the iOS simulator killed the app, but doesn't explain much as to why:

> Apr 12 17:57:52 MBPR com.apple.CoreSimulator.SimDevice.21F4CFFC-1481-4636-A4DD-05EB176C2FA1.launchd_sim[9986] (UIKitApplication:com.apdl.net[0x7eea][10057]): Service exited due to signal: Killed: 9
> Apr 12 17:57:52 MBPR SpringBoard[10002]: Application 'UIKitApplication:com.apdl.net[0x7eea]' exited abnormally via signal.

I have a few more questions:
* Can you try with both a 32-bit simulator device and a 64-bit simulator device and see if there's a difference (iPhone 4s vs iPhone 6s for instance)?
* Does the app launch if you tap on it in the simulator?
* Please attach the build log.
Comment 6 Brian 2016-04-13 12:34:46 UTC
The latest Xamarin.iOS is failing because of the "beta-reports-active" flag in Entitlements.plist. This has been working in the past and is required for submitting your app to TestFlight. For now, I am removing that flag for debugging.

4/13/16 8:22:22.083 AM taskgated[352]: killed org.mycompany.myapp[pid 1057] because its use of the beta-reports-active entitlement is not allowed (error code -67050)
Comment 7 Sebastien Pouliot 2016-04-13 12:56:53 UTC
Thanks @Brian! There's no sign of `beta-reports-active` in previous logs but we'll look into it.

@Jeff could 392c7c2c which added `beta-reports-active` to the whitelist be the cause of it (it's the only place I see where we care about that entitlement) ?
Comment 8 Neal 2016-04-13 14:34:08 UTC
@Brian - I use TestFlight and do not that have that in any of my Entitlements.plist files.  AFAIK you simply sign with your release/iphone config and send that to Apple and TestFlight applies the required signing for beta.

@Xamarin - I tested on my iPhone 6S (on device) using Debug/iPhone and it (beta channel) works fine.  So the issue definitely is in the SIM which is where my other case (whatever the #) regarding core data crashes is also having a problem, on SIM and not device.  Again as stated I do not have the plist item per @Brian's mention.
Comment 9 Neal 2016-04-13 18:16:01 UTC
Not sure if it matters but the solution that is not working uses extensions, i.e. we have a Safari extension we use to integrate with the app.
Comment 10 Jeffrey Stedfast 2016-04-13 18:59:05 UTC
https://developer.apple.com/library/ios/qa/qa1830/_index.html

That FAQ about beta-reports-active suggests that only App Store distribution profiles have that key, so you wouldn't be able to debug with it anyway.

Also: Users probably shouldn't be adding that key to their Entitlements.plist since it's part of the Provisioning Profile if done properly.
Comment 11 Sebastien Pouliot 2016-04-13 19:53:41 UTC
@Brian: adding 

	<key>beta-reports-active</key>
	<integer>1</integer>

to an Entitlement.plist for a project does reproduce the issue. Thanks!

@Jeff I have not tried it on earlier XI versions (yet) but if it's a regression then this must be fixed.

@Neal can you attach (or email me) your app entitlements ? It could be an issue affecting more than one key. Thanks!
Comment 12 Neal 2016-04-13 19:59:04 UTC
Just emailed them to you Sebastien.
Comment 13 Jeffrey Stedfast 2016-04-13 20:17:40 UTC
@Sebastien The whitelist only applies to keys defined in the Provisioning Profile, it does not apply to keys that the user has added to their Entitlements.plist because it is assumed that the user put the key there and knows better than we do :)
Comment 14 Sebastien Pouliot 2016-04-14 13:32:22 UTC
@Jeff it's not related to the whitelist but it's an msbuild regression. It works again by reverting 8c8bd0452cd6ba63cbd3b6f8095c9b16c933f34b which you added to solve #39858
Comment 15 Jeffrey Stedfast 2016-04-14 15:10:21 UTC
Okay, so we find ourselves stuck between a rock and a hard place. If we enable codesigning for sim, then some users can't run on sim... but if we don't, then users can't access anything that requires entitlements.

Yay.

It seems to me that it probably comes down to a/some entitlement keys that is causing the simulator to blow up, but I have no idea which one(s) they are.
Comment 16 Jeffrey Stedfast 2016-04-14 15:12:15 UTC
BTW, a workaround for this is to go into your iOS Signing project options and clear the "Entitlements.plist" textbox.
Comment 17 Jeffrey Stedfast 2016-04-14 21:55:48 UTC
Okay, just added logic to blacklist a whole ton of Entitlements keys that seem to cause the simulator to crash even if the provisioning profile has them.

The only 1 that seems to actually work is com.apple.security.application-groups
Comment 18 Neal 2016-04-14 22:00:54 UTC
Hopefully you saw the ones I sent Sebastien as one of them I believe is needed for extensions to work.  I'll test when you have a new build or a beta refresh comes out.
Comment 19 Jeffrey Stedfast 2016-04-14 22:04:03 UTC
Yes, I saw them. It's probably com.apple.security.application-groups which does actually work.
Comment 20 kdobson 2016-04-16 14:36:46 UTC
I also ran in to this following the April 11 update to Beta, and I see this is now flagged as RESOLVED FIXED - is there a workaround to have the Beta work with Simulator?  

Changing my config per Comment 16 (https://bugzilla.xamarin.com/show_bug.cgi?id=40318#c16) made no change (with a full clean).  I'd grown used to the C# 6 support in Alpha/Beta and I'm struggling back in Stable ;)
Comment 21 Sebastien Pouliot 2016-04-16 15:04:11 UTC
@kdobson the workaround was in comment #16, if that does not work for you we'll need more information from you (e.g. minimally the full build log, with `-v -v -v -v`, or ideally a test case).
Comment 22 Neal 2016-04-17 12:58:18 UTC
I did some testing on this today and removed entitlements.plist from both of my projects (main app and extension) and ran the app and same problem.  I then did a clean solution and ran the app and it worked so it seems clearing the entitlements.plist didn't remove it from any cache or tell the build system to clean these - FYI.

Further testing was removing specific keys to find out which one caused it.  For me it's iCloud!  All of the others seem to be fine.  AFAIK we are supposed to be able to run and test icloud in the sim are we not? It works in stable now, we see icloud work in the sim as it preloads information, so I guess back to you, why is icloud causing the break at least for me?
Comment 23 Neal 2016-04-17 12:59:48 UTC
As you can see in the entitlements files I provided I use $(AppIdentifierPrefix)$(CFBundleIdentifier) - this isn't broke is it?
Comment 24 Jeffrey Stedfast 2016-04-17 16:15:15 UTC
In my own testing with cycle7 builds, adding/removing entitlements and hitting the "Play" button was all I needed in order to test the changes.

So the msbuild logic is working perfectly for me. I didn't test the cycle6 stuff, so it's possible that logic is broken, but it's working well in cycle7.

Those variables get expanded when the msbuild logic compiles the entitlements.plist file, so that's not the problem. You can verify this by editing the temporary Entitlements.xcent file in your obj directory.

I have no idea why iCloud is not working. I also could not get those keys to work, so I added them to the blacklist of keys to remove from the Simulator builds in order to get my sample app to run at all in the simulator.
Comment 25 Neal 2016-04-17 16:25:48 UTC
I'm not sure blacklisting them is the right fix here, it works in stable now so what you're doing is removing functionality that is broke on your end affecting us on our end for things we may depend on.  I suggest reopen this case and figure out why icloud is not working in BETA when it has been working all along until now.  Again, I think your approach of "commenting out what is causing failures" is wrong instead of fixing the root cause of the problem.
Comment 26 Jeffrey Stedfast 2016-04-17 20:23:59 UTC
It was "working" before because we didn't codesign at all.
Comment 27 Rustam Zaitov 2016-04-18 17:37:47 UTC
Hello @Jeff I tried to verify this issue with newer builds. Here is my env info: https://gist.github.com/rzaitov/60dcbf1d94c6f791babc58446421c505

I am still not able to launch the app on simulator.

What I did:
* Created AppId com.xamarin.issue40318
* Created iCloud container iCloud.com.xamarin.issue40318
* Assigned that container to AppId
* Enabled only iCloud service on apple.developer.com for that AppId (there is no HomeKit, Private VPN etc)
* Generated provisioning profile for that app
* Tried to launch with XS and XCode (I reimplemented the same app with Swift)

I was able to launch app via XCode (device and sim). But with XS I was able only run app on device. I mean I failed with sim.

Here is what my console log says – "Binary is improperly signed"  https://gist.github.com/rzaitov/29750ded65607ee05729c9863c5a99a0#file-info-txt-L29

I pushed XI and native version here – https://github.com/rzaitov/selfContained/tree/master/issue40318
Here is a screencast – http://screencast.com/t/iz9cMxaG2c

Here are app entitlements as well as embedded provisioning profile
https://gist.github.com/rzaitov/bc2ddb3957347ef77f466b2814685de9

Let me know if I missed something
Comment 28 Rustam Zaitov 2016-04-18 21:24:40 UTC
@Jeff I noticed that XCode doesn't code sign simulator builds. Please have a look at these two screenshots:

http://www.screencast.com/t/fwgmkvUhGqy
http://www.screencast.com/t/RTe5dYtj7Ap

Also I found this doc from Apple, which says:
"Note: Xcode does not code sign Simulator builds, so you must choose an iOS Device run destination in order to view the Code Sign step in the build log."

https://developer.apple.com/library/ios/technotes/tn2415/_index.html#//apple_ref/doc/uid/DTS40016427-CH1-TARGETCAPABILITIES

Hopefully this could help
Comment 29 Jeffrey Stedfast 2016-04-18 21:50:15 UTC
Thanks Rustam. That does indeed help.

I've just reverted back to the cycle6 behavior of not codesigning simulator builds.
Comment 30 Neal 2016-04-18 22:03:02 UTC
Thank YOU! BETA refresh please :)
Comment 31 Rustam Zaitov 2016-04-19 14:17:50 UTC
I tried new builds today. Now app doesn't crash during the start, but it crashes when I try to use iCloud features (xi app throws an exception). Meanwhile native app works as expected.

This works with native app on sim:
https://github.com/rzaitov/selfContained/blob/master/issue40318/native/issue40318/issue40318/ViewController.swift#L17-L18

Native app prints the following info to IDE console:
https://gist.github.com/rzaitov/26e764e45276b1b79cb81fc9ffb999dc

But xi app crashes on the same line within managed app (on sim):
https://github.com/rzaitov/selfContained/blob/master/issue40318/xi/Issue40318/ViewController.cs#L17

Here is an exception info (CKException Reason: The application is missing required entitlement com.apple.developer.icloud-services):
https://gist.github.com/rzaitov/33f1379a2e456e93807f1256afc2a060

Here is a screencast which compares differences between native and xi apps: http://screencast.com/t/5jE4yTGfFp
Notice that Entitlements used to build xi app contains com.apple.developer.icloud-services key but exception complains the opposite

XI app works on device as expected.

@Jeff I am not sure should I open new bug instead of reopening this one, let me know what works for you.

My env info: https://gist.github.com/rzaitov/3729c98cf3627374d2fa28cc8c0c334f
Comment 32 Rustam Zaitov 2016-04-19 16:46:50 UTC
@Jeff native app has these entitlement keys inside a binary

What I did.
* Compiled native app with XCode for simulator
* cd to output dir
* run $ hexdump -C issue40318.app/issue40318

There is an output
https://gist.github.com/rzaitov/9357bd9335660a0f48e1141ac25bac0e#file-info-txt-L875-L888

As you can see binary contains key/values from entitlement.plist file
Comment 33 Rustam Zaitov 2016-04-19 22:42:38 UTC
Finally I figured it out. Here are my research results.

#1 XCode doesn't sign builds for Simulator. To verify this we could use codesign tool like this:
* cd to XCode output dir (could be find under Touch step in Report Navigator)
* run $ xcode codesign -d --ent :- issue40318.app/issue40318
>> issue40318.app/issue40318: code object is not signed at all

#2 But XCode has entitlements inside Mach-O executable. To verify this lets inspect executable segments/sections:
Notice the Section __entitlements bellow
$ xcrun size -x -l -m issue40318.app/issue40318
>>
Segment __PAGEZERO: 0x100000000 (vmaddr 0x0 fileoff 0)
Segment __TEXT: 0x4000 (vmaddr 0x100000000 fileoff 0)
	Section __text: 0xff2 (addr 0x100001580 offset 5504)
	....
	Section __entitlements: 0x29e (addr 0x100003d18 offset 15640)
	total 0x2a75
Segment __DATA: 0x2000 (vmaddr 0x100004000 fileoff 16384)
	Section __nl_symbol_ptr: 0x10 (addr 0x100004000 offset 16384)
	....
	Section __common: 0x10 (addr 0x100005108 offset 0)
	total 0x1118
Segment __LINKEDIT: 0x6000 (vmaddr 0x100006000 fileoff 24576)
total 0x10000c000

Let's print __entitlements section under __TEXT segment:
$ xcrun otool -X -s __TEXT __entitlements issue40318.app/issue40318 | xxd -r
>>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>application-identifier</key>
	<string>2TU993NY9J.com.xamarin.issue40318</string>
	<key>aps-environment</key>
	<string>development</string>
	<key>com.apple.developer.icloud-container-identifiers</key>
	<array>
		<string>iCloud.com.xamarin.issue40318</string>
	</array>
	<key>com.apple.developer.icloud-services</key>
	<array>
		<string>CloudKit</string>
	</array>
	<key>com.apple.developer.team-identifier</key>
	<string>2TU993NY9J</string>
	<key>get-task-allow</key>
	<true/>
</dict>
</plist>

Wow. I believe that this is what we want in our executable as well.
To add section under some segment we need to pass argument (-sectcreate) to native linker. Doc link https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-SW6

For XI we could do this via additional mtouch arguments: -gcc_flags "-sectcreate __TEXT  __entitlements path/to/Entitlements.xcent"

I did the steps above and finally run app on simulator which doesn't crash when you try to query DefaultContainer (CKContainer.DefaultContainer)

I record the screencast to proof that this works. http://screencast.com/t/uTrtJ25t
I believe that @Sebastien could clarify the situation (I am not sure that this is the right way to fix the Sim issue), but hopefully this investigation could help.

I used this page to read about Mach-O https://www.objc.io/issues/6-build-tools/mach-o-executables/
Comment 34 Sebastien Pouliot 2016-04-19 23:50:38 UTC
@Rustam :thumbsup: nice digging :-)

Like you found it's possible, and has already been discussed [1], to include entitlements into the applications without code signing. 

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=20448#c0

However that's not ideal for the simulator since it requires re-linking the native application (best avoided for fast edit-build-debug cycles).

IOW using that approach should be avoided when no entitlements are present (so our fast, pre-build, simlauncher can be used). 

FWIW I have not seen another (post `ld`) trick but it might exists (and would be best). I'll have a look but this should not stop the implementation the known solution.
Comment 35 Jeffrey Stedfast 2016-04-20 00:43:47 UTC
If that's all it is, then this should already be fixed in master and cycle7 branches as of earlier today.
Comment 36 Sebastien Pouliot 2016-04-21 18:00:44 UTC
*** Bug 40572 has been marked as a duplicate of this bug. ***
Comment 37 Rustam Zaitov 2016-04-22 15:48:23 UTC
@Jeff, I tried to verify the issue with the most recent builds from cycle7 branches but without success. I mean I got a crash on sim when I tried to query DefaultContainer property.

Have a look at screencast:  http://screencast.com/t/fra7kAn5RD0u
Notice that executable doesn't contain __entitlements section under __TEXT segment.

Here is my environment info: https://gist.github.com/rzaitov/2ea79aa9d36b94eaf99f33cf6659a8d7
Let me know if I missed something (probably I tried builds without fix).

Build output: https://gist.github.com/891bb0e3fd9748d2d9109a6a9e9402dc
Comment 38 Jeffrey Stedfast 2016-04-22 17:40:20 UTC
Okay, this is fixed now. The problem was that the entitlements only got embedded if there were native references to link in. Now it always does it.
Comment 39 Rustam Zaitov 2016-04-22 20:28:13 UTC
@Jeff, It works with xamarin.ios-9.8.0.291
Thanks!