代码之家  ›  专栏  ›  技术社区  ›  Lydon Ch

PhoneGap生成错误

  •  0
  • Lydon Ch  · 技术社区  · 15 年前

    我是PhoneGap的新手,在编译捆绑phoneGap.xcodeProject时遇到了这些错误。 我使用的是OSX 10.6.2和Xcode 3.1.3

    我错过了什么?

    多谢 唐

    Building target “PhoneGap” of project “PhoneGap” with configuration “Debug” — (5 errors, 3 warnings)
    gap-phonegap-80458a0/iphone/build/Debug-iphonesimulator/include -I/Users/lydonchandra/Documents/phonegap-phonegap-80458a0/iphone/build/PhoneGap.build/Debug-iphonesimulator/PhoneGap.build/DerivedSources/i386 -I/Users/lydonchandra/Documents/phonegap-phonegap-80458a0/iphone/build/PhoneGap.build/Debug-iphonesimulator/PhoneGap.build/DerivedSources -include /var/folders/o+/o+iwoDblFHa23jj9u8xkm++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/PhoneGap_Prefix-hacookbrellaoddmixprvtxegbot/PhoneGap_Prefix.pch -c Location.m -o /Users/lydonchandra/Documents/phonegap-phonegap-80458a0/iphone/build/PhoneGap.build/Debug-iphonesimulator/PhoneGap.build/Objects-normal/i386/Location.o
    Location.m: In function '-[Location hasHeadingSupport]':
    Location.m:33: warning: 'CLLocationManager' may not respond to '-headingAvailable'
    Location.m:33: warning: (Messages without a matching method signature
    Location.m:33: warning: will be assumed to return 'id' and accept
    Location.m:33: warning: '...' as arguments.)
    Location.m: In function '-[Location startHeading:withDict:]':
    Location.m:123: warning: 'CLLocationManager' may not respond to '-startUpdatingHeading'
    Location.m: In function '-[Location stopHeading:withDict:]':
    Location.m:136: warning: 'CLLocationManager' may not respond to '-stopUpdatingHeading'
    Location.m: In function '-[Location locationManager:didUpdateHeading:]':
    Location.m:151: error: request for member 'timestamp' in something not a structure or union
    Location.m:154: error: request for member 'magneticHeading' in something not a structure or union
    Location.m:154: error: request for member 'trueHeading' in something not a structure or union
    Location.m:154: error: request for member 'headingAccuracy' in something not a structure or union
    Build failed (5 errors, 3 warnings)
    
    1 回复  |  直到 15 年前
        1
  •  0
  •   bbum    15 年前

    是否安装了最新的iPhone开发工具包?如果您使用的是Xcode3.1,我相信您不会这样做;3.2及更高版本是当前的版本。

    Location.m:33: warning: 'CLLocationManager' may not respond to '-headingAvailable'
    

    具体来说,这表明 CLLocationManager 没有 -headingAvailable 方法。iPhoneOS3.0中添加了这种方法。因此,我敢打赌您已经安装了2.x系列的dev工具包?