iOS only (tns 2.5.3)
Xcode 8.3 has fully removed the ability to do an xcrun PackageApplication as is performed when building/running a nativescript app on a development device (see this line of code here). This means that tns run ios and friends don't work under Xcode 8.3, failing with the following error:
xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH
Command xcrun failed with exit code 72
Some googling around has suggested moving to using xcodebuild, and the cordova guys have done the update in this PR: https://github.com/apache/cordova-ios/pull/257
Let me know if you need any further info
Also reported via t.1100681
Any feedback on this? Specially on how to fix would be really much appreciated!
It happens on my machine as well and now I'm unable to run apps on my iOS device... This is really a deal-breaker!
Fix will be available in 3.0.0 and we will also release hot fix for {N} 2.5.* as soon as issue is fixed.
and we will also release hot fix for {N} 2.5.*
Really glad to hear that because we're close to release of an app and we wont have the time for an update to 3.0.0. I'm sure we're not alone with this scenario.
Really glad to hear that because we're close to release of an app and we wont have the time for an update to 3.0.0. I'm sure we're not alone with this scenario.
Same...
As a temporary workaround, you can still build and run your app by opening workspace in XCode directly. Especially for the release purposes.
@dunqan Thank you for that hint. By the way: The run command seems to work just fine with the iOS emulator. (Which helps shorten the dev-times compared to the Xcode workspace route if features can be tested within the emulator)
Is it possible to downgrade XCode back to 8.2 and would that solve current problems?
Yes, you downloaded XCode 8.2 from https://developer.apple.com/download/more/
tns build works again for me now
You can have both Xcodes installed and switch them with xcode-select, example:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
Please also run xcodebuild -version after that to verify switch is successful.
Do you know if there is a solution for version 8.3 of Xcode? I do not have space to download the previous version and downgrade... ๐
We will provide hot fix in several days.
Hi all, we have the same error, any update about the hotfix?
Regards,
Fix landed in master branches.
You can try it with following steps:
npm i -g nativescript@next
tns create MyApp --template tns-template-hello-world@rc
tns platform add ios@next --path MyApp
tns run ios --path MyApp
Notes:
Fix is in nativescript CLI and tns-ios platform, so you need to update both.
@next is current state of our master branches.
We have breaking changes in master branches (we work on next major version - 3.0.0)
We do not recommend master branches for production developments since sometimes they might be unstable.
We will merge fixes in release branches and release hot fix for latest official version of {N} later this week.
Our app is native not hybrid, we need create the build through a jenkins job against the build server.
I'm not sure is this apply in our case
I did a nativescript update (to last rev in master branches), but I get another error now (at the end of 'tns run ios').
The build is in success, but I get this error when it try to deploy on my real iphone device :
PhaseScriptExecution ??\ Check\ Pods\ Manifest.lock /Users/hackeru/Library/Developer/Xcode/DerivedData/<my app name>-fzwvlpxrggyrqpegcufqkjvwbmdb/Build/Intermediates/ArchiveIntermediates/<my app name>/IntermediateBuildFilesPath/<my app name>.build/Release-iphoneos/<my app name>.build/Script-4220C9F8A61610F98ED1157D.sh
cd /<my app folder>/platforms/ios
/bin/sh -c /Users/hackeru/Library/Developer/Xcode/DerivedData/<my app name>-fzwvlpxrggyrqpegcufqkjvwbmdb/Build/Intermediates/ArchiveIntermediates/<my app name>/IntermediateBuildFilesPath/Nowgua.build/Release-iphoneos/<my app name>.build/Script-4220C9F8A61610F98ED1157D.sh
diff: /../Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
** ARCHIVE FAILED **
The following build commands failed:
PhaseScriptExecution ??\ Check\ Pods\ Manifest.lock /Users/hackeru/Library/Developer/Xcode/DerivedData/<my app name>-fzwvlpxrggyrqpegcufqkjvwbmdb/Build/Intermediates/ArchiveIntermediates/<my app name>/IntermediateBuildFilesPath/<my app name>.build/Release-iphoneos/<my app name>.build/Script-4220C9F8A61610F98ED1157D.sh
(1 failure)
Multiple errors were thrown:
Command xcodebuild failed with exit code 65
# run ios
Whereas Xcode still works to launch the app on my iphone.
Here my current nativescript version :
โ Component โ Current version โ Latest version โ Information โ
โ nativescript โ 3.0.0-2017-04-05-8539 โ 2.5.3 โ Up to date โ
โ tns-core-modules โ 2.5.2 โ 2.5.2 โ Up to date โ
โ tns-android โ 2.5.0 โ 2.5.0 โ Up to date โ
โ tns-ios โ 3.0.0-rc.1-2017-3-28-2 โ 2.5.0 โ Up to date โ
Weird, I had that error the other way around - I was able to run from my phone, but not from Xcode. Alas, that was in Xcode 8.2 and I was making an archive. Xcode gave me that error and it was because it did not have Build options->PODS_ROOT->Release variable set. I set it to the same value as Debug variable, and then the error was gone. Perhaps thats relevant to your experience.
{N} 2.5.4 is now available on npm and it should solve the issues with Xcode 8.3
@dxshindeo @GrEg00z Can you give us exact steps to reproduce, for example:
tns create TestApp
tns plugin add <some plugin>
tns run ios
Thanks to you @dxshindeo ! After this modification in Xcode, I can make a full 'tns run ios' and launch my app direct from it.
Problem is when I perform a :
tns platform remove ios
tns platform add ios
tns run ios
Then I have to modify manualy the 'pods_root' variables in Xcode for each 'platform remove/add'
Is there a solution for this ?
@dtopuzov : This is all commands I type (after upgrading ns to 3.0.0)
I also use Xcode 8.3
I don't know if this works for run command, but I know it works for build:
tns build ios --release
When passing the release flag, it will create the appropriate PODS_ROOT variable in Xcode.
Can you please try with [email protected] and if you still encounter the issue, please provide very detailed steps to reproduce (and context), ideally:
Now it's ok with nativescript 2.5.4, I can make a full 'tns run ios' without modify 'pods_root' in Xcode.
But now I get this error on starting my app :
***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1 0x1013c9e20 -[TNSRuntime executeModule:referredBy:]
2 0x1000c6990
3 0x1925e15b8 <redacted>
JavaScript stack trace:
1 @file:///app/tns_modules/tns-core-modules/ui/core/dependency-observable.js:73:28
JavaScript error:
file:///app/tns_modules/tns-core-modules/ui/core/dependency-observable.js:73:28: JS ERROR Error: Property showOverNavigation already registered for type RadSideDrawer
It's look to a recent existing problem in telerik plugin :
Any ideas of this ?
After the Update to 2.5.4, with xcode 8.3 I'm getting this error with an empty project
tns create testApp
change package.json for a valid provisioning profile
tns run ios
** ARCHIVE SUCCEEDED **
2017-04-06 11:44:53.515 xcodebuild[5139:64979] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/v6/676b__jj5zn14nsd8jsdd7wm0000gn/T/testApp_2017-04-06_11-44-53.514.xcdistributionlogs'.
1.2.840.113635.100.1.61
1.2.840.113635.100.1.61
2017-04-06 11:44:53.876 xcodebuild[5139:64979] [MT] IDEDistribution: Step failed: <IDEDistributionThinningStep: 0x7fa59f952ee0>: Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}
error: exportArchive: No applicable devices found.
Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}
** EXPORT FAILED **
Command xcodebuild failed with exit code 70
tns device displays my device correctly with status connected
I'm only getting this error with a physical device
After removing all code of telerik sidedrawer module (in typescript code), the error disapears.
I will try to re-add sidedrawer module to be sure if it's the problem
EDIT :
The code which killed the app for me was using SideDrawerLocation in my typescript code, after importing it
import { SideDrawerLocation } from "nativescript-telerik-ui-pro/sidedrawer";
this.currentDrawLocation = SideDrawerLocation.Bottom;
Removing that resolved the problem and now I'm able to use RadSideDraw in my app !
Closing this issue since we support Xcode 8.3 now.
If you encounter other specific problems please open separate issues.
Hi, I am using Visual Studio 2017 Apache Cordova 6.3.1 and trying to build for iOS. I have been facing this issue.
I am getting this error on remotebuild
* BUILD SUCCEEDED * xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH Error: Error code 72
How to fix this!!!!
Everywhere written as 8.3 is problem and xcodebuild should be there. But where, when using Visual studio, which is complete automated one remotebuild, where to do this?
thx
Most helpful comment
Same...