Titanium CLI error in building for app-store - ios

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.

There is a migration guide at https://github.com/m1ga/from_zero_to_app/blob/master/appc_to_ti.md
It seems you need to use a GUID that is not registered with appcelerator in the tiapp.xml.
It's also worth removing any <appc-...> or <property name="appc-..."> references to appcelerator services that will be turned off, and set <analytics>false</analytics>

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...

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.

Related

Run Flutter Android Built App on IOS Device

I am very new to flutter and require your help.
I have built my complete flutter app for android, and now I want to test the same on Iphone, how is it possible?
I tried few tutorials starting with "flutter build ios --release" , but nothing is working for me
You need to have a mac, or use codemagic or get macOS on the VirtualBox on your windows system!
Xcode is required to build and release iOS app. You must use a device running on macOS.
Please refer official doc : https://docs.flutter.dev/deployment/ios
After successfully configuration, use flutter build ios command to build iOS app.
You need to have a Mac and Xcode to build and release iOS app.
However, you can use simple external tools to do so.
For example, Appollo (https://github.com/Appollo-CLI/Appollo), it is a python CLI that lets you access remote MacOS build machines.
You can install it with:
pip install appollo
You can checkout their Youtube channel for some quick tutorials, https://www.youtube.com/channel/UCBNRrJd4UP0QQRoYF4JOEmA or the official doc, https://appollo.readthedocs.io/en/master/tutorial/index.html

Unable to find any Xcode installations thats supports at least iOS 8.0

I haven't used my development tools for Appecelerator Titanium in a while (Studio and CLI). Now I try to run an existing app in the iOS simulator.
From studio I can not select the iOS simulators.
When I use the CLI and execute: appc run (platform iOS) i get this message:
Unable to find any Xcode installations thats supports at least iOS 8.0
I have Xcode version 9.0.1 installed.
How can i connect Xcode with Titanium again?
The path of the active XCode developer directory (xcode-select -p) is:
/Applications/Xcode.app/Contents/Developer
You're probably on an SDK older than 6.2. xcode 9 isn't supported by older SDK's for obvious reasons. You can either install xcode8 (downloadable from the apple website) or you can upgrade to Titanium SDK 6.2 or higher (6.3 came out, I recommend that)
For information regarding versioning (of everything related to Ti, check the compatibility matrix in the documentation)
Had the same problem today after installed Xcode 9.2, on side of Xcode 9.4.1 and Titanium SDK 7.2.0.GA. Same error message as in the title of this post. As suggested by Patrick De Marta, I've tried
appc run -p ios -T simulator -C x
after that, I could select a simulator and run the app.
Thanks!
What do you get when you execute "appc ti sdk list" from command line ?
I'm not sure if this is your case, but I had a similar problem and solved it by specifying the target simulator with the CLI build option -C
(appc ti info for the list of simulator names )
hope this helps

Issue with building iOS on AppseleratorStudio [ERROR]: Invalid "--device-id" value ""

AppseleratorStudio (Titanium), build: 4.6.0.201605201934
MacBook Pro
iPad mini, OS 8.1.
Seen similar questions being asked, but not many answers were given and most of the questions were Android related. Willing to provide more info needed if necessary.
2016-08-22T08:48:24.385Z | DEBUG | getTiDefaultPath /Users/at/Library/Application Support/Titanium
2016-08-22T08:48:24.386Z | DEBUG | active sdk install path /Users/at/Library/Application Support/Titanium
2016-08-22T08:48:26.476Z | DEBUG | to download {"modules":[{"oses":["linux","win32","osx"],"platforms":["iphone","android"],"required":true,"partner_id":"A0B129A418829127EC551EB8ADB0D1CC","partner_name":"Appcelerator","name":"Hyperloop","description":"Gain complete access to native APIs in your Titanium mobile applications.","id":"hyperloop","guid":"99a136cd-4e51-40da-bcdb-d514f5895fb5","version":"1.2.6","url":"http://appcelerator-modules.s3.amazonaws.com/hyperloop-1.2.6.zip","min_mobilesdk_version":"5.4.0"}],"components":[]}
[ERROR] : Invalid "--device-id" value ""
Available iOS Devices:
814afcb29c793aea10b182b53f3f629b73ed1a39 iPad mini
itunes iTunes Sync
For help, run: titanium.js help build
Upd1. Added device id in build command, here is the result:
[INFO] Invoking xcodebuild
[ERROR] BUILD FAILED
[ERROR] The following build commands failed:
[ERROR] CodeSign build/Products/Debug-iphoneos/Anna-inzicht.app
[ERROR] (1 failure)
Also tried to clean project - no help.
Upd2. It works ok on emulator, fail is with real device only.
The simplest fix is to go to "Debug Configurations..." and delete the config for your project. Studio will automatically rebuild it or maybe ask you for which Provisioning Profile you want to use.
While Goltsev Eugene works it's a bit much, as creating a new project makes you loose all history, analytics, push, etc. on appcelerator platform.
Try adding --device-id 814afcb29c793aea10b182b53f3f629b73ed1a39 to your titanium build command.
Finally, the solution was easy - created new project, moved all files from app folder.Build works now.
For those still having this issue in 2019.
If you aren't able to locate your device in the device list, follow these simple steps.
Update NodeJS at https://nodejs.org/#download. Then rebuilding modules with by typing into the command-line: appc ti info -t ios.
You should see the following:
"You are attempting to run appc 7.1.0 which was compiled for node 8.9.1 but you are now running node v10.16.3
Rebuilding package modules ...
Package modules rebuilt!"
After that, my device popped up on my device list.
This took a while to figure out and I could not find this straight-forward solution anywhere.

Installing Appcelerator Studio OS X El Capitan

I've been using Appcelerator Studio a lot, never seen this problem before. I recently did a fresh installation of OS X, then installing Xcode (7.3.1) and Command Line Tools for Xcode 7.3.1.
When installing Appcelerator Studio (build: 4.5.0.201602170821) everything is going great, the CLI gets installed. When starting up Appcelerator Studio, I have to configure SDKs, hence I am only interested in iOS at the moment, I uncheck Android in the Platform Configuration. The following is that Configuring SDK encountered a problem:
An internal error occurred during: "Configuring SDK". java.lang.NullPointerException
I continuing, and go to Preferences>Studio>Platforms>iOS, where the iOS SDK home says Not specified, I click refresh - nothing happens.
I run xcode-select -p and the correct path to Xcode Developer folder is printed.
Anyone having a clue of solving this?
I've check all the version statuses, also tried to reinstall and deleting all information that can impact to this.
Share the directory hierarchy where you have stored Android SDK and Platform screen folder. Also try to follow the guidelines of Titanium to integrate iOS, but remember to clean the hidden folders in root directory of your OS X system.
I believe the problem might be with your Xcode. Are you having multiple Xcode's installed?
Use sudo xcode-select -switch <xcode_folder_path> switch between Xcode's.
Then,run appc ti info -t ios and check whether CLI is able to identify the selected Xcode. If your Xcode is listed here, then studio should be able to identify it.

How to install cordova(phonegap) ios app to device via cli and not via xcode

I am trying to create a simple project with last phonegap version:
$ phonegap create my-project
$ phonegap build ios
$ phonegap install ios
All works perfectly and I see emulator with my simple application.
But I can't find documentation on how to run my application on device(iphone, for example) and not on a simulator.
All documentation by cordova / phonegap based on examples with cordova's template for xcode.
But last cordova's version don't have template for xcode and all that I need - cli, if I understand correctly?
I already registered as IOS developer and I have a valid iPhone development certificate.
When I connect my device - I can see it in xcode and I can run native application on my device.
But only via xcode.
I will be grateful to any advice.
If the cordova app builds and runs on the simulator, try running cordova run ios --device
This worked for me, when before it was only hitting the simulator.
Alternatively, if that STILL doesn't work for you, when you run codova build ios, to just build the app, you could use itunes to sync the generated .app file in <project_folder>/platforms/ios/build/device/AppName.app
There is an Apple CLI tool canned xcodebuild, as well as this wrapper around it by Facebook. I'd suggest trying out either that or look at the build-in xcodebuild shipped with xcode.
Hopefully one of them will work.
https://github.com/facebook/xctool
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html
If you use Cordova CLI, you should be able to do this:
cordova run ios

Resources