Fuzi icon indicating copy to clipboard operation
Fuzi copied to clipboard

have issue with playground

Open yaodis opened this issue 9 years ago • 7 comments

I like testing framework using playground (use this tool), which works fine with most pods like Alamofire, but your framework need to include libxml2, this some kind of improving the complication and it indeed not work, can you help me inspect this problem

yaodis avatar Apr 03 '16 16:04 yaodis

@yaodis Hi there, it looks like an interesting tool. But I could get neither Alamofire nor Fuzi run in the playgrounds it generated. Would you tell me how you succeed in running Alamofire?

image

cezheng avatar Apr 04 '16 09:04 cezheng

you need build first(click the run button), here is the proof screen shot 2016-04-04 at 7 17 34 pm

actually you can also using cocoapods with playground manually, here is the error I encounter( I can import the module, but it can't find libxml) screen shot 2016-04-04 at 7 18 57 pm

yaodis avatar Apr 04 '16 11:04 yaodis

I've already built it. But no luck getting to where your screenshots show me.

But your error message shows that the Header Search Path is not properly set by this tool.

But it is specified in the podspec. https://github.com/cezheng/Fuzi/blob/master/Fuzi.podspec#L24

Therefore try adding $(SDKROOT)/usr/include/libxml2 to Header Search Path in the project build setting.

cezheng avatar Apr 04 '16 11:04 cezheng

Tried, not work, I think only if I can set this for playground itself could work, but I can't

and there is a similar problem http://stackoverflow.com/questions/35735193/import-kanna-in-playground, he make it work by using old version pod, weird

for your issue, you can try clear module cache and derived date

yaodis avatar Apr 04 '16 12:04 yaodis

What version of Xcode, CocoaPods, and the playground tool are you using?

Here's mine:

  • Xcode 7.3
  • CocoaPods 1.0.0.beta.6
  • cocoapods-playgrounds 0.1.0

Just cannot import the module as my screenshot shows.

cezheng avatar Apr 04 '16 12:04 cezheng

I am using 0.39, for CocoaPods 1.x.x, thing become more tricky, here you can find what I mean http://stackoverflow.com/a/36047766/4730119, but in general I don't think that's the crux of the problem

yaodis avatar Apr 04 '16 12:04 yaodis

I somehow reproduced that same message by manually creating a playground. I guess this is a limitation of Xcode playgrounds, since they don't hold any build settings information themselves. And in the libxml2 headers I include in the modulemap, they include their peer headers using a include path that is not set by default in Xcode.

cezheng avatar Apr 04 '16 14:04 cezheng