Plugman framework skips Mac OS X symbolic links

社会主义新天地 提交于 2019-12-24 12:37:23

问题


I'm working on this plugin: com.ios.libgoogleadmobads, which is a helper plugin for https://github.com/appfeel/admob-google-cordova (com.admob.google cordova admob plugin)

As you can see here: https://github.com/appfeel/google-iosadmobads/tree/master/src/ios/GoogleMobileAds.framework

there are two symbolic lynks. When I try to install the plugin:

cordova plugin add com.ios.libgoogleadmobads

The links are skipped. Any workaround/solution please?

UPDATE

As a workaround I've added a hook to create the links via bash and I've deleted the predefined symbolic links. It is working in MAC, not in other systems. So I'm curious to know why plugman doesn't support symbolik links when installing remote plugins (it works for local plugins).

Idea: Could it be due to tar.gz? Could it be fixed in any way?


回答1:


Modify plugins/com.ios.libgoogleadmobads/hooks/after_plugin_add/000-create-links.sh. ln in there has an illegal option "-r". I suspect they meant to use the force option "-f"?

Update From:

#!/usr/bin/env bash


ln -s -r plugins/com.ios.libgoogleadmobads/src/ios/GoogleMobileAds.framework/Versions/A/Headers/ plugins/com.ios.libgoogleadmobads/src/ios/GoogleMobileAds.framework/Headers


ln -s -r plugins/com.ios.libgoogleadmobads/src/ios/GoogleMobileAds.framework/Versions/A/GoogleMobileAds plugins/com.ios.libgoogleadmobads/src/ios/GoogleMobileAds.framework/GoogleMobileAds


ln -s -r plugins/com.ios.libgoogleadmobads/src/ios/GoogleMobileAds.framework/Versions/A/ plugins/com.ios.libgoogleadmobads/src/ios/GoogleMobileAds.framework/Versions/Current

To:

#!/usr/bin/env bash


ln -s -f plugins/com.ios.libgoogleadmobads/src/ios/GoogleMobileAds.framework/Versions/A/Headers/ plugins/com.ios.libgoogleadmobads/src/ios/GoogleMobileAds.framework/Headers


ln -s -f plugins/com.ios.libgoogleadmobads/src/ios/GoogleMobileAds.framework/Versions/A/GoogleMobileAds plugins/com.ios.libgoogleadmobads/src/ios/GoogleMobileAds.framework/GoogleMobileAds


ln -s -f plugins/com.ios.libgoogleadmobads/src/ios/GoogleMobileAds.framework/Versions/A/ plugins/com.ios.libgoogleadmobads/src/ios/GoogleMobileAds.framework/Versions/Current



回答2:


At the end I managed to solve it by changing the dependency tag in https://github.com/appfeel/admob-google-cordova in plugin.xml:

<dependency id="com.ios.libgoogleadmobads" url="https://github.com/appfeel/google-iosadmobads"/>

For anyone who can be helpful, my conclusion is that any .framework library needed in a cordova or phonegap plugin needs to be placed in a separate repo and refferenced with the url attribute.

See related issue here: https://issues.apache.org/jira/browse/CB-6092



来源:https://stackoverflow.com/questions/28974791/plugman-framework-skips-mac-os-x-symbolic-links

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!