iOS 용 구문 분석 : 앱 실행시 오류
저는 Parse SDK로 작업 해 왔으며 빠른 단계 가이드를 따랐습니다. 실행하려고하면 8 개의 오류가 발생합니다. 이유에 대한 아이디어가 있습니까? 내가 사용하지 않는 Parse의 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)
이것은 여러 사람이 동일한 오류를보고 있기 때문에 Parse iOS 1.1.33 릴리스와 관련된 일종의 버그입니다.
몇 가지 해결 방법이 있습니다.
-ObjC 링커 플래그가 필요한 라이브러리를 사용하지 않는 경우 프로젝트에서 -ObjC를 제거 할 수 있습니다.
빌드 설정> 기타 링커 플래그> remove -ObjC
또는 해당 플래그가 필요한 라이브러리를 사용하는 경우 Facebook SDK를 추가 할 수 있습니다.
두 옵션 모두 오류를 제거합니다. 내 앱에 Facebook SDK가 필요하지 않기 때문에이 문제를 해결하기를 바랍니다.
여기에서 토론을 따르십시오.
https://parse.com/questions/cocoapods-incompatibility
크고 번거로운 FB 키트를 다운로드, 컴파일 및 설치하는 것보다 잠재적으로 더 간단한 해결 방법이 있습니다. 물론 Parse에서 FB 유형 기능을 사용할 수 없으며 이러한 더미 기호를 사용할 것으로 예상되는 Parse 코드를 트리거하면 심각한 문제가 발생합니다. 하지만 그들에게서 떨어져 있으면 괜찮을 것 같아요. 그래서...
애플리케이션에서 FBMissingSymbols라는 개체를 만듭니다.
필요하지 않은 .h 삭제
이것을 .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
이전을 삭제하고 ParseFacebookUtils.framework
새 ParseFacebookUtilsV4.framework
것을 유지 해야 작동합니다.
나는 dbquarrel의 대답을 좋아했지만 새로운 사회 계층이 없기 때문에 더 이상 작동하지 않습니다.
그래서 똑같은 일을하되 대신 다음을 추가하십시오.
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
Check and make sure that you do not have two versions of the "ParseFacebookUtils" framework added there is:
ParseFacebookUtilsV4 and ParseFacebookUtils
Once I removed ParseFacebookUtils, and kept ParseFacebookUtilsV4 it worked fine.
My Solution will definitely work and you can use -ObjC in other linker flags.
- Add "Social.framework" , "Account.framework"
- Add "FacebookSDK.framework"
Cheers....now it works..... and no need of removing -ObjC.
Sounds like you might need to add the 'Accounts.Framework' and/or the 'Social.Framework'.
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.
Please refer to this link using the parse ios sdk without including the 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
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?
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)
it's 2015 and I just had the same error. Unfortunately, none of the above answers worked for me. But this did:
Target > Build Phases > Link Binary With Libraries then add libstdc++.6.dylib
This solved the problem for me.
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:
Solution 1 - Using force_load Flag
Instead of setting -ObjC flag as Other linked flag, use force_load flag to load particular framework or library.
-force_load $(SRCROOT)/GoogleMaps.framework/Versions/A/GoogleMaps
Solution 2 - Using 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).
I was bothered this issue for many days. I used cocoapods to manage all of third SDK.
Here is how I resolved this issue. Go to pod project and set the item "build architecture only" to NO.
Rebuild pod project and then link errors is gone! help this can help someone who is using cocoapods.
I had the same problem. I solved by downloading the previous version (1.1.32) from here:
https://parse.com/downloads/ios/parse-library/1.1.32
(In my case I needed the -ObjC flag)
Edit: It seems that version doesn't work with 64 bit architectures.
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:
OTHER_LDFLAGS = (
"-weak_framework",
CoreFoundation,
"-weak_framework",
UIKit,
"-weak_framework",
AVFoundation,
"-weak_framework",
CoreMedia,
"-weak-lSystem",
"-force_load",
"\"$(BUILT_PRODUCTS_DIR)/libCordova.a\"",
"-ObjC",
);
Install cocoaPods and add this to your Podfile:
pod 'Facebook-iOS-SDK'
pod 'Parse'
pod 'ParseFacebookUtils'
참고URL : https://stackoverflow.com/questions/15457136/parse-for-ios-errors-when-trying-to-run-the-app
'program story' 카테고리의 다른 글
Emacs에서 XML 파일 인쇄하기 (0) | 2020.10.06 |
---|---|
jQuery에서 $ (this) 선택한 옵션을 얻는 방법은 무엇입니까? (0) | 2020.10.06 |
개체에 대해 LINQ를 사용한 페이징 (0) | 2020.10.06 |
Android Studio의 에뮬레이터에 APK를 설치하는 방법은 무엇입니까? (0) | 2020.10.06 |
번 들러가 JSON gem을 설치하지 않는 이유는 무엇입니까? (0) | 2020.10.06 |