Issues with the iOS SDK

I am trying to use the iOS mobile SDK but I am getting this error:

Failed to build module 'XPMobileSDK' from its module interface; the compiler that produced it, 'Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)'

My XCode version is 12.3 and Swift version is as above (5.3.2)

This also leads to a lot of errors as in the attached screenshot which all say:

‘X’ is not a member type of ‘XPMobileSDK’

Hello,

You should use the same Swift compiler version that was used to build the SDK (5.2.4).

You can switch the compiler without reinstalling XCode, from the Command Line tools setting in XCode preferences. Also described here: https://medium.com/xcblog/switching-swift-versions-inside-xcode-using-toolchains-755b28831c43

Hope this helps,

Plamen Parvanov

Perfect, now fixed - thanks.

May have jumped the gun there. Looks like there are two more issues now, firstly - when I build for simulator I guess this error immediately after it boots:

dyld: Symbol not found: _$ss17_EachFieldOptionsVMn
  Referenced from: /System/Library/Frameworks/Combine.framework/Combine
  Expected in: /Library/Developer/Toolchains/swift-5.2.4-RELEASE.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCore.dylib
 in /System/Library/Frameworks/Combine.framework/Combine

And secondly, when I try and build the app for a real device - I get the error:

The Swift standard library from the toolchain cannot be used on devices.
 
Select a macOS or simulator run destination instead, or use a different toolchain that only provides the compiler.

Additional to the above errors, I’ve also tried building this using Xcode 11.5 but that doesn’t support iOS 14 which is a requirement for my project unfortunately.

I don’t suppose the 2021 R1 release would include a SDK version that is built using the latest Xcode version?

Hi,

For 2021 R1 we will use a newer XCode version for sure (it will probably not be the very latest one at the time of release, but newer than the current one).

As for those errors, could you try using XPMobileSDK-iphoneos when building for a real device, and XPMobileSDK-iphonesimulator for the simulator?

(The XPMobileSDK should be able to work on both simulator and device, but maybe there is some issue with it )

Best regards,

Plamen Parvanov

Are you able to confirm whether the version of XCode that will compile the SDK in 2021 R1 version will support iOS 14?

I’ve tried doing that. The same errors apply.

Hello,

Yes, I can confirm that the next release of the SDK will support iOS14.

As for these errors, I’m not quite sure what’s causing them. We’ll try to reproduce them here.

Best regards,

Plamen Parvanov

Hello again,

it seems the Symbol not found error only happens on simulators running iOS14; could you try simulator with iOS13.7?

(You can download additional simulators from XCode preferences > Components)

Best regards,

Plamen Parvanov