Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

have issue with playground #13

Open
yaodis opened this issue Apr 3, 2016 · 7 comments
Open

have issue with playground #13

yaodis opened this issue Apr 3, 2016 · 7 comments

Comments

@yaodis
Copy link

yaodis commented Apr 3, 2016

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

@cezheng
Copy link
Owner

cezheng commented Apr 4, 2016

@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

@yaodis
Copy link
Author

yaodis commented Apr 4, 2016

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

@cezheng
Copy link
Owner

cezheng commented Apr 4, 2016

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.

@yaodis
Copy link
Author

yaodis commented Apr 4, 2016

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

@cezheng
Copy link
Owner

cezheng commented Apr 4, 2016

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.

@yaodis
Copy link
Author

yaodis commented Apr 4, 2016

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

@cezheng
Copy link
Owner

cezheng commented Apr 4, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants