Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

IOS Build fails with compilation errors #150

Closed
ghost opened this issue Nov 16, 2015 · 10 comments
Closed

IOS Build fails with compilation errors #150

ghost opened this issue Nov 16, 2015 · 10 comments

Comments

@ghost
Copy link

ghost commented Nov 16, 2015

I'm getting the following error when the build fails in IOS

Users/eswari/Desktop/Google_auth/blank/platforms/ios/blank/Plugins/cordova-plugin-googleplus/GooglePlus.m:1:9: fatal error: 'GoogleOpenSource/GoogleOpenSource.h' file not found
"#import GoogleOpenSource/GoogleOpenSource.h"

Error code 65 for command: xcodebuild with args: -xcconfig,/Users/winbold/Desktop/Google_auth/blank/platforms/ios/cordova/build-debug.xcconfig,-project,blank.xcodeproj,ARCHS=i386,-target,blank,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/winbold/Desktop/Google_auth/blank/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/winbold/Desktop/Google_auth/blank/platforms/ios/build/sharedpch
ERROR building one of the platforms: Error: /Users/winbold/Desktop/Google_auth/blank/platforms/ios/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /Users/winbold/Desktop/Google_auth/blank/platforms/ios/cordova/build: Command failed with exit code 2

@balajivinnakota
Copy link

I'm getting the same problem with the IOS build...
Can anybody suggest how to overcome this problem

@Mojo90
Copy link

Mojo90 commented Nov 17, 2015

Same for me.

Went to: https://developers.google.com/+/mobile/ios/getting-started
Downloaded Google+ iOS SDK and added GoogleOpenSource.frameworkmanually. Now I was able to build. Not sure if this has to be done or if in GooglePlus.m has to be fixed something

@taylorlc70
Copy link

+1 for this issue. Our cordova iOS build has been working fine for a long time, but now this. Everything I've searched suggests manual changes in xcode. Is there a better way?

@EddyVerbruggen
Copy link
Owner

Hmm, that import should no longer be there in the first place, can you please try version 4.0.5?

@taylorlc70
Copy link

Fixed! Thank you, sir.

@Mojo90
Copy link

Mojo90 commented Nov 18, 2015

Perfect does work for me, thx. Didn't see that there was sth commented out thus workaround with old Framework...

shinyMetilda pushed a commit to shinyMetilda/cordova-plugin-googleplus that referenced this issue Mar 22, 2016
shinyMetilda pushed a commit to shinyMetilda/cordova-plugin-googleplus that referenced this issue Mar 22, 2016
@YaroslavG
Copy link

Hi guys,
I use version": "4.0.8" but I have the same problem with the IOS build...
Can you help me?

@sammugg
Copy link

sammugg commented Apr 1, 2016

@YaroslavG,

This is a closed issue, so if the problem persists after trying my suggestion below, please open a _new_ issue and respond there.

I just merged a significant PR the other day that updated the Android side to use Google Sign-In and refactored plugin usage. The current documentation is up to date with those changes. You should check it out.

Could you please try removing and readding the plugin to your project? When you re-add the plugin, please install from github, not from the plugin registry. I.e.,

$> cordova plugin add https://github.com/EddyVerbruggen/cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=<your reversed client id>
$> cordova prepare

Happy Coding,
~Sam

pwbs pushed a commit to pwbs/cordova-plugin-googleplus that referenced this issue Jun 27, 2017
# This is the 1st commit message:
# This is a combination of 3 commits.
# This is the 1st commit message:
# This is a combination of 2 commits.
# This is the 1st commit message:

# This is a combination of 2 commits.
# This is the 1st commit message:

# This is a combination of 2 commits.
# This is the 1st commit message:

# This is a combination of 2 commits.
# This is the 1st commit message:

# This is a combination of 7 commits.
# This is the 1st commit message:
# This is a combination of 3 commits.
# This is the 1st commit message:
# This is a combination of 3 commits.
# This is the 1st commit message:
# This is a combination of 2 commits.
# This is the 1st commit message:

# This is a combination of 6 commits.
# This is the 1st commit message:
# This is a combination of 10 commits.
# This is the 1st commit message:
Finished implementation

# The commit message EddyVerbruggen#2 will be skipped:

