Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Xcode 8.3 #2668

Closed
jamessharp opened this issue Mar 28, 2017 · 27 comments
Closed

Add support for Xcode 8.3 #2668

jamessharp opened this issue Mar 28, 2017 · 27 comments

Comments

@jamessharp
Copy link

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: apache/cordova-ios#257

Let me know if you need any further info

@NickIliev
Copy link
Contributor

Also reported via t.1100681

@svzi
Copy link

svzi commented Mar 30, 2017

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!

@dtopuzov
Copy link
Contributor

dtopuzov commented Mar 31, 2017

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.

@mn-martin
Copy link

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.

@dxshindeo
Copy link

dxshindeo commented Mar 31, 2017

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

@dunqan
Copy link

dunqan commented Mar 31, 2017

As a temporary workaround, you can still build and run your app by opening workspace in XCode directly. Especially for the release purposes.

@mn-martin
Copy link

@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)

@dxshindeo
Copy link

Is it possible to downgrade XCode back to 8.2 and would that solve current problems?

@CitySim
Copy link

CitySim commented Mar 31, 2017

Yes, you downloaded XCode 8.2 from https://developer.apple.com/download/more/
tns build works again for me now

@dtopuzov
Copy link
Contributor

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.

@Yamilquery
Copy link

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

@dtopuzov
Copy link
Contributor

dtopuzov commented Apr 2, 2017

We will provide hot fix in several days.

@yyosifov yyosifov self-assigned this Apr 3, 2017
@yyosifov yyosifov added this to the 3.0.0 milestone Apr 3, 2017
@fsartori68
Copy link

Hi all, we have the same error, any update about the hotfix?
Regards,

@dtopuzov
Copy link
Contributor

dtopuzov commented Apr 3, 2017

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.

@fsartori68
Copy link

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

@dtopuzov dtopuzov changed the title PackageApplication deprecated in Xcode 8.3 - breaking tns run ios on devices Add support for Xcode 8.3 Apr 4, 2017
@GrEg00z
Copy link

GrEg00z commented Apr 6, 2017

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 │

@dxshindeo
Copy link

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.

@dtopuzov
Copy link
Contributor

dtopuzov commented Apr 6, 2017

{N} 2.5.4 is now available on npm and it should solve the issues with Xcode 8.3

@dtopuzov
Copy link
Contributor

dtopuzov commented Apr 6, 2017

@dxshindeo @GrEg00z Can you give us exact steps to reproduce, for example:

tns create TestApp
tns plugin add <some plugin>
tns run ios

@GrEg00z
Copy link

GrEg00z commented Apr 6, 2017

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

@dxshindeo
Copy link

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.

@dtopuzov
Copy link
Contributor

dtopuzov commented Apr 6, 2017

Can you please try with nativescript@2.5.4 and if you still encounter the issue, please provide very detailed steps to reproduce (and context), ideally:

  • small project that isolates the problem (or at least package.json of the project)
  • CLI commands you run
  • What exactly you modify in Xcode

@GrEg00z
Copy link

GrEg00z commented Apr 6, 2017

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 :
#ProgressNS/nativescript-ui-feedback#137

Any ideas of this ?

@odubuc
Copy link

odubuc commented Apr 6, 2017

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

@GrEg00z
Copy link

GrEg00z commented Apr 6, 2017

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 !

@dtopuzov dtopuzov closed this as completed Apr 7, 2017
@dtopuzov
Copy link
Contributor

dtopuzov commented Apr 7, 2017

Closing this issue since we support Xcode 8.3 now.
If you encounter other specific problems please open separate issues.

@ekambarrao
Copy link

ekambarrao commented May 5, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests