Tag Archives: IOS

99 Bottles of Beer Song in Swift

These lyrics should be your output. My solution in Swift is at the end of this post.

99 Bottles of Beer Song Lyrics

99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 98 bottles of beer on the wall.

98 bottles of beer on the wall, 98 bottles of beer.
Take one down and pass it around, 97 bottles of beer on the wall.

97 bottles of beer on the wall, 97 bottles of beer.
Take one down and pass it around, 96 bottles of beer on the wall.

96 bottles of beer on the wall, 96 bottles of beer.
Take one down and pass it around, 95 bottles of beer on the wall.

95 bottles of beer on the wall, 95 bottles of beer.
Take one down and pass it around, 94 bottles of beer on the wall.

94 bottles of beer on the wall, 94 bottles of beer.
Take one down and pass it around, 93 bottles of beer on the wall.

93 bottles of beer on the wall, 93 bottles of beer.
Take one down and pass it around, 92 bottles of beer on the wall.

92 bottles of beer on the wall, 92 bottles of beer.
Take one down and pass it around, 91 bottles of beer on the wall.

91 bottles of beer on the wall, 91 bottles of beer.
Take one down and pass it around, 90 bottles of beer on the wall.

90 bottles of beer on the wall, 90 bottles of beer.
Take one down and pass it around, 89 bottles of beer on the wall.

89 bottles of beer on the wall, 89 bottles of beer.
Take one down and pass it around, 88 bottles of beer on the wall.

88 bottles of beer on the wall, 88 bottles of beer.
Take one down and pass it around, 87 bottles of beer on the wall.

87 bottles of beer on the wall, 87 bottles of beer.
Take one down and pass it around, 86 bottles of beer on the wall.

86 bottles of beer on the wall, 86 bottles of beer.
Take one down and pass it around, 85 bottles of beer on the wall.

85 bottles of beer on the wall, 85 bottles of beer.
Take one down and pass it around, 84 bottles of beer on the wall.

84 bottles of beer on the wall, 84 bottles of beer.
Take one down and pass it around, 83 bottles of beer on the wall.

83 bottles of beer on the wall, 83 bottles of beer.
Take one down and pass it around, 82 bottles of beer on the wall.

82 bottles of beer on the wall, 82 bottles of beer.
Take one down and pass it around, 81 bottles of beer on the wall.

81 bottles of beer on the wall, 81 bottles of beer.
Take one down and pass it around, 80 bottles of beer on the wall.

80 bottles of beer on the wall, 80 bottles of beer.
Take one down and pass it around, 79 bottles of beer on the wall.

79 bottles of beer on the wall, 79 bottles of beer.
Take one down and pass it around, 78 bottles of beer on the wall.

78 bottles of beer on the wall, 78 bottles of beer.
Take one down and pass it around, 77 bottles of beer on the wall.

77 bottles of beer on the wall, 77 bottles of beer.
Take one down and pass it around, 76 bottles of beer on the wall.

76 bottles of beer on the wall, 76 bottles of beer.
Take one down and pass it around, 75 bottles of beer on the wall.

75 bottles of beer on the wall, 75 bottles of beer.
Take one down and pass it around, 74 bottles of beer on the wall.

74 bottles of beer on the wall, 74 bottles of beer.
Take one down and pass it around, 73 bottles of beer on the wall.

73 bottles of beer on the wall, 73 bottles of beer.
Take one down and pass it around, 72 bottles of beer on the wall.

72 bottles of beer on the wall, 72 bottles of beer.
Take one down and pass it around, 71 bottles of beer on the wall.

71 bottles of beer on the wall, 71 bottles of beer.
Take one down and pass it around, 70 bottles of beer on the wall.

70 bottles of beer on the wall, 70 bottles of beer.
Take one down and pass it around, 69 bottles of beer on the wall.

69 bottles of beer on the wall, 69 bottles of beer.
Take one down and pass it around, 68 bottles of beer on the wall.

68 bottles of beer on the wall, 68 bottles of beer.
Take one down and pass it around, 67 bottles of beer on the wall.

67 bottles of beer on the wall, 67 bottles of beer.
Take one down and pass it around, 66 bottles of beer on the wall.

66 bottles of beer on the wall, 66 bottles of beer.
Take one down and pass it around, 65 bottles of beer on the wall.

65 bottles of beer on the wall, 65 bottles of beer.
Take one down and pass it around, 64 bottles of beer on the wall.

64 bottles of beer on the wall, 64 bottles of beer.
Take one down and pass it around, 63 bottles of beer on the wall.

63 bottles of beer on the wall, 63 bottles of beer.
Take one down and pass it around, 62 bottles of beer on the wall.

62 bottles of beer on the wall, 62 bottles of beer.
Take one down and pass it around, 61 bottles of beer on the wall.

61 bottles of beer on the wall, 61 bottles of beer.
Take one down and pass it around, 60 bottles of beer on the wall.

60 bottles of beer on the wall, 60 bottles of beer.
Take one down and pass it around, 59 bottles of beer on the wall.

59 bottles of beer on the wall, 59 bottles of beer.
Take one down and pass it around, 58 bottles of beer on the wall.

58 bottles of beer on the wall, 58 bottles of beer.
Take one down and pass it around, 57 bottles of beer on the wall.

57 bottles of beer on the wall, 57 bottles of beer.
Take one down and pass it around, 56 bottles of beer on the wall.

56 bottles of beer on the wall, 56 bottles of beer.
Take one down and pass it around, 55 bottles of beer on the wall.

55 bottles of beer on the wall, 55 bottles of beer.
Take one down and pass it around, 54 bottles of beer on the wall.

54 bottles of beer on the wall, 54 bottles of beer.
Take one down and pass it around, 53 bottles of beer on the wall.

53 bottles of beer on the wall, 53 bottles of beer.
Take one down and pass it around, 52 bottles of beer on the wall.

52 bottles of beer on the wall, 52 bottles of beer.
Take one down and pass it around, 51 bottles of beer on the wall.

51 bottles of beer on the wall, 51 bottles of beer.
Take one down and pass it around, 50 bottles of beer on the wall.

50 bottles of beer on the wall, 50 bottles of beer.
Take one down and pass it around, 49 bottles of beer on the wall.

49 bottles of beer on the wall, 49 bottles of beer.
Take one down and pass it around, 48 bottles of beer on the wall.

48 bottles of beer on the wall, 48 bottles of beer.
Take one down and pass it around, 47 bottles of beer on the wall.

47 bottles of beer on the wall, 47 bottles of beer.
Take one down and pass it around, 46 bottles of beer on the wall.

46 bottles of beer on the wall, 46 bottles of beer.
Take one down and pass it around, 45 bottles of beer on the wall.

45 bottles of beer on the wall, 45 bottles of beer.
Take one down and pass it around, 44 bottles of beer on the wall.

44 bottles of beer on the wall, 44 bottles of beer.
Take one down and pass it around, 43 bottles of beer on the wall.

43 bottles of beer on the wall, 43 bottles of beer.
Take one down and pass it around, 42 bottles of beer on the wall.

42 bottles of beer on the wall, 42 bottles of beer.
Take one down and pass it around, 41 bottles of beer on the wall.

41 bottles of beer on the wall, 41 bottles of beer.
Take one down and pass it around, 40 bottles of beer on the wall.

40 bottles of beer on the wall, 40 bottles of beer.
Take one down and pass it around, 39 bottles of beer on the wall.

39 bottles of beer on the wall, 39 bottles of beer.
Take one down and pass it around, 38 bottles of beer on the wall.

38 bottles of beer on the wall, 38 bottles of beer.
Take one down and pass it around, 37 bottles of beer on the wall.

37 bottles of beer on the wall, 37 bottles of beer.
Take one down and pass it around, 36 bottles of beer on the wall.

36 bottles of beer on the wall, 36 bottles of beer.
Take one down and pass it around, 35 bottles of beer on the wall.

35 bottles of beer on the wall, 35 bottles of beer.
Take one down and pass it around, 34 bottles of beer on the wall.

34 bottles of beer on the wall, 34 bottles of beer.
Take one down and pass it around, 33 bottles of beer on the wall.

33 bottles of beer on the wall, 33 bottles of beer.
Take one down and pass it around, 32 bottles of beer on the wall.

32 bottles of beer on the wall, 32 bottles of beer.
Take one down and pass it around, 31 bottles of beer on the wall.

31 bottles of beer on the wall, 31 bottles of beer.
Take one down and pass it around, 30 bottles of beer on the wall.

30 bottles of beer on the wall, 30 bottles of beer.
Take one down and pass it around, 29 bottles of beer on the wall.

29 bottles of beer on the wall, 29 bottles of beer.
Take one down and pass it around, 28 bottles of beer on the wall.

28 bottles of beer on the wall, 28 bottles of beer.
Take one down and pass it around, 27 bottles of beer on the wall.

27 bottles of beer on the wall, 27 bottles of beer.
Take one down and pass it around, 26 bottles of beer on the wall.

26 bottles of beer on the wall, 26 bottles of beer.
Take one down and pass it around, 25 bottles of beer on the wall.

