I wanted to let you know that with our new SDK 7 we
have included Swift support. You can find more information on "How to
use the Wikitude Native SDK in Swift" in this documentation section. You can also download the Native SDK 7 from our Download page that contains Swift example.
Thanks Eva
K
Kwame Boateng
said
about 8 years ago
Anyone?
K
Kwame Boateng
said
about 8 years ago
Franck?!
K
Kwame Boateng
said
about 8 years ago
Hi Franck, could you post a link to your swift implementation of the Wikitude SDK. Will be of great help.
Thanks in advance
F
Franck Horlaville
said
about 8 years ago
Hi all, sorry for not responding earlier - I got pulled off to other projects and then for some weird reason didn't notice the message thread. I'll come back as soon as I can.
Apologies,
Franck
A
Andreas Schacherbauer
said
about 8 years ago
Hi Yash, Currently we don't have any example using Swift. My advice would be to use an ObjC view controller when using the Wikitude SDK.
Best regards
Andreas
Y
Yash Jain
said
about 8 years ago
Hi,
Can someone share a simple example to use Wikitude SDK with swift. If possible please share Git link.
Thanks in advance,
Yash
M
Matt DeBoard
said
almost 9 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
A
Andreas Schacherbauer
said
almost 9 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
Matthew Short
said
almost 9 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
almost 9 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
almost 9 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
almost 9 years ago
Hi Matthew, Sounds like you missed to set the OTHER_LINKER_FLAG -ObjC!?
Best regards
Andreas
M
Matthew Short
said
almost 9 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
almost 9 years ago
That sounds great! THX!
We will add Swift support as soon as it becomes more relevant and the tools support is acceptable.
yunas qazi