Software Archive
Read-only legacy content
17061 Discussions

cordova local plugin

ale_d_
Beginner
1,247 Views

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 Kudos
1 Solution
John_H_Intel2
Employee
1,231 Views

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.

View solution in original post

0 Kudos
23 Replies
PaulF_IntelCorp
Employee
1,122 Views

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

0 Kudos
ale_d_
Beginner
1,122 Views

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

0 Kudos
PaulF_IntelCorp
Employee
1,122 Views

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.

0 Kudos
ale_d_
Beginner
1,122 Views
I tried and seems that builds! The project upload will ever be so slow or only plugin differences will be uploaded?
0 Kudos
PaulF_IntelCorp
Employee
1,122 Views

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.

0 Kudos
ale_d_
Beginner
1,122 Views
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.

 
0 Kudos
John_H_Intel2
Employee
1,122 Views

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

0 Kudos
ale_d_
Beginner
1,122 Views

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.

0 Kudos
PaulF_IntelCorp
Employee
1,122 Views

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

0 Kudos
ale_d_
Beginner
1,122 Views
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?
0 Kudos
ale_d_
Beginner
1,122 Views
Hello, why nobody answers? Plz help me
0 Kudos
Amrita_C_Intel
Employee
1,122 Views

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

0 Kudos
ale_d_
Beginner
1,122 Views
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
0 Kudos
Dale_S_Intel
Employee
1,122 Views

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).

0 Kudos
ale_d_
Beginner
1,122 Views
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!
0 Kudos
ale_d_
Beginner
1,122 Views
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
0 Kudos
John_H_Intel2
Employee
1,232 Views

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.

0 Kudos
ale_d_
Beginner
1,122 Views
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.
0 Kudos
ale_d_
Beginner
1,122 Views
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?
0 Kudos
John_H_Intel2
Employee
914 Views

No news to report yet.

0 Kudos
Reply