Objective-C Programming

180

Solutions

207

Contributors

Objective-C is an object-oriented programming language that is a strict superset of C (any valid C code is equally valid Objective-C code), and it inherits its object-oriented capabilities from Smalltalk. All procedural syntax is identical to that of C, and all object-oriented syntax is an implementation of Smalltalk messaging. It is the main programming language used by Apple for OS-X and iOS and their respective APIs/ Objective-C inherits the syntax, primitive types, and flow control statements of C and adds syntax for defining classes and methods.

Share tech news, updates, or what's on your mind.

Sign up to Post

I am creating an iPhone app that needs to interact with lots of XML files stored on disk, and have no interaction with the SQLite database.  I am worried about memory problems if I try and keep lots of files open at the same time ad run into a memory limit.

Is there a way to have what amounts to an index for a given XML file?  Rather than loading the whole file, just each node's name, say.  Then if I needed a certain node to e read from the XML file I could open the file at a specific byte location.

Is that crazy?

I remember in the old days of reading/writing to/from text files, we used to record the start byte of a certain value.  Then using that offset, write to a certain file location.

Can this be done with XML files on the iPhone using Objective-C?

Thanks.
0
Hi All, probably a very common question, but I want to develop an iPhone/iPad app that works in conjunction with a database driven (MySQL), PHP (or ASP) website.  I use a PC every day and am pretty good with VB, but am happy to learn C++ (or preferably C#).  However, I also have access to a Mac.  I need to keep the costs down to start off with - but at the same time, it needs to be professional (in the end).

Any guidance / suggestions would be greatly appreciated.  If it works, I will eventually wish to port it across, but I'm not too worried about that for v1.

Thanks as always.
0
I was about to start programming my App using Xcode and Objective-C, but learned about GWT and PhoneGap as a way to write the app using Java.

Has anyone had experience doing this?  I exact to need a few capabilities but am not sure if GWT and PhoneGap can offer me this:

- Read access to the Address Book on the iPhone (or iPad)
- Ability to send outgoing emails from my app, either using the email client on the iPhone or by making the app an IMAP/POP3 client.


Has anyone had experience with GWT and PhoneGap to make apps for mobile devices?

Has anyone had memory problems deploying such an app onto the iPhone?

Thanks!
0
Hello,

I need to create a expense IPAD app  for our company. I need an app that I can use on our IPAD's that is capable of taken picture of the receipt fill a sort expense report and upload to a server or hosting site for our manager to review and approve.

I don't that much about programming I tool VB in school but I did not like it. I am teaching my self Perl .

can I get some ideas on what language would be better for the expense report app. I know I can have someone do it for me but I think it will be a nice project to do at work since I am already thinking of learning programming.

my experience is server support and networking. I am moving to IT security and Linux programming
0
Hi, I'm using Objective-C to develop an App for the iPhone. I would like to build my App in two different languages. The output will be the same message in all languages, but simply in the user's language of choice. - For example - "Mary had a little lamb..." will be in the user's native language.

Is there a simple way to do this, other than writing two different Apps?

Can anyone provide a simple example or perhaps a tutorial on how to write output to the user in multiple languages?

Ideally, I would like the user to be able to select his/her language of choice upon initiating the App. How can this be accomplished in XCode?

Thanks,
Fulano
0
Hi,

I am scoping project requirements for development of an App for iPhone and iPad which I want to connect to a Firebird  database located on on a Windows machine. What architecture would you recommend for this connection?

Thank you for your help
0
I am new to Objective-C and see

#pragma mark

used in demo programs.  What's it do?

Also, I hope to make a free iPhone version and a paid version in the same source files.  So I need to use compiler directives.

1) Where do I define a variable the compiler sees, like DEBUG?
2) What built in directives are there for me already?
3) Where can I fid the syntax for compiler directives?
4) What advice can you give for me to do or not do as I try and associate objects, ViewControllers, synthesized methods, etc. with the free app versus the paid app.

#if defined FREE_VERSION
   // do X
#else if
  // do Y
#endif


Thanks!
0
I'm pretty new to Objective-C, but I do understand a lot of the syntax and the way it handles objects through messages.  But that's about it.  

One thing I'm trying to learn is how to add UI controls programmatically and I found some sample code to try and do this.  However, I'm not sure what method I need to "paste" the following code into.  It's for an NSButton.  

This is the sample code I found:
NSView *superview = [window contentView]; 
NSRect frame = NSMakeRect(10, 10, 200, 100); 
NSButton *button = [[NSButton alloc] initWithFrame:frame]; 
[button setTitle:@"Click me!"]; 
[superview addSubview:button]; 
[button release];

Open in new window


Any help is appreciated!
0
i see your tutorials about abjective-C . http://www.experts-exchange.com/tutorials/objectiveC-intermediate.jsp

Color quality is poor. Can you check out it? nobady can not understand this videos. BAD  colour  QUALITY!!!!
0
I've been developing iPad applications for the last year and a half, whilst at first i wasn't fond of objective-c i've grown to like it, however there is an area which I'm frustrated with, I'm not sure if I'm misunderstanding it, or whether it is simply lacking in this area, I am referring to exceptions.

In java (to give an example) it is easy to create custom exceptions, it is object orientated, and it allows you to throw exceptions at any degree of specificity and catch them at any level of specificity, or generality, i.e to catch them as a whole class of exceptions.. how can this be done with objective-c? I understand it's not possible to subclass NSException, so how can I differentiate exceptions which I'd like to catch by class type and I'd also like to catch as a group??

