MOAIEnvironment devPlatform on iOS

Discussion about using Moai SDK - post questions, bugs and issues here.

Moderators: seebs, franciscotufro

MOAIEnvironment devPlatform on iOS

Postby festival » Thu Jun 14, 2012 2:28 am

MOAIEnvironment.devPlatform on iOS is not defined.

Maybe it's a good idea to have this in AKU-iphone.mm at Line 128 (approx.)
Code: Select all
  1.  

  2. #import <UIKit/UIDevice.h>

  3.  

  4. if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)       

  5.  environment.SetValue ( MOAI_ENV_devPlatform,   "iPad");

  6. else

  7.  environment.SetValue ( MOAI_ENV_devPlatform,   "iPhone");

  8.  


so MOAIEnvironment.devPlatform spits out "iPad" or "iPhone".

Now you can use MOAIEnvironment.devPlatform and MOAIEnvironment.iosRetinaDisplay
for multi resolution setup.
festival
 
Posts: 30
Joined: Mon Jun 11, 2012 11:16 am
Location: Germany

Re: MOAIEnvironment devPlatform on iOS

Postby dana » Fri Jun 15, 2012 4:42 pm

devPlatform was a contributed feature, so we haven't really touched it. From my understanding, MOAIEnvironment.devModel should be defined on iOS and should give basically the same thing. These were both contributed to us, not made by us, but we'd be happy to take a look at them and merge them if the community thinks that would be better. There might be a reason why they're separate but I'm not sure what that would be.
User avatar
dana
Site Admin
 
Posts: 200
Joined: Fri Mar 02, 2012 6:10 pm
Location: Zipline Games

Re: MOAIEnvironment devPlatform on iOS

Postby festival » Sat Jun 16, 2012 1:06 am

dana wrote: From my understanding, MOAIEnvironment.devModel should be defined on iOS and should give basically the same thing.


Good point. When you run the app on the iOS simulator MOAIEnvironment.devModel spits out "iPad Simulator" / "iPhone Simulator", which gives even more information.
festival
 
Posts: 30
Joined: Mon Jun 11, 2012 11:16 am
Location: Germany


Return to Moai SDK

Who is online

Users browsing this forum: No registered users and 0 guests

x