Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24197] appc run with --build-only produces .app that can't be run in ios-sim

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionWon't Fix
Resolution Date2016-12-05T22:59:23.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTooling
Labelsios
ReporterChristy Thomas
AssigneeChris Barber
Created2016-11-18T18:18:08.000+0000
Updated2018-08-02T22:20:08.000+0000

Description

Running the following command:
DW1415USBUM:Endless-Aisle-App cthomas$ appc run --project-dir .     --log-level warn     --platform ios     --force     --sdk 5.5.1.GA     --force-copy     --sim-type ipad     --sim-version 9.3     --deploy-type development     --target simulator     --device-family ipad     --ios-version 9.3 --build-only
Appcelerator Command-Line Interface, version 5.5.1
Copyright (c) 2014-2016, Appcelerator, Inc.  All Rights Reserved.

11/18/2016, 1:10:54 PM

Operating System
  Name                        = Mac OS X
  Version                     = 10.11.6
  Architecture                = 64bit
  # CPUs                      = 8
  Memory                      = 17179869184

Node.js
  Node.js Version             = 0.12.7
  npm Version                 = 2.11.3

Titanium CLI
  CLI Version                 = 5.0.9

Titanium SDK
  SDK Version                 = 5.5.1.GA
  SDK Path                    = /Users/cthomas/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA
  Target Platform             = iphone

Command
  /usr/local/bin/node /Users/cthomas/.appcelerator/install/5.5.1/package/node_modules/titanium/lib/titanium.js build run --project-dir . --log-level warn --platform ios --force --sdk 5.5.1.GA --force-copy --sim-type ipad --sim-version 9.3 --deploy-type development --target simulator --device-family ipad --ios-version 9.3 --build-only --config-file /var/folders/25/x4lmh1qn2rd11dkqf4g4jn80680cyz/T/build-1479492649525.json --no-banner --project-dir /Users/cthomas/Code/DSSRefApp/DSSLatest/Endless-Aisle-App

