jeduan / cordova-plugin-facebook4

Use the latest Facebook SDK in your Cordova and Ionic projects
Other
767 stars 511 forks source link

ios Build failed by podfile out of sync #833

Closed ColDrekken closed 4 years ago

ColDrekken commented 4 years ago

Hello @peterpeterparker ,

I followed some stuff on the closed issues but i still not able to mange to get a working build when using pods.

after modify podfile to:

DO NOT MODIFY -- auto-generated by Apache Cordova platform :ios, '9.0' use_frameworks! target 'XXXXX' do project 'XXXXX.xcodeproj' pod 'FBSDKCoreKit' pod 'FBSDKLoginKit' pod 'FBSDKShareKit'

end

it seems find the FBSDKCoreKit/FBSDKCoreKit.h but failed with another error:

diff: /Podfile.lock: No such file or directory diff: /Manifest.lock: No such file or directory error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

After searching a bit more around this i found to change PODs Paths in Build Phases form:

diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null if [ $? != 0 ] ; then

print error to STDERR

echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2 exit 1 fi

to

diff "${SRCROOT}/Podfile.lock" "${SRCROOT}/Manifest.lock" > /dev/null if [ $? != 0 ] ; then

print error to STDERR

echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2 exit 1 fi

So im still stuck on this... anybody else face that issue?

My pod env

Stack

   CocoaPods : 1.8.4
        Ruby : ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
    RubyGems : 2.5.2.3
        Host : Mac OS X 10.14.6 (18G95)
       Xcode : 11.2.1 (11B53)
         Git : git version 2.23.0
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - git - https://github.com/CocoaPods/Specs.git @ 3e1c94298173d3ee55c4a030167e55788e052946
               trunk - CDN - https://cdn.cocoapods.org/

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate  : 1.0.4
cocoapods-dependencies : 1.3.0
cocoapods-plugins      : 1.0.0
cocoapods-search       : 1.0.0
cocoapods-stats        : 1.0.0
cocoapods-trunk        : 1.4.1
cocoapods-try          : 1.1.0

IONIC INFO

Ionic:

Ionic CLI : 5.4.2 (/usr/local/lib/node_modules/ionic) Ionic Framework : ionic-angular 3.9.8 @ionic/app-scripts : 3.2.1

Cordova:

Cordova CLI : 7.1.0 Cordova Platforms : android 8.0.0, ios 5.0.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 1.2.1, (and 32 other plugins)

Utility:

cordova-res : 0.3.0 (update available: 0.8.1) native-run : 0.2.7 (update available: 0.2.9)

System:

ios-deploy : 1.9.2 ios-sim : 8.0.2 NodeJS : v10.16.0 (/usr/local/bin/node) npm : 6.9.0 OS : macOS Mojave Xcode : Xcode 11.2.1 Build version 11B53

peterpeterparker commented 4 years ago

Seems something not working with your local POD. Try something as described in https://github.com/jeduan/cordova-plugin-facebook4/issues/795 or https://github.com/jeduan/cordova-plugin-facebook4/issues/811

ColDrekken commented 4 years ago

@peterpeterparker i already did... i came into the issue above when was go thru all the mentioned steps...

but why do you close these issue so fast? Perhaps somebody has the same issue and/or a solution that would fit to my problem? But nobody will see when close the issue, no?

best

peterpeterparker commented 4 years ago

@ColDrekken because it's a support request (see https://github.com/jeduan/cordova-plugin-facebook4/issues/831)

peterpeterparker commented 4 years ago

ps.: if not yet tried, update your local POD maybe might help (?)

ColDrekken commented 4 years ago

ps.: if not yet tried, update your local POD maybe might help (?)

hello, no it does not help.

peterpeterparker commented 4 years ago

Hello @peterpeterparker,

i already tried finding other solutions on other channels too but not luck since days now. i still stuck on my issue #833

