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

Hi there,

I am currently designing a Mac application where one user is to send another user a file and chat over a network connection. Is there any libraries or examples I could look at? I am really having a hard time finding resources regarding this topic.

Regards,
EZFrag
0
Hey people,

I'm not a programmer or coder, someone just gave me a binary and C source file. I'm just trying to run it from terminal and I'm getting "command not found.

I copied the binary and C source file to my root (file names are "sector_size.c" and "sector_size", and this is what I do from Terminal

thanasimacpro:/ thanasikala$ cd /
thanasimacpro:/ thanasikala$ sudo ./sector_size /dev/disk0
Password:
sudo: ./sector_size: command not found
thanasimacpro:/ thanasikala$ 

Open in new window


Ideas?

Thanks
0
I'm trying to install the tools to program with C. This is my first time trying to program with C, and I'm lost. First I have a windows machine and a Mac too. so I know that in order to program with C, a way is to install Cygwin on a windows machine to be able to use GCC. But with Mac I installed Xcode tools in order to use gcc. I installed the Xcode(Disk image), but I have no idea about how to use it in order to use gcc with c programming. Any help with both using gcc with Windows and Mac would be very appreciated.
0
Hi all,
I am using the instrument tool to check for memory leak and I have hard time understanding the tool's output. I ran my iPhone app with instruments for 10 minutes and attached the output of the tool. as you can see there are couple of leaked objects but all are from foundation framework not my app. What does this mean? I think since the leaks are in the framework, I cannot do anything about them and since the tool shows no leak in my app, the app is leak free. Correct?
  Screen-shot-2011-08-25-at-4.05.3.png Screen-shot-2011-08-25-at-4.05.3.png
0
Hi experts, can you guys recommend any good tutorials or books to learn Objective-C? Thanks!
0
Hello EE-Mac,

I am doing an app in XCode with objective-C.

My problem is as follow:

I have a code that read a web service that receive some data (see snippet 1)

ok so here I am used to .NET Technology. when you see the line   action:@selector(handleGetPresentations:)
I thought XCode would go inside that BEFORE going to the next line wich is a NSLog then the return. But I see that it goes to the NSLog before entering the handleGetPresentation. so my finalList count is 0 and it returns nothing.

I dont understand how to return my array with an action:@selector

Is it possible maybe to instead of writing (void) in my handleGetPresentations to return (NSMustableArray*) ?
if so, I dont understand how in loadPresentations to retrive that return value.

any idea??

 
@synthesize listData;

...

-(NSMutableArray*)loadPresentations{
    NSLog(@"Test");
    SDZService* service = [[SDZService alloc]init];
    [service GetPresentations:self action@selector(handleGetPresentations:)];

    NSLog(@"count is, %i", finalList.count);
    return finalList;
}

-(void) handleGetPresentations:(id)value {
    if ([value isKindOfClass:[NSError class]]) {
        NSLog(@"This is an error: %@", value);
        return;
    }
    if ([value isKindOfClass:[SoapFault class]]) {
        NSLog(@"This is a fault: %@", value);
        return;
    }
    
    NSMutableArray* a = value;
    NSMutableArray* finalArray = [[NSMutableArray alloc] init];
    
    for (SDZPresentation* p in a){
        

Open in new window

0
I am having trouble finding a good compiler that's free for Macs.
0
I want to install inner-active.com on my app, but I have a question. They say it's very easy to implement but since I'm new to Object-c I would like some help.


I have this on my AppDelegate.m file

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.
    // Add the navigation controller's view to the window and display.
	
	self.window.rootViewController = self.navigationController;
    [self.window makeKeyAndVisible];
   
	[[FontManager sharedManager] loadFont:@"Rockwell.ttf"];
	
    // call the Appirater class
    [Appirater appLaunched];
    
    // call ads
    [InneractiveAd DisplayAd:@"test" withType:IaAdType_FullScreen withRoot:<#(UIView *)#> withReload:30];
	return YES;
}

Open in new window



My question is what should I enter on the <#(UIView *)#>? I'm not sure.


Thanks
0
I want to access a WCF service created in .net to be accessed via an iphone app. I currently know the end points of the service(svc file) and can access it via a browser...can you provide a sample code on how to access this svc file via iphone app using objective C
0
Hi experts,
                    How to get list of all running application using C or C++ in MacOSX.

Regards,
Vimal.
0
Hi, I have a question regarding iPhone and iPad Game Development. I was under the impression that all iDevice games had to be developed using Objective-C or OpenGL.

I was speaking to a friend today who advised me that iDevice games - can - be developed in Adobe ActiveScript 3.0 and Flash Professional CS5. Is that correct? Or is there something there that he's not aware of?

Will the App Store approve a game which was developed in Adobe ActiveScript 3.0 and Flash Professional CS5 for the iPhone or iPad?

Thanks for your help,
Fulano
0
Hi experts,
                I am developing a Netscape Apis browser plugin using c++. I need to display a messagebox how can I achieve this in c++ in XCode(MacOSX).

Regards,
Vimal.
0
Hi,

I have  a login page in my iPhone App that has two distinct text fields, one for username and one for password but I dont like having them as two distinct boxes.

Looking at a lot of apps, they seem to have a large rounded corner text box with two lines, one for username and one for password with a horizontal separator line - how do I achive the same look and feel?

Thanks for any help,

James.
0
I have a new PC and want to start writing software. Is it true the GCC is included? If so, where is it?
I do have al my installation disks.

What other compilers can I use to write Objective C or C++ on the Mac?


Thanks,
newbieweb
0
Can I boot from USB DVD drive.  Do I hold down c at startup
0
Hi, I'd like to develop an application that uses GPS. However, other than knowing an overview of how GPS works, I don't know how to program for it. Can someone offer any good technical tutorials or articles discussing GPS; how the signals work as they relates to iDevices, how they beacon, what the signals look like (i.e. their frequency range), etc. I'd really like to understand the technical aspect of how the technology works, so I can plan for my App in the best way possible.

Your assistance is greatly appreciated.

Thank you,
Fulano
0
//  RootViewController.h
//  Locations
//
//  Created by me on 6/07/11.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#import <CoreLocation/CoreLocation.h>

@interface RootViewController : UITableViewController <CLLocationManagerDelegate> {
   
    NSMutableArray *eventsArray;
    NSManagedObjectContext *managedObjectContext;
   
    CLLocationManager *locationManager;
    UIBarButtonItem *addButton;
}

@property (nonatomic, retain) NSMutableArray *eventsArray;
@property (nonatomic, retain) NSManagedObjectContext *managedObjectContext;

@property (nonatomic, retain) CLLocationManager *locationManager;
@property (nonatomic, retain) UIBarButtonItem *addButton;


@interface RootViewController : NSManagedObject {@private  //this line comes up with two errors - a missing @ and a '(' //
}

@end
0
HI experts,
 
                 How can we use pthread_cond_t ,pthread_cond_wait(), pthread_cond_init(), pthread_cond_signal(), etc.. POSIX C function for interprocess communication. I am able to use this in threads with in a processes. How can I use these functions for communicating with two or more processes.

Regrads,
Vimal.
0
Hello Experts,

I have data come from .Net Application Via XML format, this Data had been encrypted via .Net function and it must send to IPAD application as it encrypted , I need to know how I can Decrepit this data from Objective-C

The .Net Encryption  Function will be like this

Private key() As Byte = {&H61, &H72, &H84, &H7A, &H24, &H43, &H65, &H64, &H73, &H55, &H64, &H75, &H66}



    Const PASSWORD As String = "TestPassword"

Public Function Encrypt(ByVal sPlainText As String)



        Dim aPlainBytes As Byte()

        Dim aPassword As PasswordDeriveBytes



        aPlainBytes = System.Text.Encoding.Unicode.GetBytes(sPlainText)

        aPassword = New PasswordDeriveBytes(PASSWORD, key)

        Dim sEncryptedData As Byte() = Encrypt(aPlainBytes, aPassword.GetBytes(32), aPassword.GetBytes(16))



        Return Convert.ToBase64String(sEncryptedData)



    End Function



 Private Function Encrypt(ByVal sPlainData As Byte(), ByVal aKey As Byte(), ByVal aIV As Byte()) As Byte()



        Dim oMemoryStream As MemoryStream = New MemoryStream



        Dim oRijndael As Rijndael = Rijndael.Create()

        oRijndael.Key = aKey

        oRijndael.IV = aIV



        Dim oCryptoStream As CryptoStream = New CryptoStream(oMemoryStream, oRijndael.CreateEncryptor(), CryptoStreamMode.Write)

        oCryptoStream.Write(sPlainData, 0, sPlainData.Length)

        oCryptoStream.Close()

        Dim aEncryptedData As Byte() = oMemoryStream.ToArray()



        Return 

Open in new window

0
Hi Experts,
my latest challenge is do create a dashboard on an iPad that will make use of sql and excel as datasources.
I have acquired a macbook pro, xcode/ios, registered as apple developer.
I therefore should have all the basics to get started and are very willing to learn.
I am actually a .net developer but will not have a problem learning Objective-C
Please help me to get started with my first dashboard with a kickstart!
regards
0
In Xcode / Objective C I have a project with 2 UIViewControllers.

UIVC 1 has a button on it.  How can I have the click of that button bring up UIVC 2?
0
Can any one please help me to get start developing app for Android, IPhone and Blackbeery please.

I am c# .net developer, i am want to create an app that can be installed on Android, Iphone and blackbeery.

Tools i need , programming language... etc.,

please help me to get start.

Thanks
0
How can I create a string which includes hexadecimal characters? I want a string which starts with:

0x02   (start character)

... then "Hello" in the middle

... and then ends with:

0x0a (end of line character)

NSString *str=@"0x02Hello0x0a";

The above obviously doesn't work, can anyone amend the above? Or does it need to be stored as an NSData rather than NSString? Any solution which results in an NSData or NSString representing this above will do.

Many thanks!
0
Hi experts,

               I am using Xcode developement sute for C++ programming in Mac OS. I am basically a C++ programmer in windows OS. Is there any equivalent functions for CreateEvent(), OpenEvent(), SetEvent(), ResetEvent() in Mac OS C++.I am a beginner for Mac OS developement.

Regards,
Vimal.
0
Hello all,

Is there any way to send AT Commands to Iphone 4 and start a call, or answer a call, or hangup a call. I was doing that by using my nokia n97. I was connecting it by using bluetooth modem connection and send AT commands. By this way, I was controlling my phone via my pc application. But i can't do that by my iphone. In IOS4 sendmodem application and minicom do not work. My phone is jailbreaked. I wrote all forums on internet but no answer has come yet. I need a way to control my phone remotely (not via vnc etc.). I want to start a call or answer a call by sending commands remotely or anything else. I need you assistance. Or if you know the way to use it (C#.NET), I can use my laptop as a bluetooth headset, and like a bluetooth headset i can control phone to redial or answer a call. I know my question is long but just i want to find a way.
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!