OneBusAway / onebusaway-ios

OneBusAway for iOS, written in Swift.
Other
82 stars 33 forks source link

Upgrade to FloatingPanel 2.0 #301

Closed aaronbrethorst closed 1 year ago

aaronbrethorst commented 4 years ago

https://github.com/SCENEE/FloatingPanel/releases/tag/2.0.0

aaronbrethorst commented 4 years ago

Punting on this for now. I'm getting a build error with no clear resolution:

OBAKit.framework/Headers/OBAKit-Swift.h:193:9: Module 'FloatingPanel' not found
Could not build Objective-C module 'OBAKit'

We don't need to upgrade for now. It's just a nice to have. Hopefully this'll get worked out either in the SPM tooling or on the FloatingPanel side before we actually need to upgrade.

ualch9 commented 2 years ago

Punting on this for now. I'm getting a build error with no clear resolution:

OBAKit.framework/Headers/OBAKit-Swift.h:193:9: Module 'FloatingPanel' not found
Could not build Objective-C module 'OBAKit'

We don't need to upgrade for now. It's just a nice to have. Hopefully this'll get worked out either in the SPM tooling or on the FloatingPanel side before we actually need to upgrade.

This is caused by conflicting SPM package, OneSignal. I fixed it by removing OneSignal from the project, but that's not a permanent solution. @aaronbrethorst do you have any ideas why this may be the case?

aaronbrethorst commented 2 years ago

Not a clue @ualch9, but that’s a good catch. Did you happen to look through the OneSignal issues tracker? I wonder if anyone there’s ever seen something similar.

ualch9 commented 2 years ago

The build system is exporting OBAKit's dependence on FloatingPanel because we export MapViewController, which conforms to FloatingPanelControllerDelegate. Making MapViewController not public fixes this problem.


When building OneBusAway, this is the compile error:

image

Looking at OneSignalPushService.swift, when we are trying to build OneBusAway, it's failing to import OBAKit because it could not find one of its dependencies.

image

Jumping to OBAKit-Swift.h, it is suspicious as to why we are requiring FloatingPanel for OBAKit users.

@import CoreFoundation;
@import CoreLocation;
@import Foundation;
@import MapKit;
@import MessageUI;
@import FloatingPanel;     👈❓❓
@import OBAKitCore;
@import ObjectiveC;
@import StoreKit;
@import UIKit;

Building fails because OneBusAway itself does not depend on FloatingPanel. Removing OneSignal was a solution because OneSignalPushService.swift is the only file in OneBusAway that imports OBAKit-Swift.h.

Not sure why this only started appearing after upgrading FloatingPanel to 2.0...