Environment
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.
Anyone looking at this? It's also an issue on NS7.
Looking for solution too.
Any update or work around for this?
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?
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.
Does anyone test with new 7.0 cli?
It's the same... Doesn't work on the latest CLI and macOS.
cc @NathanWalker
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 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.
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;
4) 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/
Well since Big Sur has just been released this issue is going to start becoming a roadblock to lots of people very quickly.
Same here can you release an update to solve it instead of a workaround.
@OPADA-Eng it's in progress....
Thanks @rigor789
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
Is this going to get patched in Nativescript CLI 6 as well?It still exists in 6.8.0
@chuckmitchell no plans - latest CLI is able to run ns6 apps, so no need to backport fixes to old CLI versions.
@rigor789 ok thank you! I was not aware...
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 :(
Most helpful comment
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
nson the command line):- Do
npm root -gto 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_modules2) 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:
4) Rerun your
nscommands 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_moduleand 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/