I've been working with the Parse SDK and I followed the quickstep guide. When I try to run, I get these 8 errors. Any ideas as to why? It looks like something to do with the Facebook part of Parse which I'm not using.
我一直在使用解析SDK,并遵循了quickstep指南。当我尝试运行时,我得到这8个错误。你知道为什么吗?它看起来和我没有使用的Facebook解析部分有关。
Undefined symbols for architecture armv7:
"_FBTokenInformationTokenKey", referenced from:
-[PFFacebookTokenCachingStrategy accessToken] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setAccessToken:] in Parse(PFFacebookTokenCachingStrategy.o)
"_FBTokenInformationExpirationDateKey", referenced from:
-[PFFacebookTokenCachingStrategy cacheTokenInformation:] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy expirationDate] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setExpirationDate:] in Parse(PFFacebookTokenCachingStrategy.o)
"_OBJC_METACLASS_$_FBSessionTokenCachingStrategy", referenced from:
_OBJC_METACLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
"_OBJC_CLASS_$_FBSessionTokenCachingStrategy", referenced from:
_OBJC_CLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
"_FBTokenInformationUserFBIDKey", referenced from:
-[PFFacebookTokenCachingStrategy facebookId] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setFacebookId:] in Parse(PFFacebookTokenCachingStrategy.o)
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
16 个解决方案
#1
137
This is some sort of bug associated with the Parse iOS 1.1.33 release as multiple people are seeing the same errors- myself included.
这是与Parse ios1.1.33发行版相关的某种错误,因为很多人都看到了相同的错误——包括我自己。
There are a couple of workarounds-
有两个变通的办法
If you're not using a library which requires the -ObjC linker flag, you can remove -ObjC from your project:
如果您不使用需要-ObjC链接器标志的库,您可以从项目中删除-ObjC:
Build Settings > Other Linker Flags > remove -ObjC
构建设置>其他链接器标志>删除-ObjC
or if you are using a library which requires that flag, you can add the Facebook SDK.
或者如果您正在使用需要该标志的库,您可以添加Facebook SDK。
Both options will eliminate the errors. Hopefully they fix this as I have no need for the Facebook SDK in my app.
这两个选项都将消除错误。希望他们能解决这个问题,因为我的应用不需要Facebook SDK。
Follow the discussion here:
遵循这里的讨论:
https://parse.com/questions/cocoapods-incompatibility
https://parse.com/questions/cocoapods-incompatibility
#2
102
Here's a potentially simpler workaround than downloading, compiling, and installing the FB kit which is kind of large and cumbersome. Note that, of course, you won't be able to use any of the FB type functionality in Parse and you will run into severe issues if you trigger any of the Parse code that is expecting to use these dummy symbols. But, if you stay away from them you'll be OK I think. So...
这里有一个比下载、编译和安装FB工具包更简单的解决方案,它有点大,有点麻烦。注意,当然,您不能在解析中使用任何FB类型的功能,如果触发任何期望使用这些虚拟符号的解析代码,您将遇到严重的问题。但是,如果你离他们远点,我想你会没事的。所以…
-
Create an object in your application called FBMissingSymbols
在应用程序中创建一个名为FBMissingSymbols的对象。
-
Delete the .h you won't need it
删除你不需要的。h
-
Put this in the .m :
把这个放在。m:
NSString *FBTokenInformationExpirationDateKey = @"";
NSString *FBTokenInformationTokenKey = @"";
NSString *FBTokenInformationUserFBIDKey = @"";
@interface FBAppCall:NSObject
@end
@implementation FBAppCall
@end
@interface FBRequest:NSObject
@end
@implementation FBRequest
@end
@interface FBSession:NSObject
@end
@implementation FBSession
@end
@interface FBSessionTokenCaching:NSObject
@end
@implementation FBSessionTokenCaching
@end
@interface FBSessionTokenCachingStrategy:NSObject
@end
@implementation FBSessionTokenCachingStrategy
@end
#3
27
You have to delete the old ParseFacebookUtils.framework
and keep the new ParseFacebookUtilsV4.framework
to get it working.
您必须删除旧的ParseFacebookUtils.framework,并保持新的ParseFacebookUtilsV4.framework以使其工作。
#4
23
I loved dbquarrel's answer, but it doesn't work anymore because it is lacking some new social classes.
我喜欢dbquarrel的答案,但它再也行不通了,因为它缺少一些新的社会阶层。
So do the same thing, but instead, add this:
所以做同样的事情,但是相反,加上这个:
NSString *FBTokenInformationExpirationDateKey = @"";
NSString *FBTokenInformationTokenKey = @"";
NSString *FBTokenInformationUserFBIDKey = @"";
NSString *SLServiceTypeTwitter = @"";
NSString *ACAccountTypeIdentifierTwitter = @"";
@interface FBAppCall:NSObject
@end
@implementation FBAppCall
@end
@interface FBRequest:NSObject
@end
@implementation FBRequest
@end
@interface FBSession:NSObject
@end
@implementation FBSession
@end
@interface FBSessionTokenCaching:NSObject
@end
@implementation FBSessionTokenCaching
@end
@interface FBSessionTokenCachingStrategy:NSObject
@end
@implementation FBSessionTokenCachingStrategy
@end
@interface ACAccountStore:NSObject
@end
@implementation ACAccountStore
@end
@interface SLRequest:NSObject
@end
@implementation SLRequest
@end
@interface SLComposeViewController:NSObject
@end
@implementation SLComposeViewController
@end
#5
10
Check and make sure that you do not have two versions of the "ParseFacebookUtils" framework added there is:
检查并确保您没有两个版本的“ParseFacebookUtils”框架添加:
ParseFacebookUtilsV4 and ParseFacebookUtils
ParseFacebookUtilsV4和ParseFacebookUtils
Once I removed ParseFacebookUtils, and kept ParseFacebookUtilsV4 it worked fine.
一旦我删除了ParseFacebookUtils,并保持ParseFacebookUtilsV4运行良好。
#6
7
My Solution will definitely work and you can use -ObjC in other linker flags.
我的解决方案肯定会有用,你可以在其他链接标记中使用-ObjC。
- Add "Social.framework" , "Account.framework"
- 添加“Social.framework”,“Account.framework”
- Add "FacebookSDK.framework"
- 添加“FacebookSDK.framework”
Cheers....now it works..... and no need of removing -ObjC.
欢呼声....现在工作.....不需要移除-ObjC。
#7
3
Sounds like you might need to add the 'Accounts.Framework' and/or the 'Social.Framework'.
听起来你可能需要添加“账户”。框架”和/或“Social.Framework”。
#8
2
A complementary to the answer by @blueHula . Parse has removed Facebook SDK from its framework, meaning that from some certain version (1.1.33 maybe) integrating parse.framework should be accompanied by integrating FB SDK independently.
@blueHula对答案的补充。Parse已经从其框架中删除了Facebook SDK,这意味着从某个特定版本(可能是1.1.33)集成解析.framework的同时,应该独立集成FB SDK。
Please refer to this link using the parse ios sdk without including the facebook sdk
请参考这个链接使用解析ios sdk,不包括facebook sdk
The key point is to use -force_load $(SRCROOT)/path/libname.a
to link with necessary third-party libraries, rather than using -all_load
and -ObjC
关键是使用-force_load $(SRCROOT)/path/libname。与必要的第三方库链接,而不是使用-all_load和-ObjC
#9
1
It is a linker error... You are not including a needed framework in your project which you are referencing in one of you included header files.
这是一个链接错误……您没有在项目中包含需要的框架,您正在其中一个包含头文件中引用该框架。
So, for example, if you an have an include in your code:
例如,如果你的代码中有一个包含:
#import <Parse/Parse.h>
It probably requires a supporting framework, and you have to include it in your app. Did you include the parse.framework
from within Xcode?
它可能需要一个支持框架,你必须在你的应用中包含它。
#10
1
I had the same use and and the only third party I had was the PayPal SDK. After removing -ObjC everything built fine. (always make a backup of you project before changing settings)
我也有同样的用途,唯一的第三方就是PayPal SDK。删除-ObjC后,一切都很好。(在更改设置之前,总是对项目进行备份)
#11
1
it's 2015 and I just had the same error. Unfortunately, none of the above answers worked for me. But this did:
现在是2015年,我也犯了同样的错误。不幸的是,上面的答案对我都不起作用。但这是:
Target > Build Phases > Link Binary With Libraries then add libstdc++.6.dylib
目标>构建阶段>链接二进制与库,然后添加libstdc++.6.dylib。
This solved the problem for me.
这就解决了我的问题。
#12
0
There are many frameworks that needs to set -ObjC flag as Other linked flag, whereas Parse do not allow you to proceed if you do so. To deal with this you can do one of following things. I have shown example of Google Maps SDK that needs -ObjC flag, but due to Parse in the same project I can not use it directly:
有许多框架需要将-ObjC标志设置为其他链接标志,而如果这样做,解析不允许继续。为了解决这个问题,你可以做以下一件事。我已经展示了谷歌Maps SDK的示例,该SDK需要-ObjC标志,但由于在同一个项目中解析,我不能直接使用它:
Solution 1 - Using force_load Flag
解决方案1 -使用force_load标志
Instead of setting -ObjC flag as Other linked flag, use force_load flag to load particular framework or library.
使用force_load标志来加载特定的框架或库,而不是将-ObjC标志设置为其他链接标志。
-force_load $(SRCROOT)/GoogleMaps.framework/Versions/A/GoogleMaps
Solution 2 - Using Facebook SDK
解决方案2 -使用Facebook SDK
Just Add Facebook SDK as a separate framework, this will allow you to use -ObjC flag. Also make sure you have added Accounts.framework
and Social.framework
. If you have added Bolt.framework and using Parse blank project then to deal with duplicate symbol remove Bolt.framwork
. If still it have few errors then remove Accounts and Social framework and Add it again (This will be the case if you have used Parse default blank project).
只需添加Facebook SDK作为一个单独的框架,这将允许您使用-ObjC标志。还要确保你添加了account .framework和Social.framework。如果您已经添加了Bolt.framework,然后使用Parse blank项目来处理重复符号删除Bolt.framwork。如果它仍然有一些错误,那么删除帐户和社交框架并再次添加它(如果您使用了Parse default blank project,就会出现这种情况)。
#13
-1
I was bothered this issue for many days. I used cocoapods to manage all of third SDK.
我为这个问题烦恼了许多天。我使用cocoapods管理第三代SDK。
Here is how I resolved this issue. Go to pod project and set the item "build architecture only" to NO.
我是这样解决这个问题的。进入pod项目,并将“构建架构”设置为NO。
Rebuild pod project and then link errors is gone! help this can help someone who is using cocoapods.
重建pod项目,然后链接错误就消失了!帮助这可以帮助那些正在使用可可粉的人。
#14
-1
I had the same problem. I solved by downloading the previous version (1.1.32) from here:
我也有同样的问题。我通过从这里下载之前的版本(1.1.32)来解决:
https://parse.com/downloads/ios/parse-library/1.1.32
https://parse.com/downloads/ios/parse-library/1.1.32
(In my case I needed the -ObjC flag)
(在我的例子中,我需要-ObjC标志)
Edit: It seems that version doesn't work with 64 bit architectures.
编辑:看起来版本不适合64位架构。
#15
-1
This can be removed from the project-file located in <projectname>/cordova/<projectname>/platforms/ios/<projectname>.xcodeproj/project.pbxproj
and
这可以从位于
Search the file for -ObjC
, there are multiple locations. It looks like this:
搜索-ObjC文件,有多个位置。它看起来像这样:
OTHER_LDFLAGS = (
"-weak_framework",
CoreFoundation,
"-weak_framework",
UIKit,
"-weak_framework",
AVFoundation,
"-weak_framework",
CoreMedia,
"-weak-lSystem",
"-force_load",
"\"$(BUILT_PRODUCTS_DIR)/libCordova.a\"",
"-ObjC",
);
#16
-1
Install cocoaPods and add this to your Podfile:
安装可可豆并将其添加到你的播客中:
pod 'Facebook-iOS-SDK'
pod 'Parse'
pod 'ParseFacebookUtils'
#1
137
This is some sort of bug associated with the Parse iOS 1.1.33 release as multiple people are seeing the same errors- myself included.
这是与Parse ios1.1.33发行版相关的某种错误,因为很多人都看到了相同的错误——包括我自己。
There are a couple of workarounds-
有两个变通的办法
If you're not using a library which requires the -ObjC linker flag, you can remove -ObjC from your project:
如果您不使用需要-ObjC链接器标志的库,您可以从项目中删除-ObjC:
Build Settings > Other Linker Flags > remove -ObjC
构建设置>其他链接器标志>删除-ObjC
or if you are using a library which requires that flag, you can add the Facebook SDK.
或者如果您正在使用需要该标志的库,您可以添加Facebook SDK。
Both options will eliminate the errors. Hopefully they fix this as I have no need for the Facebook SDK in my app.
这两个选项都将消除错误。希望他们能解决这个问题,因为我的应用不需要Facebook SDK。
Follow the discussion here:
遵循这里的讨论:
https://parse.com/questions/cocoapods-incompatibility
https://parse.com/questions/cocoapods-incompatibility
#2
102
Here's a potentially simpler workaround than downloading, compiling, and installing the FB kit which is kind of large and cumbersome. Note that, of course, you won't be able to use any of the FB type functionality in Parse and you will run into severe issues if you trigger any of the Parse code that is expecting to use these dummy symbols. But, if you stay away from them you'll be OK I think. So...
这里有一个比下载、编译和安装FB工具包更简单的解决方案,它有点大,有点麻烦。注意,当然,您不能在解析中使用任何FB类型的功能,如果触发任何期望使用这些虚拟符号的解析代码,您将遇到严重的问题。但是,如果你离他们远点,我想你会没事的。所以…
-
Create an object in your application called FBMissingSymbols
在应用程序中创建一个名为FBMissingSymbols的对象。
-
Delete the .h you won't need it
删除你不需要的。h
-
Put this in the .m :
把这个放在。m:
NSString *FBTokenInformationExpirationDateKey = @"";
NSString *FBTokenInformationTokenKey = @"";
NSString *FBTokenInformationUserFBIDKey = @"";
@interface FBAppCall:NSObject
@end
@implementation FBAppCall
@end
@interface FBRequest:NSObject
@end
@implementation FBRequest
@end
@interface FBSession:NSObject
@end
@implementation FBSession
@end
@interface FBSessionTokenCaching:NSObject
@end
@implementation FBSessionTokenCaching
@end
@interface FBSessionTokenCachingStrategy:NSObject
@end
@implementation FBSessionTokenCachingStrategy
@end
#3
27
You have to delete the old ParseFacebookUtils.framework
and keep the new ParseFacebookUtilsV4.framework
to get it working.
您必须删除旧的ParseFacebookUtils.framework,并保持新的ParseFacebookUtilsV4.framework以使其工作。
#4
23
I loved dbquarrel's answer, but it doesn't work anymore because it is lacking some new social classes.
我喜欢dbquarrel的答案,但它再也行不通了,因为它缺少一些新的社会阶层。
So do the same thing, but instead, add this:
所以做同样的事情,但是相反,加上这个:
NSString *FBTokenInformationExpirationDateKey = @"";
NSString *FBTokenInformationTokenKey = @"";
NSString *FBTokenInformationUserFBIDKey = @"";
NSString *SLServiceTypeTwitter = @"";
NSString *ACAccountTypeIdentifierTwitter = @"";
@interface FBAppCall:NSObject
@end
@implementation FBAppCall
@end
@interface FBRequest:NSObject
@end
@implementation FBRequest
@end
@interface FBSession:NSObject
@end
@implementation FBSession
@end
@interface FBSessionTokenCaching:NSObject
@end
@implementation FBSessionTokenCaching
@end
@interface FBSessionTokenCachingStrategy:NSObject
@end
@implementation FBSessionTokenCachingStrategy
@end
@interface ACAccountStore:NSObject
@end
@implementation ACAccountStore
@end
@interface SLRequest:NSObject
@end
@implementation SLRequest
@end
@interface SLComposeViewController:NSObject
@end
@implementation SLComposeViewController
@end
#5
10
Check and make sure that you do not have two versions of the "ParseFacebookUtils" framework added there is:
检查并确保您没有两个版本的“ParseFacebookUtils”框架添加:
ParseFacebookUtilsV4 and ParseFacebookUtils
ParseFacebookUtilsV4和ParseFacebookUtils
Once I removed ParseFacebookUtils, and kept ParseFacebookUtilsV4 it worked fine.
一旦我删除了ParseFacebookUtils,并保持ParseFacebookUtilsV4运行良好。
#6
7
My Solution will definitely work and you can use -ObjC in other linker flags.
我的解决方案肯定会有用,你可以在其他链接标记中使用-ObjC。
- Add "Social.framework" , "Account.framework"
- 添加“Social.framework”,“Account.framework”
- Add "FacebookSDK.framework"
- 添加“FacebookSDK.framework”
Cheers....now it works..... and no need of removing -ObjC.
欢呼声....现在工作.....不需要移除-ObjC。
#7
3
Sounds like you might need to add the 'Accounts.Framework' and/or the 'Social.Framework'.
听起来你可能需要添加“账户”。框架”和/或“Social.Framework”。
#8
2
A complementary to the answer by @blueHula . Parse has removed Facebook SDK from its framework, meaning that from some certain version (1.1.33 maybe) integrating parse.framework should be accompanied by integrating FB SDK independently.
@blueHula对答案的补充。Parse已经从其框架中删除了Facebook SDK,这意味着从某个特定版本(可能是1.1.33)集成解析.framework的同时,应该独立集成FB SDK。
Please refer to this link using the parse ios sdk without including the facebook sdk
请参考这个链接使用解析ios sdk,不包括facebook sdk
The key point is to use -force_load $(SRCROOT)/path/libname.a
to link with necessary third-party libraries, rather than using -all_load
and -ObjC
关键是使用-force_load $(SRCROOT)/path/libname。与必要的第三方库链接,而不是使用-all_load和-ObjC
#9
1
It is a linker error... You are not including a needed framework in your project which you are referencing in one of you included header files.
这是一个链接错误……您没有在项目中包含需要的框架,您正在其中一个包含头文件中引用该框架。
So, for example, if you an have an include in your code:
例如,如果你的代码中有一个包含:
#import <Parse/Parse.h>
It probably requires a supporting framework, and you have to include it in your app. Did you include the parse.framework
from within Xcode?
它可能需要一个支持框架,你必须在你的应用中包含它。
#10
1
I had the same use and and the only third party I had was the PayPal SDK. After removing -ObjC everything built fine. (always make a backup of you project before changing settings)
我也有同样的用途,唯一的第三方就是PayPal SDK。删除-ObjC后,一切都很好。(在更改设置之前,总是对项目进行备份)
#11
1
it's 2015 and I just had the same error. Unfortunately, none of the above answers worked for me. But this did:
现在是2015年,我也犯了同样的错误。不幸的是,上面的答案对我都不起作用。但这是:
Target > Build Phases > Link Binary With Libraries then add libstdc++.6.dylib
目标>构建阶段>链接二进制与库,然后添加libstdc++.6.dylib。
This solved the problem for me.
这就解决了我的问题。
#12
0
There are many frameworks that needs to set -ObjC flag as Other linked flag, whereas Parse do not allow you to proceed if you do so. To deal with this you can do one of following things. I have shown example of Google Maps SDK that needs -ObjC flag, but due to Parse in the same project I can not use it directly:
有许多框架需要将-ObjC标志设置为其他链接标志,而如果这样做,解析不允许继续。为了解决这个问题,你可以做以下一件事。我已经展示了谷歌Maps SDK的示例,该SDK需要-ObjC标志,但由于在同一个项目中解析,我不能直接使用它:
Solution 1 - Using force_load Flag
解决方案1 -使用force_load标志
Instead of setting -ObjC flag as Other linked flag, use force_load flag to load particular framework or library.
使用force_load标志来加载特定的框架或库,而不是将-ObjC标志设置为其他链接标志。
-force_load $(SRCROOT)/GoogleMaps.framework/Versions/A/GoogleMaps
Solution 2 - Using Facebook SDK
解决方案2 -使用Facebook SDK
Just Add Facebook SDK as a separate framework, this will allow you to use -ObjC flag. Also make sure you have added Accounts.framework
and Social.framework
. If you have added Bolt.framework and using Parse blank project then to deal with duplicate symbol remove Bolt.framwork
. If still it have few errors then remove Accounts and Social framework and Add it again (This will be the case if you have used Parse default blank project).
只需添加Facebook SDK作为一个单独的框架,这将允许您使用-ObjC标志。还要确保你添加了account .framework和Social.framework。如果您已经添加了Bolt.framework,然后使用Parse blank项目来处理重复符号删除Bolt.framwork。如果它仍然有一些错误,那么删除帐户和社交框架并再次添加它(如果您使用了Parse default blank project,就会出现这种情况)。
#13
-1
I was bothered this issue for many days. I used cocoapods to manage all of third SDK.
我为这个问题烦恼了许多天。我使用cocoapods管理第三代SDK。
Here is how I resolved this issue. Go to pod project and set the item "build architecture only" to NO.
我是这样解决这个问题的。进入pod项目,并将“构建架构”设置为NO。
Rebuild pod project and then link errors is gone! help this can help someone who is using cocoapods.
重建pod项目,然后链接错误就消失了!帮助这可以帮助那些正在使用可可粉的人。
#14
-1
I had the same problem. I solved by downloading the previous version (1.1.32) from here:
我也有同样的问题。我通过从这里下载之前的版本(1.1.32)来解决:
https://parse.com/downloads/ios/parse-library/1.1.32
https://parse.com/downloads/ios/parse-library/1.1.32
(In my case I needed the -ObjC flag)
(在我的例子中,我需要-ObjC标志)
Edit: It seems that version doesn't work with 64 bit architectures.
编辑:看起来版本不适合64位架构。
#15
-1
This can be removed from the project-file located in <projectname>/cordova/<projectname>/platforms/ios/<projectname>.xcodeproj/project.pbxproj
and
这可以从位于
Search the file for -ObjC
, there are multiple locations. It looks like this:
搜索-ObjC文件,有多个位置。它看起来像这样:
OTHER_LDFLAGS = (
"-weak_framework",
CoreFoundation,
"-weak_framework",
UIKit,
"-weak_framework",
AVFoundation,
"-weak_framework",
CoreMedia,
"-weak-lSystem",
"-force_load",
"\"$(BUILT_PRODUCTS_DIR)/libCordova.a\"",
"-ObjC",
);
#16
-1
Install cocoaPods and add this to your Podfile:
安装可可豆并将其添加到你的播客中:
pod 'Facebook-iOS-SDK'
pod 'Parse'
pod 'ParseFacebookUtils'