To narrow down the issue, I'd attempt a few things, in order:
1. Compile only the C code, adding a main() function, just to
make sure the OS
and the chosen Guile version and such are working fine with
each other.
2. Compile pure Objective-C code, calling that run_guile()
function firstly
directly from the main() function in main.m of the
Objective-C program, and
commenting out the NSApplicationMain() call that would
initialize Apple's
application framework.
3. See if reactivating the NSApplicationMain() call causes
problems. (It should
be called *after* the Guile initialization.)
4. See if you can use Guile's C functions from
-applicationDidFinishLaunching:
e.g. by doing: scm_c_eval_string("(begin (display
'HelloWorld) (newline))")
If that works, we now have an Objective-C + Guile application,
and want to move
to using Swift instead. This is where my Apple knowledge hits
its limits because
I never used Swift. :-)
But I guess Swift should have something equivalent to the main()
function of C and
Objective-C, and calling Guile initialization from there might
do the trick.
If you hit a problem in step 3 or 4, then it could mean that
Guile and Cocoa are
somehow incompatible as they both want to apply some magic to
the C program while
initializing themselves. I wouldn't know how to approach that
issue.