Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

adildsw

macrumors newbie
Original poster
Jun 2, 2012
2
0
Hi, i am a noob to this xcode, but i want to make an ipad program which will do the following thing :-

Code:
if (var/lib/dsw.plist found)
{delete var/lib/dsw.plist
}
else
{terminate the program
}

i dont know anything about xcode programs....so if anyone could help me out it would be very grateful!
Please Help.
 
Last edited by a moderator:

jnoxx

macrumors 65816
Dec 29, 2010
1,343
0
Aartselaar // Antwerp // Belgium
please calling it "programming in xcode" or "programming xcode".
XCode is just the IDE to develop in..
First of all, your still thinking of Windows applications or such, we just don't terminate an app if something fails, we just think of another way.. Just killing your app when something goes wrong will irritate the user..

Now for your question, it's basically a simple use of NSFileManager.
you can detect there if something exists at a special path, and if it founds it, you can delete it with the same filemanager.. Did you even try coding this yet?
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
I don't believe that /var is inside the app sandbox. This is therefore intended to be an app that runs on a jailbroken device, I guess. It's a strange idea for an app.
 

adildsw

macrumors newbie
Original poster
Jun 2, 2012
2
0
Thanxxx man You're Gr8!!!!
I've been searching for this the whole web for days....
Can you do me another favour????
Please can you present my questions answer in codes... like what i really have to write in xcode.....please....???
And Sorry for my language about "programming xcode"....
@PhoneyDeveloper - yes...i do intend to make an app which runs on JB'en device!!!
 

larswik

macrumors 68000
Sep 8, 2006
1,552
11
adildsw - You are probably going to have to learn how to program using Objective C for your apps. People here help other people with problems and help people learn, but almost never do the work for you. Your question comes up from time to time but I have never seen anyone so far do the work for you.

Plus if someone answers this question then you will be back with another question as you try to tackle another problem you don't understand how to solve.

My advice. If you want to program, learn how to program.

I started with this book "Learn C on the Mac" it's a good place to start learning about programing. Or 2.... Hire a person to write the app for you.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.