How to use CocoaPods with Swift project

If you already know how to install and use CocoaPods then continue else please first visit my previous blog “How to install CocoaPods in XCode” (for Objective-C).

Using CocoaPods or any Objective C library in Swift is not a big deal. XCode is quite smart and it automatically do this for you. You can also check Apple’s documentation on this Using Swift with Cocoa and Objective-C. Once libraries are added, you only need to use a bridging header between Objective-C and Swift and use the new coding style of Swift for calling those methods. Like [MBProgressHUD show] become MBProgressHUD.show( ) etc. Here I am using the example of MBProgressHUD because it is normally used in most of the projects.

Let’s see how it works:

1. Create a new XCode project and select the language Swift (no need to to this if you already have Swift project).

2. Create a Bridging-Header.h file starting with your project name. like, if my project name is SampleProject, bridging header become: SampleProject-Bridging-Header.h and Put this header at the root directory of your project.

If you are not very sure how to do this, the most simplest way is to add a test objective-c file in your project (remove that later). Xcode will prompt an option to configure bridging. When you press Yes, XCode automatically create the bridging file and put inside root of project directory.

bridging

Added Bridging Header:

bridging-file

3. Setup Pod with your project.

4. Add your Pod libraries inside bridging header file as you were normally using in Objective C project.

pod-files

6.  Now you can access MBProgressHUD methods in your swift like:

        MBProgressHUD.showHUDAddedTo(self.view, animated: true)
        MBProgressHUD.hideAllHUDsForView(self.view, animated:true)

xcode-swift

You can download my SampleProject from git. While reading this if you notice that step5 is missing, then cheers!! you follow this carefully and you understand how it works 🙂

Still facing any issue with Pod? Or want to be in touch with us? Contact us:

Email:  muzammil@triffort.com Skype: muz.iphonedev

Triffort_logo

Triffort Technologies Pvt Ltd
www.triffort.com

Our new app : Classic Board Pro

!! Official Pro release of Classic Board app !!

Classic Board is one the most simplest board app on App Store. It provides you a real time touch experience with Chalk and Duster.

Use stylus pen for best experience. You can also transform your iPhone/iPad screen into a presentation screen.
# Supporting New iPad (Retina) display.
# Supporting iPhone5.
# Option to change chalk color.
# Option to change chalk/duster width.
# 8 beautiful backgrounds that gives a different and classic look to your board.
# 3 nice border styles.
# Share your board via Facebook, Twitter and Email.

Download this pro version and go back in your childhood classroom.

!! Have fun !!

Classic Board

 

Download Classic Board Pro from App Store : https://itunes.apple.com/us/app/classic-board-pro/id568702868?ls=1&mt=8

We have launched 3D framing app on AppStore

iFrame is 3D photo frame creator by which you can transform you photo frame in 3D effect in both vertical and horizontal direction. Also, you can rotate and zoom the frame.

Where you can use iFrame
✔ You can check how your photo frame will look on your bedroom wall. By placing your 3D frame on your wall.
✔ While buying carpets, drawings you can check how they will look on your wall.
✔ You can place your photo frame in office of famous persons like office of Mr. Obama, Drawing room of Queen Elizabeth 🙂
✔ You can put your photo frame on some table.

Features
☛ 25 Awesome Photo frames included in app.
☛ 25 best backgrounds included in app. You may used your own background.
☛ You can zoom-rotate your photo inside photo frame.
☛ Easy and Quick transform of 3D movement.
☛ You can share your photo frame with family and friends by sharing on Facebook and Twitter.
☛ Save to Photo Library.
☛ Email photo frame.
☛ Use help screen for more guidance.

5

Download iFrame 3D from AppStore

iPad2

Just under one year ago, Apple shocked the computing world with a 9.7-inch touchscreen tablet that few truly expected.

Some called the original Apple iPad a large-format iPhone. Others berated the name and made jokes that were not remotely funny.

The early reviews were marginal at best – we handed the device a solid four stars. Technical folks decried the lack of Adobe Flash and the missing cameras.

Now, 60,000 apps later (according to Apple, who counts every conceivable option) and just a few weeks after the first real Android 3.0 tablet contender hit the streets (Motorola Xoom), the iPad 2 has sauntered onto the playing field.

At 241mm tall, 186mm wide, and 8.6mm thick, the iPad 2 is just a hair smaller than the original iPad and it’s thinner than the iPhone 4. It has a curved edge that makes it look a bit more ‘space age’ and, surprisingly, easier to grasp because you can curve your fingers more easily around the bezel.
With rounded edges, iPad 2 has a more contoured look, shunning the straight edges of the original iPad.  According to Kevin Keller of IHS iSuppli, the slim appearance of iPad 2 not only makes the first iPad seem bulky, but also makes other tablet devices seem gargantuan compared to iPad 2.Despite having a slimmer battery, iPad 2 is roughly 15 percent more efficient in terms of power usage compared with the original.  Foregoing the two thick cells of the first iPad, Apple used three thinner, slimmer, cells, reducing the battery’s thickness.

