This script will be included in Cordova iOS 2.1. I am notifying people
here so it will be of use in tracking down problems with 2.0.0 or
greater projects - so if you have a problem, run the script and attach
the log.
The Python script can be run stand-alone:
https://raw.github.com/apache/incubator-cordova-ios/cbee723dd425909cdf15d7c5f3283b43bd2bb3c7/bin/diagnose_project
Make sure you set the exec bit on it:
chmod 755 diagnose_project
Usage:
diagnose_project path/to/your/app.xcodeproj
Summary:
This tool outputs the relevant Xcode Build Settings for your
project, the relevant Xcode Build Settings for your CordovaLib
project, Xcode preferences and variables, and Cordova version
information.
It does not list plugins or any info that can be easily
attached (like Cordova.plist)
I've included a sample log below.
-------------------------------------BEGIN--------------------------------------
Inspecting project:
/Users/shazron/Desktop/CordovaTest/CordovaTest.xcodeproj/project.pbxproj
--------------------------------------------------------------------------------
Finding your project's sub-projects...
Sub-project: {'path':
'../../Documents/Git/Apache/incubator-cordova-ios/CordovaLib/CordovaLib.xcodeproj',
'name': 'CordovaLib.xcodeproj', 'sourceTree': '<group>'}
--------------------------------------------------------------------------------
Inspecting your project's Build Settings...
Debug :
{ 'ARCHS': ['armv6', 'armv7'],
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'HEADER_SEARCH_PATHS': [ '"$(TARGET_BUILD_DIR)/usr/local/lib/include"',
'"$(OBJROOT)/UninstalledProducts/include"',
'"$(BUILT_PRODUCTS_DIR)"'],
'IPHONEOS_DEPLOYMENT_TARGET': '4.2',
'OTHER_LDFLAGS': [ '-weak_framework',
'CoreFoundation',
'-weak_framework',
'UIKit',
'-weak_framework',
'AVFoundation',
'-weak_framework',
'CoreMedia',
'-weak-lSystem',
'-all_load',
'-Obj-C'],
'USER_HEADER_SEARCH_PATHS': ''}
Release :
{ 'ARCHS': ['armv6', 'armv7'],
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'HEADER_SEARCH_PATHS': [ '"$(TARGET_BUILD_DIR)/usr/local/lib/include"',
'"$(OBJROOT)/UninstalledProducts/include"',
'"$(BUILT_PRODUCTS_DIR)"'],
'IPHONEOS_DEPLOYMENT_TARGET': '4.2',
'OTHER_LDFLAGS': [ '-weak_framework',
'CoreFoundation',
'-weak_framework',
'UIKit',
'-weak_framework',
'AVFoundation',
'-weak_framework',
'CoreMedia',
'-weak-lSystem',
'-all_load',
'-Obj-C'],
'USER_HEADER_SEARCH_PATHS': ''}
--------------------------------------------------------------------------------
Inspecting Xcode Preferences...
CORDOVALIB: /Users/shazron/Documents/Cordova/CordovaLib
Build Location Style: Unique
--------------------------------------------------------------------------------
Inspecting your CordovaLib's Build Settings...
Path is: ../../Documents/Git/Apache/incubator-cordova-ios/CordovaLib/CordovaLib.xcodeproj
{ 'Debug': { 'ARCHS': ['armv6', 'armv7'],
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'IPHONEOS_DEPLOYMENT_TARGET': '4.2',
'OTHER_LDFLAGS': '(not found)',
'PUBLIC_HEADERS_FOLDER_PATH': 'include/Cordova',
'USER_HEADER_SEARCH_PATHS': ''},
'Release': { 'ARCHS': ['armv6', 'armv7'],
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'IPHONEOS_DEPLOYMENT_TARGET': '4.2',
'OTHER_LDFLAGS': '(not found)',
'PUBLIC_HEADERS_FOLDER_PATH': 'include/Cordova',
'USER_HEADER_SEARCH_PATHS': '(not found)'}}
--------------------------------------------------------------------------------
Inspecting CordovaLib Version...
VERSION file: 2.1.0rc2
CDVAvailability.h version: __CORDOVA_2_1_0
--------------------------------------END---------------------------------------