Compilation error in MacOSX CoreServices on iOS

2019-07-28 16:27发布

This is probably some silly thing I did wrong in using frameworks, but I spent some hours now, and hope someone can help!

My compilation error:

Expected * before * and error: expected declaration specifiers or '...' before 'CFXMLTreeRef' in WSMethodInvocation.h and WSProtocolHandler.h. Both in `/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreServices.framework´

They list files where UIKit and Foundation are included. I have included these framework, but not the CoreServices framework.

Framworks included in my project

What I've tried:

  • I removed frameworks from my project folder that was accidentally copied there (I had checked "Copy resources" while adding them.)
  • I have made sure that the Framework Search Paths is empty. (from this question)
  • I chose Show in finder on all frameworks in the project, and they are all located under /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library.
  • In this answer it says Most of the CoreServices are not available on iOS. Instead, use #import <CFNetwork/CFNetwork.h>, so I tried that, desperately, with no luck. But again why do I even get an error in one of the MacOSX CoreServices classes?

It all worked fine before I started adding and moving projects and frameworks. I have tried to restore everything to how it was before, when it was working.

1条回答
ゆ 、 Hurt°
2楼-- · 2019-07-28 17:13

I moved all my code to a new project. Works fine, using the same frameworks.

If anyone have an idea of what broke, that is still welcome. :)

查看更多
登录 后发表回答