Am I missing something or could this be considered a flaw in objective-c?
0
I'm searching for an Objective-C iPhone app demo program which is an imap/pop email client.

I'd like to have my app read/write emails but need to see how it work first.


Thanks.
0
Hello

I am new to xcode and Objective-C. Also I am pretty new to object oriented programming in general. So pardon if I am not using the correct wordings here... :-)

I have created a simple game for Iphone using xcode. In 3-4 different places in the code I need to reuse the same code. Instead of just copy/paste the code-snippets I want to make a subroutine (or whatever it is called) because sooner or later (probably sooner) I will do changes in one of the copies and I will screw things up.

The "subroutine" doesn´t need to take any arguments, and does not need to return any arguments. It will just modify global variables and do changes to the gui.

How is this solved most easily?

Thanks in advance!

Best regards
Kvistofta
0
This Objective-C code comes from a sample program which shows how to retrieve Contacts from the iPhone's Address Book, then encrypt it using the attached code:

EncryptionCodeImage.tiff

I got the code from the project referenced on this page's "Github page here" link.

http://maniacdev.com/2012/02/open-source-ios-address-book-wrapper-library-providing-automatic-hashing-and-permission-alerts/


What type of encryption is this?  Is it as secure as AES encryption?

To use it, must I convert all data to strings? That probably would not be difficult since I need to write it to XML anyway...


Thanks.

P.S. I needed to attach an image since I could not attach the code in the body of the email not as an RTF.
0
I am new to Objective-C and iPhone development, and was happy to learn that the new SDK included ARC and removed the need to clean up, like C++. But I am researching a project written  by Apple in 2010 and see this use of a function called CFSTR().

      NSArray *people = (NSArray *)ABAddressBookCopyPeopleWithName(addressBook, CFSTR("Appleseed"));

Do I need to use this still?

Thanks.
0
I saw this demo Objective-C program which seems to work fine for "Quick Contacts", which does not seem to be the Address Book, as I had in mind.  


https://developer.apple.com/library/ios/#samplecode/QuickContacts/Introduction/Intro.html#//apple_ref/doc/uid/DTS40009475-Intro-DontLinkElementID_2

I there a similar demo which interacts with the Address Book database, or is that not allowed by Apple?

Thanks.
0
In this project:
https://developer.apple.com/library/ios/#samplecode/QuickContacts/Introduction/Intro.html

I see a file named: QuickContacts_Prefix.pch

Located in a folder called "Other Sources" folder

With its entire contents being:

//
// Prefix header for all source files of the 'QuickContacts' target in the 'QuickContacts' project
//

#ifdef __OBJC__
    #import <Foundation/Foundation.h>
    #import <UIKit/UIKit.h>
#endif

What does this file do?
What is this compiler directive __OBJC__?

Thanks.
0
Is there any C /C++(preferably C) based simple XML editor library that provides a GUI based interface to edit an XML on mac platform. I would like to include it in one of my projects.

http://xmleditor.sourceforge.net/ is one of them but it requires GLIB (so I can't install on MAC, right? )
0
I need AES encryption or equivalent added to my iPhone App. Are there libraries I can incorporate into my Objective-C app?


Thanks.
0
I am new to developing for the iPhone and need a demo program which can show how to use Objective-C and Core Data to export data to an XML file. Does anyone know of such a sample?

Thanks.
0
I need to learn how to use Objective-C to get my iPhone App to send and/or receive text messages and/or emails. Does anyone have such a demo program I can look at in Xcode?

Thanks.
0
I need a sample iPhone app, written in Objective-C, which will demonstrate how to interface with Contacts on the iPhone.


Thanks.
0
Here is an example of one that does:

@class AddRoleTVC;
@protocol AddRoleTVCDelegate <NSObject>
- (void)theSaveButtonOnTheAddRoleTVCWasTapped:(AddRoleTVC *)controller;
@end

@interface AddRoleTVC : UITableViewController

====

but other objects DO NOT include @class

Please explain the difference.

Thanks.
0
I see #pragma mark in the Objective-C code but am unsure if it's just a comment or what function it performs.

Please let me know...

Thanks.
0
I see variables in Objective-C and want to see their values, but can not.  For example:

cell.textLabel.text = role.name;

I wanted to see the value of role.name and hovering over it shows me the pointer address. I stumbled on the feature Print Description which printed the value of the role.name "CEO" in the output window. But now I can not find how I selected Print Description.

After the assignment statement (above) has executed, I can not open up the cell object too find anything that seems of interest. There are lots of values in a list, but I do not see "textLabel", which I looked for in the hopes I could find a value for "text".

Can someone help me to find how to inspect values in the debugger?

Thanks.
0
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

I am confused about what's the function name and what are the parameters? Please break it down for me.

Thanks.
0

Objective-C Programming

180

Solutions

207

Contributors

Objective-C is an object-oriented programming language that is a strict superset of C (any valid C code is equally valid Objective-C code), and it inherits its object-oriented capabilities from Smalltalk. All procedural syntax is identical to that of C, and all object-oriented syntax is an implementation of Smalltalk messaging. It is the main programming language used by Apple for OS-X and iOS and their respective APIs/ Objective-C inherits the syntax, primitive types, and flow control statements of C and adds syntax for defining classes and methods.

Top Experts In
Objective-C Programming
<
Monthly
>

No Top Experts for this time period. Answer questions to earn the title!