You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/02/14 06:25:16 UTC
[GitHub] RohanTalip opened a new issue #527: "cordova build ios" doesn't
create a valid .app
RohanTalip opened a new issue #527: "cordova build ios" doesn't create a valid .app
URL: https://github.com/apache/cordova-ios/issues/527
# Bug Report
## Problem
### What is expected to happen?
Running `cordova build ios --device --buildFlag='-UseModernBuildSystem=0'` builds a full .app .
### What does actually happen?
A .app symbolic link is created but points to a missing directory.
Only running `cordova run ios --device --buildFlag='-UseModernBuildSystem=0'` builds a full .app (in a real directory) but also launches it.
Ideally it would be possible to build a complete app without launching it.
Have I misunderstood what `cordova build ios` is supposed to do?
## Information
This appears to happen with cordova-ios 4.5.4 (with --buildFlag='-UseModernBuildSystem=0') as well as 5.0.0.
### Command or Code
```
$ mkdir cordova-test
$ cd cordova-test
$ cordova create hello-ios-4.5.4 com.example.hello HelloWorld
$ cd hello-ios-4.5.4
```
```
$ cordova platform add ios
Using cordova-fetch for cordova-ios@~4.5.4
Adding ios project...
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: com.example.hello
Name: HelloWorld
iOS project created with cordova-ios@4.5.5
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Installing "cordova-plugin-whitelist" for ios
Adding cordova-plugin-whitelist to package.json
Saved plugin info for "cordova-plugin-whitelist" to config.xml
--save flag or autosave detected
Saving ios@~4.5.5 into config.xml file ...
```
Try to build:
```
$ cordova build ios --device --buildFlag='-UseModernBuildSystem=0'
...
=== BUILD TARGET HelloWorld OF PROJECT HelloWorld WITH CONFIGURATION Debug ===
Check dependencies
Code Signing Error: Signing for "HelloWorld" requires a development team. Select a development team in the project editor.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.1'
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
CordovaError: Promise rejected with non-error: 'Error code 65 for command: xcodebuild with args: -xcconfig,/Users/rohantalip/dev/cordova-test/hello-ios-4.5.4/platforms/ios/cordova/build-debug.xcconfig,-workspace,HelloWorld.xcworkspace,-scheme,HelloWorld,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,HelloWorld.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/rohantalip/dev/cordova-test/hello-ios-4.5.4/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/rohantalip/dev/cordova-test/hello-ios-4.5.4/platforms/ios/build/sharedpch,-UseModernBuildSystem=0'
at cli.catch.err (/Users/rohantalip/.npm-global/lib/node_modules/cordova/bin/cordova:30:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
```
(Full logs are at https://gist.github.com/RohanTalip/6981e160d272215f6c878f17cdac623d )
Try again after adding a team:
```
$ cordova build ios --device --buildFlag='-UseModernBuildSystem=0'
...
2019-02-13 21:42:42.101 xcodebuild[91768:53732423] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/6z/pjhh1g4n1cjg_5gjgphmx8s00000gn/T/HelloWorld_2019-02-13_21-42-42.100.xcdistributionlogs'.
Exported HelloWorld to: /Users/rohantalip/dev/cordova-test/hello-ios-4.5.4/platforms/ios/build/device
** EXPORT SUCCEEDED **
```
(Full logs are at https://gist.github.com/RohanTalip/a3cc42f5ab3ef6466c13770b2186cb9f )
Try to install the .app without running it:
```
$ ios-deploy --verbose --justlaunch --no-wifi -d -b /Users/rohantalip/Library/Developer/Xcode/DerivedData/HelloWorld-dypbevcarxedgzcfodacjzvfkxrg/Build/Intermediates.noindex/ArchiveIntermediates/HelloWorld/InstallationBuildProductsLocation/Applications/HelloWorld.app
2019-02-13 21:44:20.755 ios-deploy[91836:53737395] [ !! ] Can't access app path '/Users/rohantalip/Library/Developer/Xcode/DerivedData/HelloWorld-dypbevcarxedgzcfodacjzvfkxrg/Build/Intermediates.noindex/ArchiveIntermediates/HelloWorld/InstallationBuildProductsLocation/Applications/HelloWorld.app' : No such file or directory
Exit 253
```
The device directory exists (but HelloWorld.app is a symbolic link to a non-existent directory) :
```
$ ls -l /Users/rohantalip/dev/cordova-test/hello-ios-4.5.4/platforms/ios/build/device
total 1864
0 drwx------ 9 rohantalip staff 288 Feb 13 21:42 ./
4 -rw------- 1 rohantalip staff 742 Feb 13 21:42 DistributionSummary.plist
4 -rw------- 1 rohantalip staff 466 Feb 13 21:42 ExportOptions.plist
28 -rw------- 1 rohantalip staff 25635 Feb 13 21:42 Packaging.log
1828 -rw------- 1 rohantalip staff 1871482 Feb 13 21:42 HelloWorld.ipa
0 drwx------ 3 rohantalip staff 96 Feb 13 21:42 HelloWorld.app.dSYM/
0 lrwx------ 1 rohantalip staff 215 Feb 13 21:42 HelloWorld.app@ -> /Users/rohantalip/Library/Developer/Xcode/DerivedData/HelloWorld-dypbevcarxedgzcfodacjzvfkxrg/Build/Intermediates.noindex/ArchiveIntermediates/HelloWorld/InstallationBuildProductsLocation/Applications/HelloWorld.app
0 lrwx------ 1 rohantalip staff 222 Feb 13 21:42 libCordova.a@ -> /Users/rohantalip/Library/Developer/Xcode/DerivedData/HelloWorld-dypbevcarxedgzcfodacjzvfkxrg/Build/Intermediates.noindex/ArchiveIntermediates/HelloWorld/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libCordova.a
0 drwx------ 4 rohantalip staff 128 Feb 13 21:42 ../
```
No InstallationBuildProductsLocation directory is present:
```
$ ls -l /Users/rohantalip/Library/Developer/Xcode/DerivedData/HelloWorld-dypbevcarxedgzcfodacjzvfkxrg/Build/Intermediates.noindex/ArchiveIntermediates/HelloWorld/
total 0
0 drwx------ 4 rohantalip staff 128 Feb 13 21:42 ./
0 drwx------@ 5 rohantalip staff 160 Feb 13 21:42 IntermediateBuildFilesPath/
0 drwx------@ 2 rohantalip staff 64 Feb 13 21:42 BuildProductsPath/
0 drwx------ 3 rohantalip staff 96 Feb 13 21:42 ../
```
Try to run the app without unlocking the phone:
```
$ cordova run ios --device --buildFlag='-UseModernBuildSystem=0'
...
[100%] Installed package /Users/rohantalip/dev/cordova-test/hello-ios-4.5.4/platforms/ios/build/device/HelloWorld.app
------ Debug phase ------
Starting debug of fbae1c83ee924ee274c7a491c72604455ec1014b (N51AP, iPhone 5s (GSM), iphoneos, arm64) a.k.a. 'iPhone' connected through USB...
[ 0%] Looking up developer disk image
2019-02-13 22:10:26.437 ios-deploy[93088:53818439] [ !! ] Unable to mount developer disk image. (e80000e2)
CordovaError: Promise rejected with non-error: 'Error code 253 for command: ios-deploy with args: --justlaunch,--no-wifi,-d,-b,/Users/rohantalip/dev/cordova-test/hello-ios-4.5.4/platforms/ios/build/device/HelloWorld.app'
at cli.catch.err (/Users/rohantalip/.npm-global/lib/node_modules/cordova/bin/cordova:30:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
```
(Full logs are at https://gist.github.com/RohanTalip/596c5a32ff0031f3f0ccafeea6553113 )
Try to run the app after unlocking the phone:
```
$ cordova run ios --device --buildFlag='-UseModernBuildSystem=0'
...
[100%] Installed package /Users/rohantalip/dev/cordova-test/hello-ios-4.5.4/platforms/ios/build/device/HelloWorld.app
------ Debug phase ------
Starting debug of fbae1c83ee924ee274c7a491c72604455ec1014b (N51AP, iPhone 5s (GSM), iphoneos, arm64) a.k.a. 'iPhone' connected through USB...
[ 0%] Looking up developer disk image
[ 95%] Developer disk image mounted successfully
[100%] Connecting to remote debug server
-------------------------
(lldb) command source -s 0 '/tmp/50AE343B-76B5-498C-9C9B-3532EF0E81EC/fruitstrap-lldb-prep-cmds-fbae1c83ee924ee274c7a491c72604455ec1014b'
Executing commands in '/tmp/50AE343B-76B5-498C-9C9B-3532EF0E81EC/fruitstrap-lldb-prep-cmds-fbae1c83ee924ee274c7a491c72604455ec1014b'.
(lldb) platform select remote-ios --sysroot '/Users/rohantalip/Library/Developer/Xcode/iOS DeviceSupport/12.1.2 (16C101)/Symbols'
Platform: remote-ios
Connected: no
SDK Path: "/Users/rohantalip/Library/Developer/Xcode/iOS DeviceSupport/12.1.2 (16C101)/Symbols"
(lldb) target create "/Users/rohantalip/dev/cordova-test/hello-ios-4.5.4/platforms/ios/build/device/HelloWorld.app"
Current executable set to '/Users/rohantalip/dev/cordova-test/hello-ios-4.5.4/platforms/ios/build/device/HelloWorld.app' (arm64).
(lldb) script fruitstrap_device_app="/private/var/containers/Bundle/Application/756F412E-52BD-493B-B01D-B202841E6686/HelloWorld.app"
(lldb) script fruitstrap_connect_url="connect://127.0.0.1:60613"
(lldb) target modules search-paths add /usr "/Users/rohantalip/Library/Developer/Xcode/iOS DeviceSupport/12.1.2 (16C101)/Symbols/usr" /System "/Users/rohantalip/Library/Developer/Xcode/iOS DeviceSupport/12.1.2 (16C101)/Symbols/System" "/private/var/containers/Bundle/Application/756F412E-52BD-493B-B01D-B202841E6686" "/Users/rohantalip/dev/cordova-test/hello-ios-4.5.4/platforms/ios/build/device" "/var/containers/Bundle/Application/756F412E-52BD-493B-B01D-B202841E6686" "/Users/rohantalip/dev/cordova-test/hello-ios-4.5.4/platforms/ios/build/device" /Developer "/Users/rohantalip/Library/Developer/Xcode/iOS DeviceSupport/12.1.2 (16C101)/Symbols/Developer"
(lldb) command script import "/tmp/50AE343B-76B5-498C-9C9B-3532EF0E81EC/fruitstrap_fbae1c83ee924ee274c7a491c72604455ec1014b.py"
(lldb) command script add -f fruitstrap_fbae1c83ee924ee274c7a491c72604455ec1014b.connect_command connect
(lldb) command script add -s asynchronous -f fruitstrap_fbae1c83ee924ee274c7a491c72604455ec1014b.run_command run
(lldb) command script add -s asynchronous -f fruitstrap_fbae1c83ee924ee274c7a491c72604455ec1014b.autoexit_command autoexit
(lldb) command script add -s asynchronous -f fruitstrap_fbae1c83ee924ee274c7a491c72604455ec1014b.safequit_command safequit
(lldb) connect
(lldb) run
success
(lldb) safequit
```
(Full logs are at https://gist.github.com/RohanTalip/66f37ec8e595728cc641bb08082113ab )
Look at the device directory again:
```
$ ls -l /Users/rohantalip/dev/cordova-test/hello-ios-4.5.4/platforms/ios/build/device
total 1864
0 drwx------ 9 rohantalip staff 288 Feb 13 22:11 ./
4 -rw------- 1 rohantalip staff 742 Feb 13 22:11 DistributionSummary.plist
4 -rw------- 1 rohantalip staff 466 Feb 13 22:11 ExportOptions.plist
28 -rw------- 1 rohantalip staff 25716 Feb 13 22:11 Packaging.log
1828 -rw------- 1 rohantalip staff 1871474 Feb 13 22:11 HelloWorld.ipa
0 drwxr-xr-x 48 rohantalip staff 1536 Feb 13 22:11 HelloWorld.app/
0 drwx------ 3 rohantalip staff 96 Feb 13 22:11 HelloWorld.app.dSYM/
0 lrwx------ 1 rohantalip staff 222 Feb 13 22:11 libCordova.a@ -> /Users/rohantalip/Library/Developer/Xcode/DerivedData/HelloWorld-dypbevcarxedgzcfodacjzvfkxrg/Build/Intermediates.noindex/ArchiveIntermediates/HelloWorld/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libCordova.a
0 drwx------ 4 rohantalip staff 128 Feb 13 22:11 ../
```
HelloWorld.app is now a real directory:
```
$ ls -l /Users/rohantalip/dev/cordova-test/hello-ios-4.5.4/platforms/ios/build/device/HelloWorld.app
total 2416
0 drwx------ 9 rohantalip staff 288 Feb 13 22:11 ../
0 drwxr-xr-x 48 rohantalip staff 1536 Feb 13 22:11 ./
516 -rwxr-xr-x 1 rohantalip staff 526944 Feb 13 22:11 HelloWorld*
8 -rw------- 1 rohantalip staff 7547 Feb 13 22:11 embedded.mobileprovision
0 drwxr-xr-x 3 rohantalip staff 96 Feb 13 22:11 _CodeSignature/
240 -rw-r--r-- 1 rohantalip staff 242328 Feb 13 22:11 Assets.car
4 -rw-r--r-- 1 rohantalip staff 2007 Feb 13 22:11 Info.plist
160 -rw-r--r-- 1 rohantalip staff 161722 Feb 13 22:11 LaunchImage-Landscape@2x~ipad.png
152 -rw-r--r-- 1 rohantalip staff 154923 Feb 13 22:11 LaunchImage-Portrait@2x~ipad.png
4 -rw-r--r-- 1 rohantalip staff 8 Feb 13 22:11 PkgInfo
64 -rw-r--r-- 1 rohantalip staff 61990 Feb 13 22:11 LaunchImage-568h@2x.png
64 -rw-r--r-- 1 rohantalip staff 61990 Feb 13 22:11 LaunchImage-700-568h@2x.png
160 -rw-r--r-- 1 rohantalip staff 161722 Feb 13 22:11 LaunchImage-700-Landscape@2x~ipad.png
76 -rw-r--r-- 1 rohantalip staff 76512 Feb 13 22:11 LaunchImage-700-Landscape~ipad.png
152 -rw-r--r-- 1 rohantalip staff 154923 Feb 13 22:11 LaunchImage-700-Portrait@2x~ipad.png
76 -rw-r--r-- 1 rohantalip staff 74890 Feb 13 22:11 LaunchImage-700-Portrait~ipad.png
56 -rw-r--r-- 1 rohantalip staff 55319 Feb 13 22:11 LaunchImage-700@2x.png
52 -rw-r--r-- 1 rohantalip staff 52100 Feb 13 22:11 LaunchImage-800-667h@2x.png
64 -rw-r--r-- 1 rohantalip staff 63597 Feb 13 22:11 LaunchImage-800-Landscape-736h@3x.png
76 -rw-r--r-- 1 rohantalip staff 76512 Feb 13 22:11 LaunchImage-Landscape~ipad.png
76 -rw-r--r-- 1 rohantalip staff 74890 Feb 13 22:11 LaunchImage-Portrait~ipad.png
20 -rw-r--r-- 1 rohantalip staff 20021 Feb 13 22:11 LaunchImage.png
56 -rw-r--r-- 1 rohantalip staff 55319 Feb 13 22:11 LaunchImage@2x.png
4 -rw-r--r-- 1 rohantalip staff 3349 Feb 13 22:11 AppIcon29x29.png
8 -rw-r--r-- 1 rohantalip staff 6585 Feb 13 22:11 AppIcon29x29@2x.png
8 -rw-r--r-- 1 rohantalip staff 6585 Feb 13 22:11 AppIcon29x29@2x~ipad.png
12 -rw-r--r-- 1 rohantalip staff 9082 Feb 13 22:11 AppIcon29x29@3x.png
4 -rw-r--r-- 1 rohantalip staff 3349 Feb 13 22:11 AppIcon29x29~ipad.png
12 -rw-r--r-- 1 rohantalip staff 8883 Feb 13 22:11 AppIcon40x40@2x.png
12 -rw-r--r-- 1 rohantalip staff 8883 Feb 13 22:11 AppIcon40x40@2x~ipad.png
16 -rw-r--r-- 1 rohantalip staff 14152 Feb 13 22:11 AppIcon40x40@3x.png
8 -rw-r--r-- 1 rohantalip staff 4450 Feb 13 22:11 AppIcon40x40~ipad.png
12 -rw-r--r-- 1 rohantalip staff 11331 Feb 13 22:11 AppIcon50x50@2x~ipad.png
8 -rw-r--r-- 1 rohantalip staff 5557 Feb 13 22:11 AppIcon50x50~ipad.png
8 -rw-r--r-- 1 rohantalip staff 5977 Feb 13 22:11 AppIcon57x57.png
16 -rw-r--r-- 1 rohantalip staff 13012 Feb 13 22:11 AppIcon57x57@2x.png
16 -rw-r--r-- 1 rohantalip staff 14152 Feb 13 22:11 AppIcon60x60@2x.png
36 -rw-r--r-- 1 rohantalip staff 33390 Feb 13 22:11 AppIcon60x60@3x.png
20 -rw-r--r-- 1 rohantalip staff 17926 Feb 13 22:11 AppIcon72x72@2x~ipad.png
8 -rw-r--r-- 1 rohantalip staff 8045 Feb 13 22:11 AppIcon72x72~ipad.png
20 -rw-r--r-- 1 rohantalip staff 16629 Feb 13 22:11 AppIcon76x76@2x~ipad.png
12 -rw-r--r-- 1 rohantalip staff 8463 Feb 13 22:11 AppIcon76x76~ipad.png
28 -rw-r--r-- 1 rohantalip staff 28234 Feb 13 22:11 AppIcon83.5x83.5@2x~ipad.png
0 drwxr-xr-x 5 rohantalip staff 160 Feb 13 22:11 CDVLaunchScreen.storyboardc/
64 -rw-r--r-- 1 rohantalip staff 62285 Feb 13 22:11 LaunchImage-800-Portrait-736h@3x.png
4 -rw-r--r-- 1 rohantalip staff 943 Feb 13 22:11 MainViewController.nib
4 -rwxr-xr-x 1 rohantalip staff 2353 Feb 13 22:11 config.xml*
0 drwxr-xr-x 9 rohantalip staff 288 Feb 13 21:40 www/
```
### Environment, Platform, Device
MacOS 10.13.6 (High Sierra), building for iOS.
### Version information
```
$ cordova info
Collecting Data...
Node version: v10.15.0
Cordova version: 8.1.1
Config.xml file:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.example.hello" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>HelloWorld</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<engine name="ios" spec="^4.5.5" />
</widget>
Plugins:
cordova-plugin-whitelist
iOS platform:
Xcode 10.1
Build version 10B61
```
```
$ sw_vers -productVersion
10.13.6
```
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org