Open Shib-TPF opened 10 years ago
Sounds like you need to run cordova build ios
I've done that though. Every time after I install the plugin I run cordova build ios. Then I go into xcode and run it in the emulator and it runs, but throws that error about it not finding the plugin.
cordova build ios
should have setup the .framework link and the classes .m and .h so something went wrong during your plugin install perhaps. Can you paste your Xcode console?
You can try remove then add the plugin again :/
Just left work for the week so I won't be able to post the console until Monday. It's really just those two things above that it write when the app first begins. The app works fine otherwise.
I removed and added the plugin like 5 or 6 times today though and it didn't help. I even tried with an older version and still the same problem. I'll try again on Monday in a fresh project.
So, below is the output from my Xcode console. When the app begins you can see I get the log where it says that the plugin doesn't exist. Then, when I call the plugin from within the app (the get status function), I get the last 3 logs.
2014-08-18 09:48:02.224 AppName[1637:60b] Multi-tasking -> Device: YES, App: YES
2014-08-18 09:48:02.269 AppName[1637:60b] Unlimited access to network resources
2014-08-18 09:48:02.300 AppName[1637:60b]
Started backup to iCloud! Please be careful.
Your application might rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines"
You could find it at the following address https://developer.apple.com/icloud/documentation/data-storage/ .
2014-08-18 09:48:02.983 AppName[1637:60b] [CDVTimer][file] 21.903038ms
2014-08-18 09:48:02.985 AppName[1637:60b] CDVPlugin class FacebookConnectPlugin (pluginName: facebookconnectplugin) does not exist.
2014-08-18 09:48:02.986 AppName[1637:60b] [CDVTimer][facebookconnectplugin] 0.761986ms
2014-08-18 09:48:02.986 AppName[1637:60b] [CDVTimer][TotalPluginStartup] 24.921000ms
2014-08-18 09:48:03.246 AppName[1637:60b] Resetting plugins due to page load.
2014-08-18 09:48:03.515 AppName1637:60b] Finished load of: file:///Users/tpfuser/Library/Application%20Support/iPhone%20Simulator/7.1/Applications/0B2E8C77-3988-4FA4-8B2F-06ED1D2A0023/AppName.app/www/index.html
2014-08-18 09:48:28.979 AppName[1637:60b] CDVPlugin class FacebookConnectPlugin (pluginName: FacebookConnectPlugin) does not exist.
2014-08-18 09:48:28.980 AppName[1637:60b] ERROR: Plugin 'FacebookConnectPlugin' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2014-08-18 09:48:28.981 AppName[1637:60b] -[CDVCommandQueue executePending] [Line 158] FAILED pluginJSON = [
"FacebookConnectPlugin1379351077",
"FacebookConnectPlugin",
"getLoginStatus",
[
]
]
I also just tried installing it on a fresh Cordova project with no other plugins and got this error when building:
'FacebookSDK/FacebookSDK.h' file not found
I ended up getting it to work in this fresh app, and on my main app, by following the only solution on this page here, posted 2 days ago: http://stackoverflow.com/questions/24626729/facebooksdk-facebooksdk-h-file-not-found
Basically, it doesn't work properly when you install it via
cordova plugin add com.phonegap.plugins.facebookconnect --variable APP_ID="12345567" --variable APP_NAME="Name"
I had to copy this repo to my own machine first, then do the above command referencing the directory on my own machine.
Now that it's working though, the login screen is opening up a browser window and not using the native dialogue. Is that how it's supposed to work?
https://issues.apache.org/jira/browse/CB-6092
Looking into this with Cordova team. For now, the workaround is to git clone https://github.com/Wizcorp/phonegap-facebook-plugin
directly and replace the FacebookSDK.framework in your project.
Update: Cordova team have escalated this to a Critical bug with plugman. It is an issue with symlinks being ignored when a plugin is published to the Cordova Registry.
Awesome. Thanks for looking into it for me!
Another question: is the plugin supposed to open in a web window on iOS (like it does on Android) or is it supposed to use the iOS native Facebook popup? I assumed the latter, but when I implemented it, it's launching in a web window like on Android. :/
No problem.
There is an issue open for that https://github.com/Wizcorp/phonegap-facebook-plugin/issues/623 (sorry for being all strict but issues get too quickly hijacked and will never get closed otherwise), i've not verified this yet.
:+1: encountering this issue too. Any updates? or do we still have to do the workaround? Thanks
@dbaq Not yet, hoping it was gonna be fixed in npm 2.0 which was released this last week. This means the solution is to fix plugman to publish zipped releases.
https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/plugman/registry/registry.js#L97
I think the fix will be to create a tarball in some tmp after generating pacakgeJson, then calling npm .commands, 'publish', args with the tarball instead of a folder containing the package.json
Have fun !, remember to add unit tests :-)
But I have not had the time yet.
_Update_: A warning has been added to the README with a temporary solution, but still need a fix for this solution.
I add FacebookSDK.framework to "Link Binary with libraries" and add FacebookConnectPlugin.m to "Compile Sources" and work for me!!! :)
Still happens for me.
Using Cordova 3.5. Installed it following the instructions here: https://github.com/Wizcorp/phonegap-facebook-plugin/blob/master/platforms/ios/README.md
The project builds, but when I run it, it returns the error:
CDVPlugin class FacebookConnectPlugin (pluginName: facebookconnectplugin) does not exist. ERROR: Plugin 'FacebookConnectPlugin' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
I've tried adding FacebookConnectPlugin.m to Build Phases, because it's not already there, but that just renders me with another error where the project won't build because it can't find the FacebookConnectPlugin.h file.
I've tried adding the FacebookSDK to the Link Binaries with Library tab, but that just throws an error that it can't find the FacebookSDK.
I've uninstalled the plugin and reinstalled it a whole bunch of times. I've removed the ios as a platform on Cordova and added it in again, then reinstalled the plugin. But still it doesn't work.
Everything is there though! I don't know why it's not working. :/ It works on my Android version fine, but it's just not liking iOS for some reason.