Showing posts with label Apple. Show all posts
Showing posts with label Apple. Show all posts

Reznor Helms New Beats 1 Radio Launch; Brings Listeners Closer To God

And you can have it all.  His empire of...well, a lot more than dirt.  Nine Inch Nails frontman Trent Reznor wants to help music fans find new artists to aurally appreciate, as well as enjoy classics, with the new Beats 1 radio program by Apple...

Despite previous claims, his intent is neither to let you down, nor to make you hurt.
(Image courtesy knowyourmobile.com.)

Watch Out: Apple Watch 2.0 Already In The Works

Time flies, and technological pertinence flies with it.  Since the launch of the much-lauded Apple Watch brought the fans out in force for the treasured timepieces this year, it has been revealed that Apple is already working on their new-and-improved 2016 model.

Ready for round two, Apple lovers?
(Image courtesy nymag.com.)


Way To Go: New Apple Maps Launch To Include Public Transit, Indoor Maps & More Flyovers

It's a feature that has benefited humanity tremendously since its inception, and now, it's even more comprehensive.  Apple Maps is upgrading their app to include subways, trains, new flyover views, and even robotically-determined floorplans inside of buildings.

Plot your commute or view your dream vacation, all in the palm of your hand.
(Image courtesy technewstoday.com.)


Clock 'N Roll: It's Almost Time For The Apple Watch!

Heads up...the next shiny chunk of future is about to fall of the tech tree and land on your wrist.  The much-heralded Apple Watch will go on sale next Friday, April 10th...

Anything with "space" in the color title has got to be interesting.
(Image courtesy macrumors.com.)

I Only Have i's For You: Is The Apple Watch The Fruit Of All Knowledge? (iGadgetry Release, Part Two)

The gods have spoken, the skies have parted, and the now-immortal Apple Watch has descended from the heavens to grace your wrist like a miracle on a (obviously customizable and interchangeable) watch strap.  Your precious iShinything will never be more than a glance away.

As reported by theverge.com, Apple's Tim Cook describes the watch as a "comprehensive health and fitness device" - that's right, the damn doodad could change you from slacker to lip-smacker.  Chart your heart rate or sleeping habits and monitor other fitness stats like steps taken and calories burned (so you can learn exactly how much better it is for you to walk to Dunkin' Donuts instead of drive.)  It'll even warn you if you've been sitting too long.  Yes, the brilliant Apple Watch can function as your mom, telling you to go outside.

The innovative Taptic Engine can tell the difference between a tap and a press (called "Force Touch", which sounds like the Apple Watch maybe wants to be mounted to a leather bondage cuff), allowing for your fondling to give it extra special commands (effectively recreating the "right click" element of a mouse...or a particularly sensitive wrist-mounted love slave.)

The input mechanics offer a Digital Crown that enables zooming, scrolling, and navigation, sans obstruction of the main display.  The display itself is a flexible Retina panel, laminated to the popular high-end watch covering of sapphire crystal.  The Guardian UK reports some neat variations on the watch's style, among other things.

Siri's there (that bitch is everywhere...she'll buzz your wrist and tell you where to turn.)  Maps are there.  Tunes are there.  Obviously.  It also has Bluetooth to beam your soundtrack to other devices around you.

Onboard Facebook, Twitter, email, blah blah blah.  What about something NEW?  How about Apple Pay, which acts like a credit card that only requires a touch of the watch to receptive payment systems?  You're like a sultan - simply grab and item and touch the till on your way out - those organic apples are now yours, sans any unnecessary human interaction.

Fascinatingly, the Apple Watch can be charged inductively, meaning you don't need to plug it in.  This development will likely spur on other breakthroughs for technology that was formerly required to be wired.

Oh, and it tells time to a universal standard.  So you know exactly how much of it you've been wasting, messing around with your aggravatingly awesome new Apple Watch.

How else are you supposed to tell time in the future?

