Recent problems using Xcode as editor with Kitura-based packages

Hi-- I've recently been having some difficulties with using Xcode with some of my Kitura-based packages. I recently reported this here https://stackoverflow.com/questions/65452179/xcode-giving-cannot-find-type-type-in-scope-errors-with-swift-package on Stackoverflow. But I'm starting to wonder if may be related to some recent changes in Kitura packages.

In addition to the issue I reported on Stackoverflow, I just updated another package to latest versions:


and get the same errors occurring. For example:
/Users/chris/Desktop/NewSyncServer/ServerGoogleAccount/Sources/ServerGoogleAccount/GoogleCreds.swift:45:28: Cannot find type 'AccountAPICall' in scope
/Users/chris/Desktop/NewSyncServer/ServerGoogleAccount/Sources/ServerGoogleAccount/GoogleCreds.swift:45:44: Cannot find type 'Account' in scope
/Users/chris/Desktop/NewSyncServer/ServerGoogleAccount/Sources/ServerGoogleAccount/GoogleCreds.swift:72:23: Cannot find type 'AccountDelegate' in scope
/Users/chris/Desktop/NewSyncServer/ServerGoogleAccount/Sources/ServerGoogleAccount/GoogleCreds.swift:73:36: Cannot find type 'AccountCreationUser' in scope
/Users/chris/Desktop/NewSyncServer/ServerGoogleAccount/Sources/ServerGoogleAccount/GoogleCreds.swift:80:63: Cannot find type 'AccountDelegate' in scope
/Users/chris/Desktop/NewSyncServer/ServerGoogleAccount/Sources/ServerGoogleAccount/GoogleCreds.swift:90:58: Cannot find type 'AccountHeaders' in scope

This package does build under Ubuntu.

Is anyone else also using Xcode to edit their Kitura-based server-side packages and recently running into issues?

Thanks so much for the continued support of Kitura!

Solved. Entirely my bad. Nothing to do with Kitura. I was missing:

            swiftSettings: [
                // So I can do basic development and editing with this on Mac OS. Otherwise if some dependent library uses this it will not get Account related code. See Account.swift.
                .define("SERVER", .when(platforms: [.macOS], configuration: .debug)),
            ]),

in a dependently package :).

Nice that you solved it! Entirety off-topic:

Looks like you have this code project on your Desktop. Did you know that if you create a folder called Developer in your home directory, macOS will render a special Xcode hammer icon next to it! This pretty common for us devs on macOS to use that directory, I mean look at that hammer! :heart_eyes:

2 Likes

Nice! Thanks :)

Terms of Service

Privacy Policy

Cookie Policy