You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Nick Redding (JIRA)" <ji...@apache.org> on 2016/10/28 23:16:58 UTC

[jira] [Comment Edited] (CB-12084) iOS 4.3.0 CLI tools fail with Xcode 8.1

    [ https://issues.apache.org/jira/browse/CB-12084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15616905#comment-15616905 ] 

Nick Redding edited comment on CB-12084 at 10/28/16 11:16 PM:
--------------------------------------------------------------

No it's not just clean (although if you can't clean, building is of limited use).

The following transcript shows that going straight  to build (skipping clean) only works if using asset catalogs and static launch screen images. However, as soon as you swtich (in Xcode) to not using asset catalogs, and using a launch screen storyboard, the build fails on a info.plist parse error. Again, everything is A-OK from within Xcode 8.1 itself- the revised project builds, runs and archives just fine.

I'm betting this is a simple issue introduced by Xcode 8.1. Even though the CLI clean and build tools aren't strictly speaking necessary if you're using Xcode, that means you have to manually maintain the config.xml in the platforms/ios directory instead of propagating changes from the project config.xml via clean and build. It's a serious limitation in the long run if it doesn't get fixed.


sh-3.2# cd Documents
sh-3.2# cordova create hello
Using detached cordova-create
Creating a new cordova project.
sh-3.2# cd hello
sh-3.2# cordova platform add ios
Adding ios project...
Creating Cordova project for the iOS platform:
	Path: platforms/ios
	Package: io.cordova.hellocordova
	Name: HelloCordova
iOS project created with cordova-ios@4.3.0
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-whitelist@1" via npm
Installing "cordova-plugin-whitelist" for ios
sh-3.2# chmod -R 777 ../hello
sh-3.2# chmod -R 777 ../hello/*


# Now opened Xcode 81. with HelloCordova.xcodeproj, set “Automatically manage signing” under project General
# tab and code signing identity to “iOS Developer” under project Build Settings.
# Now able to build and run the Hello app, as well as build and archive, so everything is 100% OK with Xcode 8.1

sh-3.2# cordova build ios
Building project: /Users/Nick/Documents/hello/platforms/ios/HelloCordova.xcworkspace
	
...

** BUILD SUCCEEDED **

# Now return to Xcode 8.1, set "Launch Image Source" to "Don't use asset catalog" and set "Launch Screen File" to "CDVLaunchScreen.storyboard" (which was created by the cordova create command)
# The CLI build now fails

sh-3.2# cordova build ios
Building project: /Users/Nick/Documents/hello/platforms/ios/HelloCordova.xcworkspace
	
...

	/var/root/Library/Developer/Xcode/DerivedData/HelloCordova-egmyywrokoftwwcbdhfctqfigndo/Build/Intermediates/HelloCordova.build/Debug-iphonesimulator/HelloCordova.build/CDVLaunchScreen-SBPartialInfo.plist -additionalcontentfile /var/root/Library/Developer/Xcode/DerivedData/HelloCordova-egmyywrokoftwwcbdhfctqfigndo/Build/Intermediates/HelloCordova.build/Debug-iphonesimulator/HelloCordova.build/assetcatalog_generated_info.plist -o /Users/Nick/Documents/hello/platforms/ios/build/emulator/HelloCordova.app/Info.plist
error: couldn't parse contents of '/Users/Nick/Documents/hello/platforms/ios/HelloCordova/HelloCordova-Info.plist': The data couldn’t be read because it isn’t in the correct format.

** BUILD FAILED **


The following build commands failed:
	ProcessInfoPlistFile build/emulator/HelloCordova.app/Info.plist HelloCordova/HelloCordova-Info.plist
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/Nick/Documents/hello/platforms/ios/cordova/build-debug.xcconfig,-workspace,HelloCordova.xcworkspace,-scheme,HelloCordova,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 5s,build,CONFIGURATION_BUILD_DIR=/Users/Nick/Documents/hello/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/Nick/Documents/hello/platforms/ios/build/sharedpch
sh-3.2# 



was (Author: nickredding):
No it's not just clean (although if you can't clean, building is of limited use).

The following transcript shows that going straight  to build (skipping clean) only works is using asset catalogs and static launch screen images. However, as soon as you swtich (in Xcode) to not using asset catalogs, and using a launch screen storyboard, the build fails on a info.plist parse error. Again, everything is A-OK from within Xcode 8.1 itself- the revised project builds, runs and archives just fine.

I'm betting this is a simple issue introduced by Xcode 8.1. Even though the CLI clean and build tools aren't strictly speaking necessary if you're using Xcode, that means you have to manually maintain the config.xml in the platforms/ios directory instead of propagating changes from the project config.xml via clean and build. It's a serious limitation in the long run if it doesn't get fixed.


sh-3.2# cd Documents
sh-3.2# cordova create hello
Using detached cordova-create
Creating a new cordova project.
sh-3.2# cd hello
sh-3.2# cordova platform add ios
Adding ios project...
Creating Cordova project for the iOS platform:
	Path: platforms/ios
	Package: io.cordova.hellocordova
	Name: HelloCordova
iOS project created with cordova-ios@4.3.0
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-whitelist@1" via npm
Installing "cordova-plugin-whitelist" for ios
sh-3.2# chmod -R 777 ../hello
sh-3.2# chmod -R 777 ../hello/*


# Now opened Xcode 81. with HelloCordova.xcodeproj, set “Automatically manage signing” under project General
# tab and code signing identity to “iOS Developer” under project Build Settings.
# Now able to build and run the Hello app, as well as build and archive, so everything is 100% OK with Xcode 8.1

