Page 1 of 1

Simulator fails in LC 9 with 11.2, while 11.1 in Xcode 9.2

Posted: Fri Apr 06, 2018 6:21 pm
by tomsve
I just a few days ago installed LC 9 stable and Xcode 9.2.

In Xcode I downloaded iOS simulator 11.1, while according to LiveCode "Mobile Support" and "Test Target" I have even 11.2 available...

Image

So whenever I Test run an application, the simulator fails to load.

Any ideas how I can get this thing going...?

Thanks,
Tom

Re: Simulator fails in LC 9 with 11.2, while 11.1 in Xcode 9.2

Posted: Fri Apr 06, 2018 9:42 pm
by LiveCode_Panos
Hi Tom,

What happens if you remove Xcode 8.2.1 from the "Mobile Support". Keeping only Xcode 9.2 and deploying to iOS 11.2 should be fine.

Best,
Panos
--

Re: Simulator fails in LC 9 with 11.2, while 11.1 in Xcode 9.2

Posted: Fri Apr 06, 2018 10:13 pm
by tomsve
I tried with only Xcode 9.2 first, without luck. And then I added Xcode 8.2.1.

I’ll try again when I’m back at my laptop.

Thanks,
Tom

Re: Simulator fails in LC 9 with 11.2, while 11.1 in Xcode 9.2

Posted: Sat Apr 07, 2018 12:04 am
by dougr
One thing I've learned in my experience with Apple environments is that all of the versions of the various components must "match". For example, Xcode 9.2 is NOT able to mount an iOS iPad with iOS 11.3... it requires Xcode 9.3. Ditto for other incompatibilities with Sierra vs High Sierra, etc.

You say you started with Xcode 9.2 and then added 8.2.1 so I don't see how Panos's suggestion is going to make a difference but it is definitely worth a try. Other than the compatibility issues, I don't have any other suggestions.

Re: Simulator fails in LC 9 with 11.2, while 11.1 in Xcode 9.2

Posted: Sat Apr 07, 2018 2:41 pm
by LiveCode_Panos
Hi all,
For example, Xcode 9.2 is NOT able to mount an iOS iPad with iOS 11.3...
This is not correct. There is a difference between the following two "iOS versions":

1. The version of the iOS *SDK* that is used to build the iOS standalone. This depends *only* on the Xcode version you are using to build the standalone (as the particular iOS SDK is included in the particular Xcode bundle)

2. The *minimum* version of iOS that *you* choose your app to run. You can set that in the Standalone Settings.

So for example, if you use LiveCode 9.0.0 and you are on MacOS Sierra or High Sierra, then you *must* Xcode 9.2 (--> that includes the iOS 11.2 SDK) to *build* the iOS standalone. In the standalone settings, if you choose e.g. "iOS 8.0 or more", then the standalone will run in any device that runs iOS 8.0 or more, so it will run in devices that run iOS 11.3 as well.

I suggested to remove Xcode 8.2.1 from the "Mobile Support", as when there are more than ones entries there it is possible that the standalone builder will get confused (I had seen that in older LC versions).

If the simulator does not start, try to open it first from Xcode:

- Open Xcode 9.2 and choose Xcode -> Developer Tools -> Simulator
- The simulator (possibly the iPhone 5s one) will open.
- I suggest changing the simulator device to iPhone 6 or above, as the default iPhone 5s I *think* is 32 bit, and LC 9.0.0 does not support 32 bit simulators.
- Once the new device (e.g. iPhone 6) simulator opens, wait for it to fully load, until it shows the home screen.

- Now go back to LC, choose "iPhone 11.2" in the Test target, and click on the Test button.

You should now be able to deploy to the simulator.

Best,
Panos
--

Re: Simulator fails in LC 9 with 11.2, while 11.1 in Xcode 9.2

Posted: Wed Jun 20, 2018 7:32 pm
by simon.schvartzman
Hi Panos, I have followed your guidelines with no joy. Please find below my configurations and the error I'm getting. What should I do? Help please I have been struggling with this problem for hours...
screens.001.jpg
error.jpeg
error.jpeg (24.24 KiB) Viewed 2525 times
Thanks

Re: Simulator fails in LC 9 with 11.2, while 11.1 in Xcode 9.2

Posted: Wed Jun 20, 2018 10:40 pm
by LiveCode_Panos
Hi Simon,

Maybe your command line tools are not set to Xcode9.2. Check this:

1. Open Xcode 9.2
2. Select Xcode -> Preferences from Xcode's menubar
3. Click on "Locations" icon
4. In the "Command Line Tools" dropdown, choose "Xcode 9.2"

Did that fix the problem?

Best,
Panos
--

Re: Simulator fails in LC 9 with 11.2, while 11.1 in Xcode 9.2

Posted: Wed Jun 20, 2018 11:03 pm
by simon.schvartzman
Panos many thanks for your prompt reply, the good news:
  • in fact my Xcode Command Line Tools was "empty"
  • I'm not getting the error anymore
the bad news:

still no joy, as can be seeing below LC tries to launch the App but the simulator never finishes. The simulator initially loads an iPhone5. I did manually open an iPhone6 but it didn't change anything

launching.jpeg

Re: Simulator fails in LC 9 with 11.2, while 11.1 in Xcode 9.2

Posted: Wed Jun 20, 2018 11:13 pm
by LiveCode_Panos
Hi Simon,

I had this problem too. Here is what I did to solve it:

1. Open manually iPhone 6 or more, and close iPhone 5
2. Wait until the new simulator fully loads and shows the home screen.
3. Quit and restart LC
4. Try again to test in the simulator, this time it should work.

Best,
Panos

Re: Simulator fails in LC 9 with 11.2, while 11.1 in Xcode 9.2

Posted: Wed Jun 20, 2018 11:20 pm
by simon.schvartzman
Panos, I did as you said but even with the iPhone 6 opened when I try to Test LC (or XCode) tries to open an iPhone 5 and then I end up as in the previous post...

Would it make sense to trash the XCode version download and install again?

Re: Simulator fails in LC 9 with 11.2, while 11.1 in Xcode 9.2

Posted: Thu Jun 21, 2018 1:51 am
by simon.schvartzman
I was able to make some progress, not sure exactly why...those are the steps I followed
  • Remove XCode 9.2 from LC Mobile Support
  • Close LC
  • Have an iPhone 6 open on Simulator
  • Open LC
  • Add XCode 9.2 to LC Mobile Support
It doesn't work all the times but it never worked before so it is definitely better.

Re: Simulator fails in LC 9 with 11.2, while 11.1 in Xcode 9.2

Posted: Thu Nov 01, 2018 6:51 am
by rodneyt
Hi Panos,

I had exactly the same issues reported in this thread, and this solution was the KEY for me. So THANK YOU for this post. +1 from me :-)

(Incidentally, I think Livecode should add some more informative messages when C++ errors are thrown during application testing, and be a little more constructive in advising developers on how to proceed. These issues seem to be reasonably common....)
LiveCode_Panos wrote:
Wed Jun 20, 2018 11:13 pm
Hi Simon,

I had this problem too. Here is what I did to solve it:

1. Open manually iPhone 6 or more, and close iPhone 5
2. Wait until the new simulator fully loads and shows the home screen.
3. Quit and restart LC
4. Try again to test in the simulator, this time it should work.

Best,
Panos