titanium-sdk icon indicating copy to clipboard operation
titanium-sdk copied to clipboard

iOS: Xcode warnings

Open hbugdoll opened this issue 3 months ago • 0 comments

Introduction

Motivated by https://github.com/tidev/titanium-cli/issues/593 I took a closer look at the log messages during the build process (app build and SDK build).

Currently, almost all Xcode warnings end up at log level trace – there are quite a lot of them.
 I have marked the warnings in the SDK build, because they are (a little bit) less relevant. A normal user is more likely to use a compiled/published SDK version.

The following list is intended as an overview and will be continuously updated.


Not conform to protocol warnings (-Wprotocol)

  • https://github.com/tidev/titanium-sdk/issues/14286

May not respond to warnings

  • [ ] TiFile to open: in iphone/Classes/FilesystemModule.m
  • [ ] TiUIClipboardProxy to initWithProperties: in iphone/Classes/UIModule.m
  • [ ] TiUIView to setBorderRadius_: in iphone/Classes/TiUIiOSBlurView.m

Class method not found warnings (-Wobjc-method-access)

  • [ ] +appIdentifier in iphone/Classes/AppModule.m
  • [ ] +_startActivity: in iphone/Classes/TiAppiOSActivityAttributesProxy.m
  • #14298
    • [x] SDK build: +resourceBasedURL:baseURL: in iphone/TitaniumKit/TitaniumKit/Sources/API/ScriptModule.m

Instance method not found warnings (-Wobjc-method-access)

  • [ ] -fireEvent:withObject: in iphone/Classes/TiUIWebView.m
  • [ ] -addEventListener: in iphone/Classes/TiUIWebView.m
  • [ ] -removeEventListener: in iphone/Classes/TiUIWebView.m
  • [ ] -isFunction in iphone/Classes/TiNetworkBonjourServiceProxy.m
  • #14298
    • [x] SDK build: -JSValueInContext: in iphone/TitaniumKit/TitaniumKit/Sources/API/KrollModule.m
    • [x] SDK build: -applyProperties: in iphone/TitaniumKit/TitaniumKit/Sources/API/TiProxy.h

Incompatible pointer types warnings (-Wincompatible-pointer-types)

  • [ ] JSValue * vs. NSString * in iphone/Classes/TiUIClipboardProxy.m
  • [ ] NSArray * vs. NSDictionary * in iphone/Classes/TiUIShortcutItemProxy.m
  • [ ] PlatformModule * vs. TiProxy * in iphone/Classes/PlatformModule.m
  • [ ] TiDatabaseProxy * vs. TiProxy * in iphone/Classes/TiDatabaseProxy.m
  • [ ] TiProxy * vs. TiUIClipboardProxy * in iphone/Classes/UIModule.m
  • #14298
    • [x] SDK build: JSValueRef * vs. JSValueRef _Null_unspecified in iphone/TitaniumKit/TitaniumKit/Sources/API/TiBlob.m
    • [x] SDK build: CAShapeLayer * vs. CALayer * in iphone/TitaniumKit/TitaniumKit/Sources/API/TiUIView.m

Missing selector name warnings (-Wmissing-selector-name)

  • [ ] newValue in iphone/Classes/TiUITextWidgetProxy

Multiple methods named found warnings (-Wobjc-multiple-method-names)

  • [ ] contentOffset in iphone/Classes/TiUITextArea.m

Auto property synthesis will not synthesize warnings (-Wobjc-protocol-property-synthesis)

  • [ ] socket in iphone/Classes/TiNetworkBonjourServiceProxy.m

Receiver is a forward class and corresponding interface may not exist warnings (-Wreceiver-forward-class)

  • #14298
    • [x] SDK build: TiHost in iphone/TitaniumKit/TitaniumKit/Sources/API/ScriptModule.m

Receiver type warnings (-Wreceiver-expr)

  • #14298
    • [x] SDK build: NSUncaughtExceptionHandler * in iphone/TitaniumKit/TitaniumKit/Sources/API/TiExceptionHandler.m

Enumeration value not handled in switch warnings (-Wswitch)

  • #14298
    • [x] SDK build: TiBlobTypeSystemImage in iphone/TitaniumKit/TitaniumKit/Sources/API/TiBlob.m

Unused variable warning (-Wunused)

  • #14313
    • [x] SDK build: sharedAnalytics in iphone/TitaniumKit/TitaniumKit/Sources/API/KrollBridge.m

No assign, retain, or copy attribute warnings (-Wobjc-property-no-attribute)

  • TBA...

Loosed integer precision warnings (-Wshorten-64-to-32)

  • TBA...

Parameter not found in the function declaration warning (-Wdocumentation)

  • #14313
    • [x] SDK build: {BOOL}, {NSInteger} and deployTime in iphone/TitaniumKit/TitaniumKit/Libraries/APSAnalytics/APSAnalytics.h

Marked with deprecated command but no deprecation attribute warning (-Wdocumentation-deprecated-sync)

  • #14313
    • [x] SDK build: sendCrashReport() and others in iphone/TitaniumKit/TitaniumKit/Libraries/APSAnalytics/APSAnalytics.h

Deprecation warnings (-Wdeprecated-declarations & -Wdeprecated-implementations)

  • TBA...

Conditional compilation flags do not have values in Swift warnings

  • #14352
    • [ ] SDK build: SWIFT_ACTIVE_COMPILATION_CONDITIONS in iphone/iphone/Titanium.xcodeproj/project.pbxproj

Linker warnings

  • https://github.com/tidev/titanium-sdk/issues/14285

Destination warnings Using the first of multiple matching destinations

  • https://github.com/tidev/titanium-sdk/pull/14349
    • [x] running xcodebuild clean from iphone/cli/commands/_build.js
    • [x] SDK build: running xcodebuild archive from iphone/TitaniumKit/TitaniumKit/Scripts/build-universal-framework.sh and support/iphone/build_titaniumkit.sh

hbugdoll avatar Sep 26 '25 15:09 hbugdoll