ENTRIES TAGGED "swift"

Multipeer Connectivity on iOS 8 with Swift

Discover, connect, and transmit data between devices.

portable_handsetMultipeer Connectivity is a means of identifying and connecting services together, and allows for very easy passing back and forth of data with minimal setup. If you are thinking that this seems similar to Bonjour, you are correct; however, Bonjour is for service discovery, not connection or transmission. Multipeer Connectivity handles everything in one neat package.

Multipeer Connectivity is comprised of a few different components, but it works by having applications advertise their services asking if anyone is available to connect. The service browser listens for these advertisements and can request to create a connection between the devices. If the connection is accepted, a session is created with every one inside the session being represented by a peer object.

To demonstrate how this works, we’ll make a simple chat application using Swift, Apple’s new language.

Read more…

Comment

New Swift language shows Apple history

Still reflects conventions going back to original adoption of Objective-C

A closer look at SwiftLike many Apple programmers (and new programmers who are curious about iOS), I treated Apple’s Swift language as a breath of fresh air. I welcomed when Vandad Nahavandipoor updated his persistently popular iOS Programming Cookbook to cover Swift exclusively. But I soon realized that the LLVM compiler and iOS runtime have persistent attributes of their own that have not gone away when programmers adopt Swift. This post tries to alert new iOS programmers to the idiosyncrasies of the runtime that they still need to learn.

Read more…

Comments: 3
Four short links: 9 September 2014

Four short links: 9 September 2014

Go Text, Science Consensus, Broadcast Fallacy, and In-Browser Swift

  1. bleveA modern text indexing library for go.
  2. Scientific Consensus Has A Bad Reputation—And Doesn’t Deserve It (Ars Technica) — a lovely explanation of how informal consensus works in science. NB for anyone building social software which attempts to formalise and automate consensus.
  3. TiVo Mega — 24TB of RAID storage, six tuners for capturing broadcasts. Which is rather like building the International Space Station and then hitching it to six horses for launch. Who at this point would make a $5k bet that everything you want to see on a TV will be broadcast by a cable company?
  4. runswift — an in-browser client for compiling and running basic Swift functionality.
Comments: 2
Four short links: 4 June 2014

Four short links: 4 June 2014

Swift on GitHub, HTTP APIs, PGP in Gmail, and Comments vs Community

  1. Swift on GitHub — watch a thousand projects launch.
  2. HTTP API Design Guideextracted from work on the Heroku Platform API.
  3. End-to-End PGP in Gmail — Google releases an open source Chrome extension to enable end-to-end OpenPGP on top of gmail. This is a good thing. As noted FSF developer Ben Franklin wrote: Those who would give up awkward key signing parties to purchase temporary convenience deserve neither.
  4. Close Your Comments; Build Your Community (Annemarie Dooling) — I am rarely sad when a commenting platform collapses, because it usually means the community dissolved long before.
Comment