Skip to content

tns device does not show ios devices on MacOS 11 (Big Sur beta) #5342

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

Closed
msn444 opened this issue Jul 15, 2020 · 17 comments · Fixed by #5439
Closed

tns device does not show ios devices on MacOS 11 (Big Sur beta) #5342

msn444 opened this issue Jul 15, 2020 · 17 comments · Fixed by #5439
Assignees
Milestone

Comments

@msn444
Copy link

msn444 commented Jul 15, 2020

Environment

  • CLI: 6.7.8
  • MacOS 11.0 Beta

Describe the bug
tns devices shows no ios devices, even though devices are connected and detected in xcode.
tns devices reports "iTunes is not installed. Install it on your system and run this command again." iTunes is long deprecated AFIAK.

To Reproduce
Run "tns devices"

Expected behavior
List of connected ios devices.

@msn444
Copy link
Author

msn444 commented Sep 23, 2020

Anyone looking at this? It's also an issue on NS7.

@powerdot
Copy link

powerdot commented Oct 7, 2020

Looking for solution too.

@afflick
Copy link

afflick commented Oct 9, 2020

Any update or work around for this?

@ghost
Copy link

ghost commented Oct 12, 2020

Also looking for an update. Does anyone know if this is due to a missing component within Big Sur that was present in Catalina, or is this just a case of using the wrong set of tooling within the CLI packages themselves?

@losbeekos
Copy link

losbeekos commented Nov 13, 2020

I don't have Big Sur installed yet because of this, but from what I understand from looking at the code is that { NS } relies heavily on iTunes to search for its devices, which makes sense. With Big Sur Apple removed iTunes in favour of Apple Music so { NS } needs to migrate over to account for that.

@gle6as
Copy link

gle6as commented Nov 13, 2020

Does anyone test with new 7.0 cli?

@romandrahan
Copy link

It's the same... Doesn't work on the latest CLI and macOS.

cc @NathanWalker

@jamescodesthings
Copy link

jamescodesthings commented Nov 13, 2020

Same here on Big Sur with latest ns cli blocks device deployment during testing i.e. ns run ios --device 'my device id' fails on the Itunes not installed error.

Workaround

Workaround for people who need to deploy to device in these tough times:

  1. Know your device id, you can find this in XCode: Window -> Devices and Simulators -> Plug yo device in and look at "Identifier"
  2. Disable iTunes install verification by modifying the nativescript node_module directly. (see below).
  3. Profit.

How to disable that error message

  1. Find the node_modules folder for nativescript:

    • If you have nativescript installed globally (use ns on the command line):
      • Do npm root -g to find your global node_modules directory.
    • If you have nativescript installed locally and run the ns commands via an npm script, it's [your_project]/node_modules
  2. Open node_modules/nativescript/lib/common/validators/iTunes-validator.js:43

    • relevant to [email protected], other versions it might be in a different place, grep for 'NOT_INSTALLED' and you'll find it
  3. Comment out that nasty return statement:

else if (this.$hostInfo.isDarwin) {
  const coreFoundationDir = "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation";
  const mobileDeviceDir = "/System/Library/PrivateFrameworks/MobileDevice.framework/MobileDevice";
  if (!this.isiTunesInstalledCore(coreFoundationDir, mobileDeviceDir)) {
      // commented this out
      // return ITunesValidator.NOT_INSTALLED_iTUNES_ERROR_MESSAGE;
  }
  return null;
}
return ITunesValidator.UNSUPPORTED_OS_ERROR_MESSAGE;
  1. Rerun your ns commands as you normally would (with --device '[device-id]') the run command still appears to work for me if I disable the validation.

Note I wouldn't normally suggest modifying a node_module and disabling install validation but it's a functioning workaround for me at the moment until this has been fixed.

Relevant link about this change from elsewhere on the web that suggest why this has changed: https://www.reddit.com/r/MacOSBeta/comments/hfknpa/is_corefoundation_missing_for_everyone_on_big_sur/

@mcgouganp
Copy link

Well since Big Sur has just been released this issue is going to start becoming a roadblock to lots of people very quickly.

@rigor789 rigor789 self-assigned this Nov 16, 2020
@rigor789 rigor789 added this to the 7.0.12 milestone Nov 16, 2020
@OPADA-Eng
Copy link

Same here can you release an update to solve it instead of a workaround.

@rigor789
Copy link
Member

@OPADA-Eng it's in progress....

@OPADA-Eng
Copy link

Thanks @rigor789

rigor789 added a commit that referenced this issue Nov 16, 2020
@rigor789
Copy link
Member

Pushed a temp fix for this - and it's now available in [email protected] - we are looking into a more thorough fix, so the temp fix will likely stay on the next tag.

npm i -g nativescript@next

@chuckmitchell
Copy link

Is this going to get patched in Nativescript CLI 6 as well?It still exists in 6.8.0

@rigor789
Copy link
Member

@chuckmitchell no plans - latest CLI is able to run ns6 apps, so no need to backport fixes to old CLI versions.

@chuckmitchell
Copy link

@rigor789 ok thank you! I was not aware...

@7ammer
Copy link

7ammer commented Jan 22, 2021

HI @rigor789
I am unable to run ns6 apps properly when using ns7 :(
I just see a blank white page. A simple alert('hello') function fails as well on mount.

ns version = 7.1.2
tns-ios = 6.5.4 (I think??)

I removed the old tns-ios version like so ns platform remove ios and rm -fr platforms then ran ns platform add ios. However, Looking at the package.json I don't seem to see a change??

FYI: I cannot fully migrate to ns7 because some of the ns plugins are not yet up to date. This is unfortunately causing lots of headaches as this has caused me to miss some deadlines :(

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

Successfully merging a pull request may close this issue.