Developer.apple.com/legacy/mac/library/documentation/DeveloperTools/Conceptual/SoftwareDistribution4/SoftwareDistribution4.pdf. Building for Multiple Targets in XCode | finbarrbrady.com. Some months ago, I needed to create new versions of my app’s. I wanted to do this without duplicating any code or projects. So I did some research and decided to figure out how to build towards multiple targets in XCode. This is something I shied away from for a long time as I thought it would be a nightmare to figure out. What I discovered was that it’s much easier than I first thought, and also much more powerful as well. So why do I need to do this? To create different versions of your app which have different features. So how do we do it? Lets create a simple demo project. In XCode, create a new project based on the ‘Utility Application’ template. Click on ‘Build and Run’ Notice under ‘Targets’ that there is one default target called ‘TargetTest’ We can create a new target by simply duplicating this one.
You will notice a new info.plist copy is made for this new target. Lets rename the newly created target, TargetTest_VIP Now, right click on the new target, and select ‘Get Info’. Objective c - How to prevent navigation bar from covering top of view in iOS 7. Cross-Compiling Android Applications to the iPhone. Sheet Programming Topics: About Sheets. A sheet is simply a dialog attached to a specific window, ensuring that a user never loses track of which window the dialog belongs to.
The ability to keep a dialog attached to its pertinent window enables users to take full advantage of the OS X window layering model and also encourages modelessness; users can work on other documents or in other applications while a sheet is open. A sheet is document modal—that is while it is open the user is prevented from doing anything else in the window, or document, until the dialog is dismissed.
In contrast, a dialog that is application modal prevents the user from doing anything else within the application. Managing the animation of sheets, and making sure the sheet appears properly if the parent window is narrower than the sheet or near the edge of the screen, is provided “for free” by Cocoa. Cocoa provides an API for presenting sheets. Because sheets are document modal, these calls return immediately after presenting a sheet. When to Use Sheets.
Slick's Definitive Guide To Properties. I keep answering similar questions with similar answers, so I'm trying to put this stuff in one place. I'll just start referring people to this thread. Please feel free to offer comments or suggestions, and I'll make corrections where appropriate. I'm open to debate on anything mentioned here, but this is what I do, it works well for me, and is drawn from the advice of significantly more-experienced coders.
Thread Guide You can just scroll down and start reading, but the core of this thread involves these three posts: Part 1 - OverviewPart 2 - Common MistakesPart 3 - Color Coding Additionally, as questions are asked, answers are provided. These are just highlights, and not meant to detract from the other discussion posts that are also quite useful. Post edited by BrianSlick on.
Getting Started With Core Data In iOS 5 Using Xcode Storyboards. Recently I mentioned an excellent tool for generating Core Data classes, and another popular resource for developers using Core Data is Magical Record providing a library for using Core Data utilizing the Active Record pattern. I’ve also mentioned a good tutorial for those getting started with Core Data, but with some of the recent changes, but with the release of iOS 5 there are a few issues and that tutorial does not cover how to use Core Data with Xcode storybaords.
Today I came across an excellent set of tutorials for those getting started with using Core Data on the iOS platform. The tutorials are from Tim Roadley, and cover a wide variety of problems faced by those beginning with Core Data. Here are the tutorials: A great set of tutorials for getting started with Core Data, I really like the attention to detail and how Tim goes out of his way to explain things rather than just show what to do. The first tutorial was added to the Xcode Storyboard page. » Core Data Basics Part 1 – Storyboards, Delegation Tim Roadley. Welcome to my tutorial set ‘Core Data Basics’. The aim of this set is to get you up and running with Core Data attached views as fast as possible.
If you’re new to objective-c programming you may wish to run through the iOS Newbie series first. I’m going to provide raw essentials only so you don’t get too overwhelmed. I’m writing this tutorial set as a personal learning exercise because I found Core Data difficult to learn. I hope my ‘everything-you-need-and-nothing-you-don’t’ tutorial technique brings you up to speed quickly. To follow this tutorial I assume you know how to use Xcode at least in a basic sense. Again, try the iOS Newbie series if you’re lost. Create a new iOS ‘Single View Application’: Call the project ‘Staff Manager’ and ensure the Device Family is iPhone: Link to the Core Data Framework (click the + sign shown below to add it): A Storyboard is a canvas where you can design your view based app.
Lets get started. Nice huh! Great! Here’s the source code so far -Tim. Core Data Tutorial for iOS: Getting Started. Core Data Failed Banks Model Diagram Swift Update: Check out our book Core Data by Tutorials for the latest on Core Data in iOS 8 and Swift! The first chapter of the book is available as a free tutorial too: Your First Core Data App Using Swift. Update 4/17/12: Fully updated for iOS 5 (original post by Ray Wenderlich, update by Adam Burkepile). Of all of the ways to persist data on the iPhone, Core Data is the best one to use for non-trivial data storage. It can reduce the memory overhead of your app, increase responsiveness, and save you from writing a lot of boilerplate code.
However, the learning curve for Core Data can be quite large. In this first part of the series, we’re going to create a visual data model for our objects, run a quick and dirty test to make sure it works, and then hook it up to a table view so we can see a list of our objects. Before proceeding with this Core Data tutorial, I recommend checking out the tutorial series on SQLite for iPhone Developers first. How To Preserve User Data Using SQLite or Core Data on Apple Devices. When building an iOS application, one thing to consider is a concept called “data persistence.” Data persistence is a method of holding onto data in case the application or device is reset. No one wants to be playing a game or updating their checkbook and lose everything after a reset because a poorly-designed app did not store their information.
There are many ways to ensure that user data is captured and preserved, but the two methods that I want to highlight are using SQLite databases and using Apple’s Core Data framework. Apple has embedded functionality to use SQLite databases within your application. This method is exclusively for SQLite databases, and not mySQL databases.
Whats the difference? The main difference between the two is that SQLite databases are embedded in the application, and they’re one standalone file. Apple’s Core Data framework, unlike SQLite, takes more of an object-oriented approach to storing user data. SQLite (Note: All examples presented are from XCode 4.2) Why Core Data Is a Bad Idea - Alastair’s Place. OK, so I’m being a little mischievous here; it’s possible that, for your application, Core Data is a good fit. But carry on reading, because I want to highlight something that you may still wish to think about when deciding to use Core Data as a persistence mechanism in your app. One of the first things you might want to consider when thinking about using Core Data is what type of persistent backing store you wish to use.
Apple’s framework provides four built-in implementations (three on iOS), namely: XML (OS X only)AtomicSQLiteIn-memory (and so, not, in fact, persistent) Of these, the XML store is clearly intended for debugging, so let’s discard that, and the in-memory store, while useful, is not really persistent, so we’ll ignore that for now too. So the options are the Atomic store and the SQLite store. A lot of people therefore plump for the SQLite store. If you need this level of consistency guarantee, this is a Good Thing, but it is not without overhead. To summarise: Jonathan Ellis » Working with SQLite in Objective-C/iOS. The Cocoa API provides Cocoa Touch which is a great (and powerful!)
Abstraction layer over the underlying SQLite libraries, but sometimes you just want to keep things simple with simple operations directly on a database. Unfortunately, the SQLite libraries themselves are implemented in C, so not object-oriented, and are fairly complex. With that in mind, for a recent project I developed my own small wrapper around the underlying SQLite libraries to allow me to perform queries and get back responses as Objective-C objects rather than C primitives. I’m not going to reproduce all of the code here, but I will provide a starter that will get you up & running and give you most of the functionality you would need.
Of course there is more you can do (particularly error handling) that I don’t get into here, but feel free to post any improvements you may have in the comments. The first thing you need to do is link libsqlite3.0.dylib to your build target. Let’s take a look at what’s going on here. Database - Make a program able to save data with objective-c. Cocoa for Scientists (XXXIII): 10 Uses for Blocks in C/Objective-C.
By Drew McCormack Snow Leopard brought with it blocks (closures) for the C and Objective-C languages. Blocks at first seem to be nothing more than anonymous, inline functions, but that is only partially true, because they are also a lot like objects, carrying about their context data with them. Once you start playing with blocks, a whole new style of programming opens up to you, and you find uses for blocks in places where you may not have expected them. This is my list of ten different applications of blocks in C/Objective-C. 1) Replace Callbacks C programmers rely heavily on callback functions, particularly when working with asynchronous APIs.
Callbacks are functions that are passed to other functions, which then call them at some future time, eg, to retrieve some data or indicate that some process is complete. The problem with callbacks is two fold: Blocks can achieve the same effect as callbacks in a neater manner. Here it is with a block That’s quite a bit simpler. 2) Postpone Tasks. Blocks | Ry's Objective-C Tutorial. ‹ Back to Ry’s Objective-C Tutorial Blocks are Objective-C’s anonymous functions. They let you pass arbitrary statements between objects as you would data, which is often more intuitive than referencing functions defined elsewhere. In addition, blocks are implemented as closures, making it trivial to capture the surrounding state. Creating Blocks Blocks use all the same mechanics as normal functions. You can declare a block variable just like you would declare a function, define the block as though you would implement a function, and then call the block as if it were a function: The caret (^) is used to mark the distanceFromRateAndTime variable as a block.
The block itself is essentially a function definition—without the function name. After assigning the block literal to the distanceFromRateAndTime variable, we can call that variable as though it were a function. Parameterless Blocks If a block doesn’t take any parameters, you can omit the argument list in its entirety. Closures Summary. Introducing the iOS 6 Feast! This post is also available in: Japanese, Arabic If you're new here, you may want to subscribe to my RSS feed or follow me on Twitter. Thanks for visiting! Today is a day to celebrate – the iOS 6 NDA has been lifted, so we can finally talk about the iOS 6 SDK! The iOS Tutorial Team and I believe that iOS 6 is one of the most exciting releases yet.
And yes – just like last year, we had to do something special to mark the occasion. The iOS 6 Feast consists of the following six courses: Optional appetizer: Beginning Auto Layout TutorialSecond course: iOS 6 By TutorialsThird course: iOS 5 and iOS 6 By Tutorials BundleFourth course: iOS Apprentice Updated for iOS 6Fifth course: iOS 6 Tutorial MonthDessert: iOS 6 Feast Giveaway During the iOS 6 Feast, you’ll learn about all of the new APIs introduced in iOS 6 through easy-to-understand tutorials – Auto Layout, UICollectionView, Passbook, the Social Framework, In-App Purchase mods, and much more! Want to find out more? [tweetbutton] “But wait!” iOS 5 Storyboard: How To use Segues, Scenes and Static Content UITableViews. With iOS 5, Storyboards represent a significant change to how we, as developers, construct our user interfaces using Interface Builder. So far my experience of Storyboards has been extremely positive however, resources are thin on the ground and with this post I hope to pass on some of my initial experiences.
For a walk through of some of the basics and common pitfalls check out my YouTube video. I have also recently created a practical example around todo lists with a backend system and a full explanation of how to use Storyboards in a working application please check it out here. There are several key concepts that this article will cover the first is the concept of the Scene. Within Storyboards every UIViewController represent one screen of content. These scenes are linked together with Segues, these define the transitions between one scene to another. Other extremely useful features are, Static Cells as your UITableView Content and Prototype Cells.
iOS 5 SDK: UIAlertView Text Input and Validation. With the release of the iOS 5 SDK, the UIAlertView class has been updated to natively support text input, secure text input, and username/password form fields. This quick tip will demonstrate how to take advantage of these new enhancements! In a previous full-length tutorial for beginners, I walked the reader through setting up a project with a custom button and background.
I'll use the project created in that tutorial as the starting point for this one. Introducing Alert View Styles The layout and form elements of a UIAlertView can now be easily and quickly controlled by setting the alertViewStyle property. Possible options for this property include: UIAlertViewStylePlainTextInput This style will add a single text field to the alert view: UIAlertViewStyleSecureTextInput This style is just like the plain text field, except that all characters entered will be obscured: UIAlertViewStyleLoginAndPasswordInput UIAlertViewStyleDefault This is the default style we all already know and love: That's it!
iPhone Development 101. iOS Brownbag: View vs. Layers (including Clock Demo) | Rapture In Venice: iOS, Android Mobile Development Shop. For many iOS developers, layers are a lower-level, complex version of the UIView. In reality, it’s the UIView which is a thin layer on top of CALayer. Unfortuntely, 95% of the iOS books and documentation out there talk almost exclusively about the UIKit and so it’s no surprise we get that impression. In this blog, I’m going to explain the difference between UIView and CALayer, tell you when you should be using either, and demonstrate the power of layers by creating a working clock. UIView vs. Despite what many developers think, it’s the CALayer that’s the fundamental drawing unit in iOS. Every UIView comes packaged with a CALayer knows as the “backing layer” or “underlying layer.” Now, let’s say you wanted to write a Bar Chart component. Should I use subviews or sublayers? This isn’t a simple question, but there’s one rule of thumb that make deciding a lot easier.
So, when making your bar chart, you should be using sublayers for the bars. Demo: Let’s build a working clock! Summary. OpenGL ES Programming Guide for iOS: About OpenGL ES. iPhone app distribution made easy - Part 1. Animate UITableView Cell Height Change. How To Make An Interface With Horizontal Tables Like The Pulse News App: Part 2. Multithreading and Grand Central Dispatch on iOS for Beginners Tutorial. Multithreading and Grand Central Dispatch on iOS for Beginners Tutorial.
High Order Blog : Appropriate Use of C Macros for Objective-C Developers. Objective c - Why the retain cycle warning not thrown. Modal View Controller Example – Part 1 | timneill. All about OpenGL ES 2.x – (part 1/3) | db-in's blog. The Categorized OpenGL ES Tutorial Collection. LLDB to GDB Command Map. Intermediate Debugging with Xcode 4.5. Advance debugging in XCode. LLDB to GDB Command Map.
Code:Explained Adventure: A Quick Tour of the Project. Objective c - iOS popovers as menu tutorial. Location Awareness Programming Guide: Making Your App Location-Aware. Setting up an Automated Build in an iOS environment – part 3 | Acorn Heroes. How to make an IPA on XCode 4.3. Octo-online/Xcode-formatter. UniversalIndentGUI. NSNotificationCenter tutorial. Archive Tutorials. Reachability: Classes/Reachability.m. Objective c - How to check for an active Internet Connection on iPhone SDK.
How To Get the Current User Location in iPhone App | iOS Programming.