Swift Package Manager - Speech dependency not loading





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







2















I'm encountering an issue creating a Swift Package for my project. I have CocoaPods and Travis CI running and both are working swimmingly, however I now intend to also offer the project through the Swift Package Manager. This is where I'm running into issues. My package file is looking like the following:



// swift-tools-version:4.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Voxosonus",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "Voxosonus",
targets: ["Voxosonus"]),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "Voxosonus",
path: "Voxosonus"),
.testTarget(
name: "VoxosonusTests",
dependencies: ["Voxosonus"],
path: "VoxosonusTests"),
]
)


However when I run swift build I encounter the following:



/Users/<hidden>/Documents/Projecten/Voxosonus/Voxosonus/SpeechRecognizer.swift:8:8: error: no such module 'Speech'
import Speech


My question is - why is it unable to find the 'Speech' module? This is core functionality from Apple themselves and so far the internet has made me none the wiser. Some details on the project:



Build target: iOS 12.x



macOS: 10.14



Swift Version: 4.2.1










share|improve this question

























  • Maybe the Voxosonus package isnt written in Swift 4.2..

    – Jonathan
    Jan 3 at 10:44











  • Except it is because if not the Travis CI build and the CocoaPods would not work - which they do. Also in the Voxosonus.xcodeproj file, the swift compiler is set to version 4.2.

    – Veraduxxz
    Jan 3 at 12:01


















2















I'm encountering an issue creating a Swift Package for my project. I have CocoaPods and Travis CI running and both are working swimmingly, however I now intend to also offer the project through the Swift Package Manager. This is where I'm running into issues. My package file is looking like the following:



// swift-tools-version:4.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Voxosonus",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "Voxosonus",
targets: ["Voxosonus"]),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "Voxosonus",
path: "Voxosonus"),
.testTarget(
name: "VoxosonusTests",
dependencies: ["Voxosonus"],
path: "VoxosonusTests"),
]
)


However when I run swift build I encounter the following:



/Users/<hidden>/Documents/Projecten/Voxosonus/Voxosonus/SpeechRecognizer.swift:8:8: error: no such module 'Speech'
import Speech


My question is - why is it unable to find the 'Speech' module? This is core functionality from Apple themselves and so far the internet has made me none the wiser. Some details on the project:



Build target: iOS 12.x



macOS: 10.14



Swift Version: 4.2.1










share|improve this question

























  • Maybe the Voxosonus package isnt written in Swift 4.2..

    – Jonathan
    Jan 3 at 10:44











  • Except it is because if not the Travis CI build and the CocoaPods would not work - which they do. Also in the Voxosonus.xcodeproj file, the swift compiler is set to version 4.2.

    – Veraduxxz
    Jan 3 at 12:01














2












2








2








I'm encountering an issue creating a Swift Package for my project. I have CocoaPods and Travis CI running and both are working swimmingly, however I now intend to also offer the project through the Swift Package Manager. This is where I'm running into issues. My package file is looking like the following:



// swift-tools-version:4.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Voxosonus",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "Voxosonus",
targets: ["Voxosonus"]),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "Voxosonus",
path: "Voxosonus"),
.testTarget(
name: "VoxosonusTests",
dependencies: ["Voxosonus"],
path: "VoxosonusTests"),
]
)


However when I run swift build I encounter the following:



/Users/<hidden>/Documents/Projecten/Voxosonus/Voxosonus/SpeechRecognizer.swift:8:8: error: no such module 'Speech'
import Speech


My question is - why is it unable to find the 'Speech' module? This is core functionality from Apple themselves and so far the internet has made me none the wiser. Some details on the project:



Build target: iOS 12.x



macOS: 10.14



Swift Version: 4.2.1










share|improve this question
















I'm encountering an issue creating a Swift Package for my project. I have CocoaPods and Travis CI running and both are working swimmingly, however I now intend to also offer the project through the Swift Package Manager. This is where I'm running into issues. My package file is looking like the following:



// swift-tools-version:4.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Voxosonus",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "Voxosonus",
targets: ["Voxosonus"]),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "Voxosonus",
path: "Voxosonus"),
.testTarget(
name: "VoxosonusTests",
dependencies: ["Voxosonus"],
path: "VoxosonusTests"),
]
)