For the screen, Apple did away with the metal sheet structure in favor of a touchscreen with an improved glass layer.  The glass on iPad 2 is thinner, more flexible and durable, than the screen of the original iPad according to IHS tests.

Compounding all of this is the cost advantage Apple has over its competitors.  UBM indicates that Apple reportedly only spent $270 to manufacture the 32GB iPad 2, cheaper compared to the estimated cost for the Motorola Xoom.

iPad 2 is smaller, faster and more feature-rich than the first generation iPad.  Moreover, with low costs, both to manufacture and to offer consumers, others can’t match, Apple and iPad should continue to dominate the tablet market.

Have you purchased iPad 2? 🙂

Removing an App from iTunes Sales (App Store)

NOTE: Your app’s availability date ultimately determines if your app is live on the App Store or not. If your availability date is set to a date in the future, even if your app is Ready for Sale, it will not be live in the App Store until your availability date approaches.

Since Rights and Pricing settings are app level settings, when you choose to remove all App Store territory settings for an app, you will be removing the entire app from the App Store and not just a specific version.

Now follow these steps:

1. Login into your iTunes Connect with your developer id: https://itunesconnect.apple.com

2. Click on App Icon

3. Click on Rights And Pricing

4. At the bottom This app will be on sale in all App Stores worldwide.
Or, you can select specific stores “here”. Click on here button to open all specific app stores.

5. Click on the “Deselect All” button to uncheck all App Store territories.

6. Click on “Save Changes” button.

7. Now when you save all these and go to back to your App icon home screen. There will be one more button appear “Delete Application” after “Set Up iAd Network”.

8. Click on Delete button and read instructions.

9. Your App become disappear from app store withing 24 hours.

!! Enjoy !!

iPhone OS 4.0: Multitasking, finally :)

The demand for iPhone OS multitasking is nothing new. People have been looking for ways to do more than one thing at once on their iPhones for some time. For example, let’s say you’re chatting on IRC in one application, and you want to hop out to check a Web page. Should you have to disconnect from your IRC session just so you can sneak into Safari? Maybe you want to listen to Pandora radio while shopping at the App Store. Should you have to stop the Pandora music?

People multitask, and now the iPhone OS can too. Starting with the upcoming 4.0 firmware, the iPhone OS will (finally!) allow users to do more than one task at once. As Steve demonstrated today, iPhone OS 4.0 lets you switch tasks by double-clicking the home button. A dock-like bar appears at the bottom of the screen, showing you a list of running applications.

Typically with multitasking, the more processes that you run, the more burden you’ll place on battery life. The application would have to page into and out of memory a lot more, and as a result, less memory and processor power will be available on a per-app basis. It’s a trade-off. For me, and I’m sure for many others, it’s a trade-off we’re willing to make in order to cash in to the associate benefits.

However, it seems that we may not have to fear: Apple says they have found a way around all of these caveats. How, you ask? They are providing background services to applications, allowing the app to stream music, provide notifications, or do other tasks without compromising performance.

What about you? Is this a feature that you’re going to be taking advantage of? Would you rather swap it out for better battery life and app performance? Let us know in the comments.

iPhone OS 4.0: Over 100 new features

Yesterday (Apr 8th 2010) During Apple live event, it was noted that over 100 new features are being added to iPhone OS 4.0. We captured some of that information, and list just a few new features here for your reading pleasure:

  • QuickLook: The feature everyone loves in Mac OS X now comes to iPhone and iPad
  • Folder Storage: You can now have up to 2,160 apps on your iPhone through the use of folders
  • Full app access to still and video data
  • iBooks on iPhone: A smaller version of the iBooks app for the iPhone platform.
  • Unified inbox for Mail: At last, all of your emails go can be viewed in one inbox; no more switching between inboxes. You can also have multiple Exchange accounts. The emails can be organized by threads, much in the same way that they are in Mail.app on the Mac.
  • Wireless App Distribution: Companies that create custom in-house apps no longer need to distribute those through a “wired” connection; employees can now install the apps from anywhere, anytime.
  • Homescreen Wallpaper, Bluetooth Keyboards: The iPhone and iPod touch will get these features that are now on the iPad.
  • Fast app switching
  • Background location: Apps can stay updated with location information even when you switch to another app.
  • Selective use of location: Location can be enabled or disabled on an app-by-app basis.
  • Local notifications: like push notification, but not requiring server access. It’s all done on the phone.
  • Task completion: Items that take some time can now complete in background while other work is going on in foreground. For example, uploading an image to Flickr can happen in background while you’re doing something else.
  • iAds: Developers get 60% of the ad revenue by adding interactive iAds to their apps. You can add fully interactive advertisements without taking people out of your app.
  • Address and Date data detectors: Just like those in Mail.app in Mac OS X, these add information to Address Book and Calendar with a tap.