[WARN]  The default icon "DefaultIcon.png" contains an alpha channel and will be flattened against a white background
[WARN]  You may create an image named "DefaultIcon-ios.png" that does not have an alpha channel in the root of your project
[WARN]  It is highly recommended that the DefaultIcon.png be 1024x1024
[WARN]  /Users/cthomas/Code/DSSRefApp/DSSLatest/Endless-Aisle-App/build/iphone/DefaultIcon.png (152x152) is not large enough to generate missing icon "appicon-83.5@2x.png" (167x167), skipping
[WARN]  Missing 2 launch images:
[WARN]    Default
[WARN]      Default-Portrait.png - Used for iPad - dimensions: 768x1024, orientation: portrait
[WARN]      Default-Portrait@2x.png - Used for iPad - dimensions: 1536x2048, orientation: portrait
This is what happens when I try to run with ios-sim of the resulting Endless-Aisle-App.app file
ios-sim launch build/iphone/build/Products/Debug-iphonesimulator/EndlessAisle.app --devicetypeid "com.apple.CoreSimulator.SimDeviceType.iPad-2, 9.3"
2016-11-18 13:12:36.330 ios-sim[63484:458117] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-10179/DVTFoundation/PlugInArchitecture/PlugInManager/DVTPlugInManager.m:260
Details:  Requested but did not find extension point with identifier Xcode.DVTFoundation.DevicePlatformMapping
Object:   <DVTPlugInManager: 0x7fb80a40b050>
Method:   -extensionPointWithIdentifier:
Thread:   <NSThread: 0x7fb80840b970>\{number = 1, name = main\}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
Session could not be started: Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo=\{NSLocalizedDescription=Installation Failed, NSLocalizedRecoverySuggestion=The application at “/Users/cthomas/Code/DSSRefApp/DSSLatest/Endless-Aisle-App/build/iphone/build/Products/Debug-iphonesimulator/EndlessAisle.app” does not have a bundle identifier\}
Contents of the resulting Endless-Aisle-App.app directory:
DW1415USBUM:Endless-Aisle-App cthomas$ ls -al build/iphone/build/Products/Debug-iphonesimulator/EndlessAisle.app
total 944
drwxr-xr-x  63 cthomas  staff   2142 Nov 18 13:11 .
drwxr-xr-x   3 cthomas  staff    102 Nov 18 13:10 ..
drwxr-xr-x   3 cthomas  staff    102 Nov 18 13:11 AdyenToolkit.bundle
-rw-r--r--   1 cthomas  staff   4237 Nov 18 13:11 DialogMgr.js
-rw-r--r--   1 cthomas  staff  18021 Nov 18 13:11 EAUtils.js
-rw-r--r--   1 cthomas  staff   3525 Nov 18 13:11 PagingControl.js
-rw-r--r--   1 cthomas  staff   8617 Nov 18 13:11 Ti.Google.Analytics.js
-rw-r--r--   1 cthomas  staff   2663 Nov 18 13:11 TiBackboneShim.js
-rw-r--r--   1 cthomas  staff   7724 Nov 18 13:11 Validations.js
-rw-r--r--   1 cthomas  staff     97 Nov 18 13:11 _app_props_.json
-rw-r--r--   1 cthomas  staff  33264 Nov 18 13:11 adyenDevice.js
drwxr-xr-x  15 cthomas  staff    510 Nov 18 13:11 alloy
-rw-r--r--   1 cthomas  staff  10603 Nov 18 13:11 alloy.js
-rw-r--r--   1 cthomas  staff   2622 Nov 18 13:11 alloyAdditions.js
-rw-r--r--   1 cthomas  staff   3973 Nov 18 13:11 analytics.js
-rw-r--r--   1 cthomas  staff   5680 Nov 18 13:11 app.js
-rw-r--r--   1 cthomas  staff   5320 Nov 18 13:11 appConfiguration.js
-rw-r--r--   1 cthomas  staff   2277 Nov 18 13:11 appResume.js
-rw-r--r--   1 cthomas  staff   4238 Nov 18 13:11 appSettings.js
-rw-r--r--   1 cthomas  staff   9083 Nov 18 13:11 backbone-associations.js
-rw-r--r--   1 cthomas  staff   4568 Nov 18 13:11 barcodeScanner.js
-rw-r--r--   1 cthomas  staff   7656 Nov 18 13:11 behave.js
-rw-r--r--   1 cthomas  staff    180 Nov 18 13:11 behaveLoggerExt.js
-rw-r--r--   1 cthomas  staff   1674 Nov 18 13:11 bootstrapModels.js
drwxr-xr-x  17 cthomas  staff    578 Nov 18 13:11 config
-rw-r--r--   1 cthomas  staff   2451 Nov 18 13:11 countriesStates.js
drwxr-xr-x   3 cthomas  staff    102 Nov 18 13:11 de.lproj
drwxr-xr-x   3 cthomas  staff    102 Nov 18 13:11 demandware
-rw-r--r--   1 cthomas  staff   1293 Nov 18 13:11 demandwareAnalytics.js
-rw-r--r--   1 cthomas  staff   6318 Nov 18 13:11 dialogUtils.js
-rw-r--r--   1 cthomas  staff   6369 Nov 18 13:11 disImageServiceMethods.js
drwxr-xr-x   7 cthomas  staff    238 Nov 18 13:11 dw
-rw-r--r--   1 cthomas  staff   3427 Nov 18 13:11 dwImageServiceMethods.js
drwxr-xr-x   3 cthomas  staff    102 Nov 18 13:11 en.lproj
-rw-r--r--   1 cthomas  staff  22654 Nov 18 13:11 epsonPrinter.js
drwxr-xr-x   6 cthomas  staff    204 Nov 18 13:11 fonts
drwxr-xr-x   3 cthomas  staff    102 Nov 18 13:11 fr.lproj
-rw-r--r--   1 cthomas  staff   3358 Nov 18 13:11 googleAnalytics.js
drwxr-xr-x   3 cthomas  staff    102 Nov 18 13:11 html
-rw-r--r--   1 cthomas  staff  71349 Nov 18 13:11 iTunesArtwork
-rw-r--r--   1 cthomas  staff    308 Nov 18 13:11 imageServiceMethods.js
-rw-r--r--   1 cthomas  staff   2355 Nov 18 13:11 imageServiceUtilityMethods.js
-rw-r--r--   1 cthomas  staff    566 Nov 18 13:11 imageUtils.js
drwxr-xr-x   9 cthomas  staff    306 Nov 18 13:11 images
-rw-r--r--   1 cthomas  staff  31789 Nov 18 13:11 ingenicoDevice.js
drwxr-xr-x   3 cthomas  staff    102 Nov 18 13:11 ja.lproj
-rw-r--r--   1 cthomas  staff   9766 Nov 18 13:11 jquery.deferred.js
-rw-r--r--   1 cthomas  staff  11385 Nov 18 13:11 localCache.js
-rw-r--r--   1 cthomas  staff   3359 Nov 18 13:11 logging.js
drwxr-xr-x   4 cthomas  staff    136 Nov 18 13:11 modules
-rw-r--r--   1 cthomas  staff   9124 Nov 18 13:11 ocapi_methods.js
-rw-r--r--   1 cthomas  staff    121 Nov 18 13:11 posDevice.js
-rw-r--r--   1 cthomas  staff    438 Nov 18 13:11 qrCodeGenerator.js
-rw-r--r--   1 cthomas  staff   2853 Nov 18 13:11 reporter.js
drwxr-xr-x  32 cthomas  staff   1088 Nov 18 13:11 spec
-rw-r--r--   1 cthomas  staff   9923 Nov 18 13:11 testhelper.js
-rw-r--r--   1 cthomas  staff   3401 Nov 18 13:11 timers.js
-rw-r--r--   1 cthomas  staff   8934 Nov 18 13:11 underscore.deferred.js
-rw-r--r--   1 cthomas  staff  19322 Nov 18 13:11 underscore.string.js
-rw-r--r--   1 cthomas  staff  15060 Nov 18 13:11 verifoneDevice.js
-rw-r--r--   1 cthomas  staff    197 Nov 18 13:11 webDevice.js
drwxr-xr-x   3 cthomas  staff    102 Nov 18 13:11 wireframe
drwxr-xr-x   3 cthomas  staff    102 Nov 18 13:11 zh-CN.lproj
If I remove the --build-only from the appc run command then the simulator launches the app without a problem and this is the resulting directory Command:
DW1415USBUM:Endless-Aisle-App cthomas$ appc run --project-dir .     --log-level warn     --platform ios     --force     --sdk 5.5.1.GA     --force-copy     --sim-type ipad     --sim-version 9.3     --deploy-type development     --target simulator     --device-family ipad     --ios-version 9.3 
Contents of EndlessAisle.app
DW1415USBUM:Endless-Aisle-App cthomas$ ls -al build/iphone/build/Products/Debug-iphonesimulator/EndlessAisle.app
total 66776
drwxr-xr-x  77 cthomas  staff      2618 Nov 18 13:16 .
drwxr-xr-x   4 cthomas  staff       136 Nov 18 13:16 ..
drwxr-xr-x   3 cthomas  staff       102 Nov 18 13:16 AdyenToolkit.bundle
-rw-r--r--   1 cthomas  staff      1906 Nov 18 13:16 AppIcon29x29@2x.png
-rw-r--r--   1 cthomas  staff      1906 Nov 18 13:16 AppIcon29x29@2x~ipad.png
-rw-r--r--   1 cthomas  staff       901 Nov 18 13:16 AppIcon29x29~ipad.png
-rw-r--r--   1 cthomas  staff      2799 Nov 18 13:16 AppIcon40x40@2x.png
-rw-r--r--   1 cthomas  staff      2799 Nov 18 13:16 AppIcon40x40@2x~ipad.png
-rw-r--r--   1 cthomas  staff      1332 Nov 18 13:16 AppIcon40x40~ipad.png
-rw-r--r--   1 cthomas  staff      3273 Nov 18 13:16 AppIcon76x76@2x~ipad.png
-rw-r--r--   1 cthomas  staff      2607 Nov 18 13:16 AppIcon76x76~ipad.png
-rw-r--r--   1 cthomas  staff      4237 Nov 18 13:16 DialogMgr.js
-rw-r--r--   1 cthomas  staff     18021 Nov 18 13:16 EAUtils.js
-rwxr-xr-x   1 cthomas  staff  28746424 Nov 18 13:16 EndlessAisle
drwxr-xr-x   2 cthomas  staff        68 Nov 18 13:16 Frameworks
-rw-r--r--   1 cthomas  staff      2795 Nov 18 13:16 Info.plist
-rw-r--r--   1 cthomas  staff   4913156 Nov 18 13:16 LaunchImage-700-Landscape@2x~ipad.png
-rw-r--r--   1 cthomas  staff      3525 Nov 18 13:16 PagingControl.js
-rw-r--r--   1 cthomas  staff         8 Nov 18 13:16 PkgInfo
drwxr-xr-x   4 cthomas  staff       136 Nov 18 13:16 Settings.bundle
-rw-r--r--   1 cthomas  staff      8617 Nov 18 13:16 Ti.Google.Analytics.js
-rw-r--r--   1 cthomas  staff      2663 Nov 18 13:16 TiBackboneShim.js
-rw-r--r--   1 cthomas  staff      7724 Nov 18 13:16 Validations.js
-rw-r--r--   1 cthomas  staff        97 Nov 18 13:16 _app_props_.json
-rw-r--r--   1 cthomas  staff     33264 Nov 18 13:16 adyenDevice.js
drwxr-xr-x  15 cthomas  staff       510 Nov 18 13:16 alloy
-rw-r--r--   1 cthomas  staff     10603 Nov 18 13:16 alloy.js
-rw-r--r--   1 cthomas  staff      2622 Nov 18 13:16 alloyAdditions.js
-rw-r--r--   1 cthomas  staff      3973 Nov 18 13:16 analytics.js
-rw-r--r--   1 cthomas  staff      5680 Nov 18 13:16 app.js
-rw-r--r--   1 cthomas  staff      5320 Nov 18 13:16 appConfiguration.js
-rw-r--r--   1 cthomas  staff      2277 Nov 18 13:16 appResume.js
-rw-r--r--   1 cthomas  staff      4238 Nov 18 13:16 appSettings.js
-rw-r--r--   1 cthomas  staff      9083 Nov 18 13:16 backbone-associations.js
-rw-r--r--   1 cthomas  staff      4568 Nov 18 13:16 barcodeScanner.js
-rw-r--r--   1 cthomas  staff      7656 Nov 18 13:16 behave.js
-rw-r--r--   1 cthomas  staff       180 Nov 18 13:16 behaveLoggerExt.js
-rw-r--r--   1 cthomas  staff      1674 Nov 18 13:16 bootstrapModels.js
drwxr-xr-x  17 cthomas  staff       578 Nov 18 13:16 config
-rw-r--r--   1 cthomas  staff      2451 Nov 18 13:16 countriesStates.js
drwxr-xr-x   3 cthomas  staff       102 Nov 18 13:16 de.lproj
drwxr-xr-x   3 cthomas  staff       102 Nov 18 13:16 demandware
-rw-r--r--   1 cthomas  staff      1293 Nov 18 13:16 demandwareAnalytics.js
-rw-r--r--   1 cthomas  staff      6318 Nov 18 13:16 dialogUtils.js
-rw-r--r--   1 cthomas  staff      6369 Nov 18 13:16 disImageServiceMethods.js
drwxr-xr-x   7 cthomas  staff       238 Nov 18 13:16 dw
-rw-r--r--   1 cthomas  staff      3427 Nov 18 13:16 dwImageServiceMethods.js
drwxr-xr-x   3 cthomas  staff       102 Nov 18 13:16 en.lproj
-rw-r--r--   1 cthomas  staff     22654 Nov 18 13:16 epsonPrinter.js
drwxr-xr-x   6 cthomas  staff       204 Nov 18 13:16 fonts
drwxr-xr-x   3 cthomas  staff       102 Nov 18 13:16 fr.lproj
-rw-r--r--   1 cthomas  staff      3358 Nov 18 13:16 googleAnalytics.js
drwxr-xr-x   3 cthomas  staff       102 Nov 18 13:16 html
-rw-r--r--   1 cthomas  staff     71349 Nov 18 13:16 iTunesArtwork
-rw-r--r--   1 cthomas  staff       308 Nov 18 13:16 imageServiceMethods.js
-rw-r--r--   1 cthomas  staff      2355 Nov 18 13:16 imageServiceUtilityMethods.js
-rw-r--r--   1 cthomas  staff       566 Nov 18 13:16 imageUtils.js
drwxr-xr-x   9 cthomas  staff       306 Nov 18 13:16 images
-rw-r--r--   1 cthomas  staff     31789 Nov 18 13:16 ingenicoDevice.js
drwxr-xr-x   3 cthomas  staff       102 Nov 18 13:16 ja.lproj
-rw-r--r--   1 cthomas  staff      9766 Nov 18 13:16 jquery.deferred.js
-rw-r--r--   1 cthomas  staff     11385 Nov 18 13:16 localCache.js
-rw-r--r--   1 cthomas  staff      3359 Nov 18 13:16 logging.js
drwxr-xr-x   4 cthomas  staff       136 Nov 18 13:16 modules
-rw-r--r--   1 cthomas  staff      9124 Nov 18 13:16 ocapi_methods.js
-rw-r--r--   1 cthomas  staff       121 Nov 18 13:16 posDevice.js
-rw-r--r--   1 cthomas  staff       438 Nov 18 13:16 qrCodeGenerator.js
-rw-r--r--   1 cthomas  staff      2853 Nov 18 13:16 reporter.js
drwxr-xr-x  32 cthomas  staff      1088 Nov 18 13:16 spec
-rw-r--r--   1 cthomas  staff      9923 Nov 18 13:16 testhelper.js
-rw-r--r--   1 cthomas  staff      3401 Nov 18 13:16 timers.js
-rw-r--r--   1 cthomas  staff      8934 Nov 18 13:16 underscore.deferred.js
-rw-r--r--   1 cthomas  staff     19322 Nov 18 13:16 underscore.string.js
-rw-r--r--   1 cthomas  staff     15060 Nov 18 13:16 verifoneDevice.js
-rw-r--r--   1 cthomas  staff       197 Nov 18 13:16 webDevice.js
drwxr-xr-x   3 cthomas  staff       102 Nov 18 13:16 wireframe
drwxr-xr-x   3 cthomas  staff       102 Nov 18 13:16 zh-CN.lproj
When I run it works with ios-sim
2016-11-18 13:17:13.476 ios-sim[65837:469963] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-10179/DVTFoundation/PlugInArchitecture/PlugInManager/DVTPlugInManager.m:260
Details:  Requested but did not find extension point with identifier Xcode.DVTFoundation.DevicePlatformMapping
Object:   <DVTPlugInManager: 0x7fd074a494d0>
Method:   -extensionPointWithIdentifier:
Thread:   <NSThread: 0x7fd072506190>\{number = 1, name = main\}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

