2015-04-29 72 views
8

我使用的是解析1.6.5,它在我的項目中工作正常。當我通過豆莢在1.7.2過期,然後我得到了一個關於PFNullability的問題,我通過將NSNullability放置在*符號旁邊來修復它,例如NSError *PF_NULLABLE_S error,它是固定的,但之後我得到了鏈接問題。錯誤以下parse.framework沒有鏈接,通過cocoapods安裝

Undefined symbols for architecture x86_64: 
    "_OBJC_CLASS_$_PFACL", referenced from: 
     objc-class-ref in SignUpViewController.o 
     objc-class-ref in CustomLoginViewController.o 
    "_OBJC_CLASS_$_PFAnalytics", referenced from: 
     objc-class-ref in AppDelegate.o 
     objc-class-ref in AllAnalytics.o 
    "_OBJC_CLASS_$_PFCloud", referenced from: 
     objc-class-ref in AdminsViewController.o 
     objc-class-ref in AppDelegate.o 
     objc-class-ref in ScheduleViewController.o 
     objc-class-ref in HelpViewController.o 
     objc-class-ref in AddAdminViewController.o 
     objc-class-ref in TeamReleventViewController.o 
     objc-class-ref in PhotosAndVideosViewController.o 
     ... 
    "_OBJC_CLASS_$_PFDateFormatter", referenced from: 
     objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o) 
    "_OBJC_CLASS_$_PFFile", referenced from: 
     objc-class-ref in TeamReleventViewController.o 
     objc-class-ref in SearchTeamViewController.o 
     objc-class-ref in UserProfileSettingsViewController.o 
     objc-class-ref in PhotoSharingViewController.o 
     objc-class-ref in CreateNewTeamViewController.o 
     objc-class-ref in AddItemViewController.o 
     objc-class-ref in AddNewsViewController.o 
     ... 
    "_OBJC_CLASS_$_PFInstallation", referenced from: 
     objc-class-ref in AppDelegate.o 
     objc-class-ref in CustomLoginViewController.o 
    "_OBJC_CLASS_$_PFInternalUtils", referenced from: 
     objc-class-ref in ParseFacebookUtils(PFFacebookUtils.o) 
    "_OBJC_CLASS_$_PFObject", referenced from: 
     objc-class-ref in News1ViewController.o 
     objc-class-ref in PhotosAndVideosViewController.o 
     _OBJC_CLASS_$_Post in Post.o 
     _OBJC_CLASS_$_Event in Event.o 
     _OBJC_CLASS_$_TeamMember in TeamMember.o 
     _OBJC_CLASS_$_TeamAdmin in TeamAdmin.o 
     _OBJC_CLASS_$_Team in Team.o 
     ... 
    "_OBJC_CLASS_$_PFPush", referenced from: 
     objc-class-ref in AppDelegate.o 
    "_OBJC_CLASS_$_PFQuery", referenced from: 
     objc-class-ref in AppDelegate.o 
     objc-class-ref in MoreViewController.o 
     objc-class-ref in MenuViewController.o 
     objc-class-ref in StoreViewController.o 
     objc-class-ref in NewsFeedViewController.o 
     objc-class-ref in CustomLoginViewController.o 
     objc-class-ref in NVGalleryViewController.o 
     ... 
    (maybe you meant: _OBJC_CLASS_$_PFQueryTableViewController) 
    "_OBJC_CLASS_$_PFReceptionist", referenced from: 
     objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o) 
    "_OBJC_CLASS_$_PFUser", referenced from: 
     objc-class-ref in AdminsViewController.o 
     objc-class-ref in AppDelegate.o 
     objc-class-ref in ScheduleViewController.o 
     objc-class-ref in AddAdminViewController.o 
     objc-class-ref in TeamReleventViewController.o 
     objc-class-ref in PhotosAndVideosViewController.o 
     objc-class-ref in TeamSettingsViewController.o 
     ... 
    "_OBJC_CLASS_$_Parse", referenced from: 
     objc-class-ref in AppDelegate.o 
     objc-class-ref in ParseUI(PFQueryTableViewController.o) 
    "_OBJC_CLASS_$_ParseCrashReporting", referenced from: 
     objc-class-ref in AppDelegate.o 
    "_OBJC_METACLASS_$_PFObject", referenced from: 
     _OBJC_METACLASS_$_Post in Post.o 
     _OBJC_METACLASS_$_Event in Event.o 
     _OBJC_METACLASS_$_TeamMember in TeamMember.o 
     _OBJC_METACLASS_$_TeamAdmin in TeamAdmin.o 
     _OBJC_METACLASS_$_Team in Team.o 
     _OBJC_METACLASS_$_Media in Media.o 
     _OBJC_METACLASS_$_Link in Link.o 
     ... 
    "_PFParseErrorDomain", referenced from: 
     -[PFImageView loadInBackground:progressBlock:] in ParseUI(PFImageView.o) 
     ___46-[PFImageView loadInBackground:progressBlock:]_block_invoke32 in ParseUI(PFImageView.o) 
    "_kPFErrorCacheMiss", referenced from: 
     ___48-[PFQueryTableViewController loadObjects:clear:]_block_invoke in ParseUI(PFQueryTableViewController.o) 
    "_kPFErrorInvalidImageData", referenced from: 
     ___46-[PFImageView loadInBackground:progressBlock:]_block_invoke32 in ParseUI(PFImageView.o) 
    "_kPFErrorUnsavedFile", referenced from: 
     -[PFImageView loadInBackground:progressBlock:] in ParseUI(PFImageView.o) 
ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

