Fix irregular ios version by using getPlatformVersionsFromFileSystem #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is like #35.
Instead of the webpack dependent method
__non_webpack_require__
,This PR uses the
getPlatVersionsFromFileSystem
method which is same as the one defined in cordova-lib/platform_metadata.js.PR #35 is the following.
iOSPlatform version should be the semver form, like "4.4.0".
However, If the user add platform ios by using the directory name or git:// case, like
cordova platform add /Home/user/cordova/ios/cordova-ios4.4.0
The iOSPlatform version is Home/user/cordova/ios/cordova-ios4.4.0 not 4.4.0.
(See
https://github.com/apache/cordova-lib/blob/master/src/cordova/platform_metadata.js
and its comment above the getVersions method)
In such case, this plugin hook script does not work.
This pull request, the correct iOSPlatform version is obtained by accessing platform/ios/cordova/version file.