November 15, 2024

Month: April 2019

Apple Watch Series 4 summons help for a 80-year-old Munich women after she fell

Emergency services were automatically summoned by a Series 4 Apple Watch when a 80-year-old woman fell in her apartment in Haidhausen, Munich.

"A dispatcher in the integrated control center accepted the emergency call [from the Watch]," said a spokesperson (in translation). "He heard a band announcement telling him that a person had fallen heavily. The Watch also transmitted the coordinates of the scene of the accident."

Reportedly, the police used that coordinate data to identify the woman's address and an ambulance was dispatched.

To read the rest of the Appleinsider.com article, click here.

How to Generate Random Numbers in Swift 4 & 5

Generating random numbers in an app may seem like a waste of time, but you may have to create a random number generator for various projects such as an auto password generator or even a game.

Here's the simplest way to accomplish this:

import UIKit

import Foundation

let ranNumber = Int (arc4random_uniform(100))

print (ranNumber)

Lets take this step by step:

  • Import Foundation as a habit when ever you work with numbers.
  • Let the value of ranNum hold the random number once the computer selects a number.
  • Since a number is an integer, let the program know this by adding the INT function.
  • The arc4random_uniform statement is the very basic way to make Swift generate the number.
  • The (100)) means to pick a number between 0 to 99.
  • Print the answer to the Playground output.

That's one way.  Another way is:

import UIKit

import Foundation

for i in 0...11

{

    let ranNumber = Int (arc4random_uniform(UInt32(i)))

    print (ranNumber)

}

Again, step by step:

  • ranNum will select a number from 0 - 12.
  • Print the results of ranNumber 12 times.
  • Output: 5 9 2 6 1 3 4 8 6 7 0 (your numbers maybe different).

 

 

Advanced Xcode Tip: How to install your app on an iOS device without connected it to a developer machine

We iOS developers must be able to test our apps on a real-world device.  But we have to use a USB wire to connect the device to the development machine to install and test the app.  OR DO WE?

This little known trick will get rid of that annoying step so you can install Xcode apps wirelessly.

Here's how:

  • Connect an iOS device to your Mac.
  • Open Xcode and open a project you're currently working on and is ready for testing on a real-world device.
  • Select Window > Device and Simulators.
  • Look for an option that says "Connect via Network".
  • Put a check mark next to that option.
  • After a few minutes, you can unplug the device from the computer and install the current app wirelessly.
  • That's it.

Note: Make sure that the developer's machine and the iOS device are on the same network before attempting to do an install.

 

Apple preps new web interface for Podcasts

“It seems that the Apple Podcasts web interface is getting a makeover,” Rachel England reports for Engadget.

“The previous design, which mirrored the iTunes web interface binned in 2017, was a simple list of episodes, titles and descriptions — no show notes or episode details,” England reports. “The new refresh is cleaner, with full descriptions and dedicated pages for each podcast episode.”

“Even better usability news, however, is the introduction of web playback,” England reports. “Apple has also introduced a dedicated podcasts.apple.com URL, instead of the previous itunes.apple.com URL.”

Read more in the full article here.

You may have Missed:

Verified by MonsterInsights