請幫助我,我要儘快上傳我的新版本發佈

+0

檢查您在**鏈接的框架和庫**列表中是否有正確的框架。 另請檢查您是否包含Parse SDK中的正確頭文件。 –

+0

嘗試將Build Active Architecture Only設置爲YES .. –

+0

@bojand我沒有更改代碼,我只是通過pod更新了框架。 – Mashhadi

回答

4

好吧,清理某些莢相關問題的最好辦法就是要清理一切,然後重新運行。

我有這個標準的程序工作,每當有一個鏈接錯誤與cocoaPods。

1.保留備份! (!這可能會徹底打破)

2.Do莢deintegrate 使用這個庫 - >https://github.com/CocoaPods/cocoapods-deintegrate調用pod deintegrate命令清理與可可豆莢的一切。

3.清除所有編輯的項目,清理項目設置。 (如果你爲某個框架工作,然後保留它) 刪除搜索路徑,框架標題路徑,其他鏈接器標誌 刪除配置,刪除標誌,刪除PCH(如果有) 編輯設置中的任何粗體內容都會被編輯,不是由您爲了某種目的而明確完成的,請將其刪除以恢復爲默認值。

4.從目錄中刪除工作區和任何pod文件。

4.Paste從備份中備份您的主要pod文件。從derivedFolder,窗口

5.Delete數據 - >項目 - >刪除派生數據

6.Do乾淨(產品 - >乾淨),甚至純淨build文件夾(控股選項,做產品 - >乾淨生成文件夾)

7.Do吊艙安裝

8.Build和運行。

一切都應該恢復到幸福狀態!

0

試着設置ONLY_ACTIVE_ARCHNO並返回到YES目標(不在項目上)。最近Xcode中存在導致此行爲的錯誤。我花了好幾個小時把頭髮扯到它上面。

與目前使用的Xcode版本
0

1.創建新項目

2.安裝你在新的工作區可可豆莢框架

您安裝使用可可豆莢(讓你的代碼

3.取出舊的項目框架備份)

4.Copy舊項目代碼新建項目工作區,然後建立一個運行

0

你更新的一個原因波德的版本,或者說這只是你重新運行pod install的情況下,它會自動安裝更新的版本?如果你不需要更新的版本,你可以嘗試恢復到1.6.5。如果你想永遠只安裝一個吊艙的特定版本,更新Podfile像這樣:

pod 'Parse', '1.6.5' 
0

從Podfile刪除pod 'Parse'和運行pod install

的Xcode>查看>清除所有導出的數據

添加pod 'Parse' '~> 1.6.5'您Podfile和運行pod install