November 15, 2024

Month: April 2019

Swift: NSUserDefaults – There IS a difference between the two in Swift 4 and Swift 5

The other day, I needed to use the simple NSUserDefaults to save information to the iOS device in my new Swift 5 project.

Not using it that often, I went up on Google and found this helpful article.  But to my surprise, the example was for Swift 4.  Fortunately, Xcode helped me "convert" the code to Swift 5.

Here are the differences:

Swift 4:

let defaults = UserDefaults.standard
if let item = defaults.string(forKey: "itemCount")
{
print (item)
}

Swift 5:

let defaults = UserDefaults.standard
defaults.set(item, forKey: "itemCount")
{
print(item)
}

Note: "item" is a string variable that I am using to save an Integer that I defined earlier in the code.

 

 

 

AT&T CEO: Tiered 5G phone plans could be priced based on data speeds

We’re still several years away from 5G blanketing the US in coverage and delivering on all the promises of breakneck speeds and low latency we’ve been hearing about,” Chris Welch reports for The Verge. “But when that eventually happens, AT&T CEO Randall Stephenson foresees a change to the way that mobile providers price their plans today.”

“During today’s AT&T earnings call, Randall Stephenson said 5G might be more closely modeled after broadband internet at home, with different prices for different speed tiers,” Welch reports.

I will be very surprised if, as we move into wireless, the pricing regime in wireless doesn’t look something like the pricing regime you see in fixed line. If you can offer a gig speed, there are some customers that are willing to pay a premium for 500 meg to a gig speed, and so forth. So I expect that to be the case. We’re two to three years away from seeing that play out. — AT&T CEO Randall Stephenson

Read more in the full article here.

How to Cancel Apple News Plus Subscriptions from your iPhone before they charge you

If you’re into reading magazines, then Apple News Plus is for you.

But some people wanted to try it and then decided to cancel it for one reason or another. If you’re one of them, and are having problems with finding how to, then do the below:

  1. Tap the “Following” tab along the bottom
  2. Scroll all the way down and look for “Manage Subscriptions”
  3. Choose “Cancel Subscription”

You can also cancel an Apple News+ subscription through the Settings app:

  1. Open settings and tap your name at the top
  2. Select “iTunes and App Store”
  3. Tap your Apple ID
  4. Tap “View Apple ID”
  5. Tap “Subscriptions” at the bottom
  6. Look for “Apple News+
  7. Tap “Cancel Subscription”

It it is suggested that if you decide that Apple News Plus is not for you, that you cancel it as soon as you can to Avoid any surprise charges.

By the way, you can still get CompuScoop via Apple News for free.

You may have Missed:

Verified by MonsterInsights