Skip to content

Commit

Permalink
added carplay guide page & minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Archdoog committed Nov 26, 2024
1 parent af638ce commit cc5e595
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 1 addition & 5 deletions apple/Sources/FerrostarCarPlayUI/CarPlayNavigationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public struct CarPlayNavigationView: View, SpeedLimitViewHost,

userLayers = makeMapContent()
self.navigationCamera = navigationCamera
// TODO: Correct me
// TODO: This needs to be instantiated differently to make use of the CarPlay ferrostarCore environment object.
// currentRoadNameView = AnyView(CurrentRoadNameView(currentRoadName: ferrostarCore.state?.currentRoadName))
}

Expand All @@ -70,10 +70,6 @@ public struct CarPlayNavigationView: View, SpeedLimitViewHost,
}
.navigationMapViewContentInset(.landscape(within: geometry))
}
// .task {
// try! await Task.sleep(for: .seconds(10))
// camera = .center(.init(latitude: 37.131726, longitude: -122.031790), zoom: 10)
// }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extension UIHostingController where Content: View {
/// Create a SwiftUI view in a UIHosting controller with a closure init.
///
/// - Parameter content: The convent view builder.
convenience init<V: View>(@ViewBuilder content: () -> V) where V == Content {
convenience init<V>(@ViewBuilder content: () -> V) where V == Content {

Check warning on line 9 in apple/Sources/FerrostarCarPlayUI/Extensions/UIHostingControllerInit.swift

View workflow job for this annotation

GitHub Actions / test (FerrostarCore-Package, platform=iOS Simulator,name=iPhone 16 Pro,OS=18.1)

same-type requirement makes generic parameters 'V' and 'Content' equivalent; this is an error in the Swift 6 language mode

Check warning on line 9 in apple/Sources/FerrostarCarPlayUI/Extensions/UIHostingControllerInit.swift

View workflow job for this annotation

GitHub Actions / test (FerrostarCore-Package, platform=iOS Simulator,name=iPhone 16 Pro,OS=18.1)

same-type requirement makes generic parameters 'V' and 'Content' equivalent; this is an error in the Swift 6 language mode
self.init(rootView: content())
}
}
Expand Down
1 change: 1 addition & 0 deletions guide/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- [Jetpack Compose](./jetpack-compose-customization.md)
- [Android Foreground Services](./android-foreground-service.md)
- [Web](./web-customization.md)
- [iOS CarPlay](./ios-carplay.md)

# Contributor Guide

Expand Down
5 changes: 5 additions & 0 deletions guide/src/ios-carplay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CarPlay on iOS

CarPlay is currently a work in progress that you can see in the demo app.

- [Apple - Using the CarPlay Simulator](https://developer.apple.com/documentation/carplay/using-the-carplay-simulator)

0 comments on commit cc5e595

Please sign in to comment.