Get Started         Best Practices         Developer Guide         FAQ        
Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

import CraftAR to swift

Maksim Mar 10, 2018

Tell me please how to import the project objective-c in swift. I always get the error "No such module 'CraftAROnDeviceRecognitionSDK'".

Bridging-Header connected:
#import <CraftAROnDeviceRecognitionSDK / CraftARSDK.h>
#import <CraftAROnDeviceRecognitionSDK / CraftARProtocols.h>
#import <CraftAROnDeviceRecognitionSDK / CraftARCloudRecognition.h>
#import <CraftAROnDeviceRecognitionSDK / CrsConnect.h>

As soon as I access from the swift file import CraftAROnDeviceRecognitionSDK, I get an error. Thanks for the help.

( Agent )
Alex Campayo

Mar 14, 2018

Hello Maksim,

First of all, could you check if the following files are linked to your project?

- CraftAROnDeviceRecognitionSDK.framework
- CraftARResourcesODIR.bundle
- Pods.framework

And then, try to replace your imports for the following ones in your Bridging-Header file:

#import <CraftAROnDeviceRecognitionSDK/CraftARSDK.h>
#import <CraftAROnDeviceRecognitionSDK/CraftARProtocols.h>
#import <CraftAROnDeviceRecognitionSDK/CraftARCloudRecognition.h>
#import <CraftAROnDeviceRecognitionSDK/CrsConnect.h>

It looks like the SDK is not imported or linked properly.



0 rated

Mar 17, 2018

Hello Alex,

File: Bridging-Header.h (not error)


#ifndef Bridging_Header_h
#define Bridging_Header_h

#import <CraftARAugmentedRealitySDK/CraftARCollectionManager.h>



The project is created on Swift. Libraries are added according to the instructions and in the file Bridging-Header.h - there are no errors.
Next, I want to make the import into the AppDelegate file and get an error
import CraftARAugmentedRealitySDK (There is no such module 'CraftARAugmentedRealitySDK')

I also tried

import CraftARCollectionManager, but I get the same error.

Thanks for the help.
0 rated

Mar 17, 2018

I figured out my question. There is no need to do "import" in swift files. Please document this somewhere for people like me :)
0 rated
( Agent )
Alex Campayo

Mar 19, 2018

Hello Markism,

Yes, you’re right, there is no need to do import of the library “CraftARAugmentedRealitySDK” in swift files. You only need to do import of the CraftAR’s headers you need for your implementation in your “Bridging_Header” file.

If you need anything else don’t hesitate to contact us.



0 rated

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Couldn't find what you were looking for?
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found