Building for iOS

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Building for iOS

Postby Cannos » Fri Nov 04, 2016 12:58 am

It's been about 5 years since I last built Newton for iOS, and that was version 2.x. I'm now looking to build the latest source for iOS. I see an xcodeproj, but it doesn't look like it supports an iOS target. Am I missing something here?

I think last time I built Newton I ended up making my own iOS xcodeproj to build a single combined .a file that included core/physics/newton. I wanted to make sure I wasn't missing something before doing that again.

So, does the current source have what's needed to build for iOS, or do I need to make a new project (or modify the existing one)? Thanks!
Cannos
 
Posts: 129
Joined: Thu Mar 04, 2010 5:41 pm

Re: Building for iOS

Postby Julio Jerez » Fri Nov 04, 2016 7:58 am

I believe you only need to define macros _MACOSX_VER and IOS in you command line

at the moment the demo do no build on the later version of OSX el Capitan because for some reason that I do no undertint apple seem to dropped support for quick time which is what wx widget uses for rendering on a opengl frame. This is why I am changing to a demos to a different GUI which is only use native openGL. but that takes low priority to engine fumtionality.

This is one of the things about Apple the infuriate me, each time they drop support for a feature they simple remove form the new OS not providing backwork support for legacy applications.
Apply some how thing that each on of his customer does own the device they buy form them, the act as if it is a temporary rental and the can change the rule without notifications in wimp.

this is a repeating pattern of Apple that people has never tolerated from Microsoft.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Building for iOS

Postby Cannos » Fri Nov 04, 2016 12:16 pm

Yeah I totally understand the frustration with Apple, I have that too. Luckily I don't need the demos, just the engine.

I don't usually use the command line for building iOS, just Xcode. That's why I was wondering if the xcodeproj supported an iOS target. It didn't look like it at first glance, but I could be missing something.
Cannos
 
Posts: 129
Joined: Thu Mar 04, 2010 5:41 pm

Re: Building for iOS

Postby Julio Jerez » Fri Nov 04, 2016 1:33 pm

yes the xcode project build all the libraries except wxWidget.
on an mac they will work, for a mobile device you just nee to add the macro IOS to the command line.

the IOS is only so that the engine uses the scalar version of the vector class since there isn't one for Arm in the engine yet.
just open the xcode project and add IOS to the command line in xcode and it should build
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Building for iOS

Postby Cannos » Mon Nov 07, 2016 2:00 pm

I was trying to build the latest code for iOS and ran into a few compile errors, mostly dealing with dgSpatialVector. I was able to fix them and build, though I still need to test. I'm not sure I made all the proper changes, but the errors seemed mostly straightforward.

Julio, do you want me to post the fixes I made, commit them and send a pull request, or do you just want to look at it yourself?
Cannos
 
Posts: 129
Joined: Thu Mar 04, 2010 5:41 pm

Re: Building for iOS

Postby Julio Jerez » Mon Nov 07, 2016 3:53 pm

yes please
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Building for iOS

Postby Cannos » Mon Nov 07, 2016 6:29 pm

Okay I submitted a pull request for these fixes. Let me know if you see any problems or have questions.

Also, it might be useful to create a new iOS target in the xcodeproj that has the iOS architecture selected and the IOS preprocessor macro defined. I did this locally in order to build for iOS, but didn't check this in since creating new targets requires your bundle identifier for some reason.
Cannos
 
Posts: 129
Joined: Thu Mar 04, 2010 5:41 pm

Re: Building for iOS

Postby Julio Jerez » Mon Nov 07, 2016 7:00 pm

ok I will merge tonight.
can you please sync and make sure is merge fine, I committed few changes today, but I will no do more until I merge the fix.

can you also make another request for the IOS project, my Mac is a mess, I ordered an older version of OSX (lion) but the stupid mac does not let me install an older version because this storage is an USB drive and my Mac pro does not boot from USB drive.
now I am stocked with the a version of OSX that does not supports quickdraw, so I can not compile anything.
I do not know how to make the Mac to install Lion again.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Building for iOS

Postby Cannos » Mon Nov 07, 2016 8:38 pm

The first pull request should still be good. I synced and everything still built and should merge fine without conflicts. Let me know if it doesn't work.

Oh, on the project change, I'm not sure if I can make the change or not. The new target asks for a bundle id and I don't know what your bundle id is and if I can specify it. I'll look at it more.

Yeah, I've never installed an older version of OSX, so not sure what the process is there.
Cannos
 
Posts: 129
Joined: Thu Mar 04, 2010 5:41 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 13 guests

cron