#	Attempt at some decent documentation

# The commit message EddyVerbruggen#3 will be skipped:

#	Attempt at some decent documentation

# The commit message EddyVerbruggen#4 will be skipped:

#	Added iOS screenshots

# The commit message EddyVerbruggen#5 will be skipped:

#	cleanup

# The commit message EddyVerbruggen#6 will be skipped:

#	Added a permission for Android preventing a crash on some devices

# The commit message EddyVerbruggen#7 will be skipped:

#	Cleanup

# The commit message EddyVerbruggen#8 will be skipped:

#	iOSApiKey is for iOS, not for Android :)

# The commit message EddyVerbruggen#9 will be skipped:

#	EddyVerbruggen#3 redirect url not handled when redirected from Google+ app on iOS

# The commit message EddyVerbruggen#10 will be skipped:

#	EddyVerbruggen#6 ADD Birthday and AgeRange

# The commit message EddyVerbruggen#1 will be skipped:

#	EddyVerbruggen#6 ADD Birthday and AgeRange (wasn't really happy with the PR, so I changed it a bit and added iOS support). Thanks for the help!

# The commit message EddyVerbruggen#2 will be skipped:

#	EddyVerbruggen#6 addtional checks on Android

# The commit message EddyVerbruggen#3 will be skipped:

#	Add userId property to let developer to get Google user ID for business logic.

# The commit message EddyVerbruggen#4 will be skipped:

#	EddyVerbruggen#7, needed to manually merge

# The commit message EddyVerbruggen#5 will be skipped:

#	EddyVerbruggen#7, needed additional flag

# The commit message EddyVerbruggen#6 will be skipped:

#	Missing dependency for iOS 8 SDK

# The commit message EddyVerbruggen#7 will be skipped:

#	Android - play services jar fixed version

# The commit message EddyVerbruggen#8 will be skipped:

#	Android playservices updated to 21

# The commit message EddyVerbruggen#9 will be skipped:

#	Update README.md
#
#	Fix typo. I believe this is for iOS only right now and not Android yet if I'm not mistaken.

# The commit message EddyVerbruggen#10 will be skipped:

#	A note about Android config

# The commit message EddyVerbruggen#1 will be skipped:

#	EddyVerbruggen#15 added troubleshooting section

# The commit message EddyVerbruggen#2 will be skipped:

#	Adding idToken to Android
#
#	Based on this gist [1] I'm adding support for getting the auth oauth2 token
#	that Google generates after the user accepts the login.
#
#	[1] https://gist.github.com/ianbarber/5170508

# The commit message EddyVerbruggen#3 will be skipped:

#	Introducing idToken and oauthToken
#
#	Allow the user to configure the service so any of the 3 possibles can be reached
#	when the user passes webApiKey in the credentials dictionary will get a JWT token
#	id, if androidApiKey is set in the credentials then an off-line capable oauth2
#	token bearer will be generated in the oauthToken value, while if no argument is
#	set a simple oauth2 token will get generated.

# The commit message EddyVerbruggen#4 will be skipped:

#	Adding extra necessary permissions

# The commit message EddyVerbruggen#5 will be skipped:

#	EddyVerbruggen#12 oauthToken for iOS

# The commit message EddyVerbruggen#6 will be skipped:

#	EddyVerbruggen#22 User-cancelled login on iOS - Neither the success nor error callbacks are called

# The commit message EddyVerbruggen#7 will be skipped:

#	EddyVerbruggen#26 Preparing submission to plugins.cordova.io

# The commit message EddyVerbruggen#8 will be skipped:

#	Prep plugin registry release (as tarball, to circumvent an npm symlink issue)

# The commit message EddyVerbruggen#9 will be skipped:

#	Added a warning about the current state of the plugman publish command

# The commit message EddyVerbruggen#10 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#1 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#2 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#3 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#4 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#5 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#6 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#7 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#8 will be skipped:

#	EddyVerbruggen#37 Google+ login using web browser is rejected on the App Store.

# The commit message EddyVerbruggen#9 will be skipped:

#	From Cordova 4 setActivityResultCallback is on CordovaInterfaceImpl

# The commit message EddyVerbruggen#10 will be skipped:

