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

Playground #26

Closed
cojoj opened this issue Jun 19, 2015 · 12 comments
Closed

Playground #26

cojoj opened this issue Jun 19, 2015 · 12 comments

Comments

@cojoj
Copy link
Contributor

cojoj commented Jun 19, 2015

I've investigated some projects which follows the pattern of having .xcworkspace in which they have Framework itself, sample project and also a Playground (using framework) and after digging I can confirm that we have everything to run this pattern!

Here's a proof:
screen shot 2015-06-20 at 00 05 00
As you can see I can import XcodeServerSDK and use it in Playground with code completion etc.

Earlier the problem was with wrong configuration of Playground (was targeting iOS while framework support OS X only). I think we have solution to this issue in #24 and also this matter was explained in by @esttorhe in #25.

I'll check this PR tomorrow and if everything will work fine I will strongly suggest to merge it.

@cojoj cojoj mentioned this issue Jun 20, 2015
@czechboy0
Copy link
Member

Was this an iOS playground or an OS X one? I got this working on the OS X one only so far. See commit facb6cd

@cojoj
Copy link
Contributor Author

cojoj commented Jun 21, 2015

Nope, this was OS X playground... But I had the same error message:
screen shot 2015-06-21 at 20 32 34
From my POV, I also think that the issue is what @czechboy0 pointed in this commit. On the other hand, do we really need to name PRODUCT_NAME differently? Can't we only use OS X or iOS playground (matter of choice) and have in mind that this is the issue? Final user won't have this problem as he/she will get the proper framework file.

I've also checked other well known frameworks to see how they handle this issue. For example Alamofire has internal Playground working only on iOS.

@esttorhe
Copy link
Member

Personally I think both frameworks should be named the same to avoid conditional imports on a library using this as a dependency. 
But that's my point of view 

Esteban Torres
(+506)8813-0934
Twitter: @esttorhe

On Sun, Jun 21, 2015 at 11:36 AM -0700, "Mateusz Zając" notifications@github.com wrote:

Nope, this was OS X playground... But I had the same error message:

From my POV, I also think that the issue is what @czechboy0 pointed in this commit. On the other hand, do we really need to name PRODUCT_NAME differently? Can't we only use OS X or iOS playground (matter of choice) and have in mind that this is the issue? Final user won't have this problem as he/she will get the proper framework file.


Reply to this email directly or view it on GitHub.

@cojoj
Copy link
Contributor Author

cojoj commented Jun 21, 2015

I agree with @esttorhe. What we want is to provide an easy way of importing XcodeServerSDK 😉

@czechboy0
Copy link
Member

Sure, it's just annoying we'll have a playground that doesn't actually include our framework correctly (the iOS one). Let's leave it this way for now though and if anyone finds out a way to make both iOS and OS X playgrounds work, please comment on this issue.

@cojoj Please close this if there's no other action required.

@cojoj cojoj closed this as completed Jun 21, 2015
@esttorhe
Copy link
Member

I'll play today a little bit and try to make it work as expected

@czechboy0
Copy link
Member

👍

@esttorhe
Copy link
Member

I made it work with some hacks here and there… 😒


Here's the iOS Playground execution:
screen shot 2015-06-22 at 18 20 08

Here's the OSX Playground execution:
screen shot 2015-06-22 at 18 21 33


I had to configure a custom build path on the workspace settings (I don't think this is needed but it was part of my explorations); biggest issues are that in order for the Playgrounds to work the deployment targets need to be downgraded:

  • iOS: 7.0
  • OSX: 10.9

Look at this: neonichu/quick-cli-runner#3

Long story short; I don't think the benefit is worth the hassle; I'm going to push this to another branch in case you want to take a look at this implementation ¯_(ツ)_/¯

@esttorhe
Copy link
Member

Here's a fork with the workaround:
https://github.com/esttorhe/XcodeServerSDK/tree/playgrounds-workaround

In case you need to change the paths go to:

File → Workspace Settings → Advanced… → Custom → Relative to Workspace
• Products: Build/Products/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
• Intermediates: Build/Intermediates/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

But I think the complexity far outweighs the benefits IMHO

@cojoj
Copy link
Contributor Author

cojoj commented Jun 23, 2015

@esttorhe thank for sorting it out... I think that if we have a solution and we're aware of consequences we can agree that one Playground platform is sufficient for our usage 😉

@czechboy0
Copy link
Member

Sounds good, let's remove the iOS playground from the project then? So that we don't have a failing playground there all the time. (a small PR with that removal and a declaration in our README should do)

Thanks guys for the effort, @esttorhe and @cojoj!

@cojoj cojoj mentioned this issue Jun 23, 2015
@esttorhe
Copy link
Member

I agree; its better to nuke 🔥 the iOS Playground and be done with this issue for now; if at some point there's a solution around playgrounds i'll update my branch

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

3 participants