I managed it to solve the podfile out of sync issue but at least this results then in a 'FBSDKCoreKit/FBSDKCoreKit.h' file not found issue but its just there as everything else looked.

Any other options to get help on this?

best regards

@ColDrekken have a look to #811 or #812 or #795 maybe you will find your solution there?

otherwise post a question and provide a sample repo to reproduce the problem on another channel, of course you could reference it here

P.S.: I deleted and moved your above question from #831 as it was out of topic

phiferd commented 4 years ago

@ColDrekken -- did you ever resolve this?

I've had an app using this plugin without issue for many months. However, in a recent build, I started to see the "User Canceled" issue when trying to login with facebook (https://github.com/jeduan/cordova-plugin-facebook4/issues/820). So, I thought maybe upgrading to the latest version of this plugin would solve the issue.

However, after following the suggestions in other issues, I am running into this error message:

diff: /Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
ColDrekken commented 4 years ago

Hi @phiferd ,

this could be solved by doing this:

https://stackoverflow.com/a/35446801/10717246

The sync error than disappear but unfortunatly once i did it i stuck again with

'FBSDKCoreKit/FBSDKCoreKit.h' file not found ...

ColDrekken commented 4 years ago

@ColDrekken have a look to #811 or #812 or #795 maybe you will find your solution there?

I tried, but nothing of them has worked for me finally. Step from one issue into another.

phiferd commented 4 years ago

The sync error than disappear but unfortunatly once i did it i stuck again with 'FBSDKCoreKit/FBSDKCoreKit.h' file not found ...

~Same here. The sync error went away but I see this file is not found. The only thing I have been able to do is downgrade to cordova-ios@4.5.5 and continue to use cordova-plugin-facebook4@4.2.1~

Never mind. I'm not sure what happened. I can't get it to work at all anymore. In the process of trying to sort through these issues, I upgraded to the latest version of xcode. Maybe that caused some new issue. Before upgrading XCode from 11.0 to 11.2.1, building the app with cordova-ios@4.5.5 and cordova-plugin-facebook4@4.2.1 the FB login option worked.

Not sure what to do other than remove the sign in with Facebook option.

ColDrekken commented 4 years ago

@phiferd yes, tried the same... also tried ios@5x with facebook4@4.2.1 and facebook4@5.0.0

both just show in log:

2019-11-26 22:57:06.741608+0100 BaseChat[5801:2024688] Starting login 2019-11-26 22:57:06.755997+0100 BaseChat[5801:2024688] THREAD WARNING: ['FacebookConnectPlugin'] took '14.407959' ms. Plugin should use a background thread.

and then nothing happens....

ColDrekken commented 4 years ago

@phiferd i finally managed it using https://www.npmjs.com/package/cordova-plugin-cocoapod-support additionally! Here are my steps:

  1. ionic cordova platfrom rm ios

  2. ionic cordova plugin add cordova-plugin-cocoapod-support --save

  3. ionic cordova plugin add cordova-plugin-facebook4@latest --save --variable APP_ID="yourID" --variable APP_NAME="MyApp"

  4. ionic cordova platform add ios@latest

  5. add the following to config.xml under platform ios params:

<preference name="pods_ios_min_version" value="9.0" />
        <preference name="pods_use_frameworks" value="true" />
        <pod name="FBSDKCoreKit" />
        <pod name="FBSDKLoginKit" />
        <pod name="FBSDKShareKit" />

ionic cordova build ios

works for me finally, hopefully nothing else has broken now :)

phiferd commented 4 years ago

It worked -- thanks!

hopefully nothing else has broken now

Yes. Now to recheck everything... :)

peterpeterparker commented 4 years ago

@ColDrekken @phiferd happy to hear you solved your issue 👍

could you provide a PR to add a note about your solution using cordova-plugin-cocoapod-support in the documentation?

walfridosp commented 4 years ago

thanks @ColDrekken, this worked for me! @phiferd yes that's true :D