janpio edited a comment on issue #523: With cordova-ios 5.0.0, 
phonegap-plugin-push cannot be added
URL: https://github.com/apache/cordova-ios/issues/523#issuecomment-463394883
 
 
   Running the `plugin add` command with `--verbose` gives some additional 
output:
   
   ```
   E:\Projects\throwaway\pushIos5Repro  ([email protected])
   λ cordova plugin add phonegap-plugin-push --verbose
   No scripts found for hook "before_plugin_add".
   No version specified for phonegap-plugin-push, retrieving version from 
config.xml
   No version for phonegap-plugin-push saved in config.xml or package.json
   Attempting to use npm info for phonegap-plugin-push to choose a compatible 
release
   Running command: cmd "/s /c 
"C:\Users\Jan\scoop\apps\nvm\current\nodejs\nodejs\npm.cmd view 
phonegap-plugin-push --json""
   Command finished with error code 0: cmd /s /c 
"C:\Users\Jan\scoop\apps\nvm\current\nodejs\nodejs\npm.cmd view 
phonegap-plugin-push --json"
   Running command: cmd "/s /c 
"E:\Projects\throwaway\pushIos5Repro\platforms\ios\cordova\version.bat""
   Command finished with error code 0: cmd /s /c 
"E:\Projects\throwaway\pushIos5Repro\platforms\ios\cordova\version.bat"
   Calling plugman.fetch on plugin "[email protected]"
   saving
   Running command: cmd "/s /c 
"C:\Users\Jan\scoop\apps\nvm\current\nodejs\nodejs\npm.cmd install 
[email protected] --production --save""
   Command finished with error code 0: cmd /s /c 
"C:\Users\Jan\scoop\apps\nvm\current\nodejs\nodejs\npm.cmd install 
[email protected] --production --save"
   Copying plugin 
"E:\Projects\throwaway\pushIos5Repro\node_modules\phonegap-plugin-push" => 
"E:\Projects\throwaway\pushIos5Repro\plugins\phonegap-plugin-push"
   Calling plugman.install on plugin 
"E:\Projects\throwaway\pushIos5Repro\plugins\phonegap-plugin-push" for platform 
"ios
   Installing "phonegap-plugin-push" for ios
   Running command: cmd "/s /c 
"E:\Projects\throwaway\pushIos5Repro\platforms\ios\cordova\version.bat""
   Command finished with error code 0: cmd /s /c 
"E:\Projects\throwaway\pushIos5Repro\platforms\ios\cordova\version.bat"
   Finding scripts for "before_plugin_install" hook from plugin 
phonegap-plugin-push on ios platform only.
   No scripts found for hook "before_plugin_install".
   Install start for "phonegap-plugin-push" on ios.
   PlatformApi successfully found for platform ios
   Beginning processing of action stack for ios project...
   Adding non-custom framework to project... PushKit.framework -> 
{"customFramework":false,"embed":false,"link":true,"weak":false}
   Non-custom framework added to project. PushKit.framework -> 
{"customFramework":false,"link":true,"weak":false}
   Action stack processing complete.
   pods.json found in platforms/ios
   Podfile found in platforms/ios
   "framework" tag with type "podspec" is deprecated and will be removed. 
Please use the "podspec" tag.
   Adding pods since the plugin contained <framework>(s) with type="podspec"
   Set pods.json for `libraries` - `FirebaseMessaging`
   Added pod line for `FirebaseMessaging`
   Wrote to pods.json.
   Wrote to Podfile.
   Running `pod install` (to install plugins)
   ==== pod install start ====
   
   CocoaPods check and installation ignored on win32
   ==== pod install end ====
   
   Failed to install 'phonegap-plugin-push': Error: ENOENT: no such file or 
directory, open 
'E:\Projects\throwaway\pushIos5Repro\platforms\ios\Pods\Pods.xcodeproj\project.pbxproj'
       at Object.openSync (fs.js:439:3)
       at Object.readFileSync (fs.js:344:35)
       at pbxProject.parseSync 
(E:\Projects\throwaway\pushIos5Repro\node_modules\xcode\lib\pbxProject.js:61:28)
       at Api.setSwiftVersionForCocoaPodsLibraries 
(E:\Projects\throwaway\pushIos5Repro\platforms\ios\cordova\Api.js:587:18)
       at 
E:\Projects\throwaway\pushIos5Repro\platforms\ios\cordova\Api.js:448:26
       at _fulfilled 
(E:\Projects\throwaway\pushIos5Repro\node_modules\q\q.js:854:54)
       at E:\Projects\throwaway\pushIos5Repro\node_modules\q\q.js:883:30
       at Promise.promise.promiseDispatch 
(E:\Projects\throwaway\pushIos5Repro\node_modules\q\q.js:816:13)
       at E:\Projects\throwaway\pushIos5Repro\node_modules\q\q.js:624:44
       at runSingle 
(E:\Projects\throwaway\pushIos5Repro\node_modules\q\q.js:137:13)
   ENOENT: no such file or directory, open 
'E:\Projects\throwaway\pushIos5Repro\platforms\ios\Pods\Pods.xcodeproj\project.pbxproj'
   Error: ENOENT: no such file or directory, open 
'E:\Projects\throwaway\pushIos5Repro\platforms\ios\Pods\Pods.xcodeproj\project.pbxproj'
       at Object.openSync (fs.js:439:3)
       at Object.readFileSync (fs.js:344:35)
       at pbxProject.parseSync 
(E:\Projects\throwaway\pushIos5Repro\node_modules\xcode\lib\pbxProject.js:61:28)
       at Api.setSwiftVersionForCocoaPodsLibraries 
(E:\Projects\throwaway\pushIos5Repro\platforms\ios\cordova\Api.js:587:18)
       at 
E:\Projects\throwaway\pushIos5Repro\platforms\ios\cordova\Api.js:448:26
       at _fulfilled 
(E:\Projects\throwaway\pushIos5Repro\node_modules\q\q.js:854:54)
       at E:\Projects\throwaway\pushIos5Repro\node_modules\q\q.js:883:30
       at Promise.promise.promiseDispatch 
(E:\Projects\throwaway\pushIos5Repro\node_modules\q\q.js:816:13)
       at E:\Projects\throwaway\pushIos5Repro\node_modules\q\q.js:624:44
       at runSingle 
(E:\Projects\throwaway\pushIos5Repro\node_modules\q\q.js:137:13)
   ```
   
   Seems Cocoapods is run during installation of the plugin. As this is not 
available on Windows, it is causing problems :/
   
   It even seems to be aware of that: 
   
   > CocoaPods check and installation ignored on win32
   
   So why is it trying to read that file shortly after?
   
   Looking at the code blame shows that the code is a pretty recent addition:
   
https://github.com/apache/cordova-ios/blame/c7c1f60aa50d58be413250c8c82a453ae6cd5b15/bin/templates/scripts/cordova/Api.js#L446
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to