Difference between revisions of "IPhone"

From HaskellWiki
Jump to navigation Jump to search
(Patched previous modification.)
(→‎GHC as a cross compiler: added paragraph related to static library.)
Line 200: Line 200:
 
# Do apps have to be signed in some way?
 
# Do apps have to be signed in some way?
 
## Yes, unless you're on a jailbroken platform. On Mac OS 10.5 and up, there is a program called codesign that takes an identity (with an associated private key) and signs the provided binary. Although I don't think the source for this program is publicly available, what it actually does is reasonably simple and could be ported to multiple platforms quite easily (especially given the macho library on hackage).
 
## Yes, unless you're on a jailbroken platform. On Mac OS 10.5 and up, there is a program called codesign that takes an identity (with an associated private key) and signs the provided binary. Although I don't think the source for this program is publicly available, what it actually does is reasonably simple and could be ported to multiple platforms quite easily (especially given the macho library on hackage).
  +
  +
# Haskell code should be compiled into static library.
  +
## Because custom dynamically linked libraries are not allowed in regular iOS (not jail-breaken).
   
 
= Jhc as a cross compiler =
 
= Jhc as a cross compiler =

Revision as of 02:40, 26 January 2011

Collaborators

If you are working with Haskell and making iPhone apps, or if you intend to soon, please fill in your info below. By helping each other out, we can work more productively and have more fun.

There are at least two ways to use Haskell to make iPhone apps. One is having a Haskell-to-iPhone compiler, which would probably cross-compile from another host environment (probably Mac OS X). Another way is to write Haskell programs that generate iPhone-compatible code when run (rather than when compiled), based on an embedded DSL, similarly to Compiling Embedded Languages.

Resources

GHC as a cross compiler

Now that GHC can be used as a cross compiler again we should document what is left in getting GHC to compile apps for the iPhone.

  1. Can the RTS be ported to the iPhone?
    1. How much work is this?
      1. iPhone OS is mostly a vanilla OS X, running on ARM. Syscall numbers, the object format, and the kinds of things that are available on it are all pretty much the same as OS X. The main difference is the architecture. Word size etc. are mostly the same as other platforms that are already supported, so I don't think much more is needed for an unregistered built, at least.
  1. Do apps have to be signed in some way?
    1. Yes, unless you're on a jailbroken platform. On Mac OS 10.5 and up, there is a program called codesign that takes an identity (with an associated private key) and signs the provided binary. Although I don't think the source for this program is publicly available, what it actually does is reasonably simple and could be ported to multiple platforms quite easily (especially given the macho library on hackage).
  1. Haskell code should be compiled into static library.
    1. Because custom dynamically linked libraries are not allowed in regular iOS (not jail-breaken).

Jhc as a cross compiler

Jhc has full support for cross compiling to the iPhone. Information on how to do so is in the jhc manual under Cross Compilation. Basically, you just add the following to your ~/.jhc/targets.ini

[iphone]
cc=arm-apple-darwin-gcc
merge=le32

and then invoke jhc with the --cross and -miphone options.

Other ways to stay in touch

Chat with us on the #haskell-iphone IRC channel on freenode. Does anyone know how to set up channel logging?

Name Contact info Haskell-fu (0-5) iPhone-fu (0-5) Have (to share) Need Intended iPhone apps
Conal Elliott Home, blog, wiki user, Twitter, Facebook, Linkedin, IRC: conal 5 0 Functional graphics & GUI, misc Haskell libs, design skills, iPhone basics Haskell-to-iPhone compiler, tricky iPhone stuff Interactive graphics toys
Chris Eidhof Home, Tupil, wiki user, Twitter, Linkedin, IRC: chr1s 4 3 iPhone experience, web programming experience, dependent types experience Haskell-to-iPhone compiler (either as DSL or GHC Core -> iPhone) Navigation-based apps (think of things like iTunes, Facebook, etc.), Games (maybe using a combination of FRP and something like arrowlets)
Daniel Peebles Home, Twitter 3 4 Extensive iPhone platform knowledge GHC cross-compiling to ARM Mach-O Nothing in particular yet
John Meacham Home, blog - - Working Haskell to iPhone compiler (jhc) Testers and Feedback to make cross compilation smoother. HOC integration with jhc. Symbolic Algebra Application, Equation Editor
Eelco Lempsink Home, Tupil, wiki user, Twitter, Linkedin, IRC: eelco 4 3 iPhone and web experience Haskell-to-iPhone with (Cocoa Touch) API intergration Nothing in particular, looking for a good Haskell use-case :)
Bernd Brassel Home,art2guide 5 4 Haskell experience, iPhone developer iPhone embedding into Haskell, good programmers audio-visual guiding systems
Martin Kudlvasr not exactly home,LinkedIn, irc: trin_cz, xmpp: trin@jabbim.cz 3 0 year of haskell experience in OpenGL and project euler iPhone basics, Haskell-to-iPhone compiler fascinated by reactive, game development
Sebastiaan Visser Projects, wiki user, Twitter 4 0 Some experience/ideas about building EDSLs. Deep EDSL Haskell-to-ObjectiveC, high-level to target GUI/animation. Nothing in particular yet. Want to have objective C backend for this EDSL.
Manuel Chakravarty Home, blog, wiki user, Twitter, LinkedIn, IRC: Chilli 5 2 Haskell EDSL & compiler know how; Objective-C and Cocoa Touch basics Haskell tools for iphone dev games & productivity apps
Ryan Trinkle wiki user, Twitter, Facebook, LinkedIn, IRC/AIM: RyanT5000 4 3 GHC iPhone compilation (working, to be contributed to GHC soon) Smart people Games
Stephen Blackheath wiki user, IRC: blackh, email 4 2 Working with Ryan Trinkle to release GHC iPhone compilation Games
Simon Marlow wiki user, Twitter, IRC: JaffaCake 5 0 Happy to help with GHC porting issues: ask on #ghc
Simon Michael home, email, IRC: sm 3 1 hledger project, darcs/happstack/web dev/sysadmin experience
Max Weisel Home, Twitter, IRC:mxweas 3 5 Ample Toolchain/SDK development knowledge & experience.
Sung Yoon Home 1 4 iPhone App development Games, interactive graphics/sound apps
Jonathan Fischoff LinkedIn, Facebook, wiki user, IRC: jfischoff 1 1 Game engines. Art asset pipelines. Games, graphics toys
Lyndon Tremblay Home, Facebook, wiki user, Twitter, IRC: whomasect/humasect/Sitting 4 5 Experienced mac/iphone/haskell/gnu developer. Maintaining and clean GL and AL wrappers, and cleaner ObjC integration which allows to develop Cocoa apps. (can provide and also port to iPhone), and defunct Xcode haskell plugin considered to be rewritten. Haskell-to-iPhone compiler, tricky iPhone stuff, GHCi Games, roguelike, scrolling shooter - Realtime game and procedural development visualization engines and environment, animation and music apps
Bryan Turner Home 3 3 Professional Haskell programmer, experienced mobile/embedded developer. Experience with iPhone Safari development via HTML, XML, JS, SQL. Native iPhone work via C, OpenGL. Interested in connecting with other Haskell for iPhone developers. Productivity, games, next-gen human interface.
David Terei Twitter, user, IRC: davidt_ 4 0 GHC compiler knowledge, LLVM knowledge. Interested in porting ghc to ARM Anything
Hoon Hwangbo (Eonil) Twitter,

Blog

1 4 Native iOS, UI/UX, game knowledge. And etc.(Web, SQL...) Mixing Haskell code with Objective-C code. (in any form, scripting in major) Rule/AI or whole engine for soft-realtime game/media/server apps, light-weight app middleware framework,