sh-3.2# cordova build ios
Building project: /Users/Nick/Documents/hello/platforms/ios/HelloCordova.xcworkspace
	
...

** BUILD SUCCEEDED **

# Now return to Xcode 8.1, set "Launch Image Source" to "Don't use asset catalog" and set "Launch Screen File" to "CDVLaunchScreen.storyboard" (which was created by the cordova create command)
# The CLI build now fails

sh-3.2# cordova build ios
Building project: /Users/Nick/Documents/hello/platforms/ios/HelloCordova.xcworkspace
	
...

	/var/root/Library/Developer/Xcode/DerivedData/HelloCordova-egmyywrokoftwwcbdhfctqfigndo/Build/Intermediates/HelloCordova.build/Debug-iphonesimulator/HelloCordova.build/CDVLaunchScreen-SBPartialInfo.plist -additionalcontentfile /var/root/Library/Developer/Xcode/DerivedData/HelloCordova-egmyywrokoftwwcbdhfctqfigndo/Build/Intermediates/HelloCordova.build/Debug-iphonesimulator/HelloCordova.build/assetcatalog_generated_info.plist -o /Users/Nick/Documents/hello/platforms/ios/build/emulator/HelloCordova.app/Info.plist
error: couldn't parse contents of '/Users/Nick/Documents/hello/platforms/ios/HelloCordova/HelloCordova-Info.plist': The data couldn’t be read because it isn’t in the correct format.

** BUILD FAILED **


The following build commands failed:
	ProcessInfoPlistFile build/emulator/HelloCordova.app/Info.plist HelloCordova/HelloCordova-Info.plist
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/Nick/Documents/hello/platforms/ios/cordova/build-debug.xcconfig,-workspace,HelloCordova.xcworkspace,-scheme,HelloCordova,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 5s,build,CONFIGURATION_BUILD_DIR=/Users/Nick/Documents/hello/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/Nick/Documents/hello/platforms/ios/build/sharedpch
sh-3.2# 


> iOS 4.3.0 CLI tools fail with Xcode 8.1
> ---------------------------------------
>
>                 Key: CB-12084
>                 URL: https://issues.apache.org/jira/browse/CB-12084
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 4.3.0
>         Environment: OS-X Xcode 8.1
>            Reporter: Nick Redding
>
> iOS 10.1 has been released, and requires Xcode 8.1 for builds.
> The Cordiva CLI build tools don't work with Xcode 8.1.
> Following is a transcript of a session illustrating this.
> {code}
> sh-3.2# cd Documents
> sh-3.2# cordova -v
> 6.4.0
> sh-3.2# cordova create hello
> Using detached cordova-create
> Creating a new cordova project.
> sh-3.2# cd hello
> sh-3.2# cordova platform add ios
> Adding ios project...
> Creating Cordova project for the iOS platform:
> 	Path: platforms/ios
> 	Package: io.cordova.hellocordova
> 	Name: HelloCordova
> iOS project created with cordova-ios@4.3.0
> Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
> Fetching plugin "cordova-plugin-whitelist@1" via npm
> Installing "cordova-plugin-whitelist" for ios
> sh-3.2# chmod -R 777 ../hello
> sh-3.2# chmod -R 777 ../hello/*
> # Now opened Xcode 81. with HelloCordova.xcodeproj, set “Automatically manage signing” under project General tab and code signing identity to “iOS Developer” under project Build Settings.
> # Now able to build and run the Hello app, as well as build and archive, so everything is 100% OK with Xcode 8.1
> # However, now with the CLI, cordova clean iOS fails as follows. To make matters worse, the clean is destructive, erasing the platforms/ios/www directory!
> sh-3.2# ls platforms/ios
> .DS_Store			HelloCordova			cordova				pods-debug.xcconfig
> .gitignore			HelloCordova.xcodeproj		ios.json			pods-release.xcconfig
> CordovaLib			HelloCordova.xcworkspace	platform_www			www
> sh-3.2# cordova clean ios
> === CLEAN TARGET CordovaLib OF PROJECT CordovaLib WITH CONFIGURATION Debug ===
> …
> === CLEAN TARGET HelloCordova OF PROJECT HelloCordova WITH CONFIGURATION Debug ===
> Check dependencies
> [BCEROR]No profiles for 'io.cordova.hellocordova' were found:  Xcode couldn't find a provisioning profile matching 'io.cordova.hellocordova'.
> [BCEROR]Code signing is required for product type 'Application' in SDK 'iOS 10.1'
> …
> ** CLEAN SUCCEEDED **
> === CLEAN TARGET CordovaLib OF PROJECT CordovaLib WITH CONFIGURATION Release ===
> …
> === CLEAN TARGET HelloCordova OF PROJECT HelloCordova WITH CONFIGURATION Release ===
> Check dependencies
> [BCEROR]No profiles for 'io.cordova.hellocordova' were found:  Xcode couldn't find a provisioning profile matching 'io.cordova.hellocordova'.
> [BCEROR]Code signing is required for product type 'Application' in SDK 'iOS 10.1'
> …
> ** CLEAN SUCCEEDED **
> sh-3.2# ls platforms/ios
> .DS_Store			HelloCordova			cordova				pods-debug.xcconfig
> .gitignore			HelloCordova.xcodeproj		ios.json			pods-release.xcconfig
> CordovaLib			HelloCordova.xcworkspace	platform_www
> sh-3.2# 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org