iPhone 4.0 OS: Now with iAds

Apr 8th 2010

Today at the iPhone 4.0 preview event, Apple announced that one of the new features coming in 4.0 is the iAd network. According to Steve, an average iPhone user is on their phone using apps about half an hour a day. So at one ad every three minutes, that’s 10 ads on each device each day, and with almost ten million devices out there, Apple claims they’ll be serving a billion ad opportunities every day.

And yet this isn’t the huge news about iAds. Here is what makes it a big deal: Apple built the network and is offering it up to developers to use how they’d like, with 60% of the revenue made on those ads going to developers themselves. That’s up a bit from the standard “Apple gets a 30% cut” rule of thumb, but more than half seems more than fair. Apple hosts and sells the ads, and developers take home over half the revenue.

The ad demonstrated live actually looked cool: they showed off little Toy Story 3 ad at the bottom of a news app. Tap the ad, and it comes up with some options (a character list, sounds from each character, etc) and even a game to play, including an option to buy a game from right within the ad. Steve even asked if anyone had seen anything like this before, and among the gathered press, he got silence in response.

Currently, the most educated of guesses is that the AdKit API will be a developer source as well as an iTunes source (iTunes sources are where the App Store and Music Store get their content.)

After the event in the Q&A session, Steve said they attempted to buy AdMob and got sniped by Google, so they bought Quattro and are trying very hard to come up to speed on what web advertising is like, presumably so they can change it. As long as they aren’t trying to get me to refinance my mortgage or whiten my teeth, I’m looking forward to the future of advertising on the iPhone.

Secret iPhone codes:

1. *3001#12345#* and tap Call. Enter Field Mode.

Field mode reveals many of the inner settings of your iPhone, specifically up-to-date network and cell information.

2.  *#06# Displays your IMEI. No need to tap Call.

IMEI is the unique identifier for your cell phone hardware. Together with your SIM information it identifies you to the provider network.

3.  *777# and tap Call. Account balance for prepaid iPhone.

4. *225# and tap Call. Bill Balance. (Postpaid only)

5. *646# and tap Call. Check minutes. (Postpaid only)

These three are pretty self explanatory.

6. *#21# and tap Call. Setting interrogation for call forwards.

Settings for your call forwarding. You’ll see whether you have voice, data, fax, sms, sync, async, packet access, and pad access call forwarding enabled or disabled.

7. *#30# and tap Call. Calling line presentation check.

This displays whether you have enabled or disabled the presentation of the calling line, presumably the number of the party placing the call.

8. *#76# and tap Call. Check whether the connected line presentation is enabled or not.

State whether the connected line presentation is enabled or disabled. Presumably similar to the calling line presentation.

9. *#43# and tap Call. Determine if call waiting is enabled.

Displays call waiting status for voice, data, fax, sms, sync data, async data, packet access and pad access. Each item is either enabled or disabled.

10. *#61# and tap Call. Check the number for unanswered calls.

Show the number for voice call forwarding when a call is unanswered. Also show the options for data, fax, sms, sync, async, packet access and pad access.

11. *#62# and tap Call. Check the number for call forwarding if no service is available.

Just like the previous, except for no-service rather than no-answer situations.

12. *#67# and tap Call. Check the number for call forwarding when the iPhone is busy.

And again, but for when the iPhone is busy.

13. *#33# and tap Call. Check for call control bars.

Check all the usual suspects (voice, data, fax, sms, etc) to see whether barring is enabled or disabled for outgoing.

First iPad App

10 Easy Steps to create your first iPad App:

In this tutorial I will give you a brief introduction on how to get started with your first iPad application. To begin you will need the latest version of the iPhone SDK which you can download it from Apple Site. With the SDK you get some tools like Xcode, Interface Builder, new iPad simulator, and many more.

Lets start with the Most Useless App “Hello World” 🙂

In this tutorial i will show you how to make a simple image view in iPad. After completing this tutorial your App should look like this:

Creating a new project
Launch Xcode and click on File -> New Project -> Select Application (under iPhone OS) -> select Split View Based Application. and then give the name iPadHelloWorld (or anything else) ->save it.

Here is something change. This is not look like iPhone. Here you see three classes- delegate, MasterViewController and DetailViewController. MasterViewController is for Left Side portion of iPad (show table etc) and DetailViewController is Right side portion of iPad which show your Actual data.

Now follow the Screen Shot and do the same:

1. In your MasterViewController take NSMutableArray and give the name Images.

2. In ViewDidLoad alloc the array with image name.

3. In number of Row of Table return [images count].

4. Set Cell text label.

5. Here you select the row for the Detailview.

6. Now in Detail View take one UIImageView name it myImageView then synthesize it.

7. In DetailItem open the image in the ImageView.

8. Add image files in your Resource folder.

9. Open DetailView Xib and take one ImageView in this and connect this with myImageView.

10. Build and Go.

Your App look Like this:

Please give you comments and If you have any questions mail me…

Thanx