I'm battling with the import and it would be great to have the basics covered
I'm also finding difficult to access the WTFeatures bit mask from Swift as enums/options don't have values in Swift
Thanks a lot
Franck
A
Andreas Schacherbauer
said
about 8 years ago
Hi Franck, Currently we don't have any Swift related samples, but I found some information on how to transfer enums/options from ObjC into Swift. I'm sorry that you have to do this by yourself, but we currently don't have a Swift API. However you can write an augmented reality related view controller in ObjC and use this VC in your Swift project.
Maybe this NSHipster article helps you integrating our ObjC API into your Swift project
Best regards
Andreas
F
Franck Horlaville
said
about 8 years ago
Thanks Andreas,
I have managed to build the first sample in Swift, will post it to GitHub shortly and will add a link here.
:-)
A
Andreas Schacherbauer
said
about 8 years ago
That sounds great! THX!
We will add Swift support as soon as it becomes more relevant and the tools support is acceptable.
Best regards
Andreas
M
Matthew Short
said
about 8 years ago
Frank,
I'm building out a Swift version as well and I think I've got everything configured. I can debug through Safari and see that the js files are loading up and my WTArchitectViewDelegates are firing but my camera never loads and the isRunning flag never seems to update even after a call to my architect view's start() function.
I've tested the wtc file in the SDKs example code and it works just fine. Did you have this problem at all?
A
Andreas Schacherbauer
said
about 8 years ago
Hi Matthew, Sounds like you missed to set the OTHER_LINKER_FLAG -ObjC!?
Best regards
Andreas
M
Matthew Short
said
about 8 years ago
Thanks Andreas, that was the missing piece to get my architectView running but after the wikitude logo appears it fades away to a black screen. Any places I should look for the camera feed not loading? My understanding from the docs is that calling start() should activate the camera etc. In the Obj-C example demo i'm not seeing any explicit user call to set up the feed.
A
Andreas Schacherbauer
said
about 8 years ago
Hi Matthew, A black camera usually means that you did not authorized access to the camera. Please check your iOS Privacy settings regarding camera access for your application in the iOS Settings App.
Best regards
Andreas
M
Matthew Short
said
about 8 years ago
My problem ended up being because I was trying to programmatically add my WTArchitectView. I fixed the problem by adding it as a subview in Interface Builder and then created an Outlet.
A
Andreas Schacherbauer
said
about 8 years ago
Hi Matthew, Thanks for sharing your finding! I'm still a little bit surprised that it works with IB but not when programatically adding the WTArchitectView as a subview. If you want, you can send me a demo project that reproduces the problem and I have a look at it. Once we officially support Swift, I will definetly have a look at your problem.
Best regards
Andreas
M
Matt DeBoard
said
almost 8 years ago
Andreas,
I have been working on this project as well with Swift. I modeled my view controller after the one found here. (Whoops, this repo is private)
However I too am getting this black screen. When I look at the Debug View Hierarchy, I see that some of the web content does appear to be rendering, but it's "hidden" behind the WTArchitectLicenseView. I suspect it may have something to do with the constraints being set, maybe? I'm not entirely sure. But I would really appreciate some help on this as I am definitely 100% stuck without some help.
Thanks,
Matt
Y
Yash Jain
said
over 7 years ago
Hi,
Can someone share a simple example to use Wikitude SDK with swift. If possible please share Git link.
yunas qazi