cordova-plugin-googleplus icon indicating copy to clipboard operation
cordova-plugin-googleplus copied to clipboard

iOS build failure for ionic

Open pralok opened this issue 5 years ago • 16 comments

Versions Info

Xcode version : 9.4.1 Plugin Version : 6.0.0 Cordova Version : 6.5.0

Plugin works fine for android. For iOS, Reverse Client Id is in place. But when running ios build from cli, I get this error =>

app/platforms/ios/App/Plugins/cordova-plugin-googleplus/GooglePlus.m:11:126: error: use of undeclared identifier 'CDVPluginHandleOpenURLWithAppSourceAndAnnotationNotification' [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleOpenURLWithAppSourceAndAnnotation:) name:CDVPluginHandleOpenURLWithAppSourceAndAnnotationNotification object:nil]; ^ 1 error generated.

** BUILD FAILED **

The following build commands failed: CompileC /var/root/Library/Developer/Xcode/DerivedData/App-nvofvnofvndfoinvdifnvodivn/Build/Intermediates.noindex/App.build/Debug-iphonesimulator/App.build/Objects-normal/x86_64/GooglePlus.o App/Plugins/cordova-plugin-googleplus/GooglePlus.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure)

Error: Error code 65 for command: xcodebuild with args: -xcconfig,/App/platforms/ios/cordova/build-debug.xcconfig,-workspace,Kennect.xcworkspace,-scheme,Kennect,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 5s,build,CONFIGURATION_BUILD_DIR=/App/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/App/platforms/ios/build/sharedpch

Does anyone know how to fix this ? Please let me know. Thanks in advance.

pralok avatar Dec 25 '18 13:12 pralok

Faced this issue today. Does anyone have any thought on it?

alexgureev avatar Dec 30 '18 17:12 alexgureev

Same here would love some help on this. (although mine isn't ionic, it's Vue)

zabaat avatar Dec 31 '18 06:12 zabaat

Same here

balabanmihai avatar Jan 11 '19 14:01 balabanmihai

Was stuck on this for a while but went back to documentation and saw this =>

⚠️ From plugin version 6.0.0 the minimum required cordova-ios version is 4.5.0. Need to use a lower cordova-ios version? Use plugin version 5.3.2 or lower.

My cordova-ios version was 4.3.1 (find it in your project folder's => platforms/platforms.json file).

  1. I removed my ios platform cordova platform rm ios

  2. Added it again cordova platform add [email protected] / cordova platform add ios@latest

This error should go away. Then embrace for another errors 😈

pralok avatar Jan 11 '19 14:01 pralok

Was stuck on this for a while but went back to documentation and saw this =>

⚠️ From plugin version 6.0.0 the minimum required cordova-ios version is 4.5.0. Need to use a lower cordova-ios version? Use plugin version 5.3.2 or lower.

I tried ionic cordova plugin add [email protected] --variable REVERSED_CLIENT_ID=xxxxxx but I get this new error: <projectdir>/ios/capacitor-cordova-ios-plugins/sources/CordovaPluginGoogleplus/GooglePlus.m:38:57: No visible @interface for 'CDVViewController' declares the selector 'pluginObjects'

My cordova-ios version was 4.3.1 (find it in your project folder's => platforms/platforms.json file).

I don't have anything in my platforms directory. Doing ionic cordova platform ls shows that I already have ios ~4.5.4

This error has not gone away...

Any other ideas? Thanks.

clarako avatar Jan 13 '19 05:01 clarako

Facing same error here

epiphanatic avatar Feb 04 '19 02:02 epiphanatic

Also facing the same error when trying to build the app for ios with capacitor. Any updates?

The android version works fine.

nikosdouvlis avatar Mar 29 '19 11:03 nikosdouvlis

Same issue here. I looked at the cordova-ios version living in CapacitorCordova and it looks like the version of cordova-ios being used may be before CDVPluginHandleOpenURLWithAppSourceAndAnnotationNotification was introduced?

AceLondon avatar Apr 08 '19 17:04 AceLondon

For Capacitor users, I just added it in https://github.com/ionic-team/capacitor/pull/1650 Next time, please, report it on Capacitor repository.

But the fix is not enough to make the plugin work, you will need to post the CDVPluginHandleOpenURLWithAppSourceAndAnnotationNotification yourselves from your AppDelegate.swift in func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool

jcesarmobile avatar Jun 10 '19 16:06 jcesarmobile

@jcesarmobile could you please clarify what you mean by "you will need to post the CDVPluginHandleOpenURLWithAppSourceAndAnnotationNotification"? I am looking at the application function of the file AppDelegate.swift, but unsure how to accomplish that. Could you provide a sample code?

sung-monomax avatar Jun 19 '19 07:06 sung-monomax

any solution?

undereyes avatar Jul 15 '19 07:07 undereyes

any solution?

nadinejerome avatar Jul 28 '19 10:07 nadinejerome

cordova plugin add cordova-plugin-googleplus**@7.0.2** (etc...) worked for me

Alb93 avatar Aug 11 '19 21:08 Alb93

I'm using ios 5.1.1 and this plugin 7.0.2 but still have the issue

sahyun1 avatar Jan 22 '20 04:01 sahyun1

I'm still having this issue. Any solution?

sp00mm avatar May 09 '20 04:05 sp00mm

I'm still having this issue. Any solution?

For anyone wondering how I got it to work,

update xcode (11.4.1 at the time), do an ionic repair, re-add ios ionic cordova platform add ios and run pod install in platforms/ios

sp00mm avatar May 10 '20 02:05 sp00mm