我使用的是解析1.6.5,它在我的项目中运行良好。当我在1.7.2上通过pods使用时,我遇到了关于PFNullability的问题我通过将NSNullability放在* NSError *PF_NULLABLE_S error
旁边的*符号旁边来修复它并且它已经修复但是之后我遇到链接问题。错误如下
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 :(得分:4)
好的,清理某些pod相关问题的最佳方法是清理所有内容并重新运行。
我有这个标准程序,只要与cocoaPods发生链接错误就可以使用。
1.保持备份! (这可能完全破裂!)
2.让一个吊舱解体
使用此库 - > https://github.com/CocoaPods/cocoapods-deintegrate调用pod deintegrate
命令清除可可豆荚的所有内容。
3.通过删除已编辑的所有内容来清理项目设置。 (如果你为一些框架工作,那么保持它) 删除搜索路径,框架标头路径,其他链接器标志 删除配置,删除标志,删除PCH(如果有) 任何在构建设置中都是粗体的东西都会被编辑,无论你出于某种目的没有明确地做什么,删除它以恢复到默认值。
4.删除工作区以及目录中的任何pod文件。
4.Paste从备份中返回主pod文件。
5.删除derivedFolder中的数据,窗口 - >项目 - >删除派生数据
6.做一个干净的(产品 - >干净),甚至干净的构建文件夹(持有选项,做产品 - >清理构建文件夹)
7.安装pod
8.Build and run。
一切都应该恢复到幸福的状态!
答案 1 :(得分:0)
尝试将FEventTypeValue
设置为ONLY_ACTIVE_ARCH
并返回目标上的NO
(而非项目)。最近的Xcode中存在导致此行为的错误。我花了好几个小时把头发撕成了它。
答案 2 :(得分:0)
1.创建当前使用Xcode版本
的新项目2.在新工作区中安装带有可可豆荚的框架
3.删除使用cocoa pod安装的旧项目框架(保留代码备份)
4.将旧项目代码复制到新项目工作区,然后构建运行
答案 3 :(得分:0)
您是否因某种原因更新了Pod的版本,或者仅仅是您重新运行pod install
并自动安装了较新版本的情况?如果您不需要更新的版本,可以尝试恢复到1.6.5。如果您只想安装特定版本的Pod,请按以下步骤更新Podfile:
pod 'Parse', '1.6.5'
答案 4 :(得分:0)
1 从您的Podfile中删除pod 'Parse'
并运行pod install
2 Xcode>查看> 清除所有派生数据
3 将pod 'Parse' '~> 1.6.5'
添加到您的Podfile并运行pod install
答案 5 :(得分:0)