Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force emulator to run with specific iOS version? #952

Closed
enchev opened this issue Sep 23, 2015 · 14 comments
Closed

Force emulator to run with specific iOS version? #952

enchev opened this issue Sep 23, 2015 · 14 comments
Assignees
Milestone

Comments

@enchev
Copy link
Contributor

enchev commented Sep 23, 2015

From @emiloberg on September 21, 2015 12:58

Hi,

All of a sudden (might be connected with me updating to 1.3.0), when I run tns emulate ios --device iPhone-5, my iOS simulator gives me:

The iOS 7.1 simulator runtime is not available.
Unable to open liblaunch_sim.dylib. Try reinstalling Xcode or the simulator runtime.

skarmavbild 2015-09-21 kl 14 52 01

This is most probably because Xcode 7 (7A220 in my case)/Yosemite dropped support for simulating iOS 7.x. However, how can I make tns emulate ios --device iPhone-5 use iOS 8.x instead of 7.x?

Running tns emulate ios --device iPhone-6 (n.b iPhone 6) works as it opens the emulator with iOS 8.1.

Copied from original issue: NativeScript/NativeScript#794

@enchev
Copy link
Contributor Author

enchev commented Sep 23, 2015

From @emiloberg on September 22, 2015 7:11

Looking at Xcode, there's no such thing as a 7.1 simulator (as Xcode 7 doesn't support it):

skarmavbild 2015-09-22 kl 09 08 41

@enchev
Copy link
Contributor Author

enchev commented Sep 23, 2015

From @manijak on September 22, 2015 8:32

I haven't installed Xcode7 yet. I've heard that {N} modules are not supported in iOS 9?

Does this mean that iOS7 apps are no more? And users of iPhone3 & 4 are out? We can focus on developing apps that are 8.x > ?

@enchev
Copy link
Contributor Author

enchev commented Sep 23, 2015

From @emiloberg on September 22, 2015 8:55

This doesn't mean that you can't build iOS7 apps (as far as I understand it), it just means that you can't use the emulator iOS 7 emulator.

@Fatme Fatme added this to the 1.5.0 (under consideration) milestone Oct 1, 2015
Fatme pushed a commit to NativeScript/ios-sim-portable that referenced this issue Oct 1, 2015
@Fatme Fatme modified the milestones: 1.4.1, 1.5.0 Oct 5, 2015
@maknz
Copy link

maknz commented Oct 6, 2015

+1 this would be good. We're just building in Xcode for now.

@teobugslayer teobugslayer modified the milestones: 1.4.2, 1.4.1 Oct 7, 2015
@protonmesh
Copy link

I encountered the same problem after recently upgrading to XCode 7.

isim device-types showed that the older iOS 7 simulator runtime was still available and was not deleted (The XCode upgrade correctly deleted the iOS 8 runtime, which was bundled in with XCode 6. I suspect the reason the 7 runtime was not automatically deleted is because it was installed manually from the XCode Preferences -> Downloads -> Components section.

Regardless, the way I forced using the latest iOS 9 simulator runtime is simply deleting /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/ directory.

Now running isim device-types showed only the iOS 9 devices and simulator was starting properly.

@teobugslayer teobugslayer modified the milestones: 1.5.0, 1.4.2 Oct 14, 2015
Fatme pushed a commit to NativeScript/ios-sim-portable that referenced this issue Oct 21, 2015
Fatme pushed a commit to NativeScript/ios-sim-portable that referenced this issue Oct 22, 2015
Fatme pushed a commit to NativeScript/ios-sim-portable that referenced this issue Oct 27, 2015
@teobugslayer
Copy link
Contributor

With the latest master you can select devices using tns emulate ios --device "iPhone5" - nothe the device name has changed. This will be released with 1.5.0.

@emiloberg
Copy link

How is this a change? Appart from the removal of the dash.

@dtopuzov
Copy link
Contributor

Yes, --device now do not use the format with dashes. --device should specify the name of Simulator you see in the Xcode UI (name which is listed by "xcrun simctl list devices").

@dtopuzov
Copy link
Contributor

{N} CLI 1.5.0 will support Xcode 7 and 7.1, we hope it will be live next week.

@emiloberg
Copy link

I still don't get it.

How to choose iOS version? I have loads of a different, let's say iPhone 6, emulators. I've one for iOS 8.0, one for 8.1, 8.2, 8.3, 8.4, 9.0, 9.1 and so on. How do I start emulate an iPhone 6 with iOS 8.0 and another iPhone 6 with iOS 9.1 ?

@dtopuzov
Copy link
Contributor

Ok I've got your idea and will reopen the issue.

With {N} 1.5 you should create emulator with unique name and use it in --device option.
Currently we don't have way to handle ambiguous simulators (with same name).

May be in future we can extend --device option, so user is able to specify both device name and version.

@dtopuzov dtopuzov reopened this Nov 16, 2015
@dtopuzov dtopuzov modified the milestones: 1.6.0 (Under consideration), 1.5.0 Nov 16, 2015
@dtopuzov dtopuzov removed the 3 - Done label Nov 16, 2015
@emiloberg
Copy link

As this is the way XCode sets up the Emulators per default, I'd say you'd want to support doing --device iPhone-6 --sdk 8.0

@Fatme
Copy link
Contributor

Fatme commented Nov 17, 2015

Hi @emiloberg,

With {N} 1.5 you'll be able to specify --sdk option to emulate command.

@atanasovg atanasovg removed this from the 1.6.0 (Under consideration) milestone Jan 5, 2016
@rosen-vladimirov rosen-vladimirov added this to the 1.6.0 milestone Feb 11, 2016
@rosen-vladimirov rosen-vladimirov self-assigned this Feb 11, 2016
@rosen-vladimirov
Copy link
Contributor

Hm, I'm not sure what happened here, but this feature is available in our 1.5.2 release. The option is --sdk, for example:
tns emulate ios --sdk 9.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants