More OSX questions...

Added by David Cowan about 2 years ago

So, I finally got my iPhone project compiling on OSX from the terminal.
The project has a bunch of stuff in it, but at the end of the day - it boils down to a relatively empty main(argc,argv) that doesn't call anything (for the purposes of testing and debugging)

Everything compiles and links, but I'm having problems with the generated XCode projects.
I can't load the XCode workspace that has been generated with Jamplus - instead, I have to navigate into the package and load the individual .xcodeproj file.

On XCode 3 - I am missing the target information for iOS -- only i386 is available
On XCode 4 - I can load the project, compile and run it on the simulator - but I don't seem to be able to debug -- putting in breakpoints at main never get hit. Attempting to debug starts the simulator and launches the app, but then drops out immediately while XCode sits saying 'attaching to test.app.debug'

Is anyone successfully using jamplus for authoring/debugging iOS projects?


Replies (2)

RE: More OSX questions... - Added by Joshua Jensen about 2 years ago

I did this:

  1. cd samples/ipad/opengles
  2. ./CreateJamXcodeWorkspace.sh
  3. In Finder, I double clicked build/ipad/opengles/_workspace.xcode_/opengles.workspace.xcodeproj.
  4. In Xcode, I selected from the configuration dropdown: Simulator, Active Configuration: ipadsimulator - release, Active Target: opengles.
  5. I built the project. I ran it in the simulator.

I tried the samples/iphone/opengles sample, too, and it worked according to the instructions above. I did push an update to bump the minimum Mac OS X version to 10.6, because a clean install of Xcode 3 doesn't install the 10.5 libraries. (Maybe I need to reinstall again.)

Can you tell me where the steps break down for you?

RE: More OSX questions... - Added by David Cowan about 2 years ago

OK... so I had a few brainfarts that were preventing this from working.

a) When generating the workspaces for VS2008, VS2010 and XCode, I created them in folders...
Workspace.VS
Workspace.Xcode

What I hadn't counted on was using the .XCode extension on the workspace folder made finder treat the folder as an Xcode project bundle (hence the 'Missing project.pbxcode' dialog when trying to open the folder).
Regenerating the XCode workspace as 'Workspace.OSX' meant that I could now navigate into the folder and open my test.xcodeproj correctly.

b) using a workspace.xconfig when generating the xcode workspace using the commandline
jam --workspace -gen=xcode -config=workspace.xconfig jamfile.jam Workspace.OSX
and the workspace.xconfig containing the following...

Config =
{
    Configurations = 
    {
        "debug",
    },

    JamFlags = 
    {
    },

    Platforms = 
    {
        "iphone",
        "iphonesimulator",
    },

    SubIncludes = 
    {
        {
            "AppRoot",
            "$(sourceRootPath)",
        },
    },

    JamModulesUserPath = "$(sourceRootPath)jam",
}

I could start the debugger with the generated Xcode project, but debugging would simply hang with 'attaching to test.app.debug'

I eventually found that Xcode was ignoring my "target | iPhone 4.3 Simulator" drop down and was actually building a native iPhone app. I ended up having to remove the 'iphone' platform from the above config so that 'iphonesimulator' was the only target platform.

Now... on to my "target | iPhone 4.3 Simulator" drop down... on Xcode 4 - it doesn't seem to be populated correctly (although I'm unsure what its supposed to look like on Xcode 4 with a jam workspace).

I've attached a picture of my drop down menu -- which one should I be building with (and which one should I use to 'rebuild' with - because that doesn't seem to work either)?
Also... even if I add "iphone" or "ipad" or "ipadsimulator" - it doesn't seem to add anything to the drop down... and I'm also a bit worried about the fact that all my library sub-projects have "My mac 32-bit" as their targets?

(1-2/2)