commercetools/commercetools-ios-sdk

Generic parameter 'T' could not be inferred by jsonEncoder

kornerr opened this issue · 3 comments

Hi.

Xcode 9.3 can't build Commercetools 0.7.4:

.../Pods/Commercetools/Source/Commercetools.swift:144:43: error: generic parameter 'T' could not be inferred
        let jsonProfile = try jsonEncoder.encode(profile)
                                          ^

This is a minimal Xcode project with Commercetools pod only.

Changing public func signUpCustomer(_ profile: [String: Any] (in the same file) to public func signUpCustomer(_ profile: [String: String] fixes the error but I'm not sure if it's correct.

Thank you, the new 0.7.5 release will have latest Xcode support and some new API features incorporated. It will be in CocoaPods trunk in a day or two, and in the meantime you can specify master branch for Commercetools SDK in your podfile.

@kornerr try running pod repo update and then pod update to get the latest version of the SDK (0.7.5).

Let me know if this fixed your issue.

@nikola-mladenovic 0.7.5 works like a charm. Thanks.