25 bottles of beer on the wall, 25 bottles of beer.
Take one down and pass it around, 24 bottles of beer on the wall.

24 bottles of beer on the wall, 24 bottles of beer.
Take one down and pass it around, 23 bottles of beer on the wall.

23 bottles of beer on the wall, 23 bottles of beer.
Take one down and pass it around, 22 bottles of beer on the wall.

22 bottles of beer on the wall, 22 bottles of beer.
Take one down and pass it around, 21 bottles of beer on the wall.

21 bottles of beer on the wall, 21 bottles of beer.
Take one down and pass it around, 20 bottles of beer on the wall.

20 bottles of beer on the wall, 20 bottles of beer.
Take one down and pass it around, 19 bottles of beer on the wall.

19 bottles of beer on the wall, 19 bottles of beer.
Take one down and pass it around, 18 bottles of beer on the wall.

18 bottles of beer on the wall, 18 bottles of beer.
Take one down and pass it around, 17 bottles of beer on the wall.

17 bottles of beer on the wall, 17 bottles of beer.
Take one down and pass it around, 16 bottles of beer on the wall.

16 bottles of beer on the wall, 16 bottles of beer.
Take one down and pass it around, 15 bottles of beer on the wall.

15 bottles of beer on the wall, 15 bottles of beer.
Take one down and pass it around, 14 bottles of beer on the wall.

14 bottles of beer on the wall, 14 bottles of beer.
Take one down and pass it around, 13 bottles of beer on the wall.

13 bottles of beer on the wall, 13 bottles of beer.
Take one down and pass it around, 12 bottles of beer on the wall.

12 bottles of beer on the wall, 12 bottles of beer.
Take one down and pass it around, 11 bottles of beer on the wall.

11 bottles of beer on the wall, 11 bottles of beer.
Take one down and pass it around, 10 bottles of beer on the wall.

10 bottles of beer on the wall, 10 bottles of beer.
Take one down and pass it around, 9 bottles of beer on the wall.

9 bottles of beer on the wall, 9 bottles of beer.
Take one down and pass it around, 8 bottles of beer on the wall.

8 bottles of beer on the wall, 8 bottles of beer.
Take one down and pass it around, 7 bottles of beer on the wall.

7 bottles of beer on the wall, 7 bottles of beer.
Take one down and pass it around, 6 bottles of beer on the wall.

6 bottles of beer on the wall, 6 bottles of beer.
Take one down and pass it around, 5 bottles of beer on the wall.

5 bottles of beer on the wall, 5 bottles of beer.
Take one down and pass it around, 4 bottles of beer on the wall.

4 bottles of beer on the wall, 4 bottles of beer.
Take one down and pass it around, 3 bottles of beer on the wall.

3 bottles of beer on the wall, 3 bottles of beer.
Take one down and pass it around, 2 bottles of beer on the wall.

2 bottles of beer on the wall, 2 bottles of beer.
Take one down and pass it around, 1 bottle of beer on the wall.

1 bottle of beer on the wall, 1 bottle of beer.
Take one down and pass it around, no more bottles of beer on the wall.

No more bottles of beer on the wall, no more bottles of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.

Solution in Swift:

import UIKit

func beerSong(forThisManyBottlesOfBeer totalNumberOfBottles:Int) -> String {

    var lyrics: String = ""

    for number in (0...totalNumberOfBottles).reversed() {

        if number > 1 {let newLine: String = "\n\(number) bottles of beer on the wall, \(number) bottles of beer. \nTake one down and pass it around, \(number - 1) bottles of beer on the wall. \n"

            lyrics += newLine

        } else if number == 1 {

            lyrics += "\n\(number) bottle of beer on the wall, \(number) bottle of beer. \nTake one down and pass it around, no more bottles of beer on the wall. \n"

        } else if number == 0{

            lyrics += "\nNo more bottles of beer on the wall, no more bottles of beer. \nGo to the store and buy some more, 99 bottles of beer on the wall.\n"

        }

    }

    return lyrics

}

print(beerSong(forThisManyBottlesOfBeer:99))

iPhone X; all hope not lost for single hand operation

As everyone probably know by now, iPhone X is not a phone you can use with single hand. In fact none of the phones after iPhone 6 are not ideal for use with one hand because users cannot reach all corners of the screen without adjusting hand grip. The problem is not limited to just iPhones and it applies to any phone that is bigger than iPhone 5, 5s or 5SE.

