【发布时间】:2019-01-10 09:13:14
【问题描述】:
我有这种情况,我的所有 Cordova 项目都存储在 Windows 机器上。在 Windows 中,我使用的是 Android 平台,这没有问题。
对于 iOS 平台,我在 Mac OSX (High Sierra) 上工作,通过网络共享文件夹访问项目文件夹(在 Windows 中)(我需要避免项目文件/文件夹的重复)。在 Mac 中,我可以浏览访问已安装驱动器 (/Volumes/PROJECTS) 的 Windows 文件,我使用 Windows 上存在的授权用户帐户(“spacorum”,具有管理员权限)连接到该驱动器。
我可以从 Mac 终端创建一个新项目,该项目完美地存储在 Windows 共享文件夹中。然后,进入新创建的项目文件夹后,我尝试添加 ios 平台,这个过程永远不会结束,它什么也没做,“/platforms”下没有创建“ios”文件夹。
这是我运行“cordova platform add ios -d”的输出:
No scripts found for hook "before_platform_add".
No version supplied. Retrieving version from config.xml...
Grabbing pinned version.
Using cordova-fetch for cordova-ios@~4.5.4
saving
我必须取消它,否则它会像这样冻结好几天。 但是 Cordova 工作正常,我检查了它,因为如果我在本地文件夹上执行相同的步骤(存储在 Mac OSX 上,而不是通过网络存储在 Windows 中),该过程将按预期结束:
No scripts found for hook "before_platform_add".
No version supplied. Retrieving version from config.xml...
Grabbing pinned version.
Using cordova-fetch for cordova-ios@~4.5.4
saving
Running command: npm install cordova-ios@~4.5.4 --production --save
Command finished with error code 0: npm install,cordova-ios@~4.5.4,--production,--save
Removing "cordova-" prefix from cordova-ios
Adding ios project...
PlatformApi successfully found for platform ios
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: com.example.hello
Name: Hello
Copying iOS template project to /Users/spacorum/Desktop/test projects/Hello/platforms/ios
iOS project created with cordova-ios@4.5.5
Checking for any plugins added to the project that have not been installed in ios platform
No differences found between plugins added to project and installed in ios platform. Continuing...
PlatformApi successfully found for platform ios
Generating platform-specific config.xml from defaults for iOS at /Users/spacorum/Desktop/test projects/Hello/platforms/ios/Hello/config.xml
Merging project's config.xml into platform-specific iOS config.xml
Merging and updating files from [www, platforms/ios/platform_www] to platforms/ios/www
mkdir platforms/ios/www/cordova-js-src
copy platforms/ios/platform_www/cordova-js-src/exec.js platforms/ios/www/cordova-js-src/exec.js (new file)
copy platforms/ios/platform_www/cordova-js-src/platform.js platforms/ios/www/cordova-js-src/platform.js (new file)
mkdir platforms/ios/www/cordova-js-src/plugin
mkdir platforms/ios/www/cordova-js-src/plugin/ios
copy platforms/ios/platform_www/cordova-js-src/plugin/ios/console.js platforms/ios/www/cordova-js-src/plugin/ios/console.js (new file)
copy platforms/ios/platform_www/cordova-js-src/plugin/ios/logger.js platforms/ios/www/cordova-js-src/plugin/ios/logger.js (new file)
copy platforms/ios/platform_www/cordova.js platforms/ios/www/cordova.js (updated file)
copy www/index.html platforms/ios/www/index.html (updated file)
copy www/js/index.js platforms/ios/www/js/index.js (updated file)
Current launch storyboard undefined
Not changing launch storyboard setting in info plist.
Wrote out iOS Bundle Identifier "com.example.hello" and iOS Bundle Version "1.0.0" to /Users/spacorum/Desktop/test projects/Hello/platforms/ios/Hello/Hello-Info.plist
No need to update build settings for launch storyboard support.
iOS Product Name has not changed (still "Hello")
This app does not have icons defined
This app does not have splash screens defined
Updating launch storyboard images at platforms/ios/Hello/Images.xcassets/LaunchStoryboard.imageset/
Updating Storyboard image set contents.json
This app does not have additional resource files defined
Prepared iOS project successfully
Installing plugin "cordova-plugin-whitelist" following successful platform add of ios
Found variables for "cordova-plugin-whitelist". Processing as cli_variables.
Installing "cordova-plugin-whitelist" for ios
Running command: "/Users/spacorum/Desktop/test projects/Hello/platforms/ios/cordova/version"
Command finished with error code 0: /Users/spacorum/Desktop/test projects/Hello/platforms/ios/cordova/version
Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-whitelist on ios platform only.
No scripts found for hook "before_plugin_install".
Install start for "cordova-plugin-whitelist" on ios.
Beginning processing of action stack for ios project...
Action stack processing complete.
Install complete for cordova-plugin-whitelist on ios.
Finding scripts for "after_plugin_install" hook from plugin cordova-plugin-whitelist on ios platform only.
No scripts found for hook "after_plugin_install".
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Checking config.xml for saved plugins that haven't been added to the project
Checking for any plugins added to the project that have not been installed in ios platform
No differences found between plugins added to project and installed in ios platform. Continuing...
Generating platform-specific config.xml from defaults for iOS at /Users/spacorum/Desktop/test projects/Hello/platforms/ios/Hello/config.xml
Merging project's config.xml into platform-specific iOS config.xml
Merging and updating files from [www, platforms/ios/platform_www] to platforms/ios/www
copy platforms/ios/platform_www/cordova_plugins.js platforms/ios/www/cordova_plugins.js (updated file)
Current launch storyboard undefined
Not changing launch storyboard setting in info plist.
Wrote out iOS Bundle Identifier "com.example.hello" and iOS Bundle Version "1.0.0" to /Users/spacorum/Desktop/test projects/Hello/platforms/ios/Hello/Hello-Info.plist
No need to update build settings for launch storyboard support.
iOS Product Name has not changed (still "Hello")
This app does not have icons defined
This app does not have splash screens defined
Updating launch storyboard images at platforms/ios/Hello/Images.xcassets/LaunchStoryboard.imageset/
Updating Storyboard image set contents.json
This app does not have additional resource files defined
Prepared iOS project successfully
No scripts found for hook "after_prepare".
Saving ios@4.5.5 into platforms.json
--save flag or autosave detected
Saving ios@~4.5.5 into config.xml file ...
adding ios to cordova.platforms array in package.json
No scripts found for hook "after_platform_add".
如果这是权限问题,我不知道如何解决。 Windows 共享文件夹具有完全访问权限,我以授权用户身份登录。另外,我能够创建项目,如果我没有 Mac 的权限,我怀疑我可以做到,对吧?
注意:我注意到,如果我在 Mac 终端 (ls -la) 上列出从 Windows 共享的文件夹,每个文件夹的默认权限都为“700”,我无法使用 chmod 更改它,没有任何变化。另一方面,我在 Mac 上的本地项目文件夹中的每个子文件夹都具有更多权限 (755),我可以使用 chmod 毫无问题地更改它。
不是一个重度 *nix 用户,所以任何帮助都将不胜感激,我已经在这里呆了一个星期了。
【问题讨论】:
标签: ios macos cordova networking directory