problem with parsing data - iphone

hi folks i am parsing a xml file using NSXmlParser class.i am sending path exactly and i can able to see the parsing in my simulator upto now i got what i expected.Now i installed the same code and same data of(xml file) into the device and again i checked the data its working well.
My Problem:After disconnecting the the device from my xcode again i am trying to parse the data same as above this time it is not working.
MyQuestion: I know simulator is case in sensitive and device(ipad) is case sensitive so while i installed through the xcode then its working even in the device but after disconnecting it is not working.can any one please give me your idea about this situation.I cross checked with all the code there is no problem.Your suggestion is more important for me.Thanks in advance.

Check if your xml file is copied into bundle resources. Goto 'Targets' select/right-click your target and expand 'Copy Bundle Resources', if your file is not there, +/drag-drop it. Hope it works :)

Related

How do I open a file in my IOS SwiftUI App?

I have an app that saves data in my Documents directory. It would be very useful to be able to mail the data file to some other users so they can also use the gathered information. I have spent most of today looking for a solution, but have not found any answers basic enough to be of any help. So, I would greatly appreciate some help to get me started. Like, what do I need to do to make IOS aware that I am interested in opening ( in my case actually only copying the file to the app’s Documents directory for further chewing) a file with, for example the .xyz-extension and how this is done.
Much appreciated,
stalle
Running on a real device, there seems to be no problem.

Do I need to set something before I can write to an App's Documents-directory?

I have been struggling (see here & here) for a while now to get it right to write to my app's documents directory. It always tell me "Not a Directory" even though the code is just copied from a simple tutorial etc.
Do I need to set anything in the Target or project settings to be able to accomplish this?
My code works totally fine on the simulator, but not on the actual device.
Usually it works like a charm to write on the documents directory. No need to setup anything on the project level. The only difference I see regarding the file system is that it is case sensitive on the device and case insensitive on the simulator. Say you want to write in a folder called "Document", if you spell it "document" in your code it is going to work in the simulator (just like it would work if you spelled it "doCumEnt"), but it won't work on the device.
The answer is NO
The problem got solved by setting a non standard Bundle ID in die info.plist
I used the Bundle ID from iTunes Connect for this specific app. Now everything works perfectly.

iPhone MoveMe Example - trouble with DisplayStrings

I'm starting to play a bit with iPhone applications and I downloaded the MoveMe example from the apple web page.
I managed to run the app, however I do not get the strings displayed. I noticed that the DisplayStrings.strings file, although it exists in the app folder, does not appear as one of the resources.
I tried adding it as a resource, but then after compiling I get an error saying "copystrings failed with exit code 1". I cannot find anything online regarding what the origin of this problem is...
The file itself is in utf16 (big endian), and contains simply a list of strings separated by new lines.
Any ideas?
Thanks.
I was having the same problem and as a workaround I renamed DisplayStrings.strings to DisplayStrings.data and added it as a resource. I then modified init in PlacardView.m to use the new filename. This made Xcode happy.
I fixed this by adding the DisplayStrings.strings file as a resource. However, when you do this it defaults the type to 'text.plist.strings' which is incorrect, since the file is just text. So, right click on the DisplayStrings.strings file in resources and change the type to 'text'. This solved the problem for me.

problem with connection of facebook in my app for iPhone

I have complete code of facebook connection. But When i dragged the complete code into my application then 112 errors will occurs. wherever i have use use that code "FBConnect/FBConnectGlobal.h"Then error will arises "FBConnect/FBConnectionGlobal.h" No such file or directory. Even i have given all the path in project setting/project active setting.
So please tell me some solution how to rectify some solution. and also tell me exact place where i have set the path and what to give in that path
Thanks
I think Ayaz is right, you checked of the "copy items.." box. However, try and start over, deleting the FBConnect folder and do it without copying it. If you start changing the headers you will probably have to do it for all the classes and if there is an update to the FBConnect library you need to start all over again.

Where are the headers for libbz2.dylib for the iPhone?

The headers for libbz2.dylib on the iPhone are missing, or contained in a less than obvious location. I've looked for bzlib.h, bz2lib.h, bz2.h, etc., grepped for patterns, and found nothing - are they included with the SDK, or do I need to just pull the header from the main libbz2 distro and use that instead?
Since the library is clearly available on the device, the header really should be in the SDK, but it appears that it isn't. I'd use the one that's packaged for the Simulator, since this is most likely to be the same as the one on the device:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk/usr/include/bzlib.h
Then open a Radar case to ask that the distribution be fixed.
From the site below get the bzlib-0.5.0.0.tar.gz file and copy the files (.h and .c) inside the cbits directory to your Xcode project.
http://hackage.haskell.org/package/bzlib
So far it seems to work, I've managed to read the contents of a .bz2 file with the functions BZ2_bzReadOpen and then BZ2_bzRead.