Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-10-2008, 02:33 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2008
Posts: 22
satyanarayanagv is an unknown quantity at this point
Default How to save files in a build dynamically?

hi,
iam using cocoa touch navigation controller application. in that i need to do the following tasks,
1. i need to download an xml.
2. i need to use the xml data on the screen.
if specify the path related to mac. it is working fine. but it wont work if it is really placed in iphone.
can anybody please tell me how to place new files in iphone build.
the code i used is

Code:
NSMutableData *receivedData=[[NSMutableData data] retain];
/////// some operation to fill received data
[receivedData writeToFile "sample.xml" atomically:YES];
/// the above sample file is placed in root.
/// but i want to place it in iphone.
/// if i use the below statement..

NSString *appPath=[[NSBundle mainBundle] bundlePath];
appPath=[appPath stringByAppendingString "/sample.xml"];
[receivedData writeToFile:appPath atomically:YES];
/// it return true but unable to find where the file is.. not in "sample.app" also
Thanks
satyanarayanagv is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically hiding tab bar in UITabBarController? bonehead iPhone SDK Development 8 04-24-2009 10:40 AM
Do we need to build license code system in application? Eric20000 iPhone SDK Development 0 07-03-2008 06:32 PM
Localization: which files go where? bonehead iPhone SDK Development 3 05-13-2008 12:41 PM
Build and Run - Kaboom bshirley iPhone SDK Development 2 04-30-2008 09:19 PM
Build error w/ Interface Builder and UITableView jc_iphone iPhone SDK Development 1 04-22-2008 09:16 AM


» Advertisements
» Online Users: 341
3 members and 338 guests
guusleijsten, Kryckter, LEARN2MAKE
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,880
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:47 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0