Announcements
The Scaleform forum is now read-only. Please head to the Gamedev site for product support.
Scaleform Forum (Read Only)
Scaleform enables developers to leverage the power of the Adobe® Flash® tool set to create powerful user interface environments for video games.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Building with Xcode 5.1

19 REPLIES 19
Reply
Message 1 of 20
FrankFloor84
1527 Views, 19 Replies

Building with Xcode 5.1

I just upgraded Xcode to 5.1 today and now my Scaleform iOS app are not building. The initial error is:

Platform_IPhone_GL.h (line 45) 

class Scaleform::Platform::DeviceImpl;

Forward declaration of class cannot have a nested name specifier

 

I commented out this forward declaration and everything compiles fine and runs in the Debug Scheme, but crashes at runtime in the Release/Shipping schemes. In Release, if I change the Optimization Level to None[-O0], it runs. Has anyone had luck running a Scaleform iOS project with Xcode 5.1? The crash is currently taking place in FxRenderThread constructor.

19 REPLIES 19
Message 2 of 20
adam.petrone
in reply to: FrankFloor84

Hello FrankFloor84,

 

Which Scaleform package is this -- specifically, which version? (4.3.27, for instance)

 

Are you compiling the libs from source or do you just have binaries?

 

 

Message 3 of 20
FrankFloor84
in reply to: adam.petrone

Hey Adam,

 

Installed from Autodesk_Scaleform_4.2_Mobile_SDK_iOS_2014_EJKSCTC_MacOSX.dmg. I am not certain where I can get a more detailed version number than 4.2. Project was created with Deployer.app, so it looks like it build from the source. Everything worked fine in all schemes up until when I upgraded to the latest Xcode (5.1) yesterday. 

 

 When exceptions are enabled (default), the allocation here fails:

// Platform_IPhone_GL.mm [ScaleformAppVC loadView]
ScaleformAppView *glView = [[[ScaleformAppView alloc] initWithFrame:screenBounds] retain];

 

 If I disable exceptions, the app crashes in the constructor of FXRenderThread. It seems this allocation is failing:

// Platform.h - App::OnInitHelper
pRenderThread = *new RT((typename RT::ThreadingType)ttype);

 

Message 4 of 20
adam.petrone
in reply to: FrankFloor84

Hello Frank,

 

From what I can tell, you're using the May 2013 Mobile iOS SDK.

 

It looks like there's a newer version available, 8/23/2013.

 

In the May package, I ran into this crash you noted. However, in the August version, I don't see the issue.

 

Perhaps you can try upgrading to the August release and see if resolves your issue.

 

It's available for download here under Mobile SDK.

http://gameware.autodesk.com/scaleform/public/downloads

Message 5 of 20
FrankFloor84
in reply to: adam.petrone

Thanks for the reply Adam. Everything is working again! It does look like I was using the older May SDK, so I have downloaded the latest version. In order to build with this sdk/xcode I had to use the command make P=iPhone+clang/armv7 and then modify my project's Library Search Paths to add in the "clang" subfolder. I noticed that in addition to the standard library files generated by the make, there was also a *_Consumer an *_Unity set. I am assuming the Unity one is for use with the Unity Engine, but what is the Consumer set for. Any performance difference from the regular set?

Message 6 of 20
adam.petrone
in reply to: FrankFloor84

Hello Frank,

 

I'm glad to hear you're back up and running. As you deduced, the Unity libs are for use with Unity. In fact, they are just the Consumer libs built with Unity specifics and handling code. The consumer libraries are typically used in native code applications where you may want to integrate Scaleform into an iOS or Android project.

 

Regards,

Adam

Message 7 of 20
FrankFloor84
in reply to: adam.petrone

One thing I noticed that since upgrading our games are actually running slower. in our game you can restart the level repeatedly. most of the times it will run slowly, but sometimes it will run just as smooth as before. I am trying to track down the code changes between the last 4.2.23 and 4.2.24. Is there any change that you could think of that might of triggered this behavior. Could this behavior be related to removal of Vertex Array Objects? When I get in to work, I will try to get some more data through AMP, unless you have some thoughts on how I can debug this further.
Message 8 of 20
adam.petrone
in reply to: FrankFloor84

You might try to use our HUD to compare performance -- see how the numbers compare between versions.

 

Take a look at Doc/sf_4.2_mobile_readme_ios.pdf. See how it's used in: GFx 4.2 iPhone SDK.

You should be able to drop your (single) Flash swf in place and build.

Message 9 of 20
FrankFloor84
in reply to: adam.petrone

I did some testing today with the HUD tool and hitting Profile and Pause inside of it so Advance is not called. In the previous version of scaleform, our game ran at 60fps on ipad2, ipad3, and iphone 4 (all iOS 6). Since the update the game will usually run at 40fps on them. If I minimize the app and bring it back (HUD is still paused), the game will sometimes run at 60fps again. Note that the HUD tool shows zero difference in stats between the two states other than the FPS. The strange thing is that I did some profiling with the AMP tool while paused at the 40FPS and 60fps states and it showed no differences. As far as AMP was concerned, they appeared to be running at the same framerate. I do not see this behavior on our iPad 4, iPad Air, iPhone 5, and iPhone 5s which all run iOS 7, although they are faster devices of course.

Message 10 of 20
DrNeroCF
in reply to: FrankFloor84

Any more information on this?  I'd like to know if I can update ScaleForm, or if I just need to figure out how to downgrade Xcode.  Considering how difficult it was to get a project built in the first place (and even then only the example would work), I don't want to go through that again only to take a major hit in performance...

Message 11 of 20
FrankFloor84
in reply to: DrNeroCF

I am still getting this issue. In fact, I created a blank swf and it displays the exact same behavior. I would suggest downgrading xcode for now if all your devices aren't updated to iOS 7.1 already.

 

The issue seems related to this:

http://iphonedevsdk.com/forum/iphone-sdk-development/107025-cadisplaylink-on-iphone-3gs-and-iphone-4...

http://www.idevgames.com/forums/thread-190.html

http://www.cocos2d-iphone.org/forums/topic/app-often-but-not-always-runs-at-40-fps-at-startup-rather...

 

Although, Scaleform uses an NSTimer update loop. I tried using a CADisplayLink like Unity does, but it still gave the same effect. It seems like all the views are set as opaque as well.

Message 12 of 20
DrNeroCF
in reply to: FrankFloor84

I'm glad I've been lazy about updating my phone, then!  Grabbed Xcode 5.0 from Time Machine (only the 30 billionth time that's saved the day, heh), and everything is back to normal.

 

Really would like some updates from the ScaleForm team on this issue, though!

Message 13 of 20
FrankFloor84
in reply to: adam.petrone

Is there any timeline on when the next update will be released in order to fix issues with the Xcode 5.1 / iOS 7.1 workflow. Our main issue is this 40-60fps issue that is seen even when using a blank swf. I see you mentioned that some people already have access to the 4.3 sdk (http://forums.autodesk.com/t5/Scaleform-Mobile-Development/Scaleform-crashing-new-Scaleform-Render-G... We actually have two completed apps that we cannot submit because of this issue.

Message 14 of 20
DrNeroCF
in reply to: FrankFloor84

FrankFloor, just for reference, are you not able to use Xcode 5.0 to publish? Is it necessary for iOS 7.1?
Message 15 of 20
adam.petrone
in reply to: DrNeroCF

Do you see this problem with FxPlayerMobile or FxPlayerTiny, one of the included projects in the SDK? I just tested both on the 4.2.24 (August) release and don't see any issues. Switching apps, locking the device, the app resumes and dips to about 55fps and slowly climbs back to 60. (iPad 3, iOS 7.1)

 

Does your test project repro this with 100% reliability? If so, could you please send that in to me?

 

Thanks,

Adam

Message 16 of 20
adam.petrone
in reply to: adam.petrone

Hello,

We just ran another test with 4.2.24 on an iPad2 with iOS 7.1, no performance issues.

 

Are you testing these in Debug, Release or Shipping? It's expected for performance to be lower on Debug builds.

 

Thanks,

Adam

 

Message 17 of 20
FrankFloor84
in reply to: adam.petrone

It does happen in FxPlayerMobile on an iPad 3 (iOS 6.1.3), but not in FxPlayerTiny. For these two projects, it did not happen on an iPhone 5 and iPad Air with iOS 7.1.

 

OS X 10.8.5

Xcode 5.1

Scaleform 4.2.24

All running as Shipping builds

 

I will try to get a minimum test case in our project together as well for you.

Message 18 of 20
FrankFloor84
in reply to: FrankFloor84

It appears that the latest version of Xcode (5.1.1) might of helped with this, but what definitely fixed it for some of the older devices was commenting this out in Platform_IPhone_GL.mm applicationDidFinishLaunching:

 

view.backgroundColor = [UIColor blackColor];

 

This was the article that lead me to the find: http://forum.cocos2d-iphone.org/t/app-often-but-not-always-runs-at-40-fps-at-startup-rather-than-60-...

 

App no longer starts at 40 or 60 randomly. 

Message 19 of 20
raul
in reply to: FrankFloor84

Hi there, 

 

I'm getting the same original error as Adam while building using XCode 6:

 

class Scaleform::Platform::DeviceImpl; 

(  /scaleform_4.2.24_iphone_consumer/Src/Platform/Platform_IPhone_GL.h:45:7: Forward declaration of class cannot have a nested name specifier)

 

I just downloaded the latest scaleform SDK from your website here:

 

http://gameware.autodesk.com/scaleform/public/downloads

 

However when I look at Include/GFxVersion.h it says 4.2.24 

 

is that the latest version? In this thread you seem to indicate there is a more recent version

Message 20 of 20
FrankFloor84
in reply to: raul

You'll need to completely comment out that line. Also take a look at this thread on getting everything set up: http://forums.autodesk.com/t5/scaleform-mobile-development/it-s-hard-to-get-an-example-running-on-io...    

 

I have everything working with the latest Mac OS X and Xcode.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report