Hot answers tagged

7

Anything that works is fine as long as you don't care about the environments where it doesn't work. If you have no ambitions to compile your code in an environment that doesn't support one-line comments (presumably comments that begin with // and continue to the end of the line), then it's fine.


6

Apple's sample code is just that, sample code. No guarantee that it works, that it is bug free, that it is the best way to achieve something. Use it to study some area that you don't know much about, until you are knowledgable in that area by yourself. And then throw the sample code away. Which is what you should do with any code that you find on the ...


5

Short answer: No. It helps to have an appropriate mental model of the problem you're facing. Imagine that your app is a filing clerk (program binary) working in a rented office (the user's phone). He's got his own computer, desk and phone (process running on the user's phone), but the filing system (file system) is controlled by the landlord of the office ...


4

I think it should said you can develop for iOS on other platforms, you just can't build final applications on them. It's been explained in the accepted answer why you can't build outside of OS X, but there are many development tools that allow you to write iOS apps on other platforms. Some of the development tools that I've used that allow this : Qt ...


3

As Uncle Bob always says, your tests should not be coupled to the structure of your application (great blog discussing this topic). Doing what you're suggesting sounds like you may run into issues with deployment, or other aspects of development... But the biggest issue I see is you'll be tempted to (if not forced to) couple your test-suite tot your ...


3

If you're using GitHub as your central Git repository, you could take a look at Travis CI. It's a cloud-based CI system, so you don't have to manage the server yourself. I'm thinking of trying this out for some of my open-source projects. If you want to stick with Apple's tools all the way, try out Bots. It ships as part of Xcode Server. I've been ...


3

However, since I'm still trying to understand how C++ applications are structured, I'm not sure how the project should be organized. This depends greatly on what tools and process you will use. You mention Visual Studio and XCode. Each has it's quircs and both optimize the sources for their own interractions with them (which makes the sources poorly ...


3

You don't have to look very hard in the Objective-C Runtime Reference to figure out how to do things like get a list of all the registered classes, get all the methods for a given class, etc. From that you can generate a list of all methods. The runtime doesn't care about which methods are documented, though, so in order to pick out the undocumented methods ...


2

Better to follow Unix naming conventions here Always use lowercase characters Only 1 dot for file extension, otherwise no dot allowed No white space allowed For long file name use hyphen(-) If you follow Unix naming conventions, there will no complexity as your server configuration.


2

Utilize the followings http://docs.freebsd.org/44doc/psd/18.gprof/paper.pdf http://oprofile.sourceforge.net/about/


2

You don't have to use TFS inside Visual Studio, though Microsoft seems to prefer this "buy one, get one for full price plus SQLServer and CALs" solution :) You can access TFS from an external source control. They have a Windows Explorer plugin that works much like TortoiseXXX products, allowing you to commit and update directly from the filesystem icons. ...


2

The only issue I can see is that it may be confusing. NSLog is a commonly used function provided by Foundation framework. But you change it globally to something else and new developer may not aware of it. Other than that, it should be fine since the header/define won't change often.


2

If you have one set of data that you need to access in multiple places, I would recommend using a singleton. Create a model for the data, download the data from the backend, parse it and store it in the singleton to access later on from where ever it needs to be. It makes no sense to waste all that time parsing multiple times. The issue with the tableview ...


2

Well this indeed requires another approach. Normally with https you would like to get unknown attackers away from the user. But this time you need application to protect the user from attacking. Hacking games requires different levels of hacking Well first of all you should protect that the game could run in an emulator mode (or something like that). With ...


2

One approach that I've used and seen used for this kind of thing is that you can load the application and start background threads that start pre-fectching data that you know you will need. Typically, you load the data for the initial view before displaying it. For example, lets say you have a main page/window that has a 'messages' menu. On that messages ...


1

PS. I hope I'm not making some stupid rookie mistake, or being ignorant of some cheap and simple xcode hack here. The xcode debugger supports breakpoints when a variable is modified. Is there an easy way to avoid getters and setters whilst discovering when my variables are modified/accessed in an easy way? Generally, don't write them. You will have ...


1

How about option 3. Put the CVCalendarView on the VC's view, and a UITableView under the CVCalendarView. When the user taps a day, reload the table view with the new data. Since the calendar view is not in the table view, it will not need to be reloaded. When the user scrolls through the events of the day, the calendar will stay put. That's how I would do ...


1

Yes. The newer Team Foundation Server versions support Git, so if you set up your TFS repository to use git, you can easily use TFStogether with the build-in git version control tools in Xcode.


1

I just cloned the git repository xVim and ran the build in Xcode (as the instructions say), and it works like a champ. Right now, it has a limited keyset, but has what I need for now. And you get to look at the source code to learn how to write an XCode Plugin and work with Objective-C


1

I don't know much about Objective-C, but the extern "C" approach will only work if your C++ header files don't contain C++ classes, only C style structs and functions. If your model is written in C++, I guess this will not be the case, so I think you will have to try the second road. extern "C" is intended to use C code in C++, not vice versa.


1

The targets within a single project file are usually strongly related. For example, if you have a product that collects data and which has several related components, DataCollector, DataCollectorAdministrator, and DataCollectorLibrary, those components might all be targets in the same project. Furthermore, you might also have targets in that project for ...


Only top voted, non community-wiki answers of a minimum length are eligible