Solution? Apple implemented reachability feature on all iPhones since Touch ID was introduced. The operation is simple, double tapping (not click) on home button on your iPhone will bring the whole screen half way down so users can reach top corners of screen without having to adjust the grip on the device. Feature works flawlessly on all iPhones. But if you are thinking iPhone X cannot do that becuase it DOES NOT have a home button to tap on, then you’d be wrong.

Reachability on iPhone X. I haven’t seen any reviewers talk specifically about this feature and thought I would shed some light on it. iPhone X uses swipe-up action from bottom notch on the screen to give the default home-button-press action i.e. closing your apps. Swipe-down on the bottom edge notch will give users reachability option. This would particularly come in handy if you wish to use your iPhone X with one hand without adjustting grip risking the fall.

Reachability is not enabled by default and would need activation via Accessibility menu in Settings app. Here is how it works.

Awkward: Swiping down on botton notch is not really intuitive and took some time to master but, I guess fans would not mind training their hand mussles get used to this new workout.

iOS 11: 3D Touch Multitasking and new Emojis

iOS has been advancing very fast since version 8. Currently there is almost no need to actually jailbreak iOS for any new functionality. Engineers at Apple have done good job in mimicking all those fan favorite jailbreak and some of android features. iOS 11 is definitely a big leap for Apple devices especially for iPad however, Apple messed up when they took out 3D touch multitasking functionality from their initial iOS 11 release. They did not announce anything or mentioned anything as this was a negative point on their “fantastic” iOS 11 release. Later Apple told multiple news resources that the functionality was eliminated because it was causing trouble somehow on iPads.

With iOS 11.1 update Apple kept it’s promise to bring this function back. iOS 11.1 also came with several new emojis and the Internet is going crazy about it.

3D touch multitasking is back on iOS 11.1

Here are some of the new emojis introduced in iOS 11.

Apple Music for $5 per month is not a bad idea

Buying music was never my thing until I was introduced to iTunes. I used to listen to radio or just pirate my music whenever I really wanted to hear those famous songs. Yes, I downloaded music when I was staying with my parents and paying for my tuitions. everyone out there does that, so get over it.

Now I buy music but, now that is an old thing too! Last year when apple released their Apple Music streaming service I was excited because it came with 3 months of free subscription. In those 3 months I really didn’t use any streaming because I had all the latest music that I really really wanted to listen to and didn’t feel the need of buying any new music. Once the free trial period got over I absolutely did not want to pay $10/month for the music I love and not keep it with me if I choose not to pay monthly fees anymore.

Recently I came across one amazing option that will still allow me to listen to new music and just in half the price. I sure am a music love and absolutely cannot live without it. So to stay sane in life $5 is really not a bad price. iTunes is one of the reliable source to the highest quality music out in the world.

Even though I think Apple Music is the best quality music streaming service out there I still wouldn’t pay $10/month for it. So how to get Apple Music for $5/month? You need to have a student’s account. If you are a student, you can get Apple Music for half the price of their individual subscription. You can validate your account with your school email. Click the link below and verify your account as student account and start using Apple Music for $0.99 for first 3 months and at discounted price later.

Visit https://www.myunidays.com/perks/view/applemusic/online for validation of your student account.

Caution: If you reach 48 months of Student Membership or they find that you are not a student anymore, your membership automatically becomes an Apple Music Individual Membership. Because, once you’re hooked on them they will rip you off any way. Until then, enjoy!! 🙂

How to use vulcan salute emoji on iOS 8.3?

iOS 8.3 update bought over 300 emoji to it’s users. Many of these emoji were already available on Android already. However, there is this one Vulcan Salute users cannot use because iOS Emoji Keyboard doesn’t have a key assigned for it but, that doesn’t mean you cannot use it. Follow steps below to get access to the famous Vulcan Salute without any jailbreak.

1. Copy this Vulcan salute imoji here, 🖖

2. Goto Settings App -> General -> Keyboards -> Shortcuts and add this new keyboard shortcut.

 

3. Type your shortcut phrase when you want to use Vulcan salute.

Using shortcuts: You can also create keyboard shortcuts for other uses for example, use short of your email ID to type whole email ID or shortcut to your Out Sick email to your boss 😉 Some better examples would be like, Short of that restaurant you always ask to go, convert ‘gm for Good morning, ‘gn for Good night.

Live long and prosper! 🖖 

How to remove iPhone, iPad or Mac from iCloud account?

Removing iCloud account from the device settings is the easiest way to disassociate from an iCloud account. But, in case you don’t have access to the device then, follow steps below.

Step 1- Sign in to your iCloud account.

ic0

