iphonemobilemacinternetbusinessinnovationsblog ...

The current project: A complete rewrite of the good old CompareMe app in Apples new programming language Swift. So, there are some insights & code snippets I want to share with the interested iOS developer community.

Today, let’s create some action sheets to open websites, twitter profiles in the native twitter app on the iOS device or create a eMail on the device. The Swift code is tested on Xcode 6.1 GM with iOS 8.1 on OS X Yosemite 10.10 GM.

If you present your alert as a UIAlertControllerStyle.ActionSheet, then be sure to include the popoverController.sourceView & popoverController.sourceRect. Otherwise your app will terminate on a big screen device like the iPad.On those devices, the ActionSheet is not displayed as a modal view, which covers the whole screen like on iPhone devices. Here the ActionSheet is presented as a popup besides the element, which created the ActionSheet.

Compose a new email with passing a “mailto:…@…” url is the easiest way to accomplish that goal. But be aware, that the user is switching to the Mail program to compose that mail. If the user sends or cancels the form, the user will not be directed back to your application. So if you want the user to stay in your app, or if you want to define more parameters, like the subject or body of the email, then you have to use MFMailComposeViewController … But that’s an other post ;-)

I just migrated to the new iPhone6 and recognized, that I’m not able to send out any emails from different apps like the Apple Mail app or within third party apps.
After reinstalling from iCloud-backup I go all my previously installed pop/smtp-mail accounts. When I opened Apple Mail the first time it prompted me for all the POP-passwords, to access the email-accounts. So far so good. I thought everything is ok and setup now.
But I encountered a bug, as I tried to send a picture with the Apple Picture App via email. It looked like I did successfully send out the picture. But it never arrived. So I tried to figure out the problem and a workaround. I found the bug, reported it to the Apple bug reporter but I wanted to share the easy workaround:
Just open the Apple Mail app and send one first test-email from every pop/smtp-account … then you’ll get prompted for the missing smpt-password. After entering the right password the test-emails will be send out. Even the stuck emails, which could not be delivered before, will now be sent out. Just check out the “Sent” box by selecting the email-Account in the account list of the Mail app. If the old mails are still here. you need to open and send them to get everything done.

Hope this helps :-)

Apple Time Machine & Time Capsule prove to be a boon for backup-dorks. And I think most of us belong to that species ;-)

Most of the time TimeMachine works well in the background. The only point you may recognize it is the temporary performance loss if the backup is running.
But yesterday, nothing worked any more: Time Capsule reported an error:

“Time Machine Error – The Backup disk image „/***/***/***.sparsebundle“ is already in use.”

Problem: Time Machine and the connected Time Capsule assume, that there is a backup process still running. In my case, a cold (but necessary) restart of my Mac was the reason for the confusion.

Solution: Unfortunately a restart of my Mac did not help. The problem is the Time Capsule itself, which has to release the established connection. You can fix that problem with the AirPort Utility under Programs/Utilities. The brand new AirPort Utility Version 6.1 has only one function you can use: The restart of the Time Capsule. But that did not help in my case. Weird but true: the old AirPort Utility Version 5.6.1 comes with much more features … especially “Disconnect all users …”. This is exactly what we need to solve our Time Machine error! So you just need to open the 5.6.1 version of the AirPort Utility, open the Time Capsule with a double click and open the tab “Disks” and press the button “Disconnect all users …”.

In order to solve the problem like I described before, I had to work around an other problem: How to install the old AirPort Utility version 5.6.1 on my Mac running OSX 10.8 Mountain Lion?! The old AirPort-Utility version works well under 10.8, but the installation routine will not allow to install it. Luckily, Frank Tisellano helps us out with am Automator workflow to extract the App from the installation bundle. In my case I had to open the “AirPort Utility Extractor” Skript in Automator to run the commands in the terminal manually.

I hope, that howToFix saves one or the other some time …

A short reminder on how to name your iPhone / iPad app icons properly. Sure, you can always specify those names specificy in the application info.plist. But why not chose convention over configuration to make life easier ;-)

Icon.png (required)
# 57x57px ... standard iPhone icon
Icon@2x.png (required)
# 114x114px ... retina display iPhone icon
Icon-72.png (required)
# 72x72px ... standard iPad icon
Icon-Small.png (recommended)
# 29x29px ... standard iPhone Spotlight search icon
Icon-Small@2x.png (recommended)
# 58x58px ... retina display iPhone Spotlight search icon
Icon-Small-50.png (recommended)
# 50x50px ... standard iPad Spotlight search icon

Just drag the files into the “Supporting Files folder” within Xcode and allow Xcode to copy the files into the proper directory of your app.
If you also want to adhoc distribute your app – like, in beta testing – you should also include the following iTunesArtwork-file in your source. If you want it to render with the shiny Apple effects in iTunes you need to provide a JPEG file, if it should be rendered untouched just use a PNG. The iTunesArtwork file must not have a file extention:

iTunesArtwork
# 512x521px ... iTunes icon used with adhoc distributions

And don’t forget to exclude the file in your iTunes-Connect distributions to the AppStore. There you upload the PNG file separately within the upload process in iTunesConnect!

Hope this saves some time ;-)

Apple just published the video of the tribute to Steve special event at the Apple Campus on October 19, 2011. So kind, that the Apple folks are sharing the event with us. Thanks. It’s really moving.

Picture: Apple

Pages: 1 2 3 4 5 6 7 8 ... 28 29 30 Next