@@ -625,24 +625,21 @@ export class ProjectDataService implements IProjectDataService {
625625 projectDir : string ,
626626 platform : constants . SupportedPlatform
627627 ) : IBasePluginData {
628+ console . log ( 'getInstalledRuntimePackage' ) ;
629+ let packageName : string [ ] = [ ] ;
630+ if ( platform === constants . PlatformTypes . ios ) {
631+ packageName . push ( this . $projectData . nsConfig . ios ?. runtimePackageName , constants . SCOPED_IOS_RUNTIME_NAME , constants . TNS_IOS_RUNTIME_NAME ) ;
632+
633+ } else if ( platform === constants . PlatformTypes . android ) {
634+ packageName . push ( this . $projectData . nsConfig . android ?. runtimePackageName , constants . SCOPED_ANDROID_RUNTIME_NAME , constants . TNS_IOS_RUNTIME_NAME ) ;
635+ } else if ( platform === constants . PlatformTypes . visionos ) {
636+ packageName . push ( constants . SCOPED_VISIONOS_RUNTIME_NAME ) ;
637+ }
628638 const runtimePackage = this . $pluginsService
629639 . getDependenciesFromPackageJson ( projectDir )
630640 . devDependencies . find ( ( d ) => {
631- if ( platform === constants . PlatformTypes . ios ) {
632- const packageName = this . $projectData . nsConfig . ios ?. runtimePackageName || constants . SCOPED_IOS_RUNTIME_NAME ;
633- return [
634- packageName ,
635- constants . TNS_IOS_RUNTIME_NAME ,
636- ] . includes ( d . name ) ;
637- } else if ( platform === constants . PlatformTypes . android ) {
638- const packageName = this . $projectData . nsConfig . android ?. runtimePackageName || constants . SCOPED_ANDROID_RUNTIME_NAME ;
639- return [
640- packageName ,
641- constants . TNS_ANDROID_RUNTIME_NAME ,
642- ] . includes ( d . name ) ;
643- } else if ( platform === constants . PlatformTypes . visionos ) {
644- return d . name === constants . SCOPED_VISIONOS_RUNTIME_NAME ;
645- }
641+ return packageName . includes ( d . name ) ;
642+
646643 } ) ;
647644
648645 if ( runtimePackage ) {
0 commit comments