#	Not importing android-support-v4

# The commit message EddyVerbruggen#1 will be skipped:

#	EddyVerbruggen#45 login and trySilendLogin now return userdata on Android

# The commit message EddyVerbruggen#2 will be skipped:

#	Update plugin.xml

# The commit message EddyVerbruggen#3 will be skipped:

#	Update plugin.xml

# The commit message EddyVerbruggen#4 will be skipped:

#	EddyVerbruggen#56 new playservices version

# The commit message EddyVerbruggen#5 will be skipped:

#	npm

# The commit message EddyVerbruggen#6 will be skipped:

#	or not to npm..

# The commit message EddyVerbruggen#7 will be skipped:

#	replace deprecated dependency plugin

# The commit message EddyVerbruggen#8 will be skipped:

#	New ID, published to npm

# The commit message EddyVerbruggen#9 will be skipped:

#	New ID, published to npm

# The commit message EddyVerbruggen#10 will be skipped:

#	PGB note

# The commit message EddyVerbruggen#1 will be skipped:

#	Update dependencies to gradle format to fix EddyVerbruggen#64

# The commit message EddyVerbruggen#2 will be skipped:

#	bump

# The commit message EddyVerbruggen#3 will be skipped:

#	Switch to Google Sign-In SDK for iOS
#
#	This should fix Apple rejection from popping up Safari.
#	Will update README soon.
#	Update version to 3.0.0.

# The commit message EddyVerbruggen#4 will be skipped:

#	Allowed scope to be passed into signin

# The commit message EddyVerbruggen#5 will be skipped:

#	Attempt to fix offline screen

# The commit message EddyVerbruggen#6 will be skipped:

#	Cleanup for google plus connection with scopes and offline access

# The commit message EddyVerbruggen#7 will be skipped:

#	Fixed REVERSED_CLIENT_ID variable

# The commit message EddyVerbruggen#8 will be skipped:

#	Invalid quotes (according to my IDE)

# The commit message EddyVerbruggen#9 will be skipped:

#	Made ios use scopes

# The commit message EddyVerbruggen#10 will be skipped:

#	Added server auth code logic for ios

# The commit message EddyVerbruggen#1 will be skipped:

#	Made server auth code not throw a null reference

# The commit message EddyVerbruggen#2 will be skipped:

#	Plugin update to 4.0.0:
#	- Changed the ID to cordova-plugin-googleplus (again)
#	- Wider Android dependent fwk compatibility
#	- Documented scopes feature
#	- Removed the need for the iosApiKey

# The commit message EddyVerbruggen#3 will be skipped:

#	Fixed npm reference in doc

# The commit message EddyVerbruggen#4 will be skipped:

#	EddyVerbruggen#95 Crash when using isAvailable method before login

# The commit message EddyVerbruggen#5 will be skipped:

#	access_token fix for iOS
#
#	The access_token will now be returned as: accessToken

# The commit message EddyVerbruggen#6 will be skipped:

#	* generate both oauthToken and idToken

# The commit message EddyVerbruggen#7 will be skipped:

#	Added an "offline" parameter to enable getting a server auth token even without androidApiKey.

# The commit message EddyVerbruggen#8 will be skipped:

#	Added info to README about the API key for serverClientId.

# The commit message EddyVerbruggen#9 will be skipped:

#	Google decided to change a link without adding a nice redirect

# The commit message EddyVerbruggen#10 will be skipped:

#	Enabled getting serverAuthCode when the webApiKey param is set.

# The commit message EddyVerbruggen#2 will be skipped:

#	EddyVerbruggen#108 Added an option to generate access token for offline access on Android

# The commit message EddyVerbruggen#3 will be skipped:

#	EddyVerbruggen#82 Google Plus window not loading!
#	EddyVerbruggen#113 Not getting user extras (e.g. imageUrl) in callback object. Re-added imageUrl for iOS

# The commit message EddyVerbruggen#4 will be skipped:

#	Android: Ensure a new one time token on each login
#
#	When using the androidApiKey parameter a short-lived one time token
#	is generated, which can then be passed to the server where it can be
#	exchanged for a proper access and refresh token. Since all tokens get
#	cached by GoogleAuthUtil logging in a second time will cause the token
#	to be invalid if it was used before or some time has passed.

