3
votes

I'm using the open source Titanium CLI for updating an app that's currently in the Apple app store. It builds and runs in the simulator without any problems using the command

ti build -p ios

When I try to build for the app store I use the command

ti build -p ios -T dist-appstore -R <company> -P <distribution certificate>

and get an error message

[ERROR] titanium_prep failed to run (10) [ERROR] This application cannot be built with the Titanium open source SDK because it is an Appcelerator Platform registered application. Please use the Appcelerator Platform CLI tools or Appcelerator Studio to build this application.

I've unregistered the application with the Appcelerator Platform, but it hasn't corrected the problem. I'm using Titanium Command-Line Interface, CLI version 5.0.6, Titanium SDK version 6.0.0.v20160131225447 and Node version 0.12.7. Any help resolving this would be greatly appreciated.

2
Do you know if the app was created with appc new or ti create? - Victor Casé
Check at your tiapp.xml if has a property appc-app-id, if yes, remove it, clean the project and build it again with ti create. I think that will work. - Victor Casé
The app was created about five years ago with Titanium Studio. I removed the appc-app-id, but got the same error. I then removed all of the acs related properties (e.g. acs-oauth-secret-production), deleted the build folder and ran the command with the same result. - KerryS
I had the same problem with an app that I have created a long time ago with ti create. At some point, I built the app via appc a few times, then decided to stick with the open source Titanium SDK. I could build with ti again after deleting the app on the Appcelerator Platform, removing the appc-app-id property AND changing the guid in tiapp.xml and then doing a clean build. I generated a new guid at guidgenerator.com/online-guid-generator.aspx. Depending on your project, changing the guid may have side effects, but I'm not sure about that. - Philippe

2 Answers

2
votes

I'm on a Mac with node 0.12 and I was having the same issue with Titanium SDK 5.X.X, but I have changed it to 4.X.X and now I can compile without errors.

I hope you don't need Titanium SDK 5.X.X. or 6.X.X to make your code run...

2
votes

I met the same problem.

Solution:

  • re-create your app using $ ti create
  • or, just build this app using $appc ti build ...

Long explanation:

Our experience is: don't create ti app using $ appc create, just use $ ti create ...

in China mainland, the appc command is not usable at all because of GFW.

I found the related file is the titanium_prep file, which is binary, I can't see any useful information there.

You can't simply edit tiapp.xml and remove the appc/acs attributes to solve this problem

this problem will not occur if you run your app on IOS simulator.

Also, don't downgrade to Titanium 4.X. That means your app won't run at the latest devices.