Comments

  1. Hans Knöchel 2016-11-18

    Ok, so diffing both directory listings looks like the app-icons, the plist and the app-binary are missing. Is that correct?
  2. Christy Thomas 2016-11-18

    Yes that sounds correct to me.
  3. Sharif AbuDarda 2016-11-22

    Hello, Can you run with the latest version 6.0.0 for CLI and SDK and in iOS 10. Send a list of CLI commands for us to test the issue. Thanks.
  4. Christy Thomas 2016-11-22

    We cannot upgrade to 6.0 at this time. We are not all on Xcode 8 and Sierra yet b/c of restrictions in our company. The command I used was this: appc run --project-dir . --log-level warn --platform ios --force --sdk 5.5.1.GA --force-copy --sim-type ipad --sim-version 9.3 --deploy-type development --target simulator --device-family ipad --ios-version 9.3 --build-only
  5. Chris Barber 2016-12-05

    Regarding ios-sim, we removed it Titanium SDK 5.0.0. The last version of Titanium that shipped with ios-sim was 4.1.1 which was end of life in Sept 2016. Thus we no longer support ios-sim. Regarding the app icons, when building with Titanium SDK 5.5.1, I was able to verify that the app icons are NOT in the build/iphone/build/Products/Debug-iphonesimulator/<app name>.app directory as expected. Instead they are copied to the build/iphone/build/Products/Debug-iphoneos/<app name>.app directory. The thing is, there shouldn't be a Debug-iphoneos directory. This does not happen in Titanium SDK 6.1.0, so we probably fixed whatever was causing this. Regardless if app thinning is enabled or not, Xcode will copy the app icons to the app output directory. This is probably for backwards compatibility. Since this ticket is specifically about ios-sim and not missing app icons, I'm resolving as "won't fix".
  6. Christy Thomas 2016-12-06

    If you don't support ios-sim anymore, is there another way I can launch the app in the simulator after building? Is there a way to build the app (without a run) and then run in the simulator? Pretend that ios-sim isn't being used here we see a difference in the app when building with --build-only and without. That has nothing to do with ios-sim. Our use case is for using jenkins and running automation. We have a job to build the app and then later have jobs that run automation using that built app. We don't need to keep rebuilding the app, but need to run it in the simulator with different starts and stops of the simulator. Using MonkeyTalk we need to be able to have the app launch in the simulator.
  7. Chris Barber 2016-12-06

    [~cthomas] You should use simctl which comes with Xcode. You can invoke it by running xcrun simctl. It has a launch command, but it requires the iOS Simulator to be running. simctl cannot launch the iOS Simulator. You must launch it first, then you can use simctl. You can launch the iOS Simulator by running /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator -CurrentDeviceUDID <udid>.
  8. Christy Thomas 2016-12-07

    Thanks for the information Chris. This ticket is not specific to ios-sim. The appc run --build-only flag does not build the app correctly. I was only using ios-sim as an example with the error about the incomplete app.
  9. Chris Barber 2016-12-07

    [~cthomas] Like I said, the \-\-build\-only issue is not reproducible with Titanium SDK 6.0.0. There were some \-\-build\-only related changes in 6.0.0 such as TIMOB-24065. I recommend upgrading to 6.0.0 or manually apply the diff from TIMOB-24065's PR. I wouldn't be surprised if there were other fixes. There hasn't been that many changes in the past couple months: https://github.com/appcelerator/titanium_mobile/commits/master/iphone/cli/commands/_build.js.
  10. Eric Merriman 2018-08-02

    Closing old "Won't fix" tickets. If you disagree, please reopen.

JSON Source