Bug 22750 - [Xcode6/iOS 7 and 7.1 simulator] iOS application does not launch on iOS 7 and 7.1 simulator.
Summary: [Xcode6/iOS 7 and 7.1 simulator] iOS application does not launch on iOS 7 and...
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: XI 8.0.0
Hardware: Macintosh Mac OS
: High critical
Target Milestone: 8.2.0
Assignee: Sebastien Pouliot
URL:
: 20739 22898 22996 23225 23290 ()
Depends on:
Blocks:
 
Reported: 2014-09-08 14:01 UTC by Akhilesh kumar
Modified: 2014-11-12 13:34 UTC (History)
14 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:
RESOLVED FIXED

Description Akhilesh kumar 2014-09-08 14:01:29 UTC
[Using Xcode 6 Beta 7/ iOS 7.0 and iOS 7.1 simulator]

On running iOS application(Classic and Unified) on iOS 7.0 and 7.1 simulator with Xcode 6, as soon as application launches it gets Terminated.

However, it is working fine on iOS 8.0 simulator with Xcode 6

IDE log: https://gist.github.com/saurabh360/7bdd7d97ba146e39212a
Mac system log: https://gist.github.com/saurabh360/17684297c7be4bcea691

Application output: 

Xamarin.iOS: USING STAGING SERVER FOR ACTIVATION
Xamarin.iOS: USING STAGING SERVER FOR ACTIVATION
Starting iPhone 4s
Launching application
Application launched. PID = 8321
Press enter to terminate the application
>
Application Terminated

Environment info:
=== Xamarin Studio ===

Version 5.4 (build 206)
Installation UUID: ff0c16c6-3c75-46d8-ac56-56c3b56e2c76
Runtime:
	Mono 3.8.0 ((no/45d0ba1)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000009

=== Apple Developer Tools ===

Xcode 6.0 (6256.20)
Build 6A280n

=== Xamarin.Mac ===

Version: 1.11.0.1 (Enterprise Edition)

=== Xamarin.Android ===

Version: 4.17.0 (Enterprise Edition)
Android SDK: /Users/360_macmini/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		4.5    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.iOS ===

Version: 7.9.5.14 (Enterprise Edition)
Hash: 828bf09
Branch: 
Build date: 2014-09-06 14:00:12-0400

=== Build Information ===

Release ID: 504000206
Git revision: f4eb04462127b0dbe511662e6ed7399f50fdf531
Build date: 2014-09-07 16:41:45-04
Xamarin addins: 9c62b69db7a6c1a887954dad2d421972ad4cb948

=== Operating System ===

Mac OS X 10.9.4
Darwin Apples-iMac.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 1 Sebastien Pouliot 2014-09-08 14:34:06 UTC
Your 2nd link (Mac logs) shows that crash report exists. Could you attach them to the bug report ?
Comment 2 Sebastien Pouliot 2014-09-08 22:48:30 UTC
@Akhilesh I could duplicate the issue locally - but please try to attach all revelent information to the bug reports.

---

Dyld Error Message:
  Symbol not found: __dealloc
  Referenced from: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
  Expected in: /Applications/Xcode6-Beta7.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/usr/lib/libobjc.A.dylib
 in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation

It seems the last hack did not get us past beta 6. So we're back with the (SceneKit.)framework* confusion again - Apple closed the bug report I made (and the other one is not part of Xcode beta 7 release notes), so they could have "fixed" this in a way that broke us.

* it's SceneKit-only on Mavericks (YMMV on Yosemite or ML)

Right now even completly disabling "fastsim" does not help. We might have to start shipping several simlauncher (not use a build time cache like we planned) since we do not know, at build time, under which simulator the build will be executed :-|

note: enabling the linker helps only if the framework are never used - i.e. if it's under a condition, like a version check, then it will present and the simulator will fail to load properly.

note 2: I'm starting to wonder if a solution (or at least yet another hack) would be to modify the dependendies before lauching the app in the simulator

note 3: We could remove SceneKit from the simulator build in 8.0 (or just add it if the target is 8.0+). That's an _ugly_ hack but we likely have more people expecting 7.x simulators to work (in XI 8.0) than SceneKit (for which we can provide workarounds). Need to sleep on it...
Comment 3 Sebastien Pouliot 2014-09-10 17:31:23 UTC
*** Bug 20739 has been marked as a duplicate of this bug. ***
Comment 4 Sebastien Pouliot 2014-09-10 17:35:55 UTC
This was either having:

(a) SceneKit working on iOS8 simulator; or

(b) iOS7.x simulators working

Not both. Decision was made to have SceneKit working for 8.0.

We need to re-think the whole simlauncher strategy (as explained above) so that random Apple changes do not affect us (over and over again). At best I'd say XI 8.2 (with a late backport).
Comment 5 PJ 2014-09-10 17:46:01 UTC
+CC Brendan/Chrisntr just so they see Comment 4 and can prepare.
Comment 6 Sebastien Pouliot 2014-09-11 22:01:37 UTC
*** Bug 22898 has been marked as a duplicate of this bug. ***
Comment 7 Sebastien Pouliot 2014-09-15 10:19:01 UTC
*** Bug 22996 has been marked as a duplicate of this bug. ***
Comment 8 Rolf Bjarne Kvinge [MSFT] 2014-09-22 08:50:42 UTC
*** Bug 23225 has been marked as a duplicate of this bug. ***
Comment 9 Sebastien Pouliot 2014-09-22 20:52:51 UTC
I have a local fix, testing...
Comment 10 James Montemagno [MSFT] 2014-09-22 23:13:56 UTC
I had this happened to me, however if I changed linked from No Linking to "Link SDK Assemblies" then it worked just fine.
Comment 11 Sebastien Pouliot 2014-09-22 23:30:52 UTC
@James yes, it's been suggested as a workaround several times, e.g. https://bugzilla.xamarin.com/show_bug.cgi?id=23225#c4 for the last duplicate bug.

It can work because the linker remove unused code, which in turn might mean removing unused framework(s), which can solve the issue. 

Sadly it does not always solve every cases - e.g. if there's a reference to a framework (e.g. SceneKit) the linker won't be able to remove it (and the app still won't work on the 7.x simulator since the sim will try to load the SceneKit.framework from OSX). Conditional code (around newer features) and components are two  common ways you can get references to frameworks you might not use at runtime.
Comment 12 Sebastien Pouliot 2014-09-23 09:23:53 UTC
*** Bug 23290 has been marked as a duplicate of this bug. ***
Comment 13 Sebastien Pouliot 2014-09-23 15:20:38 UTC
Fixed in master / 719c2d79741c16e0031a38adaf2a29c17f13befa
Comment 14 Sebastien Pouliot 2014-09-23 15:29:40 UTC
Backported to monotouch-8.2.0-branch in 9d613ff9ef134a0a9f8554b66b50025674916961
Comment 15 Akhilesh kumar 2014-09-29 07:00:11 UTC
I have checked this issue with latest builds:

Mono 3.10.0.18
XS 5.5(Build 222)
XI 8.2.0.187
Xcode 6.0.1

For Classic API iOS apps:

I am successfully able to launch classic api iOS application on iOS7, iOS 7.1 and iOS 8 simulators.


For Unified API iOS application:

I am just able to launch unified api iOS application on iOS 8 simulators. But I am still not able to launch  on iOS 7 and iOS 7.1 simulators and it gives "Application Terminated" message in XS application output. "This application supports only iOS8 correctly."

If it is correct behavior that unified api iOS application will work only with iOS 8 simulator then it should display a relevant message like "This application supports only iOS8 correctly." in application output.
Comment 16 Akhilesh kumar 2014-09-29 07:03:07 UTC
Please ignore comment 15.

I have checked this issue with latest builds:

Mono 3.10.0.18
XS 5.5(Build 222)
XI 8.2.0.187
Xcode 6.0.1

For Classic API iOS apps:

I am successfully able to launch classic api iOS application on iOS7, iOS 7.1
and iOS 8 simulators.


For Unified API iOS application:

I am just able to launch unified api iOS application on iOS 8 simulators. But I
am still not able to launch  on iOS 7 and iOS 7.1 simulators and it gives
"Application Terminated" message in XS application output. http://www.screencast.com/t/Uh0Spu7ePI

If it is correct behavior that unified api iOS application will work only with
iOS 8 simulator then it should display a relevant message like "This
application supports only iOS8 correctly." in application output.
Comment 19 Mohit Kheterpal 2014-10-01 11:37:21 UTC
I have checked this issue and now we are able to build and deploy sample template application on iOS 7.1/7.0 simulator without any crash.

Hence closing this issue.

XVS 3.7.191 + X.iOS 8.2.0.91
Xcode 6.0.1

Thanks
Comment 20 James Clancey 2014-10-30 23:45:45 UTC
Reopening this issue. I cannot deploy to iOS 7.1 simulators 

Console Output:
Starting iPad 2
Launching application
Application launched. PID = 23665
Press enter to terminate the application
>
Application Terminated




Xamarin Studio
Version 5.6.2 (build 5)
Installation UUID: 52089b5f-87fd-4a01-8acf-c63eac855683
Runtime:
	Mono 3.10.0 ((detached/633e444)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000020

Apple Developer Tools
Xcode 6.1 (6604)
Build 6A1052d

Xamarin.Mac
Version: 1.11.1.3 (Business Edition)

Xamarin.Android
Version: 4.99.0 (Business Edition)
Android SDK: /Users/Clancey/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		4.5    (API level 21)
Java SDK: /usr
java version "1.8.0_20-ea"
Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b23)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b22, mixed mode)

Xamarin.iOS
Version: 8.2.0.193 (Business Edition)
Hash: 959c1e4
Branch: 
Build date: 2014-10-03 00:25:37-0400

Build Information
Release ID: 506020005
Git revision: 19bc3b64b70332bfab18faf9cf1ce7d3aa191b36
Build date: 2014-10-17 14:49:01-04

Operating System
Mac OS X 10.10.0
Darwin Jamess-MacBook-Pro-3.local 14.0.0 Darwin Kernel Version 14.0.0
    Tue Sep 23 23:01:41 PDT 2014
    root:xnu-2782.1.97~6/RELEASE_X86_64 x86_64
Comment 21 Sebastien Pouliot 2014-10-31 09:10:59 UTC
Does it work from Xcode itself ? Xcode updates can break the simulator list and requires a reboot to fix (it often happen if you rename Xcode.app*, but that's not the only condition where it happens).

* it's part of Apple release notes

If it's not listed (iPad 2 - iOS 7.1) in Xcode's Device windows then it won't be available to XS/XI. XS 5.5.3 (stable) will query the "right" list of simulator that Xcode presentely has available. 5.6.x is older (evolve previews) and can show (or miss) some configurations.

FWIW I do not think it's the same issue, as the original was easy to duplicate (and would not have pass thru QA undetected).

If the above did not help please include your:
1. build log (with -v -v -v -v) and;
2. console.app simulator logs (that will show why the app did not launch)
Comment 22 Sebastien Pouliot 2014-11-12 13:17:42 UTC
Closing, no one else reported this as a regression.

@James if you can duplicate this please open a different bug report (it's something else, or many people would have reported it) and include the things I asked in comment #21
Comment 23 James Montemagno [MSFT] 2014-11-12 13:34:29 UTC
This is working just fine for me now. I haven't been able to reproduce it for a long while.