xcode 7 beta 在进行 google 集成时显示链接器错误
xcode 7 beta showing the linker error while doing google integration
我正在尝试集成 google 符号,但 Xcode7 beta
中出现许多链接器错误
错误:
Ld /Users/ajeyraj/Library/Developer/Xcode/DerivedData/fb_login-fyenitgjyzxqdnaelggrvofnteki/Build/Products/Debug-iphoneos/fb\ login.app/fb\ login normal arm64
cd "/Users/ajeyraj/Documents/my app/untitled folder/video gyan activities/fb login"
export IPHONEOS_DEPLOYMENT_TARGET=8.2
export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -L/Users/ajeyraj/Library/Developer/Xcode/DerivedData/fb_login-fyenitgjyzxqdnaelggrvofnteki/Build/Products/Debug-iphoneos -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GGLInstanceID/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/Google/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleAnalytics/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleAppUtilities/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleAuthUtilities/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleCloudMessaging/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleInterchangeUtilities/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleNetworkingUtilities/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleParsingUtilities/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GooglePlusUtilities/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleSignIn/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleSymbolUtilities/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleUtilities/Libraries -F/Users/ajeyraj/Library/Developer/Xcode/DerivedData/fb_login-fyenitgjyzxqdnaelggrvofnteki/Build/Products/Debug-iphoneos -F/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/AppInvites/Frameworks -F/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GPPCore/Frameworks -F/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleMobileAds/Frameworks -F/Users/ajeyraj/Downloads/FacebookSDKs-iOS-20150910 -F/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login -filelist /Users/ajeyraj/Library/Developer/Xcode/DerivedData/fb_login-fyenitgjyzxqdnaelggrvofnteki/Build/Intermediates/fb\ login.build/Debug-iphoneos/fb\ login.build/Objects-normal/arm64/fb\ login.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=8.2 -dead_strip -ObjC -L/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xlinker /Users/ajeyraj/Library/Developer/Xcode/DerivedData/fb_login-fyenitgjyzxqdnaelggrvofnteki/Build/Intermediates/fb\ login.build/Debug-iphoneos/fb\ login.build/Objects-normal/arm64/fb_login.swiftmodule -framework Foundation -framework CoreSpotlight -framework Social -framework CoreMotion -framework CoreLocation -framework AssetsLibrary -framework Accounts -framework MediaPlayer -framework CoreMedia -framework AVFoundation -framework StoreKit -framework SystemConfiguration -framework AddressBook -framework FBSDKMessengerShareKit -framework GoogleSignIn -framework Bolts -framework FBSDKShareKit -framework FBSDKLoginKit -framework FBSDKCoreKit -lPods -Xlinker -dependency_info -Xlinker /Users/ajeyraj/Library/Developer/Xcode/DerivedData/fb_login-fyenitgjyzxqdnaelggrvofnteki/Build/Intermediates/fb\ login.build/Debug-iphoneos/fb\ login.build/Objects-normal/arm64/fb\ login_dependency_info.dat -o /Users/ajeyraj/Library/Developer/Xcode/DerivedData/fb_login-fyenitgjyzxqdnaelggrvofnteki/Build/Products/Debug-iphoneos/fb\ login.app/fb\ login
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GGLContext", referenced from:
type metadata accessor for ObjectiveC.GGLContext in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
它说它在 AppDelegate.h 文件中有未定义的符号我无法解决它
这是我的 AppDelegate.swift
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate,GIDSignInDelegate{
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> (Bool,Bool) {
//Override point for customization after application launch.
// return FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
var configureError: NSError?
GGLContext.sharedInstance().configureWithError(&configureError)
assert(configureError == nil, "Error configuring Google services: \(configureError)")
GIDSignIn.sharedInstance().delegate = self
return (true,FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions))
}
//func application(application: UIApplication,
// didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> (Bool,Bool) {
// Initialize sign-in
// }
func application(application: UIApplication,
openURL url: NSURL,
sourceApplication: String?,
annotation: AnyObject) -> (Bool,Bool) {
return (FBSDKApplicationDelegate.sharedInstance().application(
application,
openURL: url,
sourceApplication: sourceApplication,
annotation: annotation), GIDSignIn.sharedInstance().handleURL(url,
sourceApplication: sourceApplication,
annotation: annotation))
}
func signIn(signIn: GIDSignIn!, didSignInForUser user: GIDGoogleUser!,
withError error: NSError!) {
if (error == nil) {
// Perform any operations on signed in user here.
let userId = user.userID // For client-side use only!
let idToken = user.authentication.idToken // Safe to send to the server
let name = user.profile.name
let email = user.profile.email // ...
} else {
print("\(error.localizedDescription)")
}
}
func signIn(signIn: GIDSignIn!, didDisconnectWithUser user:GIDGoogleUser!,
withError error: NSError!) {
// Perform any operations when the user disconnects from app here.
// ...
}
}
您必须 link libGGLAnalytics.a 和 libGGLCore.a 才能使 GA 工作。
Link 它在您应用的目标中 构建阶段
我正在尝试集成 google 符号,但 Xcode7 beta
中出现许多链接器错误错误:
Ld /Users/ajeyraj/Library/Developer/Xcode/DerivedData/fb_login-fyenitgjyzxqdnaelggrvofnteki/Build/Products/Debug-iphoneos/fb\ login.app/fb\ login normal arm64
cd "/Users/ajeyraj/Documents/my app/untitled folder/video gyan activities/fb login"
export IPHONEOS_DEPLOYMENT_TARGET=8.2
export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -L/Users/ajeyraj/Library/Developer/Xcode/DerivedData/fb_login-fyenitgjyzxqdnaelggrvofnteki/Build/Products/Debug-iphoneos -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GGLInstanceID/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/Google/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleAnalytics/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleAppUtilities/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleAuthUtilities/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleCloudMessaging/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleInterchangeUtilities/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleNetworkingUtilities/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleParsingUtilities/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GooglePlusUtilities/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleSignIn/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleSymbolUtilities/Libraries -L/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleUtilities/Libraries -F/Users/ajeyraj/Library/Developer/Xcode/DerivedData/fb_login-fyenitgjyzxqdnaelggrvofnteki/Build/Products/Debug-iphoneos -F/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/AppInvites/Frameworks -F/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GPPCore/Frameworks -F/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login/Pods/GoogleMobileAds/Frameworks -F/Users/ajeyraj/Downloads/FacebookSDKs-iOS-20150910 -F/Users/ajeyraj/Documents/my\ app/untitled\ folder/video\ gyan\ activities/fb\ login -filelist /Users/ajeyraj/Library/Developer/Xcode/DerivedData/fb_login-fyenitgjyzxqdnaelggrvofnteki/Build/Intermediates/fb\ login.build/Debug-iphoneos/fb\ login.build/Objects-normal/arm64/fb\ login.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=8.2 -dead_strip -ObjC -L/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xlinker /Users/ajeyraj/Library/Developer/Xcode/DerivedData/fb_login-fyenitgjyzxqdnaelggrvofnteki/Build/Intermediates/fb\ login.build/Debug-iphoneos/fb\ login.build/Objects-normal/arm64/fb_login.swiftmodule -framework Foundation -framework CoreSpotlight -framework Social -framework CoreMotion -framework CoreLocation -framework AssetsLibrary -framework Accounts -framework MediaPlayer -framework CoreMedia -framework AVFoundation -framework StoreKit -framework SystemConfiguration -framework AddressBook -framework FBSDKMessengerShareKit -framework GoogleSignIn -framework Bolts -framework FBSDKShareKit -framework FBSDKLoginKit -framework FBSDKCoreKit -lPods -Xlinker -dependency_info -Xlinker /Users/ajeyraj/Library/Developer/Xcode/DerivedData/fb_login-fyenitgjyzxqdnaelggrvofnteki/Build/Intermediates/fb\ login.build/Debug-iphoneos/fb\ login.build/Objects-normal/arm64/fb\ login_dependency_info.dat -o /Users/ajeyraj/Library/Developer/Xcode/DerivedData/fb_login-fyenitgjyzxqdnaelggrvofnteki/Build/Products/Debug-iphoneos/fb\ login.app/fb\ login
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GGLContext", referenced from:
type metadata accessor for ObjectiveC.GGLContext in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
它说它在 AppDelegate.h 文件中有未定义的符号我无法解决它
这是我的 AppDelegate.swift
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate,GIDSignInDelegate{
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> (Bool,Bool) {
//Override point for customization after application launch.
// return FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
var configureError: NSError?
GGLContext.sharedInstance().configureWithError(&configureError)
assert(configureError == nil, "Error configuring Google services: \(configureError)")
GIDSignIn.sharedInstance().delegate = self
return (true,FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions))
}
//func application(application: UIApplication,
// didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> (Bool,Bool) {
// Initialize sign-in
// }
func application(application: UIApplication,
openURL url: NSURL,
sourceApplication: String?,
annotation: AnyObject) -> (Bool,Bool) {
return (FBSDKApplicationDelegate.sharedInstance().application(
application,
openURL: url,
sourceApplication: sourceApplication,
annotation: annotation), GIDSignIn.sharedInstance().handleURL(url,
sourceApplication: sourceApplication,
annotation: annotation))
}
func signIn(signIn: GIDSignIn!, didSignInForUser user: GIDGoogleUser!,
withError error: NSError!) {
if (error == nil) {
// Perform any operations on signed in user here.
let userId = user.userID // For client-side use only!
let idToken = user.authentication.idToken // Safe to send to the server
let name = user.profile.name
let email = user.profile.email // ...
} else {
print("\(error.localizedDescription)")
}
}
func signIn(signIn: GIDSignIn!, didDisconnectWithUser user:GIDGoogleUser!,
withError error: NSError!) {
// Perform any operations when the user disconnects from app here.
// ...
}
}
您必须 link libGGLAnalytics.a 和 libGGLCore.a 才能使 GA 工作。
Link 它在您应用的目标中 构建阶段