I have a given huge DTD file and I want to generate my classes for an iOS project automatically. Preferably Swift or Objective-C classes. Is there any tool that could do the trick? I did some research and only found generators for Java and C#.
Related
I would like to write something like import SignalProtocol at the top of one of my Swift files and then be able to call the C functions from libsignal-protocol-c.
libsignal-protocol-c's README says: "When integrating into actual applications, you should not need anything beyond CMake. Alternatively, you may integrate the code using a build system of your choice."
I think I'd like to use the Swift Package Manager to integrate libsignal-protocol-c into my Swift iOS app. Is there a way to automatically generate a manifest file, ie, Package.swift, and a module map, ie, a module.modulemap file, from libsignal-protocol-c's CMake files? Or if I need to create these files manually, what should they include? Otherwise, how would I do this with CMake?
How to import and use libsignal-protocol-c in an existing .xcodeProj? is a similar question but for Objective-C projects.
I'm not sure its an answer but I'm going to start using https://github.com/christophhagen/LibSignalProtocolSwift. Seems like a good start.
We have a legacy application for iOS translated to two languages. After checking the localization files we realized, that there are a lot of strings that are not really used in the application, though, we cannot be sure which ones.
Is there some way (maybe some utility) that can check objective-c project and localization files and check which strings re really in use and which are not so we can delete the from the localization files?
Thanks
You could use genstrings to generate a new strings file from your project and then use one of the string-files comparison/merge tools to find the differences.
I want to generate an XML document in iOS. My primary goal is to generate it using inbuilt classes/libraries. I researched a lot and I found that NSXMLElement, NSXMLDocument etc are used to generate XML in OS X but not in iOS (correct me if I'm wrong about this). I found some of the third party libraries like GDataXML, APXML etc which generates the XMLDocument as per my needs. But, I'm trying hard to achieve the same using inbuilt classes (if any). BTW, I do not want the strings to be appended manually to create XML.
I'm not expecting a complete code which does the generation. Any help/suggestion on any inbuilt classes would be appreciated.
Thanks in advance.
You're right -- you need to look for a 3rd party solution for XML writing in iOS. For parsing, there is NSXMLParser.
I am developing an app for iPad, and I need to modify several attributes in a XML file at runtime.
I found the class NSXMLDocument. But I haven't been able to import it to my project.
Is this class not available for iPhone/iPad development?
Is there some other approach I can consider?
I read about libxml library. Is it my answer or there is a better approach?
NSXMLDocument is MacOS X Cocoa only. You have available on iPhone NSXMLParser, and several external libraries built on libxml2 - TouchXML, KissXML and a couple of others.
Note that KissXML supports writing XML.
Other XML libraries that have been suggested include the XML support from Google Data and VTD-XML.
You are looking for a DOM XML parser, which is best for modification of XML documents. See for example this tutorial - without mapping to and from Model Objects - use the XPath.
J2ME lacks the java.util.Properties class. Although it is possible to put application settings in the JAD file this is not recommended for many properties. (Since, some platforms limits the size of JAD file.) I want to put a configuration file inside my jar file and parse it. And I do not want to go with XML because it will be overshooting for my case.
Question is, is there an already existing library for J2ME that can parse properties files or something similar such as INI file. Or would you recommend another method to solve the initial problem?
The best solution probably depends on what is going to be generating the properties files.
If you've got other non-JavaME projects using the same properties files, then stick with them, and write or find a parser. (There is a simple one from GoBible available on Google Code)
However you might find it just as easy to keep your configuration as static final String myproperty="myvalue"; in a Configuration.java file which you compile, and include in the jar instead, since you then do not need any special code to locate, open, read, and parse them.
You do then pick up a limitation on what you call them though, since you can no longer use the common dot separated namespacing idiom.