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

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.

Related

Error HE0046. Rider fails to install iOS app

When trying to debug an iOS application in Rider (macOS) I get this error message in the run window.
error HE0046: Failed to install the app 'com.company.name' on the device 'iOS 13.5 (17F61) - iPhone 8': Failed to install the requested application
If I switch to Visual Studio it works fine. I am unable to find any more information regarding this error or why it is occuring. Anyone know why this might be happening?
One of possible ways to understand what is going on during deploy - read msbuild logs.
Go to Rider Preferences: Preferences | Build, Execution, Deployment | Toolset and Build and enable this logs there:
Then deploy the app and go to this folder and read msbuild logs. Probably there is a specific error there.
Also you can compare these logs to visual studio log. Anyway anytime you can fire an issue in Rider issue tracker:
https://youtrack.jetbrains.com/newIssue?project=Rider
I fixed my issue by re cloning my repo.

App iOS stuck on blank white screen when build release React Native

I'm setting up a new project using React Native like this tutorial: https://facebook.github.io/react-native/docs/getting-started.html and build iOS release but it does not work, the blank white screen showed after LaunchScreen run.
The app works if build in Debug(react-native run-ios) but does not work in Release(build release by Xcode or terminal).
react-native v0.53.0
react-native-cli v2.0.1
node v8.10.0
Xcode 9.2
The log show in Xcode:
2018-02-06 15:55:14.464233+0700 MyApp[306:35863] [Accessibility] ****************** Loading GAX Client Bundle ****************
2561-02-06 15:55:14.697 [error][tid:main][RCTCxxBridge.mm:423] Failed to load bundle(file:///var/containers/Bundle/Application/4FAF82CD-9EA4-4E73-800A-A2ABC9313405/MyApp.app/main.jsbundle) with error:(Error reading bundle /var/containers/Bundle/Application/4FAF82CD-9EA4-4E73-800A-A2ABC9313405/MyApp.app/main.jsbundle (null))
2018-02-06 15:55:14.706782+0700 Shiip[306:35863] Failed to load bundle(file:///var/containers/Bundle/Application/4FAF82CD-9EA4-4E73-800A-A2ABC9313405/MyApp.app/main.jsbundle) with error:(Error reading bundle /var/containers/Bundle/Application/4FAF82CD-9EA4-4E73-800A-A2ABC9313405/MyApp.app/main.jsbundle (null))
I use many node version so the Xcode not using the node version which I used in my Terminal, it's make my app build crashed. Let's do this to solved my problem
Open The Script Build Phases in Xcode:
Now, using with the node version path exactly (use command: which node to get your node version path)
And my problem was solved
In my case,
Xcode v14.1
React native 0.69.5
I found out that the error source is due to the node version which system use for running release build. credits to this answer Stack overflow
I had to add the following lines in Xcode ==> Project ==> Build phases ==> Build react native code and images
export NODE_BINARY="/Users/<UserName>/.nvm/versions/node/v14.17.0<Your_Version>/bin/node"
../node_modules/react-native/scripts/react-native-xcode.sh
change UserName and Node version in this line accordingly
If you need to test in release build before uploading to testflight
for review
Go to Xcode ==> product ==> Scheme ==> edit scheme ==> Select Run ==> change build configuration to release
to run a release build from terminal
you just only need to type the following command:
npx react-native run-ios --configuration Release
If you want run your project on a real device use --device parameter:
npx react-native run-ios --configuration Release --device "Your Device Name"
The reason this is happening is because debug mode runs on the chrome javascript engine where as release mode runs on the device javascript engine. Some javascript features that work on chrome don’t work on the engines that mobile devices use. Please see mdn for more information there must be some js function you’re using that is undefined and causing the white screen.

xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH - Since updating Xcode

Updated Xcode this morning and now ionic project wont deploy to a device.
ionic run ios --device
Returns:
** BUILD SUCCEEDED **
xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH
Error: Error code 72 for command: xcrun with args: -sdk,iphoneos,PackageApplication,-v
No idea what to do to fix, Googling returns lots of options but none correct.
Cordova is trying to use "PackageApplication" tool. But it was removed since Xcode 8.3. Either downgrade Xcode or wait for Cordova to have a fix for that.
Linked in the Jenkins issue that matson kepson mentioned here there was a guy who attempted a PR to fix the issue. There was some unfinished change requests in his PR and I also found a few null ptrs in his changes. I forked his pr and fixed these things here and there is now a snapshot linked here that you can download and become unblocked until such a change is merged into the full build.
Hi its official Bug from jenkins
here you have a fresh status
https://issues.jenkins-ci.org/browse/JENKINS-43163
Little bit clearer to look at this:
http://subathrathanabalan.com/2016/01/07/building-ipa-export-archive/
I've just come across this and my solution was to remove the iOS platform from the project:
ionic platform rm ios
Then add it back in again
ionic platform add ios
I needed to run an initial build for it to fail with no signing set, so opening up the project in Xcode to just fix that. After that, building via the ionic cli worked as expected. I am guessing that re-adding the platform pulled in a new version of cordova-ios.
Update: I had only started on this project and created the base project from the blank template. I have Xcode 8.3.1 installed and using Ionic 3 (still with the --v2 switch with ionic cli).
I used shenzhen this automatic procedure encountered a similar problem, and finally in accordance with the github Pull Request to solve my problem, hope for your reference!
https://github.com/nomad/shenzhen/pull/347
I found a workaround to solve this using command line, with device connected on your mac:
ionic build ios --device
ios-deploy --noninteractive --debug --bundle build/device/YOURAPP.app
After this, stop debug using Ctrl C, and your app will be working on your device.
Hope work for you guys.
The is caused by the deprecated PackageApplication. If you're using the remotebuild tool to run from Windows, it will be solved when the remotebuild bug has been fixed: https://github.com/Microsoft/remotebuild/issues/26
Another solution is to downgrade XCode.
Here if the explanation on how to uninstall current XCode.
And here you can download XCode 8.2.
An option is open a .xcodeproj file located at platforms/ios and run the project directly from Xcode.

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.

Titanium CLI error in building for app-store

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.

Resources