# The commit message EddyVerbruggen#5 will be skipped:

#	EddyVerbruggen#118 App Crash

# The commit message EddyVerbruggen#6 will be skipped:

#	EddyVerbruggen#147 Android fwk tags

# The commit message EddyVerbruggen#7 will be skipped:

#	Android 6.0
#
#	Added call to request permission

# The commit message EddyVerbruggen#8 will be skipped:

#	EddyVerbruggen#149 Android 6.0

# The commit message EddyVerbruggen#9 will be skipped:

#	IOS Build fails with compilation errors EddyVerbruggen#150

# The commit message EddyVerbruggen#10 will be skipped:

#	IOS Build fails with compilation errors EddyVerbruggen#150

# The commit message EddyVerbruggen#1 will be skipped:

#	Android: Gets a new offline token on each login
#
#	Based on EddyVerbruggen#119
#	I tested this on an app I'm working where every authentication attempt returned the same invalid token. After applying this change, the authentication works fine each time.

# The commit message EddyVerbruggen#2 will be skipped:

#	Get refreshToken on iOS sign in
#
#	The refresh token is a useful token for third party apps, to refresh the access token and keep users logged in.

# The commit message EddyVerbruggen#3 will be skipped:

#	Update README.md

# The commit message EddyVerbruggen#4 will be skipped:

#	Updated Google Sign-In iOS SDK to 2.4.0

# The commit message EddyVerbruggen#5 will be skipped:

#	Enabled GoogleOpenSource.framework explicitely

# The commit message EddyVerbruggen#6 will be skipped:

#	EddyVerbruggen#153 Ios updated google framework

# The commit message EddyVerbruggen#2 will be skipped:

#	EddyVerbruggen#168 IOS Build failure with this plugin

# The commit message EddyVerbruggen#2 will be skipped:

#	Added a few npm keywords

# The commit message EddyVerbruggen#3 will be skipped:

#	Update GooglePlus.java
#
#	Fix for app crash on android 6

# The commit message EddyVerbruggen#2 will be skipped:

#	A note about failing Android builds

# The commit message EddyVerbruggen#3 will be skipped:

#	Adding a link to how to use keytool

# The commit message EddyVerbruggen#2 will be skipped:

#	Update README.md

# The commit message EddyVerbruggen#3 will be skipped:

#	Update README.md

# The commit message EddyVerbruggen#4 will be skipped:

#	Google success login redirects to google.com issue fixed

# The commit message EddyVerbruggen#5 will be skipped:

#	iOS readme updated to include latest Google SDK changes

# The commit message EddyVerbruggen#6 will be skipped:

#	Update README.md

# The commit message EddyVerbruggen#7 will be skipped:

#	Update README.md

# The commit message EddyVerbruggen#2 will be skipped:

#	Remove OpenSource and Plus libraries.

# The commit message EddyVerbruggen#2 will be skipped:

#	ignoring some more files

# The commit message EddyVerbruggen#2 will be skipped:

#	Google SignIn framework bump

# The commit message EddyVerbruggen#2 will be skipped:

#	ignore

# The commit message EddyVerbruggen#2 will be skipped:

#	testing sth

# The commit message EddyVerbruggen#3 will be skipped:

#	testing sth

# The commit message EddyVerbruggen#2 will be skipped:

#	new demos for firebase and ionic2+firebase

# The commit message EddyVerbruggen#3 will be skipped:

#	typo fix
@dm-marimuthu
Copy link

Hi,
I have faced the same issue while building for IOS and Ionic 1.

In file included from /ionic/platforms/ios/Kitescafe/Plugins/cordova-plugin-googleplus/GooglePlus.m:3:
/ionic/platforms/ios/Kitescafe/Plugins/cordova-plugin-googleplus/GooglePlus.h:2:9: fatal error: 'GoogleSignIn/GoogleSignIn.h' file not found
#import <GoogleSignIn/GoogleSignIn.h>

Any solutions ?

@dm-marimuthu
Copy link

Try

cordova plugin add cordova-plugin-googleplus@4.0.5 --save --variable REVERSED_CLIENT_ID=<Your Id>

Version 4.0.5 working fine

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants