NativeScript / NativeScript/nativescript-cli

iOS build fails after renaming project root folder

Offen
#3,574 0 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug build os: ios reproducible
Vorherrschende Sprache
JavaScript
Sterne
1.1k
Forks
204
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
8

Beschreibung

Please, provide the details below:

Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo?

yes

Tell us about the problem

Running app for iOS, renaming its root folder and trying to run it again - build fails after renaming project root folder with this error:

xcodebuild: error: '/Volumes/NHRISTOVA/Work/NS/AppRen2/platforms/ios/AppRen2.xcodeproj' does not exist.
Unable to apply changes on device: F6900C39-7AAA-45C8-AFF6-D923DBEF1E8E. Error is: Command xcodebuild failed with exit code 66.

NOTE: iOS build is successful after removing iOS platform. However, this works for android without removing android platform.

Which platform(s) does your issue occur on?

iOS

Please provide the following version numbers that your issue occurs with:
  • CLI: 4.0.0
  • Runtime(s):
    "tns-ios": "4.0.1"
    "tns-android": "4.0.1"
Please tell us how to recreate the issue in as much detail as possible.
  1. tns create MyApp
  2. tns run ios
  3. Rename root folder e.g. MyApp -> MyApp2
  4. tns run ios

Here is ths full log:

Loading extensions.
System information:
{ platform: 'darwin',
  shell: '/bin/bash',
  os: 'Darwin mcsofhristova 17.3.0 Darwin Kernel Version 17.3.0: Thu Nov  9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64 x86_64\n',
  procArch: 'x64',
  nodeVer: '8.11.1',
  npmVer: '5.6.0',
  nodeGypVer: null,
  nativeScriptCliVersion: '4.0.0',
  gitVer: '2.15.1 (Apple Git-101)',
  dotNetVer: null,
  javacVersion: '1.8.0_111',
  adbVer: '1.0.39',
  androidInstalled: true,
  monoVer: null,
  gradleVer: null,
  isAndroidSdkConfiguredCorrectly: true,
  xcodeVer: '9.3.0',
  xcodeprojLocation: '/usr/local/bin/xcodeproj',
  itunesInstalled: true,
  cocoaPodsVer: '1.4.0',
  isCocoaPodsWorkingCorrectly: true,
  isCocoaPodsUpdateRequired: false,
  pythonInfo: { isInstalled: true, isSixPackageInstalled: true } }
Looking for project in '/Volumes/NHRISTOVA/Work/NS/AppRen2'
Project directory is '/Volumes/NHRISTOVA/Work/NS/AppRen2'.
Will send the following information to Google Analytics: { googleAnalyticsDataType: 'event',
  action: 'Check Local Build Setup',
  label: 'Starting',
  customDimensions: {} }
Initializing analytics statuses.
Analytics statuses:  { TrackFeatureUsage: 'disabled', TrackExceptions: 'disabled' }
Xcode is installed and is configured properly.
xcodeproj is installed and is configured properly.
CocoaPods are installed.
CocoaPods update is not required.
CocoaPods are configured properly.
Your current CocoaPods version is newer than 1.0.0.
Python installed and configured correctly.
The Python 'six' package is found.
Will send the following information to Google Analytics: { googleAnalyticsDataType: 'event',
  action: 'Check Local Build Setup',
  label: 'Finished: Is setup correct: true',
  customDimensions: {} }
Exec xcodebuild -version | head -n 1 | sed -e 's/Xcode //' 
 stdout: 9.3
 
 stderr: 
Validate options for platform: iOS
Searching for devices...
startLookingForDevices; platform is iOS
Starting to look for iOS devices.
Found device with identifier 'F6900C39-7AAA-45C8-AFF6-D923DBEF1E8E'
startLookingForDevices; platform is iOS
Project dir from hooksArgs is: /Volumes/NHRISTOVA/Work/NS/AppRen2.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
  '/usr/local/lib/node_modules/nativescript/lib/common/hooks',
  '/Volumes/NHRISTOVA/Work/NS/AppRen2/hooks' ]
BeforeHookName for command liveSync is before-liveSync
Changes info in prepare platform: ProjectChangesInfo {
  appFilesChanged: false,
  packageChanged: false,
  appResourcesChanged: false,
  nativeChanged: false,
  configChanged: false,
  nativePlatformStatus: '3' }
Project dir from hooksArgs is: /Volumes/NHRISTOVA/Work/NS/AppRen2.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
  '/usr/local/lib/node_modules/nativescript/lib/common/hooks',
  '/Volumes/NHRISTOVA/Work/NS/AppRen2/hooks' ]
BeforeHookName for command shouldPrepare is before-shouldPrepare
Project dir from hooksArgs is: /Volumes/NHRISTOVA/Work/NS/AppRen2.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
  '/usr/local/lib/node_modules/nativescript/lib/common/hooks',
  '/Volumes/NHRISTOVA/Work/NS/AppRen2/hooks' ]
AfterHookName for command shouldPrepare is after-shouldPrepare
Skipping prepare.
Building project...
Will send the following information to Google Analytics: { googleAnalyticsDataType: 'event',
  action: 'Build',
  label: 'iOS_Simulator_Debug_Incremental',
  customDimensions: { cd2: 'Pure JavaScript' } }
Exec xcodebuild -version | head -n 1 | sed -e 's/Xcode //' 
 stdout: 9.3
 
 stderr: 
spawn: xcodebuild "SHARED_PRECOMPS_DIR=/Volumes/NHRISTOVA/Work/NS/AppRen2/platforms/ios/build/sharedpch" "build" "-configuration" "Debug" "-sdk" "iphonesimulator" "ARCHS=i386 x86_64" "VALID_ARCHS=i386 x86_64" "ONLY_ACTIVE_ARCH=NO" "CONFIGURATION_BUILD_DIR=/Volumes/NHRISTOVA/Work/NS/AppRen2/platforms/ios/build/emulator" "CODE_SIGN_IDENTITY=" "-project" "/Volumes/NHRISTOVA/Work/NS/AppRen2/platforms/ios/AppRen2.xcodeproj" "-target" "AppRen2" "-allowProvisioningUpdates"
Build settings from command line:
    ARCHS = i386 x86_64
    CODE_SIGN_IDENTITY = 
    CONFIGURATION_BUILD_DIR = /Volumes/NHRISTOVA/Work/NS/AppRen2/platforms/ios/build/emulator
    ONLY_ACTIVE_ARCH = NO
    SDKROOT = iphonesimulator11.3
    SHARED_PRECOMPS_DIR = /Volumes/NHRISTOVA/Work/NS/AppRen2/platforms/ios/build/sharedpch
    VALID_ARCHS = i386 x86_64

xcodebuild: error: '/Volumes/NHRISTOVA/Work/NS/AppRen2/platforms/ios/AppRen2.xcodeproj' does not exist.
Unable to apply changes on device: F6900C39-7AAA-45C8-AFF6-D923DBEF1E8E. Error is: Command xcodebuild failed with exit code 66.
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

Consider using the playground to provide the code you have issues with.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere die Abfolge mit tns create, tns run ios, einer Umbenennung des Stammordners und einem zweiten tns run ios. Beginne mit dem iOS-Build-Pfad, der den protokollierten xcodebuild -project-Befehl zusammenstellt, und untersuche, wie er platforms/ios/AppRen2.xcodeproj ableitet. Als erledigt gilt, wenn das umbenannte Projekt erstellt wird, ohne die iOS-Plattform zu entfernen, während das bestehende Android-Verhalten intakt bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
build-system, cli, mobile-dev
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.