Errors building Pod

I’ve been following the getting started page on the Spokestack website, but I have been having issues with building the pod.

The first thing I ran into is the pod file that is supplied by the getting started page doesn’t work because there is no version supplied for the TensorFlowLiteSwift module. Suggested by this error message:

- `TensorFlowLiteSwift` does not specify a Swift version and none of the targets (`Pods`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.

So I referred to another post on here that said the following worked for installing the packages

platform :ios, '13.0'

pre_install do |installer|
    installer.analysis_result.specifications.each do |s|
        if s.name == 'TensorFlowLiteSwift'
            s.swift_version = '5'
        end
    end
end

target 'spokestack-story' do
        pod 'Spokestack-iOS'
end

This allowed me to install the packages successfully, but after I tried to build it, I ran into this error that I cannot decipher, since the suggestion doesn’t seem to make since in context of the error. The following is the error:

    SpokestackDelegate.swift:66:11: error: 'optional' requirements are an Objective-C compatibility feature; add '@objc'
    @objc optional func didTrace(_ trace: String) -> Void
          ^
          @objc 
Command EmitSwiftModule failed with a nonzero exit code

Has anyone experienced this before? Is there any work arounds or suggestion on what to do?

1 Like

I also have bumped into this issue.