Step 2- Click “Find My iPhone” and wait for the application to attempt to sync with the device you want to delete. If it is unsuccessful, the “Delete” icon will display next to the device name. If it does connect successfully, you must disconnect the device from the Internet and wait for it to appear as “Offline.” Once device is offline click on it to get more options.

ic1ic2

Step 3- Click “Remove from Account” to remove the device.

ic3

In addition, if you have access to device perform further steps. Otherwise you are done.

Step 4- Tap the “Settings” icon on the device’s menu and select “iCloud.”

Step 5- Move the Find My iPhone slider to the “Off” position.

Check how Apple Watch will look on your wrist before it releases

Every true Apple fan out there is excited about new Apple Watch release. Apple announced it’s new device which is a wrist watch which will be released in about a month from now. Pre-orders are starting on April 10th but, how to know which size is right for you?

Well, there is always an answer on the internet. ARWatch app will allow you to check how the Apple Watch fits on your wrist. ARWatch uses augmented reality which scans a small piece of paper on your wrist (PDF explains) using iPhone camera and then puts a 3D version of watch on your wrist when looked at your phone screen.

1. Print this PDF in 100% and cutout the marked area. (Click here to download PDF)

If you are too lazy to print the PDF, check image below.

2015-03-25_13-00-46

2. Download the App by scanning the QR code in the PDF. (If you don’t know how to do it then, open this link on your iPhone)

3. Put the cutout on your wrist.

Put the cutout on your wrist as if it's the dial or face of your watch.
Put the cutout on your wrist as if it’s the dial or face of your watch.

4. Open ARWatch app and point the camera towards the cutout.

IMG_4583

I was thinking 42 mm is right for me but turns out 38 mm fits best. Hope this helps you decide the right size for you Apple Watch.

Know true value of cellphone signal (iPhone/iPad/iPodTouch)

To view true value of signal strength of your iPhone (3G and later, with iOS 4 or later) you have to enter into Field Test Mode on your device.

Entering Field Test Mode on iPhone (iPhone 3G and later on iOS 4 and later)

This will work on any iPhone model and any version of iOS, except the very original:

1. Open the Phone app as if you were going to make a regular phone call

2. From the iPhone keypad, dial *3001#12345#* and hit the “Call” button

After this your phone will change carrier signal bars/dots to show you a negative number. Signal numbers extend from -40 to -130. 

This is how to read these numbers: Anything above -80 is considered full signal strength. Calls usually start dropping or having bad connection around -110 and -120. Some users might see -130 before actually dropping the call. 

Eg. If you have signal strength of -50, you have a great carrier reception. -95 is not bad. -120 is when you better get ready to say bye as that call might drop at any moment.

How to keep numbers setting

Field test mode doesn’t last and you will be out of it when you lock your phone but, if you want to always see signal numbers rather than bars/dots then go through following steps.

1. Dial *3001#12345#* and hit “Call” if you haven’t done so already to launch Field Test.

2. Now hold down the Power button until the “Slide to Power Off” message appears, then release the Power button and hold the Home button until Field Test quits.

3. Tap the signal bars or signal numbers to switch between the two.

To remove the tap-to-switch signal indicator ability, you can either reboot the iPhone or go back into Field Test and close out of it as usual.

Fitness Band: This time from Microsoft

Last week Microsoft joined the fitness band wagon with it’s brand new Microsoft Band. Microsoft Band is a fitness device like any other you’ve seen out there except it gives you GPS and continuous heart rate monitoring features like the recently announced line of fitness trackers from Fitbit.

Features are:
Guided workouts – Band’s companion app offers several fitness routines which provide instructions while in the exercise routine.
24-hours heart rate tracking – This one is self explanatory. Band has optical sensors to provide continues heart rate monitoring.
Sleep tracking – Collects sleep data to provide insights on sleeping habits. This feature is also provided in Jawbone UP24 and Fitbit bands. So far, UP24 band is on top of this game when it comes to sleeping data.
GPS mapping – Band also has inbuilt GPS which is only provided so far in the Garmin fitness watches. The next line of Fitbit bands will have this feature.
Notifications – Band also has notification feature for emails and texts. Users can also set alarm and times on the band.
Cortana – Microsoft’s smart assistant Cortana on Windows phones can listen to users via the band.
Battery – On a single full charge Microsoft band works unto 46 hours. This is incredible considering continuous heart rate monitor and the GPS in running mode.

Microsoft is compatible with Windows Mobile OS, iOS and Android. That makes this band more successful than current Android gear. It’s been just couple of days since it’s release, we’ll see how well it does during the holiday season.

Microsoft band is currently available at major retailers and on microsoft.com for $199. Check for more details here.