CTO, Software engineer and Team leader
Posts tagged XCode
iMeet application presentation
Jul 25th
Finally, the biggest moment: application is ready!! I am very proud of this application, as it represents my achievements in fast learning and adapting to:
- new way of programming, as XCode and Interface Builder truly represent the ModelViewController paradigm
- new language- Objective-C, which as any language has its pluses and minuses
- new device: mobile devices on which I didn’t work since my experience on Sales Force Automation in TotalSoft company, back in 2005, on Windows CE.
I’ve structured the application visually in few areas:
1. Login screen – the ‘”gate” to the application. Since the access to the
XML-RPC is done in a secure way, the application More >
Objective-C: Putting markers on Map control
Jul 21st
This article comes as a completion to my previous ones, XCode : using MapKit with no geocoding available out of the box and XCode: Modal windows – Google maps and shows how to add pins on your already created Map View.
First of all, adding the points to the map is not as intuitive as it might seem, so let’s start by creating a new class called POI – point of interest. Its header must be filled with this code:
#import <foundation foundation.h>
#import <mapkit mapkit.h>
#import <corelocation corelocation.h>
@interface POI : NSObject { CLLocationCoordinate2D coordinate; NSString *subtitle; NSString *title; }
@property (nonatomic, readonly) More > XCode: Modal windows – Google maps
Jul 18th
From time to time, you’ll need to show in your iPhone application a view over the entire application without navigating and destroying your workflow of the application. I’ll present the mechanism of modal windows as it is implemented in Cocoa Touch.
Lets take a real case: you have a view in which you want to input an address. Near the address you have a button which will show the user the Map centered on the specific address that he inputted. How this can be implemented?
The answer is quite simple: you need to declare the view from which you launch the modal More >
XCode : using MapKit with no geocoding available out of the box
Jul 15th
One of the tasks in the CSCW lab was to create a map on which the users to see the location of a specific address.
So I started working on it, knowing that the newest framework brings a lot of goodies, through which there is also a map framework. But surprise! Apple provides only reverse geocoding, not forward geocoding. This means that you can only transform a pair of Latitude / Longitude to the Map and it will show it to the user. But what to do when user enters an address?
My point is that nobody caries with him a GPS More >
Objective-C: Base64 to NSString and NSString to Base64
Jul 11th
While working on the CSCW Lab project, I encountered a situation in which the XML-RPC call returned an image, of course encoded as Base64. And guess what – in its known style, Apple doesn’t provide Base64 encoding and decoding – quite lame, given the fact that this encoding is used everywhere in data transfer over the internet – e-mail, browsers, web services – all of them use at some point this encoding to overcome the different local encodings on each one’s machine.
Once identified this problem, I had to solve it somehow – but guess what? – over the free sources More >
Processing NSDate into an ISO8601 string
Jul 6th
During the CSCW Lab, where I had the experience of working on iPhone, I had to connect to a XML RPC server. Some of the parameters of the request had to be formatted as ISO8601 standard. After some reading, I end up using the following code, managing both the conversion of a NSDate to NSString and a NSString to a NSDATE using the above format:
NSString –> NSDate
-(NSString *) strFromISO8601:(NSDate *) date {
static NSDateFormatter* sISO8601 = nil;
if (!sISO8601) {
sISO8601 = [[NSDateFormatter alloc] init];
NSTimeZone *timeZone = [NSTimeZone localTimeZone];
int offset = [timeZone secondsFromGMT];
NSMutableString *strFormat = [NSMutableString stringWithString:@"yyyyMMdd'T'HH:mm:ss"]; More > Objective-C: UIAlert or asking for confirmation
Jun 29th
While start XCoding, I faced a new challenge : how to create modal, single use confirmation dialogs? So after some digging in the internet, I found out that this can be actually done pretty simple and elegant. This will be very useful if you want to display some deletion confirmation or ask for user permission to use the camera or GPS sensor. All you have to do is just create a UIAlert and the IBAction hooked up to your “Nuclear launch” button, and then have its delegate decide whether to destroy the world or not.
In the header file you have to More >
UIImageView setImage problem
Jun 28th
While working for this semester’s CSCW lab project, I encountered a strange situation: no matter what I did, the UIImageView didn’t load the image. After some digging on the Internet about this, I found out that first thing to look for is whether you’re sending the setImage message to the UIImageView instance you expect.
Being newbie in XCode and Apple’s technologies in general, I forgot to use NSLog. So my advice is to check and check often with NSLog for a nil pointer in the same place you’re trying to set the image. Obj-C loves to make freshman crazy by sending More >
Xcode – String concatenation
Jun 6th
Don’t be fooled that Objective-C is a Object oriented language. For decades operators overloading is something standard in almost all of them.
But in Objective-C you don’t have it. Mostly, I believe that comes from the struggle of Apple guys to assure the stability of the system. A lot of errors can come from poorly designed overloads, thus the crashes can appear.
Now let’s put some hands on code.
In C, Java or Pascal you would have written something like the following for string concatenation:
string1 = string2 + string3;
But in Objective-C you need to do something different:
NSString *myString = @"http://www.mywebsite.com"; float myValue = More >
Apple’s Xcode : symbol(s) not found at Line Location Tool:0
May 13th
I am a begginer in XCode. My first real application for iPhone requires connection to a webservices. Since I wanted to use RPC XML or Soap, I searched on internet and found few examples (Apple programmers aren’t so into code sharing) to implement my requests. I want to mention that since the app is in the stage of proof of concept, the code is still not structured in classes separating the data and business layers as should.
So I took the example from CocoaDev and expected to run flawlessly.
But after pasting the code in my application and build it, a lot of More >
























