phonegap / phonegap-plugin-push

Register and receive push notifications
MIT License
1.94k stars 1.91k forks source link

cordova-plugin-googleplus and phonegap-plugin-push duplicate symbols for architecture x86_64 #1325

Closed immark closed 7 years ago

immark commented 8 years ago

Hi there, I got build issue, as i build cordova app on iOS platform, this app include plugins Cordova-plugin-googleplus and phone gap-plugin-push, if I just use any one plugin, build will success, but build both to be fail. how to resolve this issue?? please help me, thanks.

Actual Behaviour

cordova plugin add cordova-plugin-googleplus --save --variable REVERSED_CLIENT_ID=xxx cordova plugin add phone-plugin-push --save --variable SENDER_ID=aaaaaa cordova build ios

... ... ld: 270 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

\ BUILD FAILED **

The following build commands failed: Ld build/emulator/app/appName normal x86_64 (1 failure) Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/mm/appProject/platforms/ios/cordova/build-debug.xcconfig,-workspace,AppName.xcworkspace,-scheme,AppName,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 5s,build,CONFIGURATION_BUILD_DIR=/Users/mm/appProject/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/mm/appProject/platforms/ios/build/sharedpch

Steps to Reproduce

cordova build ios

Platform and Version

iOS 10.12 Xcode 8.0

Cordova CLI version and cordova platform version

cordova --version 6.4.0                   

Plugin version

cordova.plugin.googleplus     5.1.1 

grep phonegap-plugin-push 1.8.1

macdonst commented 8 years ago

@immark yes the resolution will be in the upcoming 1.9.0 release which will use Cocoapods to include the GCM libraries. Then the two plugins will be able to include the same libs without this error.

immark commented 8 years ago

Thank you! Look forward that upcoming 1.9.0 release.

danielcrk-cn commented 7 years ago

Just to add, is anyone else looks for the same answer here, the same conflict happens with the firebase plugin as well (https://github.com/arnesson/cordova-plugin-firebase).

Looking forward to the 1.9.0 release. Is any aprox. ETA?

Thanks!

macdonst commented 7 years ago

@immark can you make sure you have CocoaPods installed then try the latest code from master to see if your bug is resolved. If it isn't I may need to actually send a PR to ccordova-plugin-googleplus.

immark commented 7 years ago

@macdonst , I had installed CocoaPods, then try the 1.8.4 release, it's still "Build failed".

macdonst commented 7 years ago

@immark build log?

immark commented 7 years ago

@macdonst I installed v1.9.0, it solved this issue, and my app built successful. it's install/ updated as follow items, CocoaPods v1.1.1 cordova-cli 6.4.0 cordova-ios 4.3.0 phonegap-plugin-push 1.9.0

I think this issue could be closed if no more comment. Thanks for your help.

victorazv commented 7 years ago

I had this problem and i solved removing the phonegap-plugin-push. I'm already had the fcm plugin installed...

mikedoubintchik commented 7 years ago

@immark I'm getting the below error. Any ideas how to fix it?

Error: Uh oh!
Cannot find module '/platforms/ios/pods.json'
abulte commented 7 years ago

For anyone coming here with the same problem as @allurewebsolutions, this has worked for me:

cordova platform remove ios
cordova platform add ios
# install plugin
mikedoubintchik commented 7 years ago

The solution for me was to remove the plugin folder and re-add the platforms

realyze commented 7 years ago

@macdonst Brilliant, I was using an older version of this plugin and was starting to get slightly desperate I'll need to do something like this. Many kudos for this plugin!

lock[bot] commented 6 years ago

This thread has been automatically locked.