Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 8, 2013, 03:52 PM   #1
RookieAppler
macrumors member
 
Join Date: Mar 2012
Saving a cocoa application to like an executable.

Hello, I am very new to mac cocoa applications. I currently work on iOS programming. So i was interested in cocoa applications also. I followed few tutorials and got a core-data based cocoa application built. Its very simple. Add records to table view and removing them. Now i have started to compare .net application to cocoa application..is it right?i built C# applications in the past in my school. I used to get .exe files in those applications. I can use the .exe file on any of my PCs. I used archive to create an application to test now. So i saved it on my desktop. Now i open the application and work with it..add records, remove records. When i close the application, it asks me to save it in binary,sqlite or xml. How can i close the application to save it like a .exe file. Basically not to ask user to save..more questions coming. Thanks

Last edited by RookieAppler; Feb 8, 2013 at 04:56 PM. Reason: Changed information
RookieAppler is offline   0 Reply With Quote
Old Feb 8, 2013, 06:16 PM   #2
jared_kipe
macrumors 68030
 
jared_kipe's Avatar
 
Join Date: Dec 2003
Location: Seattle
Send a message via AIM to jared_kipe
The Binary, XML and sqlite are the data part of core-data. They have nothing to do with (.exe) equivalency.

When you build an (Cocoa) application bundle in MacOS you are creating a nested folder structure with the binary (no file extension) and any resources needed to run that application.

This would be equivalent to creating and installing an application in Windows that includes a .exe and resources like images that are used by that .exe in say C:\Program Files\
jared_kipe is offline   1 Reply With Quote
Old Feb 8, 2013, 08:33 PM   #3
RookieAppler
Thread Starter
macrumors member
 
Join Date: Mar 2012
@jared_kipe.Thanks. So is there a way i can build a cocoa application exactly like an .exe file with resources like you said. Like an application where i enter username, password. It connects to a web service. Validates those credentials and returns me true/false. I want to take that application and put it on my friends mac and he can put his credentials and check. But no saving option when we close the application. Very simple one. I must say again i am very new to cocoa.
RookieAppler is offline   0 Reply With Quote
Old Feb 9, 2013, 06:49 AM   #4
Nmx-
macrumors newbie
 
Join Date: Apr 2011
nwm. didnt quite understand your first post
Nmx- is offline   0 Reply With Quote
Old Feb 9, 2013, 11:00 AM   #5
Ap0ks
macrumors regular
 
Join Date: Aug 2008
Location: Cambridge, UK
Quote:
Originally Posted by RookieAppler View Post
@jared_kipe.Thanks. So is there a way i can build a cocoa application exactly like an .exe file with resources like you said. Like an application where i enter username, password. It connects to a web service. Validates those credentials and returns me true/false. I want to take that application and put it on my friends mac and he can put his credentials and check. But no saving option when we close the application. Very simple one. I must say again i am very new to cocoa.
Turn off core data and document-based application and you'll be able to make a simple program without asking you to save when exiting.
Ap0ks is offline   0 Reply With Quote
Old Feb 9, 2013, 12:37 PM   #6
jared_kipe
macrumors 68030
 
jared_kipe's Avatar
 
Join Date: Dec 2003
Location: Seattle
Send a message via AIM to jared_kipe
Quote:
Originally Posted by RookieAppler View Post
@jared_kipe.Thanks. So is there a way i can build a cocoa application exactly like an .exe file with resources like you said. Like an application where i enter username, password. It connects to a web service. Validates those credentials and returns me true/false. I want to take that application and put it on my friends mac and he can put his credentials and check. But no saving option when we close the application. Very simple one. I must say again i am very new to cocoa.
You don't understand, every time you build a Cocoa application you are building the 'like .exe with resources like I said'.

What is happening is that you made an application like TextEdit. You go into it, mess around, and low and behold, the application wants to save your progress.

If you want an application without any of that, start over with a pure view based applications, throw some IBOutlet text fields up there with a button to process the results. When you build it you can take that, zip it up and put it on your friends computer no problem.
jared_kipe is offline   1 Reply With Quote
Old Feb 9, 2013, 03:48 PM   #7
RookieAppler
Thread Starter
macrumors member
 
Join Date: Mar 2012
Quote:
If you want an application without any of that, start over with a pure view based applications, throw some IBOutlet text fields up there with a button to process the results. When you build it you can take that, zip it up and put it on your friends computer no problem
I followed like you said.Doing that will build me a iPad/iPhone application. I dont want an iOS application. A mac/cocoa app that one logs in and gets connected to a web service. A stand alone application.
Forgive me for this non-mac terminology.
RookieAppler is offline   0 Reply With Quote
Old Feb 9, 2013, 04:16 PM   #8
RookieAppler
Thread Starter
macrumors member
 
Join Date: Mar 2012
@jared_kipe.I was also trying to do more on a core data cocoa app (TestApp) that i built. I made an archive->application and saved the file to my desktop. I had saved some data in that application. Saved it in binary info called "PlayerInfo". I launched the app on my desktop. I went to File->Open Recent and choose the binary info file "PlayerInfo". It open another instance of my app TestApp and showed the file info there. So coming back to one my earlier questions, when i double click and open the application can it retrieve the file info automatically?
RookieAppler is offline   0 Reply With Quote
Old Feb 9, 2013, 07:20 PM   #9
jared_kipe
macrumors 68030
 
jared_kipe's Avatar
 
Join Date: Dec 2003
Location: Seattle
Send a message via AIM to jared_kipe
Quote:
Originally Posted by RookieAppler View Post
I followed like you said.Doing that will build me a iPad/iPhone application. I dont want an iOS application. A mac/cocoa app that one logs in and gets connected to a web service. A stand alone application.
Forgive me for this non-mac terminology.
Sorry, I guess I just mean OSX->Cocoa Application, then don't check off 'Use Core Data'. This will give you a basic view based application.

----------

Quote:
Originally Posted by RookieAppler View Post
@jared_kipe.I was also trying to do more on a core data cocoa app (TestApp) that i built. I made an archive->application and saved the file to my desktop. I had saved some data in that application. Saved it in binary info called "PlayerInfo". I launched the app on my desktop. I went to File->Open Recent and choose the binary info file "PlayerInfo". It open another instance of my app TestApp and showed the file info there. So coming back to one my earlier questions, when i double click and open the application can it retrieve the file info automatically?
There are a lot of ways to answer this. You could use a NSUserDefaults to save all of your data. You could use NSUserDefaults to store the last file saved. You could use NSBundle to save/load your data automatically inside your application bundle...
jared_kipe is offline   1 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Tags
cocoa, ios, mac, save, work

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Cocoa Application: Setting Custom Background Image ajbudis Mac Programming 1 Jul 22, 2013 11:42 AM
General: Opening the executable in an IPA StevenMeyer Jailbreaks and iOS Hacks 1 Oct 9, 2012 11:40 AM
Need Assitance in creating a simple Cocoa OS X application lilabila Mac Programming 2 Aug 18, 2012 12:52 PM
How to show/hide objects in Cocoa Applescript application sjmonty99 Mac Programming 3 Aug 6, 2012 11:02 AM
How to pass commandline argument in cocoa application? Ram Thakkar Mac Programming 1 Jul 7, 2012 06:57 AM

Forum Jump

All times are GMT -5. The time now is 05:36 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC