Software Archive
Read-only legacy content
17060 ディスカッション

cordova local plugin

ale_d_
ビギナー
3,615件の閲覧回数

Hello I have this kind of problem:

1) I need to import a plugin from github to include it locally (this is because this issue @ https://github.com/Wizcorp/phonegap-facebook-plugin Cordova Registry warning iOS)

2) I obtained a clone of the git and I saved automatically from GitHub desktop into phonegap-facebook-plugin folder into my application main directory. Inside this folder there are plugin.xml, platforms and .cordova folder and so on

3) I tried to include the plugin via Include local plugin but it fails when builds (both ios and android). That's why the plugin requires 2 parameters: APP_ID and APP_NAME

4) So, where can I find some example about how to use intelxdk.config.additions.xml (or .crosswalk.xml or .ios.xml) to add local plugin so I can set parameters? i tried with this code into config.additions.xml (and .config.crosswalk.xml) file and it fails during building

 

<intelxdk:plugin intelxdk:name="my facebook new" intelxdk:value="C:\Developer\XDK\LocalMed\phonegap-facebook-plugin" intelxdk:id="com.phonegap.plugins.facebookconnect"> <intelxdk:param intelxdk:name="APP_ID" intelxdk:value="myappid" /> <intelxdk:param intelxdk:name="APP_NAME" intelxdk:value="myappname" /> </intelxdk:plugin>

please help me

0 件の賞賛
1 解決策
John_H_Intel2
従業員
3,599件の閲覧回数

I was able to replicate this and filed a bug. I will post back when it has been fixed.

Also, it does work in the regular XDK.

元の投稿で解決策を見る

23 返答(返信)
PaulF_IntelCorp
従業員
3,177件の閲覧回数

The local copy of your plugin needs to be located in the "source" directory of your project directory (usually in the www directory) if you are using 2323.

I recommend that you use the EA edition, it does a much better job of handling this situation. You do not need to uninstall 2323, both can be installed at the same time. The EA project file format is different, so you should create a copy of your project or start a new one for the EA edition. You can download a copy of the EA at the bottom of this page: https://software.intel.com/en-us/intel-xdk/early-access and additional instructions can be found here: https://software.intel.com/en-us/forums/topic/561050

ale_d_
ビギナー
3,177件の閲覧回数

so is it impossible to handle the situation with my version of xdk?

PaulF_IntelCorp
従業員
3,177件の閲覧回数

The local copy of your plugin needs to be located in the "source" directory of your project directory (usually in the www directory) if you are using 2323.

ale_d_
ビギナー
3,177件の閲覧回数
I tried and seems that builds! The project upload will ever be so slow or only plugin differences will be uploaded?
PaulF_IntelCorp
従業員
3,177件の閲覧回数

In the current version it uploads the entire plugin, along with your sources. In the EA and follow-on versions, there will be some caching to address the size of the upload, but there is no reliable way to completely eliminate the problem.

ale_d_
ビギナー
3,177件の閲覧回数
Hello I tried with EA/iOS. with local and plugin from web I got this error...

normal/armv7/FacebookConnectPlugin.o
In file included from .../Visitami/platforms/ios/Visitami/Plugins/com.phonegap.plugins.facebookconnect/FacebookConnectPlugin.m:11:
Visitami/Plugins/com.phonegap.plugins.facebookconnect/FacebookConnectPlugin.h:11:9: fatal error: 'FacebookSDK/FacebookSDK.h' file not found
#import <FacebookSDK/FacebookSDK.h>
        ^
1 error generated.

 
John_H_Intel2
従業員
3,177件の閲覧回数

Can you try building without any plugins and see if that works for you?

Also, can you attach you log file as txt file in the future? It makes it easier for us

ale_d_
ビギナー
3,177件の閲覧回数

the problem is only facebook plugin. Without it, no problems.

the problem occurs if I use the normal reference (import plugin from github): in this case an error occurs because it's impossible to resolve FacebookSDK.h. I changed it to the correct location and another error occurs (that one I pasted)

the same problem occurs if I use the local plugin (change for FacebookSDK.h then this error)

A question: I have to use IntelXDK EA on a Mac? because I use a Windows computer.

PaulF_IntelCorp
従業員
3,177件の閲覧回数

Does not matter if you use a Mac or a Windows machine.

Are you able to build a new simple app using the Facebook plugin as outlined in this article? https://software.intel.com/en-us/xdk/article/facebook-connect-plugin-android-ios

ale_d_
ビギナー
3,177件の閲覧回数
I don't understand which is the zip demo project to download.further in the link that you provided it's shown the browser login and this is wrong because I need app login. Anyway i think that the problem is that the framework facebooksdk.framework doesn't come along the project in the ipa file so the plugin uses browser and not facebook app. In Android everything works fine, infact the apk is about 25MB (maybe framework in?) while ipa is less than 10: Android uses facebook app and ios not. I tried a new app only with XDK facebook connect plugin and the error while building for ios is like the first i've posted Im currently using intel xdk ea as suggested Can you try a ios project?
ale_d_
ビギナー
3,177件の閲覧回数
Hello, why nobody answers? Plz help me
Amrita_C_Intel
従業員
3,177件の閲覧回数

Have you tried building it without any plugins? If yes any success in that?

ale_d_
ビギナー
3,177件の閲覧回数
Yes i've tried. Of course without plugins (but in particular without fb plugin) the build is ok. So can you try with a blank project by yourself and make it work with this plugin? Thank you
Dale_S_Intel
従業員
3,177件の閲覧回数

ale d. wrote:

Yes i've tried. Of course without plugins (but in particular without fb plugin) the build is ok.
So can you try with a blank project by yourself and make it work with this plugin?
Thank you

 

I was able to build with the plugin.  I created a blank cordova app and added the facebook plugin as a third party plugin from the web, and it built without problems.  I did find when I ran it that "facebookConnectPlugin" was still undefined (not sure if I was using it right though).

ale_d_
ビギナー
3,177件の閲覧回数
With intel xdk, build is ok but not working when app runs on real ios device (browser fb login is called instead of fb app one). With intel xdk EA the ios build fails (facebooksdk.h not found). Please check it!
ale_d_
ビギナー
3,177件の閲覧回数
Dale Schouten (Intel) wrote:

Quote:

ale d. wrote:

Yes i've tried. Of course without plugins (but in particular without fb plugin) the build is ok.
So can you try with a blank project by yourself and make it work with this plugin?
Thank you

 

I was able to build with the plugin.  I created a blank cordova app and added the facebook plugin as a third party plugin from the web, and it built without problems.  I did find when I ran it that "facebookConnectPlugin" was still undefined (not sure if I was using it right though).

Try with xdk EA, you'll find the problem while building iOS version. Plz help me
John_H_Intel2
従業員
3,600件の閲覧回数

I was able to replicate this and filed a bug. I will post back when it has been fixed.

Also, it does work in the regular XDK.

ale_d_
ビギナー
3,177件の閲覧回数
thank You for answering. I'll wait for your new post! Anyway in regular xdk the iOS build is ok but at runtime the webview is called not the app. That's because the fb framework is not linked. That's why I tried EA.
ale_d_
ビギナー
3,177件の閲覧回数
JOHN H. (Intel) wrote:

I was able to replicate this and filed a bug. I will post back when it has been fixed.

Also, it does work in the regular XDK.

Hello no news yet?
John_H_Intel2
従業員
2,969件の閲覧回数

No news to report yet.

返信