How to integrate iMedia 3 into your project

46 views
Skip to first unread message

joerg.j...@mac.com

unread,
Dec 21, 2012, 6:47:42 AM12/21/12
to imedi...@googlegroups.com
Hello everyone,

with some contribution from Christoph I have written a "How To Install" for the iMedia 3 framework. It's a wiki page on github:

https://github.com/iMediaSandboxing/iMedia/wiki/How-To-Install

I tested almost every step with an exemplary Xcode App setup, but if you find any errors feel free to correct (I guess anybody has write access to the wiki?).

Enjoy, Jörg.

Hey, and congrats to the team at Karelia for Sandvox having won an Apple "App of the Year" medal!


Daniel Jalkut

unread,
Apr 8, 2013, 2:54:34 PM4/8/13
to imedi...@googlegroups.com
Hi Jörg - thank you for writing this up. I'm finally taking a look at trying this out, and will let you know how it goes!

I wonder if anybody has any tips about how to maintain forks of both the original iMedia repository *and* the iMediaSandboxed variant? Since they are considered of the same lineage by github, I can't fork the iMediaSandboxed version separately from my existing fork of Karelia's iMedia.

It would appear the best solution is to create a new github account dedicated to forking iMediaSandboxed, but of course that is obnoxious. I guess another approach would be to add a branch to my fork of iMedia's that merges all the changes from iMediaSandboxed.

Any tips?

Daniel

Jörg Jacobsen

unread,
Apr 8, 2013, 4:09:42 PM4/8/13
to imedi...@googlegroups.com
Hi Daniel,

happy to hear the news.

I had the same problem when forking the sandboxed version from Karelia's. You would have to create an organisation with your existing account and initiate the fork through that organization. This way you avoid a separate account.

Regards, Jörg.
--
You received this message because you are subscribed to the Google Groups "iMedia Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to imedia-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Daniel Jalkut

unread,
Apr 8, 2013, 4:40:21 PM4/8/13
to imedi...@googlegroups.com
Thanks for the tip - I am unfamiliar with organization support in GitHub. Will check that out!

FWIW regarding the advice document I’m finding it quite helpful, but I’m running into trouble with building the XPC services that I think may reflect a misunderstanding on my part. Maybe it could be clarified in the document:

The first thing I noticed is when trying to build e.g. iMediaTester none of the XPC services are built, so I tried adding them as specific dependencies on iMedia.framework. This leads to some issues with Xcode considering there to be a dependency cycle.

I see in your documentation you allude to needing to manually build all the XPC services you want and then add them to the copy files phase for XPC bundling. But how does this work in practice for automated, recurring builds of the host app and iMedia?

I think this must have something to do with your use in the sample project of "Automatic Dependency" resolution. This is not something I use in my host apps and probably will not start using. I wonder if there’s a way to specify the dependencies in such a way that the cycle is avoided and it will work consistently for host apps that don’t use the automatic dependencies?

What I’ve done in the past for situations like this is build a DYLD "stub library" for the parent framework (iMedia in this case). Then the subsidiary pieces can link against the stub instead of depending explicitly on the parent library already being built.

Daniel

Mike Abdullah

unread,
Apr 8, 2013, 4:43:05 PM4/8/13
to imedi...@googlegroups.com

On 8 Apr 2013, at 19:54, Daniel Jalkut <jal...@gmail.com> wrote:

> Hi Jörg - thank you for writing this up. I'm finally taking a look at trying this out, and will let you know how it goes!
>
> I wonder if anybody has any tips about how to maintain forks of both the original iMedia repository *and* the iMediaSandboxed variant? Since they are considered of the same lineage by github, I can't fork the iMediaSandboxed version separately from my existing fork of Karelia's iMedia.
>
> It would appear the best solution is to create a new github account dedicated to forking iMediaSandboxed, but of course that is obnoxious. I guess another approach would be to add a branch to my fork of iMedia's that merges all the changes from iMediaSandboxed.
>
> Any tips?

Well the neat/unwieldy thing about git is that everybody's forks are technically independent. You can happily have both forks setup as remotes for your own repository. Pull in all the branches and push them back up to your account on Github.

This is made easier if the branch names are unique. To help with that, I suggest we follow something along the lines of http://rentzsch.tumblr.com/post/45552867242/semantic-version-branches-for-submodules

Jörg Jacobsen

unread,
Apr 11, 2013, 11:16:40 AM4/11/13
to imedi...@googlegroups.com
Hi Daniel,

what is wrong with implicit dependencies (apart from that I should add the setting to the documentation)? When I turn them off then aside from targets not being built I get a whole bunch of additional problems (not finding header files and the like).

Anyway, you seem to have managed to get around those and set an explicit dependency from your host app's build target to the iMedia target. So why not add explicit dependencies from your host app's build target to the XPC targets? This does not introduce any dependency cycle and also honors the fact, that the iMedia 3 framework is not dependent on XPC services. As the documentations states the framework is fully functional without the existence of any XPC service. It is the app rather that decides to depend on XPC services or not.

Another option is to add the desired XPC services to the build list in your host app target's scheme (section Build). Your app's build target must be ordered last.

BTW: The only reason the documentation asks for building an XPC target _once_ explicitly is that it appears to me that you could not otherwise add its product to that "Copy XPC Services" build phase (but maybe I am wrong).

Does that help? Jörg.

Daniel Jalkut

unread,
Apr 11, 2013, 11:33:36 AM4/11/13
to imedi...@googlegroups.com
Hi Jörg -

I have just found that implicit dependencies are unreliable and I have not committed to using them for this reason. I have no problem with your using them in iMedia, assuming it doesn’t hinder host projects from not using it outside the scope of iMedia. That is to say, I don’t think iMedia should impose a requirement that host projects also use implicit dependencies. I think you’ll find I am not unique in my distaste for them.

I didn’t get that the XPC services are supposed to be optional and therefore should be direct dependencies of the iMedia framework target. I agree that it can be the responsibility of the host project to specifically add those dependencies, particularly since the host app needs to copy them in separately from iMedia.

So ... ignore my pull request for now, I guess ;)

Daniel

Jörg Jacobsen

unread,
Apr 11, 2013, 11:43:02 AM4/11/13
to imedi...@googlegroups.com
Excellent. Would you mind telling how you managed to add explicit dependencies across Xcode projects? So I could add that to the documentation.

Jörg.

Daniel Jalkut

unread,
Apr 11, 2013, 12:02:16 PM4/11/13
to imedi...@googlegroups.com
You have to have a reference to the dependent project among the host project’s "files". When a dependent .xcodeproj is listed among the project files, adding a dependency always offers the dependent projects’ targets as potential dependencies:

http://cl.ly/image/2J293H291a2e

Daniel

Jörg Jacobsen

unread,
Apr 11, 2013, 1:55:36 PM4/11/13
to imedi...@googlegroups.com
Thanks. Will try that tomorrow. Jörg.
Reply all
Reply to author
Forward
0 new messages