0

I am a beginner of swift and started to create an image tracking AR app using Reality Composer and ARkit3.

I am trying to add scene made by Reality Composer to the example below. https://developer.apple.com/documentation/arkit/detecting_images_in_an_ar_experience

Drag and drop the .rcproject file in my Xcode project and add the code below, but the error occurs.

guard let anchor = try? MyProject.loadMyGreatScene() else { return }
arView.scene.anchors.append(anchor)

The stacktrace is as follows;

Build target ARKitImageDetection of project ARKitImageDetection with configuration Debug

RCProjectCodegen /Users/Kageori/Downloads/Pop.rcproject (in target 'ARKitImageDetection' from project 'ARKitImageDetection')
    cd /Users/Kageori/Documents/git/source/playground/AR-xcode
    /Applications/Xcode.app/Contents/Developer/usr/bin/rctool generate -o=/Users/Kageori/Library/Developer/Xcode/DerivedData/ARKitImageDetection-ahoeapgfbqqtzkftcohcfoohqffu/Build/Intermediates.noindex/ARKitImageDetection.build/Debug-iphoneos/ARKitImageDetection.build/DerivedSources/RCProjectGenerated/Pop /Users/Kageori/Downloads/Pop.rcproject --swift-version=4.0


error: unsupported swift version

I saw the following solution and fix Swift compiler language, but it has not been worked.
How to fix "SWIFT_VERSION '3.0' is unsupported, supported versions are: 4.0, 4.2, 5.0" error in Xcode 10.2?

What should I do to fix it?

Xcode Version: 11.3.1 (11C504)

  • What version of Xcode are you using? Can you change the Swift version in your target's settings? – Phillip Mills Jan 20 '20 at 21:45
  • I use Xcode Version 11.3.1 (11C504). Yes, I can and I tried. But the error still occured... –  Jan 20 '20 at 22:54
  • Are you using any package manager such as Cocoapods? – denis_lor Jan 21 '20 at 09:07
  • Yes, I use Cocoapods. –  Jan 21 '20 at 10:48
  • Maybe try to check the individual project (including the pod project targets) swift versions and see which one is not compatible? (Click each target and check the Swift Version under Build Settings) –  Jan 21 '20 at 16:20

0 Answers0