dropbox / SwiftyDropbox

Swift SDK for the Dropbox API v2.
MIT License
669 stars 207 forks source link

SwiftUI/iOS integration issue #420

Closed dfrl-dev closed 1 week ago

dfrl-dev commented 1 week ago

I'm running into an issue when following the SwiftUI test example:

No ObservableObject of type SceneDelegate found. A View.environmentObject(_:) for SceneDelegate may be missing as an ancestor of this view.

The examples are copied verbatim, minus the calls to TestData.swift, and use of the RunApiTests functions.

The only change I had to make was import UIKit within AppDelegate, otherwise all the classes prefixed with UI were not found.

Any clues why this would occur?

SwiftyDropbox v 10.0.2, iOS Deployment Target 17.2, Xcode Version 15.3 (15E204a)

dfrl-dev commented 1 week ago

User error.