Upgrade 32-bit iOS app to 64-bit

We had a simple iPhone app written for us a few years back using version 2012.840. We understand that, once iOS 11 is released, that app will no longer function since it’s 32-bit. 

The developers, of course, are no longer around. I’m not familiar with Corona but downloaded the most recent version (2017.3068) and tried loading the old project, but it’s throwing errors right off the bat (the first referencing setReferencePoint).

Before I wade in too deeply, I’m wondering if there’s a recommended procedure for updating apps from 32-bit to 64-bit that doesn’t require recoding from scratch?

Three to four years ago we made some major updates to our API’s to make them more consistent. We left a compatibility mode in so older apps would continue to work.

The first change you should try is to open up the config.lua file and add this line:

graphicsCompatibility = 1,

at the same place that width and height are defined.

The next issue you’re likely to run into is we’ve deprecated several libraries that you may need to get your hands on. One is the sprite library. Your app may pre-date our Storyboard scene manager and be using the old Director class. You may have to fix a couple of things to get that working. But lets start with the graphicsCompatibility and see what errors you have left.

Rob

That helped quite a bit. Just a few warnings now:

Apr 21 12:11:15.324 WARNING: V1 graphics compatibility is deprecated. Some features may not work as expected

Apr 21 12:11:17.988 WARNING: Map views are not supported in the simulator. Please build for device.

Apr 21 12:11:18.001 WARNING: object:setReferencePoint() was given a ‘nil’ value. The behavior is not defined.

A couple more notes:

  • As you suspected, the app does use the old Director class.
  • In the Simulator, the data display is too wide; it displays fine in the current app so don’t know if that’s just a glitch in the Simulator or some other issue I’ll need to address.

@hesse you may want to put this out to tender if it is an income stream for you.  Director is real old school (and before my time) and would need a big chunk of work to bring it into line with modern Corona.  This has nothing to do with 32 or 64 bit.

It won’t be too difficult to update it to modern frameworks but unless you can do that easily it will be a struggle.  There are a few devs here I’d recommend.  I’d definitely try to connect with roaminggamer as he would be able to help you tell him I referred you and he should give you a discount on modernising your code.

Apr 21 12:11:15.324 WARNING: V1 graphics compatibility is deprecated. Some features may not work as expected

We are going to remove V1 compatibility at some point, but for now, this is just a reminder you should start migrating to the new way of doing things.

 

Apr 21 12:11:17.988 WARNING: Map views are not supported in the simulator. Please build for device.

Mapviews have never been supported in the simulator. I usually draw a gray box under where the mapView will be so I can design the app around it. This is working as expected.

 

Apr 21 12:11:18.001 WARNING: object:setReferencePoint() was given a ‘nil’ value. The behavior is not defined.

This one you should look at. You may be expecting to be aligning an object left or right, top or bottom or center and you’re not telling it where you want to. Likely you are passing a constant in that’s mis-spelled or has a TopLeft vs LeftTop problem.

 

The text in the tableView could be a result of the reference point problem, but you may just need to adjust the placement of your text, chance font sizes etc.

 

Rob

Three to four years ago we made some major updates to our API’s to make them more consistent. We left a compatibility mode in so older apps would continue to work.

The first change you should try is to open up the config.lua file and add this line:

graphicsCompatibility = 1,

at the same place that width and height are defined.

The next issue you’re likely to run into is we’ve deprecated several libraries that you may need to get your hands on. One is the sprite library. Your app may pre-date our Storyboard scene manager and be using the old Director class. You may have to fix a couple of things to get that working. But lets start with the graphicsCompatibility and see what errors you have left.

Rob

That helped quite a bit. Just a few warnings now:

Apr 21 12:11:15.324 WARNING: V1 graphics compatibility is deprecated. Some features may not work as expected

Apr 21 12:11:17.988 WARNING: Map views are not supported in the simulator. Please build for device.

Apr 21 12:11:18.001 WARNING: object:setReferencePoint() was given a ‘nil’ value. The behavior is not defined.

A couple more notes:

  • As you suspected, the app does use the old Director class.
  • In the Simulator, the data display is too wide; it displays fine in the current app so don’t know if that’s just a glitch in the Simulator or some other issue I’ll need to address.

@hesse you may want to put this out to tender if it is an income stream for you.  Director is real old school (and before my time) and would need a big chunk of work to bring it into line with modern Corona.  This has nothing to do with 32 or 64 bit.

It won’t be too difficult to update it to modern frameworks but unless you can do that easily it will be a struggle.  There are a few devs here I’d recommend.  I’d definitely try to connect with roaminggamer as he would be able to help you tell him I referred you and he should give you a discount on modernising your code.

Apr 21 12:11:15.324 WARNING: V1 graphics compatibility is deprecated. Some features may not work as expected

We are going to remove V1 compatibility at some point, but for now, this is just a reminder you should start migrating to the new way of doing things.

 

Apr 21 12:11:17.988 WARNING: Map views are not supported in the simulator. Please build for device.

Mapviews have never been supported in the simulator. I usually draw a gray box under where the mapView will be so I can design the app around it. This is working as expected.

 

Apr 21 12:11:18.001 WARNING: object:setReferencePoint() was given a ‘nil’ value. The behavior is not defined.

This one you should look at. You may be expecting to be aligning an object left or right, top or bottom or center and you’re not telling it where you want to. Likely you are passing a constant in that’s mis-spelled or has a TopLeft vs LeftTop problem.

 

The text in the tableView could be a result of the reference point problem, but you may just need to adjust the placement of your text, chance font sizes etc.

 

Rob