BTW, this is what some of the rest of the world looks like, in case you stop noticing.

I Only Have i's For You: Apple Unveils Latest iGadgetry (Part One)

It's like Christmas for the computer crowd.  Today, Apple is releasing not only their sixth and latest version of the iPhone, but also a rumored iWatch product that will make its popular technology more portable (because you weren't dithering with enough iSchwag already.)  Here are some of the new features you get to enjoy while phasing out all of humanity around you.

-According to the telegraph.co.uk, the iPhone has been hailed as "the world's most popular camera."  The iPhone 6 will now feature advanced image stabilization with exceptional low-light capabilities (for all those various and vilifying bar images that you'll end up deleting lest they end up on social media.)

-The camera also has the capacity to shoot at 240 frames per second, making it all the more easy to be extraordinarily creepy as you sneak photos of hotties on the subway.

-The 8-megapixel camera has "focus pixels", which are extra important to help make sure all your illicit imagery is crystal clear - your nudie-questing hackers will thank you.

-An integrated M8 motion chip and barometer work in conjunction with a new onboard health app or Nike's fitness app to maybe someday give you all sorts of data on the exercise you swear you'll do tomorrow.

-Worldwide cell service providers have teamed up to make your iPhone 6 able to complete calls over any 4G network, voice-over-LTE, and voice-over-WiFi.  Every single person at the NSA was reported to be seen malevolently drumming their fingers together and orgasmically murmuring, "Exxxcellent."

-Onscreen multi-tasking, because god forbid your ADD not get its fix.  Also, double the transistors of the iPhone 5 (2 BILLION!) making a 25% faster CPU and 50% faster graphics.  MORE CAT GIFS.  RIGHT NOW.  FASTER.  MORE.

-A record-breaking size:  6.5 mm of sleek sexy slimness, because even if Americans can't be svelte, our tech toys can be!

-Oh, and 1.3 million apps.  No big deal.  We've come a long way since phones only carried onboard Snake.  Is there a modern Snake app to be had, for old time's sake?  Maybe some Tetris?  This technological whirlwind shouldn't eradicate the simpler elegances of life.  WAIT A SECOND, IT PLAYS GAMES IN HIGHER RESOLUTION THAN CONSOLES.  SCREW SNAKE AND THOSE STUPID RUSSIAN BRICKS.

Pre-sale starts Friday, plebes.  Too bad you weren't in the line outside the Apple store in NYC.  It started last week.

Once rumors of the fabled "iWatch" wearable are confirmed, more information will be posted here.  Watch (iWatch?) this space.

That's evolution, baby.










Tutorial: A Simple iOS Stopwatch App in Swift

In this tutorial, we will create a single view iOS application using the Swift programming language. The tutorial will provide some insight into basic usage of the Apple Xcode integrated programming environment, as well as the model/view/controller software architectural pattern. Our target audience are people who have some prior experience in application development and programming but who are relatively new to Xcode and iOS development. The project goal is to build a simple iOS stopwatch-style timer application designed for iPhone using Swift.

The app will contain two labels (one for our title and one for our numeric timer display), and two buttons (a start/stop button, and a reset button). We will first lay out our main view, which will contain these elements and then use the interface builder (i.e. storyboard) to hook our view into the controller (IBOutlets and IBActions). Finally, we will turn to the business logic of the app. In the end, we will have two imports and a view controller. We will add three methods to the view controller class: two actions methods and one helper method. The tutorial will be broken down into a series of just over thirty steps with screen caps to provide a quick visual aid.

The first thing you'll need to do, if you haven't already, is download the latest version of Xcode 6 (currently in beta as of this writing). If you are completely new to Xcode, you may find it difficult to navigate the interface. There are tons of great guides to Xcode that can be found online such as this one.

On initial startup, Xcode will present you with its ‘Welcome’ screen and offer several options. Select the “Create a New Xcode Project” panel from the window (see figure 1). If it does not present you with this screen, select File->New->Project from the menu bar.

Figure 1
On the following screen, select “Single View Application” and press the “Next” button (see figure 2).

Figure 2

Next, choose the options for your new project (see figure 3) and fill in the necessary fields as you wish, ex. project and organization names, and select “iPhone” as the device, since we are creating an iPhone app.

Figure 3
The following screen will then prompt you to provide a destination directory for your project. I like to keep current projects in a folder on my Desktop. There is also an option on the bottom of the screen to place your project under source control. If you don’t know what source control is or how to use it, then simply uncheck this box. (However, it is highly recommended that you invest some time learning about source control systems such as git.) Click “Next” once you have made your selections.

Your project should have opened to a screen similar to the one in figure 4.

Figure 4
From the device dropdown menu, located in the upper left corner, select iPhone 5s (notice also the other options that could have been selected here if we were planning to create a different app). See figure 5.

Figure 5

Now that we have our project’s initial setup completed, let’s get down to business! From the Project Navigator, select the Main.storyboard file. See figure 6.

Figure 6
In the Storyboard, select any view, then go to the File Inspector in Xcode’s right panel. Uncheck “Use Size Classes”, and you will be asked to keep size class data for: iPhone/iPad. Then click the “Disable Size Classes” button. Doing this will make the storyboard’s view automatically size with the selected device. See figure 7.

Figure 7
In the top left corner of Xcode, locate the “Play” button and press it to build and run your project for the first time. See figure 8. Upon a successful first launch of the project, you should see something like the image in figure 9, an iOS simulator. If you get any errors and the project does not build correctly, read the error report(s) carefully and see if you can troubleshoot the problem.


From the Object Library toward the bottom of the right panel in Xcode, select Label (figure 10) and then drag and drop it at the left style guide, but vertically centered into your single storyboard scene/view. See figure 11. The style guides are temporary visual placement lines that appear as you position view elements into your scene. This label will eventually provide the numeric display of our running stopwatch.

Figure 10

Figure 11

In order to make the label wider, we will select and drag the trailing edge of our Label element to the right of your scene until it meets the right most style guide. See figure 12.

Figure 12
From the Attribute Inspector panel in the right panel of Xcode, toggle the text alignment to center so our text appears in the middle of the label. See figure 13.

Figure 13
Go back to the object library and place two Buttons equally spaced apart about midway between the label and the bottom of our scene. See figure 14. These will function as our reset button and our start/stop button on the stopwatch.

Figure 14

From the Size Inspector in Xcode’s right panel change, the width of each button to 60 points. See figure 14.1.

Figure 14.1
Run your project to see what it looks like. Again, if you get any errors and the project does not build correctly, read the error report(s) carefully and see if you can troubleshoot the problem.

Select the Assistant Editor from the top right corner of Xcode to display the storyboard and associated Swift file side-by-side. Now hide both the Navigator and Utilities panels by clicking on the appropriate panel buttons in the top right corner of Xcode. See figure 15.
Figure 15
Now let’s connect up our storyboard elements to our controller, which will connect our interface to our code, that way all the relevant interface elements can communicate events to the controller.

Place your mouse pointer over the Label; then press and hold the control button while clicking and holding down your mouse button as you pan your mouse pointer across the screen and into the right side of Xcode where your Swift file is located. You should see a blue line follow your mouse pointer. See figure 16.

Figure 16

Once in the class area, as shown, release the mouse button and the control as well.  You will see a dialogue box prompting you for the name of your outlet. Name it ‘numericDisplay’. See figure 17. This will add the necessary outlet code to your Swift controller class. An outlet is a reference pointer to an element inside your storyboard. Creating outlets allows for easy access to objects in your storyboard. After naming the outlet, your screen should look like figure 18.

Figure 17


Figure 18

Go ahead and connect the buttons as outlets as well. Name the left button ‘resetButton’ and the right button ‘startStopButton’.

In a similar fashion to the newly created outlets, we will now create action methods for each button. This time we will drag the blue line toward the bottom of the file but inside the class body. Name the left button resetButtonPressed and startStopButtonPressed for the right button. In the dialog box, make sure you select 'Action' from the Connection drop down menu. See figure 19. Action methods are the functions in your class that get messaged/called when the button that is associated with the connected method is triggered by an event. An event is initiated when the user interacts with any of your buttons.
Figure 19
Your interface should now look like the screencap in figure 20.

Figure 20

To accurately update our numeric display label, we need to tie it in to a mechanism that will update at very precise time intervals. To access this functionality, we need to import the appropriate class library. From Xcode’s menu bar, select the Window tab drop down menu then select Documentation and API Reference. See figure 21. The documentation search window should appear. In the search bar type CADisplayLink and locate the appropriate documentation. Read through the documentation and familiarize your self with the CADisplayLink class. This class is very useful when your code needs precise timing control.

Figure 21

Notice that the CADisplayLink requires the QuartzCore framework. A framework is a set of classes with predefined functionality so that you don’t have to reinvent the wheel; it's code packaged for re-use, so use it!  With Swift you no longer need to define an interface(.h) and an implementatin(.m) file to define a class which is nice. Also, when importing different frameworks into your project you no longer have to go Xcode's build setting and explicitly add that framework; it automatically loads when you use the keyword import followed by the desired framework like so: import {SomeFramework} but without the curly braces.  And my favorite addition is the fact that semicolons are no longer required! WhooHoo! There are also a ton of outher features of Swift that I have yet to discover. In your ViewController.swift file add the line of code importing QuartzCore:


Importing a framework into your file gives you access to its classes and functionality. In your ViewController class, add the following var properties just below the @IBOutlet properties. Add the code in lines 5 and 6 below:



‘var’ is short for variable and displayLink is our object pointer of type CADisplayLink. We use this pointer to hold a strong reference to an instantiated CADisplayLink object that we will create in a few moments. We want a strong reference to an instance of CADisplayLink to be able to access it throughout the various parts of our class. We also define a lastDisplayLinkTimeStamp of type CFTimeInterval. This variable will store a running tally of the total elapsed time.

Now let’s set the default view element values for our numeric display label and our two buttons. Add the code below to our viewDidLoad() method:



In your viewDidLoad() method now add the lines of code from the snippet below:



The first new line of code above (line 16) creates an instance of a CADisplayLink object, and assigns this class, i.e. “self,” as the target for messages that inform us of a display refresh rate update. This occurs in the first parameter of the CADisplayLink(<first parameter>, <second parameter>) method call. In the second parameter we pass the name of the method that we would like to be called when there is a display refresh rate update. We will define this method shortly. The second new line of code (line 9) ensures that the display link does not begin its updates until we press the Start button in our user interface. The third new line of code (line 12) schedules the display link to begin sending notifications to our instance method about display refresh rate updates. The fourth new line of code (line 15) simply initializes our elapsed time running tally variable.

The next step is to define the method that will be called when the display link has an update. Add this code to the bottom of the viewController.swift class, i.e. inside the final class curly brace:



Now for the logic—we are almost there! In the newly created function add the following lines of code:



The first new line of code (line 3) updates our running tally. The second (line 6) formats our running tally into a string that only shows the last two significant digits. The third (line 9) updates our numeric display label.

Let’s move over to the startStopButtonPressed(…) method. This method is called anytime the user presses the button situated to the right in our stop watch scene. When this button is pressed we want to toggle the display link’s “paused” Boolean value. Add the following line of code to this method.



At this point you can run your project and press the start button to see your stop watch in action! Woohoo! Again, if you get any errors and the project does not build correctly, read the error message(s) carefully and see if you can troubleshoot the problem.

Let’s shift our focus to the Reset button. What do you think this button should logically do? It should pause the display link to prevent it from  sending us any further updates, then set the numeric display label to zero, and update our Start/Stop button state. In the resetButtonPressed(…) method add the following lines of code:



Let’s now complete our code project by adding the last few lines of code for our Start/Stop button. In startStopButtonPressed(…) add the code in bold:



Our label text string will not be modified if our code does not fall through our first conditional if statement. If, however, the display link is paused, then we check the running display link tally. If this tally is greater than zero, then we display the resume button since pressing this button again will not reset our running tally. If it’s equal to zero then we display the start text. The button text is set in the last line of code.

Your final ViewController file should look like this.

Finally, let’s add a title label. Go back to the main storyboard. From the object list at the bottom of the File Inspector in the right pane of Xcode, drag a Label to the center/top of your main view. Size it as you like, and provide it with a text title such as “Stopwatch”.  The final product should look something like the three screencaps below, showing the default, running and paused states:

Default State



Running

Paused

And that concludes our simple Stopwatch app tutorial! We leave you off with a question for further reflection.  Notice that our chronometer output is not formatted for standard time. Our implementation increments our minor units, values to the right of the decimal point, from .00 to .99 before increasing the the major unit by one. Although this is a correct unit of measurement, it is not in the ubiquitous standard time format. In the standard format the minor unit, a.k.a the second, is incremented from .00 to .59 before the next major unit, i.e. a minute, is increased by one. Since there are many ways to implement this, some being more efficient than others, we leave this consideration to the reader as an exercise. Post your own solution below. And, as always, feedback, suggestions, and angry tirades are welcome in the comments.

This project can be found on GitHub.

The Stopwatch app and tutorial was originally authored by Stefan Agapie, a Senior iOS Software Engineer, and then adapted for the present piece.

Apple Responds to Claims of Backdoor in iOS Devices

 Just in case you were still wondering if your devices are secure.  From The Next Web:
Apple has published new information about the diagnostic capabilities of iOS, in what appears to be a response to suggestions that it includes a ‘backdoor’ that could enable governments and other third-parties to access user data.

The controversy arose after security consultant Jonathan Zdziarski documented a vulnerability that could leave usage data on iOS device exposed. Rebutting subsequent reports that linked the vulnerability with government data collection, Apple told iMore that it has “has never worked with any government agency from any country to create a backdoor in any of our products or services.” . . .

Following his initial findings, Zdziarski has been in contact with Apple. Citing the company’s response to his claims, he said that he “doesn’t buy for a minute that these services are intended solely for diagnostics.” That’s to say that he found the type of data available to the diagnostics services to be “of an extreme personal nature,” which seemed out of place given the focus.
For all you folks out there who "have nothing to hide", I suppose you have nothing to be afraid of.  But in that case, feel free to leave your bank account information in the comments!

Pirate Box: A Simple LAMP Stack Live Server Build

I first came across the PirateBox DIY project late last year, and thought it would be fun to set one up, but I didn’t really have an idea of where it could be put to good use. And then one day it hit me. I'm in a band and we play shows fairly regularly here in NYC. After shows people often ask if they can download any of our songs online (which, of course, they can), or they want to share pics they took during the set, or they want to get in touch with us and need our contact info, and so on. So I thought, hey, I’ll set up a Pirate Box for the band and run it as a live server during shows, and then people could share pics with us and one another directly, download songs directly from us rather than through an online middleman, get general info about the band, upcoming shows and so on.

I began hunting on Craig’s List for an appropriate router to install the PirateBox ISO, but had no luck. Being the impatient type, I broadened my search criteria and found someone selling an old Mac Mini for $50. Perfect. That weekend, I went to a local flea market and picked up a cheap soho router and some cables for another $10, and set to work.

Because of some apparent incompatibilities between the PirateBox ISO and the Mac Mini hardware, I decided to scratch the idea of installing the PirateBox ISO and instead create my own build from scratch rather than spend endless amounts of time troubleshooting and tweaking to get the hardware and software to play nice with each other.

After a couple weeks of research and tinkering, I managed to put together a nice little LAMP stack running a main portal page, a band Wiki, a chat room, and a song downloads page (see below for full details). I keep the setup in an old laptop case with the Mac Mini and the router inside, plugged into a power cord. I’ve since brought it along to two shows and set it up somewhere inconspicuous on stage. When we’re doing sound check I just plug in the extension cord, turn on the router and the server, and it’s good to go!

I configured the network and server so that once someone has hopped onto the wifi, all they have to do is navigate to serverhostname.local to access the server, and I set the wifi broadcast name and the host name of the server to the name of the band.  Here are some screen caps from the initial setup.  Once someone connects to the wifi and navigates to the correct url (in the present case: utm.local), they are greeted with a success page. 


Clicking the portal link takes them to the site's main navigation page.


From there, users can navigate to the wiki:


Or to the chat room:


 Or to the download page:


Try not to laugh at the download page, this was what it looked like after initial setup, it's since been spiced up a bit.  If you want to see it now, you'll just have to come out to one of our shows!

All in all this was a fun little project.  It took about a month's worth of work (mostly on weekends) to get everything up and running, including preliminary research, installation, configuration and customization, as well as the time spent setting up an initial test on a VirtualBox VM on my laptop. 

There were, however, some frustrating hurdles along the way: finding an Ubuntu Server ISO that worked without problems on the Mac hardware, getting hostname resolution to operate correctly for both iOS and Android devices (avahi-daemon eventually did the trick, though a bug in older generations of the Android OS prevents those devices from being able to resolve the hostname.local URL to the IP address of the server), and, perhaps most ridiculously, uploading the band's logo into the MediaWiki (though drinking a bit less beer during configuration would have probably made that process go a bit more smoothly!).   

There's a lot more that one could go into here: installing Ubunutu Server onto the Mac Mini, installing and configuring the LAMP stack, comparisons of the various open source software packages I decided to include, as well as those that I decided against, potential security issues running an open wifi at bars and clubs in NYC, and so on.  But perhaps those are best left to their own individual posts. So for now, that's all folks!


UTM Live Server Build

Hardware
• Mac Mini, $50 on Craig’s List
• Netgear router, $10 at a local flea market
• Cables, $5 at the same flea market
Total Hardware Cost: $65

Software
• OS: Ubuntu Server
• LAMP Stack:
    • Apache2 Web Server
    • PHP5
    • MYSQL DB
    • PHPMyAdmin
    • OpenSSH
• Web Interface:
    • MediaWiki
    • Blueimp’s AJAX Chat
    • PHP login module for the downloads page (adapted from Harvard’s Building Dynamic Websites online course)
    • Noir HTML5 Template optimized for mobile devices
Total Software Cost: $0

MS Releases Office for IPad

From The Verge:
After years and years of rumors, Office for iPad is finally here. At a press event in San Francisco this morning, Microsoft Office general manager Julia White has unveiled the company’s latest mobile Office app. While Office for iPad was originally rumored for a release in 2012 and 2013, it's available as three separate applications (WordExcelPowerPoint) in Apple’s App Store today.

The World's Most Honest Apple Picker

From the UK Metro:
A pickpocket surprised his victim when he posted him a handwritten note of the 1,000 contacts on his stolen iPhone.  Zou Bin received the 11-page letter after sending a series of threatening texts demanding his Apple handset to be returned.
He was allegedly robbed after sharing a taxi with a man in the central province of Hunan in China, the Xinhua state news agency reported. ‘I know you are the man who sat beside me. I can assure you that I will find you,’ he wrote in the text message. ‘Look through the contact numbers in my mobile and you will know what trade I am in.  ‘Send me back the phone to the address below if you are sensible.’  Zou said he was ‘astonished’ when he received a package containing the note days later, although the thief did not return the stolen iPhone.