Closed Zvika88 closed 4 years ago
Did you run pod update
in your platforms/ios
folder?
Did try to update (sudo gem install cocoapods
) Cocoapods?
Did you try to remove and add the platform again?
Same problem for me. Any suggestions?
@peterpeterparker: yes to all your questions. updated pods, removed and re-added ios platform - no effect.
important update: Applying the change that (per the docs) intends to address ion-cordova < 5, i.e:
<framework src="FBSDKCoreKit" type="podspec" spec="5.7.0" />
<framework src="FBSDKLoginKit" type="podspec" spec="5.7.0" />
<framework src="FBSDKShareKit" type="podspec" spec="5.7.0" />
(doing this on a local disk copy of the plugin, then specifying that directory in package.json as source). It allows me to build the app in CL mode, i.e. "cordova build ios" or "cordova run ios" !
Again - I am on ios-cordova 5.0.1 and this helps! But in command line only.
However it does not help building in Xcode. Building in Xcode I still the error: FBSDKCoreKit/FBSDKCoreKit.h' file not found
Same problem here.
Everything worked fine with v5.0.0 but after i updating to v6.2.0 caused the problem.
I already tried everything pod update
sudo gem install cocoapods
platform rm/add ios
Someone who solved this issue, please let me know!
Fix that solve problem for me.
@vadimwe , how do you manually add the SDKs to the pod file(s)? I guess you are referring to the files called "Pod-xxxxxx.debug.xcconfig" and "Pod-xxxxxx.release.xcconfig" .
Here is my debug file - it already seem to have the FB kits defined. What am i missing? Or, is it somewhere else that needs to be changed?
Thanks, Z.
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKShareKit" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKShareKit/FBSDKShareKit.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' OTHER_LDFLAGS = $(inherited) -l"z" -framework "FBSDKCoreKit" -framework "FBSDKLoginKit" -framework "FBSDKShareKit" -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
@Zvika88 which version of cocoapods are u using (pod --version
)? and Xcode version?
hi @peterpeterparker , version 1.8.3 (freshly re-installed yesterday)
@peterpeterparker and latest Xcode 11.0 (11A420A)
@Zvika88 thx for the info. same to me and no problems. not sure providing a sample repo would help but if you think so, I could check it out and give it a try on my machine?
When you do pod search FBSDKCoreKit --simple
you do find v5.7.0 right?
hmmm, it seems to finds 5.8.0...
` -> FBSDKCoreKit (5.8.0) Official Facebook SDK for iOS to access Facebook Platform core features pod 'FBSDKCoreKit', '~> 5.8.0'
`
@Zvika88 that's good, seems that cocoapods is definitely up-to-date then. according your spec you should be able to use the plugin referencing the pod without touching the plugin.xml
I honestly don't have much more idea. like I said, if you wish you could provide a sample repo and I could give it try
The pods are present in the project, under
./platforms/ios/Pods
, and yet the statement in FacebookConnectPlugin.h : `
`
does not find them when xcode runs.
'FBSDKCoreKit/FBSDKCoreKit.h' file not found
I am sure its something silly about xcode setup with pods, yet it escapes me. @vadimwe above says he solved it by manually adding the sdks to the pods but I am not sure I understand what he means.
@Zvika88 It`s very simple.
When I installed the plugin I don't know why pods wasn't installed from the console. You should go to platforms/ios/, find file Podfile and manually add missed pods (screenshot). After saving file run pod install command in terminal (same folder!).
Of course, you should update pods before.
One moment, I tested to build only with the new (modern) build system. Not sure about legacy, but I think it should work as well.
@Zvika88 Any luck?
@vadimwe, thanks. Not yet but it points to the likely problem - the path gets screwed up.
My podfile is fine (almost the same, it also has a "use_frameworks!" statement and specific ref to version 5.7.0). But when running "pod install" I get a warning: `
[!] The xxxxxxx [Debug]
target overrides the LD_RUNPATH_SEARCH_PATHS
build setting defined in 'Pods/Target Support Files/Pods-xxxxxxx/Pods-xxxxxxx.debug.xcconfig'. This can lead to problems with the CocoaPods installation
$(inherited)
flag, or[!] The xxxxxxx [Release]
target overrides the LD_RUNPATH_SEARCH_PATHS
build setting defined in 'Pods/Target Support Files/Pods-xxxxxxx/Pods-xxxxxxx.release.xcconfig'. This can lead to problems with the CocoaPods installation
$(inherited)
flag, orHere is my podfile:
source 'https://github.com/CocoaPods/Specs.git' platform :ios, '9.0' use_frameworks! target 'xxxxxxx' do project 'xxxxxxx.xcodeproj' pod 'FBSDKCoreKit', '5.7.0' pod 'FBSDKLoginKit', '5.7.0' pod 'FBSDKShareKit', '5.7.0' end
solved - use ".xcworkspace" file (after pod install) in Xcode, not ".xcodeproj" .
Well, I've always been opening the xcodeproj file in Xcode - the file generated by cordova platform command - in order to do builds, archives and installs. (I also did not get to use pods before switching to this version of the facebook plugin that relies on pods) .
The error I reported: "'FBSDKCoreKit/FBSDKCoreKit.h' file not found" - occurs only when opening the xcodeproj file. It does not happen if using the xcworkspace file. I guess the xcworkspace file is a wrapper that sets up env variables for the pods in the project.
Since 3~4 other people above encountered the same issue within 24 hours from my report, there are probably more users like us who did not have cocoapods dependencies in their project before. Just run "pod install" and use the xcworkspace file!
closing this issue. Thanks much @peterpeterparker and @vadimwe .
@Zvika88 happy to hear it worked out and good to know, what would be the error msg in case the .xcodeproj would be used 👍
I experienced this same issue and tried all the suggested solutions to no avail. Eventually I realised that permissions might be at the heart of it. I was running all my Phonegap / Cordova CLI commands as root (via sudo) because I originally installed Node and Phonegap as root. I uninstalled everything, then reinstalled it all but this time as my local user (which involved changing write access to a few files along the way). Once I had an environment in which I could run the Phonegap / Cordova CLI commands as my local user, everything worked cleanly.
Opening ".xcworkspace" file (after pod install) in Xcode instead of ".xcodeproj" worked for me. Thanks!
installed the plugin after a refresh of the pods (update, upgrade). Using the latest cordova-plugin-facebook4 v6.2.0 , cordova 9.0.1, on a Mac OS 10.14.6 .
During build in Xcode I get the error: FBSDKCoreKit/FBSDKCoreKit.h' file not found
The new doc for version 6.2.0 suggests that this is due to cordova-ios below 5, but mine is 5.0.1 . Adding the framework statements to plugin.xml does not help.
Any ideas?