Skip to content

Investigate and clean up iOS native code quality #215

@robert-northmind

Description

@robert-northmind

Description

During the SPM migration work (#189), we fixed several Swift compiler warnings to get a clean pod lib lint run. Some of the fixes revealed deeper code quality concerns that warrant a dedicated investigation.

Areas to investigate

  • AppStart.swift — dead code in getAppStartDuration(): Lines 51–54 compute values that are immediately discarded. The function returns a duration computed via sysctl, while a second (unused) computation based on ProcessInfo.systemUptime is left dangling. Verify the sysctl-based approach is correct and remove the dead code.

  • AppStart.swiftgetAppStartEndMillis() return type: Returns Double? but the backing field appStartEndMillis is a non-optional Double (initialized to 0.0). The optional return type is misleading.

  • FaroPlugin.swift — unused variables in getMemoryUsage case: A CACurrentMediaTime() call result and an empty [String] array are created but never used.

  • CrashReportingIntegration.swift — unused jsonString: A JSON string is constructed but never used.

  • General: Review all iOS native code for correctness, remove dead code, and ensure consistent code style.

Context

These issues are pre-existing and were not introduced by the SPM migration. They were surfaced by compiler warnings during pod lib lint.

Related: #189, #35

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions