Log in or register to post comments

Updated Unity to 4.1.2 Error Xcode

April 8, 2013 - 8:34am #1

Hi,

Today I updated Unity4 Pro  to 4.1.2  & now when I build I get the following error  when X-code builds.

 

(void) applicationWillResignActive:(UIApplication*)application

{

    printf_console("-> applicationWillResignActive()\n");

UnityPause(true);

PresentSurface(& _surface);  

 

QCARUnityPlayer::getInstance().QCARPause(true);

 

    _didResignActive = YES;

}

 

// the ERROR  it states  

 RollBall/RollAballTest1/Classes/AppController.mm:486:19: Use of undeclared identifier '_surface'

 

I notice in the following  Vuforia iOs  thread they talk about a similar situation...  but I'm not sure how to rectify it. 

 https://developer.vuforia.com/forum/ios/error-new-version-xcode-unity-plugin

 

 Mick

Updated Unity to 4.1.2 Error Xcode

May 31, 2013 - 3:46pm #11

Hey guys, I wanted to post a response that might help some people. I was having this exact same issue, and I had thought that I deleted everything Vuforia until I remembered that I also had Vuforia Video Playback in my project!

So make sure you delete everything Vuforia, not just the base Augmented Reality stuff! I just lost half a day because I forgot that we play videos using a Vuforia video plugin. I no longer have this error now.

Updated Unity to 4.1.2 Error Xcode

April 11, 2013 - 7:42am #10

Excellent - great to hear!

N

Updated Unity to 4.1.2 Error Xcode

April 11, 2013 - 7:07am #9

OK fixed it .....     Working fine again... I just built  to iPad & its running  great.  I folowed the Migrating instructions & now all is good  :)  

 

 

I'm also reading over the file as you suggested in Unittron 

 

 

import sys
import os
 
 
#Update with constants since Unity 4.1
UNITY_35 = 35
UNITY_40 = 40
UNITY_41 = 41
 
 
 

 

 

Updated Unity to 4.1.2 Error Xcode

April 11, 2013 - 6:13am #8

what I meant was if you open it up in textedit, for the latest it should show the following:

 

# version date 30/1/13

 

#Update with constants since Unity 4.1
UNITY_35 = 35
UNITY_40 = 40
UNITY_41 = 41

 

This is because when Unity 4.1 came out it changed many things, so the script was updated to handle all 3 skus

N

Updated Unity to 4.1.2 Error Xcode

April 11, 2013 - 6:10am #7

I looked over the  Post Process Editor 

 

 

RollBall/Assets/Editor/PostProcessBuildPlayer", line 427, in <module>

    if sys.argv[2] == "iPhone":
IndexError: list index out of range
logout
 
 
 
I'll read over the notes now on how to remove Vuforia. probably  best I revert back to my copied project ) then remove as per the notes.

Updated Unity to 4.1.2 Error Xcode

April 11, 2013 - 6:03am #6

The official way to upgrade is described here:

https://developer.vuforia.com/resources/dev-guide/migrating-your-unity-project

 

Let me know how it progresses.

N

Updated Unity to 4.1.2 Error Xcode

April 11, 2013 - 6:03am #5

Is there a "clean way"  of removing Vuforia from a project ?   I notice QCAR  files etc... in many different folders 

I can easily go in and start simply deleting anyhting I beleive to be vuforia related... but perhaps this is a bad idea  

 I'll make a copy of the entire project first then give it a go.  

 

Well I tried & still same x-code error  "  PresentSurface(&_surface);  "

 

 

 

 

 

 

 

 

 

Updated Unity to 4.1.2 Error Xcode

April 9, 2013 - 7:05am #4

Hi Mick

You need to remove 2.0.29 completely, so make a copy first.  You can check for yourself by comparing the PostProcessBuildPlayer in Assets/Editor and this should show where the error is.

Also, you can verify 2.0.31 works by running one of the samples.

 

N

Updated Unity to 4.1.2 Error Xcode

April 9, 2013 - 5:15am #3

Hi Nalin,

I tried deleting the postprocess build player from within Assets> Editor   but no luck  :(   

I believe I am using the latest Vuforia SDK ...    I downloaded from the  Qualcom site a day ago. 2-0-31  

I can run the game within Unity4 pro  but when I build to XCode I get that error.    

I just checked to see if I did in fact load Vuforia 2-0-31 into my project..    so I re-loaded it to confirm it is there & not the older version v2-0-29   

Do I need to remove Vuforia2-0-29 completely from my project before re-importing  package 2-0-31  ? ( I  simply imported 2-0-31 ) 

 Michael

 

 

Updated Unity to 4.1.2 Error Xcode

April 9, 2013 - 2:30am #2

Hi Mick,

Assuming you have the latest Unity Vuforia Extension, the chances are that you might have some remnants of a previous Vuforia extension within your Unity project.  Specifically it is the PostProcessBuildPlayer script under assets/editor that updates the AppController.mm file, and it could be that this is out of date in your project.

Please see this thread for more details:

https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/unity3d-41-and-vuforia-20-latest-version

 

N

Log in or register to post comments