- Objective-C is not dead, it’s awesome, it’s a lovely language but you just won’t find a job if stick to it.
- Daniel misses the Objective-C’s
*in Swift. Because that way he knows that something is (or isn’t) a reference type. He also misses header files because those are nice overviews of what he can call in a certain class. Otherwise, he loves Swift. - Context is important in code. If you would want to get
timeIntervalUntilNowyou need the inverse oftimeIntervalSinceNowbecause the latter would return a negative number. Just putting a-in front of it somewhere is bad, because there’s no context. Wrapping it in a method,-is okay to put there. That provides context. SotimeIntervalUntilNowwould just return-timeIntervalSinceNow. - Translating things from Objective-C to Swift is not thinking in Swift. Thinking in Swift doesn’t mean monads, map, flatmap, reduce and all the haskell stuff.
- If you use protocols, like
SequenceTypeyou get a lot
- Is on the raywenderlich.com team. Monthly newsletter, iOS animation by email.
- Animation calls on iOS are really easy. Lots of people feel like they will pick up animation along they. But then they don’t and they go to stack overflow and they pick up a bloated framework and everything is bloated and ugly and not how it has to be at all. These 3rd party libraries are slow, underperforming and way to heavy.
- The best way to learn about animation is by experimenting. There’s not many APIs so it isn’t super complicated to do that. Three steps:
- Get to know your APIs
- Try different properties
- Try new layers Many people don’t really discover all this which is partially Apple’s fault because they don’t supply the best docs on this.
UIView.animateWithDuration(…something…), in this method there’s spring APIs. Damping and initialSpringVelocity. Velocity is hard to explain. It represents the speed that the object init
- Amazing talks by Andy Matushak (Controlling complexity in Swift & Making friends with value types) made her dive into value types more. Every time she made a value type she needed to subclass and she turned out using a class anyway. Then the talk about POP at WWDC 2015 happened. “Swift is protocol-oriented programming language” -Dave Abrahams.
- The power of protocols is know to most because of stuff like
UITableViewDataSource,UITableViewDelegateand more. These patterns are beautiful and we all love them. But at work it’s hard to suddenly transition to a new paradigm. - Reading: MVVM in Swift. MVVM is all about abstracting model, formatting and other data related things out of your ViewController. View models are very testable and clean. The view controller should keep track of the view model state. When view models are static the view controller will determine what is displayed to the user, the view m
- “The best apps are created by constant experimentation and tweaking.” You have to touch the app, play with it and iterate over your design. Just using Sketch won’t do. Designers ask for tweaks all the time, changing colors, corners, icons and tweaking animations is the kind of thing that’s important. But constantly having a designer ask about that is annoying.
- So, what if the designer could actually get their designs into the app on their own. That would mean.. that the designer has to touch code?.. Ew! That won’t turn out well. Experimentation time!!
- Explaining how to use Xcode to a designer can be very complicated. Showing them how to use
images.xcassetsis a no-brainer. Designers know how drag&drop works so that’s all fine. The next step is to allow the designer to change a label here and there.@IBDesignableis a great tool for that. If you combine that with@IBInspectablethe designer can change a lot of aspects for a button or
- Topcoder breaks problems down in smaller challenges. They propose these challenges to their community to see how the community would architect or solve the problem at hand. All these crowdsources solutions are actually composed into a real application that, for example is used by NASA astronauts in space.
- Topcoder is all over the world, there are almost 900.000 people working together and a couple of million dollars are payed out to the community. You can work on a lot of different problems, platforms and languages.
- When a challenge is created the team decides on a spec and a price. Then a couple of people can compete and the winner is payed the most. Second and third place are also payed. So it’s attractive to compete. In late 2014 they came up with the challenge to build Pong in Swift, it had to be unique and fun and you could win $750. In 5 days there were actual ideas built and submitted. Every submission gets a review so you know how your code can
- Nikita is a developer at Facebook working on the Parse SDK
- Parse is ±730 source files over 51000 lines of code, 150 Classes/Protocols and 2 people working on it. It’s one of the biggest, most advanced SDKs on the platform. It powers over 800 million active app-device pairs (july 2015). Internally Parse uses promises for asynchronous operations. It’s dependencies are loaded lazily. It’s written in Objective-C, works in Swift.
- Promises are used to handle errors, deal with chaining, cancellation and serial/parallel work. Parse implements Bolt.framework to use promises. Normally you would use a function with a completion handler. If you would chain this you have to duplicate your error handling, you would drift right and code becomes messy. With Bolts you return a
BFTask, if an error happend you return aBFTaskwith an error, otherwise you return your data. - Parse uses Instance vs Controller vs State.
- Instance -> public API, Immutable state
- Stat
- BLE (Bluetooth Low Energy) is the only way to communicate with devices without pairing at all. You can read and write some data without even taking your phone out of your pocket. During the talk we will investigate a running app that allows people to make some data available across runners. This includes things like username, heart rate, distance, elevation etc. Also, this will be platform agnostic.
- You use a Peripheral, this will advertise some services. Heart rate and run. The information that these Peripherals publish are called characteristics. Setting up a Peripheral requires a delegate and some options. This allows the PeripheralManager to run in the background. When the manager calls
didUpdateStatewe know if the user has bluetooth enabled and we can ask them to turn it on. Then we calladdService, you pass that a new service and you add characteristics. (CBMutableServiceandCBCharacteristics). Bluetooth is unstable and if you don
- In 2010 ING started doing mobile banking, they focussed on the iPhone. Koen was the only developer and his task was to make the best experience. But they were missing something, they forgot about the iPad. The iPad was added as a last minute decision so they had to hire more people. And with that, the first technical dept was introduced. In the end they were pretty happy with the universal app.
- And then Swift came out, ING had a huge Objective-C codebase but they wanted to adopt it regardless of all the SourceKit crashes. So they started doing new features in Swift.
- Out came the watch, and notification center widgets, and Apple TV. But they weren’t ready to support that.. they couldn’t securely reuse a lot of their code. Because ING is a bank everything has to be super secure and opening up the app to different targets was a big problem.
- Not just the problem is big but also the ING app is big. There’s almost 1.000.000 lines of code, > 40 developers and over
- Anastasia didn’t know much about security until she contributed to an open source crypto library. But, at the end of the day she still was a developer writing responsive apps. Security shouldn’t get in the way of that.
- When two people are talking they might not want other to hear them. In the real world you would walk somewhere where nobody can hear or see you. The solution is usually very intuitive. In the computer world this isn’t possible, the solution isn’t intuitive.
- Apple wrote a security guide, but who reads that? They say every app is a potential target, your customers property and your own reputation are at stake.
- The most vulnerable part of data is when it’s in motion. Data in memory is protected by the OS, data in Storage can be encrypted. In between we’re vulnerable.
- When you’re sending data over plain HTTP it’s really easy to steal. HTTPS makes this a lot harder. From a hacker’s perspective a lot of protection measures look like pu
- When the rumours about writing apps for Apple TV people said they were just web-apps using a silly html-like language. Then tvOS came out and we had TVML and UIKit. This made it easy for existing apps to be ported and web-developers could use TVML to make simple apps.
- On tvOS you can use the top shelf to display some of your content.
- The focus engine is a nice effect but it might be hard to see what’s selected. You have to wiggle your thumb and see what part moves. An example is the Air b&b app.
- Putting content in the top shelf is done with an extra top shelf provider target.
- There is no persistent storage next to
NSUserDefaults. No data is guaranteed to be stored. The maximum cache size is 200MB. You have to useCloudKit. - Missing frameworks are
HealthKit,CoreMotion,ContactsandAccounts. What’s weird is thatHomeKit,MapKit,ReplayKitandVideoToolboxare missing. Seems like apple really wants this to be a consumer device. Webkitis