Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Swift for iOS/Mac Example

Rank

Total Posts: 6

Joined 2015-03-13

PM

So, realizing that there were no responses to my previous question regarding problems building with the FIT static library in Xcode with any Swift code included (cf. Problems with FIT SDK in an Xcode Swift Project) ,

I'm posing another question, more specifically to the ANT folks to ask that they consider including a Swift example in subsequent SDKs. It appears — within the OSX development world, including Apple — that Swift is now the preferred language over Objective-C, certainly over C++ for modern development on both OSX and iOS. A simple Swift example, or even building a static library in Swift, would be a great way to keep FIT modern.

To anyone who is curious why this all came up, I haven't — after a few days of trying — managed to get the exampleios code to build with a trivial Swift file included in the exampleios project. I'd be grateful if anyone has any suggestions or clues as to how to do this. I even made a movie of the problem/pain — Vimeo link is below. I believe this is either an Xcode configuration issue, or perhaps it's "impossible" because of language incompatibilities (despite examples and arguments that these kinds of language-mixings should work.)

https://vimeo.com/205082135

For the time being, I very painfully created a woefully incomplete FIT file decoder in Swift.

Julian      
RankRank

Total Posts: 34

Joined 2013-01-28

PM

For anyones future reference, please see: https://www.thisisant.com/forum/viewthread/6697/ for how we worked around this issue working with Swift and Objective-C.