There are a few new features you may want to develop for, like multitasking on iPad, App Search, and App Thinning. This year’s release of iOS is mostly focused on stability and maintenance. Now if statements and for loops get to use pattern matching just like switch statements. Use pattern matching in if clauses and for loops And if you want to use a new API when your app is running on a new version of the OS, you can use the new built-in availability checking that allows you to perform those checks much more safely. I’m glad Swift 2.0 will address this problem with a compiler error. I don’t even want to think about how many times I shipped an app in Objective-C that crashed for my users because I used an API that was unavailable on the version of iOS they were running. When you try to use an API that’s not available on the OS version you’re targeting, you’ll get a compiler error telling you the API is unavailable. Get compiler errors when using APIs that are too new for the target OSįinally. Here’s some sample code from Apple’s Swift site: func loadData() throws Ħ. It looks to me like this will no longer be necessary with Swift 2.0 – instead, we’ll be throwing and catching errors with try, catch, and throws, similar to the way we handle errors in other languages. The caller can then inspect the Result and see whether it was a Success or Failure and then do something with it. Up to now, my approach has been to return a Result type from methods that may succeed or fail. Handle errors with try, catch, and throws Here are some of the new things you’ll be able to do with it: 5. I’m super excited for it, and I think it’s awesome that Apple will be open-sourcing it later this year. One of the biggest features of Xcode 7 is Swift 2.0. I’m hopeful that it’ll help me to write better tests that cover more of the production code base. It’s 2015, and Apple finally has a comparable code coverage tool built in to Xcode. When I was doing Java development in 2008, we used a code coverage tool to show us how much of our production code was tested, and it had plugins for our IDE and CI server. Xcode 7 improves unit testing with code coverage reports. See what code is tested by your unit tests with code coverage (Personally, I’ve never been a fan of the OS X menubar app you need to install to get Crashlytics to work.) 4. Maybe – just maybe – you’ll be able to get away with using the built-in tools instead of having to add yet another framework to your app. If you’re using or considering a crash reporting solution like Crashlytics or HockeyApp, you might want to try out Xcode’s new crash reporting tools first to see if it provides what you need. View and debug crash reports right inside of XcodeĬrashes from your App Store and TestFlight users now show up right inside of Xcode for you, and you can jump directly to the line that’s causing the crash. It certainly looks promising, and I’m hopeful that this makes it easier to lay out views. From the Platforms State of the Union talk, it looks a bit like a layout manager that allows you to stack views vertically or horizontally. The new stack views in Interface Builder allow you to group views together so constraints can be automatically added, meaning less layout code for you. Group views together with stack views in Interface Builder and have constraints added automatically Hopefully Xcode 7 lives up to its promise so we can more easily build and run apps on device. I’m always struggling with provisioning profiles and code signing and all that stuff just to get my app running on my iPhone. Simply sign in with your Apple ID, and turn your idea into an app that you can touch on your iPad, iPhone, or Apple Watch. Xcode 7 and Swift now make it easier for everyone to build apps and run them directly on their Apple devices. Install apps on device easily with just an Apple ID If you do have time to watch a few videos, I’d recommend these:īut assuming you’re busy and can’t spend hours watching videos… Below are some of the cool new things Apple announced that you can use to build better apps as you’re developing for iOS. If you don’t have time to watch the all the WWDC 2015 videos to find out what’s happening with Xcode 7, Swift 2.0, and iOS 9, read on for a quick summary of what you – as an iOS developer – need to know from WWDC this year. Or: How Xcode 7, Swift 2.0, and iOS 9 can help you build better iOS apps
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |