Cordova iOS Project diagnostics script

432 views
Skip to first unread message

Shazron

unread,
Sep 9, 2012, 1:44:07 AM9/9/12
to phonegap
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---------------------------------------

Voltron

unread,
Sep 9, 2012, 3:45:51 AM9/9/12
to phonegap
Is there going to be something like this for Android/Eclipse?

On Sep 9, 7:44 am, Shazron <shaz...@gmail.com> wrote:
> 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/cbee723dd425909cd...
>
> 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.xco deproj',

Shazron

unread,
Sep 9, 2012, 4:16:16 AM9/9/12
to phon...@googlegroups.com
Not for 2.1. AFAIK nothing slated for the future - you could file a
feature request:
https://issues.apache.org/jira/browse/CB
> --
> -- You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com
>
> To compile in the cloud, check out build.phonegap.com
>
>

Shazron

unread,
Nov 28, 2012, 3:10:38 PM11/28/12
to phonegap
Run Xcode at least once to generate the Xcode prefs plist


On Wed, Nov 28, 2012 at 3:57 AM, Vladimir Stanković <svl...@gmail.com> wrote:
I have also problem compiling project 
This is my output


-------------------------------------BEGIN--------------------------------------
Inspecting project: /Users/zzz/dev/test-proj/testproj.xcodeproj/project.pbxproj


--------------------------------------------------------------------------------
Finding your project's sub-projects...

Sub-project: {'path': '../phonegap-phonegap-8a3aa47/lib/ios/CordovaLib/CordovaLib.xcodeproj', 'name': 'CordovaLib.xcodeproj', 'sourceTree': '<group>'}


--------------------------------------------------------------------------------
Inspecting your project's Build Settings...

Project :
{   'Debug': {   'ARCHS': '$(ARCHS_STANDARD_32_BIT)',
                 '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.3',
                 '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': '$(ARCHS_STANDARD_32_BIT)',
                   '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.3',
                   'OTHER_LDFLAGS': [   '-weak_framework',
                                        'CoreFoundation',
                                        '-weak_framework',
                                        'UIKit',
                                        '-weak_framework',
                                        'AVFoundation',
                                        '-weak_framework',
                                        'CoreMedia',
                                        '-weak-lSystem',
                                        '-all_load',
                                        '-Obj-C'],
                   'USER_HEADER_SEARCH_PATHS': ''}}
Targets :
{   'testproj': {   'Debug': {   'ARCHS': '(not found)',
                                 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
                                 'HEADER_SEARCH_PATHS': '(not found)',
                                 'IPHONEOS_DEPLOYMENT_TARGET': '4.3',
                                 'OTHER_LDFLAGS': '(not found)',
                                 'USER_HEADER_SEARCH_PATHS': '(not found)'},
                    'Release': {   'ARCHS': '(not found)',
                                   'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
                                   'HEADER_SEARCH_PATHS': '(not found)',
                                   'IPHONEOS_DEPLOYMENT_TARGET': '4.3',
                                   'OTHER_LDFLAGS': '(not found)',
                                   'USER_HEADER_SEARCH_PATHS': '(not found)'}}}


--------------------------------------------------------------------------------
Inspecting Xcode Preferences...

/Users/zzz/Library/Preferences/com.apple.dt.Xcode.plist: file does not exist or is not readable or is not a regular file
Traceback (most recent call last):
  File "diagnose_project", line 216, in <module>
    main(sys.argv)
  File "diagnose_project", line 157, in main
    xcodePrefsPlist = getXcodePlist(xcodeBinaryPrefsPath)
  File "diagnose_project", line 56, in getXcodePlist
    return plistlib.readPlist( tmpfile )
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plistlib.py", line 75, in readPlist
    pathOrFile = open(pathOrFile)
IOError: [Errno 2] No such file or directory: '/var/folders/Nz/NztTJ94ZGS8gWWrMbxhYHU+++TI/-Tmp-/tmpChe7MY.xml'
Reply all
Reply to author
Forward
0 new messages