However when I run swift build I encounter the following:



/Users/<hidden>/Documents/Projecten/Voxosonus/Voxosonus/SpeechRecognizer.swift:8:8: error: no such module 'Speech'
import Speech


My question is - why is it unable to find the 'Speech' module? This is core functionality from Apple themselves and so far the internet has made me none the wiser. Some details on the project:



Build target: iOS 12.x



macOS: 10.14



Swift Version: 4.2.1







swift swift4 swift4.2 swift-package-manager






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 3 at 10:41







Veraduxxz

















asked Jan 3 at 10:30









VeraduxxzVeraduxxz

427




427













  • Maybe the Voxosonus package isnt written in Swift 4.2..

    – Jonathan
    Jan 3 at 10:44











  • Except it is because if not the Travis CI build and the CocoaPods would not work - which they do. Also in the Voxosonus.xcodeproj file, the swift compiler is set to version 4.2.

    – Veraduxxz
    Jan 3 at 12:01



















  • Maybe the Voxosonus package isnt written in Swift 4.2..

    – Jonathan
    Jan 3 at 10:44











  • Except it is because if not the Travis CI build and the CocoaPods would not work - which they do. Also in the Voxosonus.xcodeproj file, the swift compiler is set to version 4.2.

    – Veraduxxz
    Jan 3 at 12:01

















Maybe the Voxosonus package isnt written in Swift 4.2..

– Jonathan
Jan 3 at 10:44





Maybe the Voxosonus package isnt written in Swift 4.2..

– Jonathan
Jan 3 at 10:44













Except it is because if not the Travis CI build and the CocoaPods would not work - which they do. Also in the Voxosonus.xcodeproj file, the swift compiler is set to version 4.2.

– Veraduxxz
Jan 3 at 12:01





Except it is because if not the Travis CI build and the CocoaPods would not work - which they do. Also in the Voxosonus.xcodeproj file, the swift compiler is set to version 4.2.

– Veraduxxz
Jan 3 at 12:01












1 Answer
1






active

oldest

votes


















1














As explained in the Swift Package Manager Github, you can't define the target platform of a Swift Package yet:




At this time there is no explicit support for depending on UIKit,
AppKit, etc, though importing these modules should work if they are
present in the proper system location. We will add explicit support
for system dependencies in the future. Note that at this time the
Package Manager has no support for iOS, watchOS, or tvOS platforms.




So when you are try to build the library with Xcode (or with the swift build command), the compiler can't find the Speech module because it is only available on iOS 10+.



You can check this github project (swift-package-manager-ios) which provides a ruby script that modify the xcodeproj generated by the Swift Package Manager by adding the necessary information in order to build for the iOS platform.






share|improve this answer



















  • 1





    Thank you - I'll have a look at this solution, although it seems to me that with that information, the Swift Package Manager and it's support is something that can wait for the foreseeing future if this is the case so I'll leave it be for now.

    – Veraduxxz
    Jan 4 at 12:42











  • Yes for the moment SPM is mainly designed for the Linux support. I hope it'll support iOS in the next version...

    – Yannick Loriot
    Jan 4 at 22:42












Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54020478%2fswift-package-manager-speech-dependency-not-loading%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














As explained in the Swift Package Manager Github, you can't define the target platform of a Swift Package yet:




At this time there is no explicit support for depending on UIKit,
AppKit, etc, though importing these modules should work if they are
present in the proper system location. We will add explicit support
for system dependencies in the future. Note that at this time the
Package Manager has no support for iOS, watchOS, or tvOS platforms.




So when you are try to build the library with Xcode (or with the swift build command), the compiler can't find the Speech module because it is only available on iOS 10+.



You can check this github project (swift-package-manager-ios) which provides a ruby script that modify the xcodeproj generated by the Swift Package Manager by adding the necessary information in order to build for the iOS platform.






share|improve this answer



















  • 1





    Thank you - I'll have a look at this solution, although it seems to me that with that information, the Swift Package Manager and it's support is something that can wait for the foreseeing future if this is the case so I'll leave it be for now.

    – Veraduxxz
    Jan 4 at 12:42











  • Yes for the moment SPM is mainly designed for the Linux support. I hope it'll support iOS in the next version...

    – Yannick Loriot
    Jan 4 at 22:42
















1














As explained in the Swift Package Manager Github, you can't define the target platform of a Swift Package yet:




At this time there is no explicit support for depending on UIKit,
AppKit, etc, though importing these modules should work if they are
present in the proper system location. We will add explicit support
for system dependencies in the future. Note that at this time the
Package Manager has no support for iOS, watchOS, or tvOS platforms.




So when you are try to build the library with Xcode (or with the swift build command), the compiler can't find the Speech module because it is only available on iOS 10+.



You can check this github project (swift-package-manager-ios) which provides a ruby script that modify the xcodeproj generated by the Swift Package Manager by adding the necessary information in order to build for the iOS platform.






share|improve this answer



















  • 1





    Thank you - I'll have a look at this solution, although it seems to me that with that information, the Swift Package Manager and it's support is something that can wait for the foreseeing future if this is the case so I'll leave it be for now.

    – Veraduxxz
    Jan 4 at 12:42











  • Yes for the moment SPM is mainly designed for the Linux support. I hope it'll support iOS in the next version...

    – Yannick Loriot
    Jan 4 at 22:42














1












1








1







As explained in the Swift Package Manager Github, you can't define the target platform of a Swift Package yet:




At this time there is no explicit support for depending on UIKit,
AppKit, etc, though importing these modules should work if they are
present in the proper system location. We will add explicit support
for system dependencies in the future. Note that at this time the
Package Manager has no support for iOS, watchOS, or tvOS platforms.




So when you are try to build the library with Xcode (or with the swift build command), the compiler can't find the Speech module because it is only available on iOS 10+.



You can check this github project (swift-package-manager-ios) which provides a ruby script that modify the xcodeproj generated by the Swift Package Manager by adding the necessary information in order to build for the iOS platform.






share|improve this answer













As explained in the Swift Package Manager Github, you can't define the target platform of a Swift Package yet:




At this time there is no explicit support for depending on UIKit,
AppKit, etc, though importing these modules should work if they are
present in the proper system location. We will add explicit support
for system dependencies in the future. Note that at this time the
Package Manager has no support for iOS, watchOS, or tvOS platforms.




So when you are try to build the library with Xcode (or with the swift build command), the compiler can't find the Speech module because it is only available on iOS 10+.



You can check this github project (swift-package-manager-ios) which provides a ruby script that modify the xcodeproj generated by the Swift Package Manager by adding the necessary information in order to build for the iOS platform.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 3 at 17:05









Yannick LoriotYannick Loriot

6,37622851




6,37622851








  • 1





    Thank you - I'll have a look at this solution, although it seems to me that with that information, the Swift Package Manager and it's support is something that can wait for the foreseeing future if this is the case so I'll leave it be for now.

    – Veraduxxz
    Jan 4 at 12:42











  • Yes for the moment SPM is mainly designed for the Linux support. I hope it'll support iOS in the next version...

    – Yannick Loriot
    Jan 4 at 22:42














  • 1





    Thank you - I'll have a look at this solution, although it seems to me that with that information, the Swift Package Manager and it's support is something that can wait for the foreseeing future if this is the case so I'll leave it be for now.

    – Veraduxxz
    Jan 4 at 12:42











  • Yes for the moment SPM is mainly designed for the Linux support. I hope it'll support iOS in the next version...

    – Yannick Loriot
    Jan 4 at 22:42








1




1





Thank you - I'll have a look at this solution, although it seems to me that with that information, the Swift Package Manager and it's support is something that can wait for the foreseeing future if this is the case so I'll leave it be for now.

– Veraduxxz
Jan 4 at 12:42





Thank you - I'll have a look at this solution, although it seems to me that with that information, the Swift Package Manager and it's support is something that can wait for the foreseeing future if this is the case so I'll leave it be for now.

– Veraduxxz
Jan 4 at 12:42













Yes for the moment SPM is mainly designed for the Linux support. I hope it'll support iOS in the next version...

– Yannick Loriot
Jan 4 at 22:42





Yes for the moment SPM is mainly designed for the Linux support. I hope it'll support iOS in the next version...

– Yannick Loriot
Jan 4 at 22:42




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54020478%2fswift-package-manager-speech-dependency-not-loading%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith

How to fix TextFormField cause rebuild widget in Flutter