-
Notifications
You must be signed in to change notification settings - Fork 9
Description
I am trying to build an iOS app in Swift, using a Haskell backend for logic. There have been no comprehensive tutorials online about how to do this, so I assumed that it wouldn't be too different from creating a Mac app. I did find one repo called ghc-ios, which had a guide on how to set up a iOS project, but ghc-ios was written in 2014 when Swift was still in its early days (in addition, Cabal linking is a mess in that tutorial and did not work).
I was able to get through half of the tutorial*, up until I am supposed to "Build the SwiftHaskellLibrary framework in Xcode, then stack build, and then finally build and run the SwiftHaskell app target to launch the app and see the default window from MainMenu.xib".
*At one point, we assumed MainMenu.xib could be considered the same as Main.storyboard?
Then, during stack build we get the following error:
ld: warning: URGENT: building for OSX, but linking against dylib (build/SwiftAppLibrary.framework/SwiftAppLibrary) built for iOS. Note: This will be an error in the future.
Undefined symbols for architecture x86_64:
"_runNSApplication", referenced from:
_r2YD_info in Main.o
_c30S_info in Main.o
(maybe you meant: _Main_runNSApplication_info, _Main_runNSApplication_closure )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Does anyone know what modifications I could follow to properly run Haskell code in Swift (3.0.2) for iOS? Is it even possible to make modifications to this Mac tutorial?
Any insight would be helpful. Thank you.