Live data from Hacker News

Swift 2 Apps in the App Store

developer.apple.com

11–20 of 33 posts

Re: Swift 2 Apps in the App Store

#12
post #6
post #4

Earlier quoted context omitted.

"Clean Build Folder" is basically the "turn it off, then turn it back on" of Xcode. Almost anytime you get a weird compiler error on a project that compiled fine moments ago, it's solved by "Clean Build Folder." Definitely a good trick to know.

Or for those who prefer automating, add this to ~/.bash_profile: alias nuke="rm -rf ~/Library/Developer/Xcode/DerivedData/"

I always advice people to put their DerivedData and build folder somewhere accessible. You can change it settings, don't use the default setting.

Re: Swift 2 Apps in the App Store

#13
post #6
post #4

Earlier quoted context omitted.

"Clean Build Folder" is basically the "turn it off, then turn it back on" of Xcode. Almost anytime you get a weird compiler error on a project that compiled fine moments ago, it's solved by "Clean Build Folder." Definitely a good trick to know.

Or for those who prefer automating, add this to ~/.bash_profile: alias nuke="rm -rf ~/Library/Developer/Xcode/DerivedData/"

That's pretty drastic. That nukes the derived data folder of all your Xcode projects. If you work on more than 1, using this to solve a problem in 1 will lead to needing to rebuild all of your projects. That seems a bit extreme for an issue in a single project.

Re: Swift 2 Apps in the App Store

#14

I ran the “Convert > To Latest Swift Syntax” on an app with about six view controllers, four views, a network service, and three cocoapods. It worked surprisingly well, most of the changes were really just suggestions ("this var something could be a let something"), small change to how NSData unwraps. I did have to guess around an obscure compile issue (solution: "Clean Build Folder"), but after that it was clear sai…

All uploaded builds of my iOS 9 content blocker, written in Swift 2 with Xcode 7 GM, were (and still are!) stuck "In Processing" on iTunes Connect.

I rewrote the extension in Objective C and uploaded another build, and after a few minutes, I was able to submit it to the App Store.

Just a random anecdote that made me go back into late adopter mode for the rest of the year. It's great that Swift mostly works, but I'm really scared of the times when it doesn't.

(Edit: Not just me - https://forums.developer.apple.com/message/50182#50182)

Re: Swift 2 Apps in the App Store

#15

I ran the “Convert > To Latest Swift Syntax” on an app with about six view controllers, four views, a network service, and three cocoapods. It worked surprisingly well, most of the changes were really just suggestions ("this var something could be a let something"), small change to how NSData unwraps. I did have to guess around an obscure compile issue (solution: "Clean Build Folder"), but after that it was clear sai…

That's a pretty small app. Sure, it's ready for smaller apps but, things aren't so great on larger scale apps.

Re: Swift 2 Apps in the App Store

#16
Here's my prediction : apple is currently working on a replacement framework for cocoa (at least uikit), that will be writen for swift first, taking advantage of its great special features.

My other guess is that it will come in time for ios 10 and be cross-platform ( aka work on mac os as well as ios).

I have absolutely zero inside info, but the fact is cocoa felts great and elegant on ios3 , but with all the latest additions it now starts to feel old and convoluted. Objective-c has been patched incredibly well but can only go so far, and the convergence of hardware between devices makes the distinction between computers and tablets more and more obsolete.

Re: Swift 2 Apps in the App Store

#17
post #16

Here's my prediction : apple is currently working on a replacement framework for cocoa (at least uikit), that will be writen for swift first, taking advantage of its great special features. My other guess is that it will come in time for ios 10 and be cross-platform ( aka work on mac os as well as ios). I have absolutely zero inside info, but the fact is cocoa felts great and elegant on ios3 , but with all the latest…

Plus, OSX needs a UIKit-style revival, especially with all the recent grumbling about the Mac App Store. Having just written an OSX app after doing UIKit for several years, it feels incredibly old and clunky in comparison. Even simple layer transform animations are for the most part unsupported!

Re: Swift 2 Apps in the App Store

#18
Swift 2 is fantastic except (har har) for exceptions. Optional has been hanging out, monad-y and all, since v1. Why not Result? You can't flatMap exceptions, and the Swift 2 implementation even throws away type data (or hides it, at least). Huh?

Re: Swift 2 Apps in the App Store

#19
post #8

If your Swift app is using SpriteKit it might take a little longer to get it ready for the App Store: https://forums.developer.apple.com/thread/17463 Apple really screwed up SpriteKit badly in the new version. I'm experiencing almost all of the problems mentioned in the forum.

I scanned the post and it seemed the issues are regardless of the language.

Re: Swift 2 Apps in the App Store

#20

I ran the “Convert > To Latest Swift Syntax” on an app with about six view controllers, four views, a network service, and three cocoapods. It worked surprisingly well, most of the changes were really just suggestions ("this var something could be a let something"), small change to how NSData unwraps. I did have to guess around an obscure compile issue (solution: "Clean Build Folder"), but after that it was clear sai…

I really like Swift too, but for serious usage, I find that it still gets kinda wonky in generics land. Also, not crazy about the fact that there's no such thing as abstract classes. A lot of iOS coding for me is stuff that builds on top of each other. You can subclass, but there's so many times when it's "all subclasses gotta just do this one or two things and base class can take care of rest." So what you do is define them in the base-class and throw "Must override" exception, but still, I wish this mechanic would somehow just get built-in.

Anyway, Swift is a great language though I don't mean to discredit it. It just doesn't take the spot of my #1 -- Scala. :)

Post reply on HN