大佬教程收集整理的这篇文章主要介绍了ios – 在Xcode 6.3(Swift)中使用Parse和Facebook框架编译错误,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_FBSDKAppEvents",referenced from: __TMaCSo14FBSDKAppEvents in AppDelegate.o "_OBJC_CLASS_$_FBSDKApplicationDelegate",referenced from: __TMaCSo24FBSDKApplicationDelegate in AppDelegate.o "_OBJC_CLASS_$_PFAnalytics",referenced from: __TMaCSo11PFAnalytics in AppDelegate.o "_OBJC_CLASS_$_PFFacebookUtils",referenced from: __TMaCSo15PFFacebookUtils in AppDelegate.o "_OBJC_CLASS_$_Parse",referenced from: __TMaCSo5Parse in AppDelegate.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command Failed with exit code 1 (use -v to see invocation)
我不知道这意味着什么,但我已经尝试了许多其他解决方案,例如清理,删除Derived Data文件夹,检查我的所有框架,我仍然无法解决问题.如果有人知道如何解决这个问题,我将非常感激.感谢您的时间.
编辑
这是我正在使用的Bridging-Header.h:
#import <AFNetworking.h> #import <BDBOAuth1requestOperationManager.h> #import <NSDictionary+BDBOAuth1Manager.h> #import <UIImageView+AFNetworking.h> #import <UIScrollView+SVInfiniteScrolling.h> #import <FBSDKCoreKit/FBSDKCoreKit.h> #import <FBSDKLoginKit/FBSDKLoginKit.h> #import <FBSDKShareKit/FBSDKShareKit.h> #import <Parse/Parse.h> #import <ParseCrashReporTing/ParseCrashReporTing.h> #import <ParseFacebookUtilsV4/PFFacebookUtils.h> #import <Bolts/Bolts.h>
这是AppDelegate.swift文件:
import UIKit import CoreData import Parse import FBSDKCoreKit import FBSDKLoginKit import Bolts @UIApplicationMain class AppDelegate: UIResponder,UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication,didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. UIApplication.sharedApplication().setStatusBarStyle(UIStatusBarStyle.Lightcontent,animated: truE) // Type casTing in swift is "as Type",you'll need to unwrap optionals however. let tabBarController = self.window!.rootViewController as! UITabBarController let tabBar = tabBarController.tabBar as UITabBar // I prefer to use 0 based labels since the array is 0 based let tabBarItem0 = tabBar.items![0] as! UITabBarItem let tabBarItem1 = tabBar.items![1] as! UITabBarItem let tabBarItem2 = tabBar.items![2] as! UITabBarItem // The UIColor method you are using is an initializer in swift tabBar.TintColor = UIColor(red: 62.0/255.0,green: 191.0/255.0,blue: 180.0/255.0,alpha: 1.0) // UIImage also has an initializer for your situation in swift tabBarItem0.SELEctedImage = UIImage(named: "Discover TabBar SELEct.pdf") tabBarItem1.SELEctedImage = UIImage(named: "Me TabBar SELEct.pdf") tabBarItem2.SELEctedImage = UIImage(named: "SetTings TabBar SELEct.pdf") //Facebook SDK Setup FBSDKApplicationDelegate.sharedInstance() Parse.setApplicationId("HxjVTJZ2rZA6qFBl0Xaji9z12HYQmTFPIXhVcfPp",clientKey:"8FJT7KHSmDPZi1AtpFS1GvTw39qevvB0JuimwWdS") if let launchOptions = launchOptions { PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(launchOptions) } else { PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions([NSObject:AnyObject]()) } // [Optional] Power your app with Local Datastore. For more info,go to // https://parse.com/docs/ios_guide#localdatastore/iOS Parse.enableLocalDatastore() // [Optional] Track statistics around application opens. PFAnalytics.trackAppOpenedWithLaunchOptions(launchOptions) return true } func applicationDidBecomeActive(application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was prevIoUsly in the BACkground,optionally refresh the user interface. FBSDKAppEvents.activateApp() }
我将最新的Parse和Facebook SDK框架拖到我的项目中,并通过“Build Phases”部分下的“Link Binary with Libraries”选项卡添加了所需的额外Frameworks(包括lib@R_502_1442@.dylib和libz.dylib)
我希望这些额外的信息是有用的.
1)转到构建设置
2)键入其他链接器标志.因为我使用目标C.所以我点击它并添加两个新值.第一个是-ObjC,第二个是$(继承).添加这两个值后,您的其他链接器标志将显示为-ObjC -ObjC – |“Pods -…类似于as.我正在使用COcapods.
3)现在键入“允许框架模块中的非模块化包含”并使用YES值.
4)然后键入“启用模块(C和Objective-C),它应该是YEs.
并清理和构建您的项目.如果它仍然不适合您,请检查您的链接二进制库.在My mine中,这些是框架.
Accounts.framework AddressBook.framework Foundation.framework CFNetwork.framework GoolgeMaps.Framework Social.framework CoreData.framework QuartzCore.framework Security.framework CoreLOCATIOn.framework CoreGraphics.framework UIKit.framework
请试试谢谢
以上是大佬教程为你收集整理的ios – 在Xcode 6.3(Swift)中使用Parse和Facebook框架编译错误全部内容,希望文章能够帮你解决ios – 在Xcode 6.3(Swift)中使用Parse和Facebook框架编译错误所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。