Topic locked

Use Vuforia in Swift

September 8, 2014 - 2:00am #1

Heey guys,

 

I was wodering if there is any way to get Vuforia working in Swift for IOS

If I use a Bridging header and the header files i get these errors:

http://puu.sh/bquqU/0bc91ed551.png

This is a image with my error screen.

I don't know how to fix these errors.

 

I hope some of you can help me out to get Vuforia working in IOS.

Use Vuforia in Swift

October 20, 2014 - 9:49am #6

good to hear ;-)

Use Vuforia in Swift

October 20, 2014 - 9:47am #5

Xpento wrote:

AlessandroB wrote:

Hi, it should be possible to create a Swift projct with Vuforia; however the Vuforia and OpenGL (EAGLView etc.) code must remain in Objective-C / C++ as they are in our samples;

what you can do is to create multiple UI View Controllers and implement some of them in Swift (for example, one for the About Page, one for the Options menu, etc...)  and then have the AR OpenGL view controller (with Vuforia code) written in Objective-C and C++ / OpenGL.

Using a bridging header you can then "communicate" across different View Controllers (i.e. among different classes).

We have successfully tested this scenario and it worked for us (but there is no tutorial available at this time);

see also:

https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html#//apple_ref/doc/uid/TP40014216-CH10-XID_76

 

 

How do you get around the deployment target issue?

For my application the Vuforia libraries break when my deployment target is set above 6.1.

But the minimum for Swift is 7.0. Any help wo0uld be appreciated.

 

Cheers

 

This issue has been fixed (thanks Alessandro). See the thread: https://developer.vuforia.com/forum/ios/samples-targeting-ios8

Use Vuforia in Swift

October 17, 2014 - 6:00pm #4

AlessandroB wrote:

Hi, it should be possible to create a Swift projct with Vuforia; however the Vuforia and OpenGL (EAGLView etc.) code must remain in Objective-C / C++ as they are in our samples;

what you can do is to create multiple UI View Controllers and implement some of them in Swift (for example, one for the About Page, one for the Options menu, etc...)  and then have the AR OpenGL view controller (with Vuforia code) written in Objective-C and C++ / OpenGL.

Using a bridging header you can then "communicate" across different View Controllers (i.e. among different classes).

We have successfully tested this scenario and it worked for us (but there is no tutorial available at this time);

see also:

https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html#//apple_ref/doc/uid/TP40014216-CH10-XID_76

 

 

How do you get around the deployment target issue?

For my application the Vuforia libraries break when my deployment target is set above 6.1.

But the minimum for Swift is 7.0. Any help wo0uld be appreciated.

 

Cheers

Use Vuforia in Swift

October 7, 2014 - 11:07pm #3

Hi, it should be possible to create a Swift projct with Vuforia; however the Vuforia and OpenGL (EAGLView etc.) code must remain in Objective-C / C++ as they are in our samples;

what you can do is to create multiple UI View Controllers and implement some of them in Swift (for example, one for the About Page, one for the Options menu, etc...)  and then have the AR OpenGL view controller (with Vuforia code) written in Objective-C and C++ / OpenGL.

Using a bridging header you can then "communicate" across different View Controllers (i.e. among different classes).

We have successfully tested this scenario and it worked for us (but there is no tutorial available at this time);

see also:

https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html#//apple_ref/doc/uid/TP40014216-CH10-XID_76

 

Use Vuforia in Swift

October 7, 2014 - 3:49pm #2

You are going to have to wrap the C++ code in Objective-C wrappers as swift is unable to use C++ code.  

Topic locked