Xcode macros, compiling, linking process [closed] - ios

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Lots of iOS development tutorials are full of "just copy this and your button will work" or "this code does this, just copy it and change some variables". I'm trying to learn everything from scratch so it makes the best possible sense. Turns out I can't find any information about Xcode compiling and linking process. And also, I would like to understand how the macros like IBAction are translated exactly. I've found something here, but it does not explain entirely. I want to see the code when its fully assembled with its headers and so...
Is there a way to program for Xcode just with code? I mean, to insert and link all objects with code, no visual processes used.
Does anyone know a good book about this?

Here are some answers to your questions!
Anything that you can do in InterfaceBuilder you can do in code, yep. Configuring view objects is a bit repetitive and ends up being a lot of code for something easy (once you know what options you have) which is why the IB tool is there.
The IBAction flag is actually only used by the IDE to provide assistance in generating the xib so when the file is unarchived, the properties it sets will line up. It's not foolproof as you can make a property, set the outlet, then delete the property and your app will crash!
You can see the output of pre-processor macros by selecting Product -> Perform Action -> Compile/Analyze/Preprocess/Assemble. These are all handy tools to see what Xcode is building under the hood.
Compiling and linking is not too important for iOS development since Xcode is the only tool you use to build your application (with the exception of xcodebuild command) and it handles that all for you. If you do want to dig in deeper, I don't know of a good reference but googling LLVM (the toolset to compile/debug/link/etc) would be a good starting place.

Related

Where can I view a large iOS codebase to see how it was organized? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
For a new developer building an app, are there projects/repositories I can pull into Xcode to study and see how code, files, folders, MVVM patterns are implemented in a BIG project??
It would be great to analyze and refer to a large code-base that has implemented best coding practices for the problem it solves.
This way I (as a new developer) can be aware of how to organize & refactor my code for a maintainable app.
Thank you!
my two cents: don't try to find a large ios code base to study. take a look at smaller, easier-to-consume open source projects and get a feel for what you like / don't like, comparing them against each other. you will find that there is not one set way of doings; if there was, we'd all be doing it! what's important is figuring out what tools / patterns / practices etc. help you build the best app that you can (hint: an app that's built is better than one that's not), and you'll only find that out by doing some building yourself.
There are many open source projects.
First one that comes to mind is Signal.
https://github.com/signalapp
Here are many projects listed by categories:
https://github.com/dkhamsing/open-source-ios-apps
First one that sprung out was Firefox:
https://github.com/mozilla-mobile/firefox-ios
Google should help you find more, just check out your favorite apps and see if they are open source.
Try to find different kinds of projects, with huge storyboards, with many libraries in the Podfile, ...

General Questions about Copyright and iOS 11 Warnings due to old Frameworks [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
How is it with the copyright? For example I have linked a button to a Facebook page in my App and on the Button I've put a small image of the Facebook Icon, where do I have to mention the copyrights?
And Code copied from Stacksocial doesn't have copyright?
I have some really small Images in my App, is it important to convert them for 2x 3x ? for example:
https://imgur.com/a/88p8E
With the new release of Xcode 9 and ios 11 I have a warning: update to recommend setting. And I tried but it destroyed my App because the frameworks needed to update as well. Can I ignore the Warning? Because the App works just fine on ios 11.
Thank you very much! :)
If unsure how to deal with copyright, a lawyer is your best friend. A 1hr consultation should be more than enough to give you an introductory tour of this world and make you feel at ease. Highly recommended if you have no clue what are you getting into. A good online resource to get to know what the different typical open source licenses are and what they mean is Licenses & Standard | Open Source Initiative
It is typically a good idea to provide all pixel density images, if you don't have them or want to easily generate the various images, there's a good tool on the Mac App Store named AssetsProcessor
You should typically apply the update to your project but not to the framework. That does mean that you will have build warnings; something you have to learn to live with until you feel comfortable branching off the different frameworks and updating them yourself. Overall yes, learning which warnings are safe to ignore and which ones should be addressed is important. There's no magic here, except TEST, TEST and TEST to ensure that ignoring a warning won't be the death of your app.
Good luck!

Any method to document design in xib/Storyboard? [duplicate]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Is there a tool for documenting the many Xcode bindings, outlet and IBAction bindings, key value bindings, etc? I have looked at the threads on Doxygen and HeaderDoc, but these document program files, to describe classes etc, but don't seem to cover the huge number of 'hidden' linkages that Xcode drag-and-drop enables?
A specific example, I can use the XIB editor to create an IBAction for every control on my window, to methods in one or more class/instances, defined in one or more files - I want ONE list of all of these, showing the control type and name, the source file, class and method - or a graphical representation would be even better. Then a similar list for the key value path links to arrayControllers etc.
I AM new, so if I have missed something obvious, please tell me.
Thanks.
No, there's no tool for documenting .xib files unless you consider the file itself as part of your documentation. (You did say "self documenting" after all.) .xibs are stored as XML, though, so if you really want to extract the data, it's there to be had.
The actions you create in IB appear in your source code. You could add comments there describing the object that sends the action, but that would largely miss the point of using a .xib (and actions) in the first place, which is to decouple the UI elements from the controller.
If the point of the documentation is to make your project easier for other developers to understand, you might want to get some more experience with Objective-C before you go to a lot of trouble creating a .xib documenting tool. Given a .xib and the relevant header files, any competent Obj-C programmer should be able to tell easily which controls are connected to which actions, or to debug problems in that area. People have been working with .xib and .nib files for 20+ years -- the lack of a separate documentation tool may be a good indication that such a thing may not be as useful as it seems at first.

Looking for a tool that will let me store and insert text fragments (code snippets) into Visual Studio [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have a demo coming up and would rather not type in front of the audience. I figured I could put the code snippets some place and put them in as I go. Now I know I can use Notepad (or pretty much any other text editor) for the purpose but I have a feeling there's something nicer out there. Anybody have any ideas for me?
Ideally I'm looking for something like the Visual Studio toolbox where I can drag text in to set it up and then drag it back into the IDE when I need it.
I tried just dragging the text to the toolbox. It seemed to work but then I closed Visual Studio, put my laptop into standby and powered it back up and everything was gone! Maybe its a VS bug (or a Win 7 bug) or maybe this is how its supposed to work. Either way, I'm looking for something a bit more robust.
Have you tried just dragging the text to the toolbox? I believe that does exactly what you want.
Here's some information on defining your own code snippets in Visual Studio.
http://blogs.microsoft.co.il/blogs/gilf/archive/2009/01/17/how-to-write-your-own-code-snippets.aspx
Code snippets are inserted typing their keyword, then pressing Tab twice.
If you're not familiar with how they work, try using some of the default ones first. Type "prop" then press Tab twice, and VS will generate a Property stub for you, or "mbox" to generate a MessageBox.Show() stub.
what about using the built in code snippets, creating your own with their own aliases? modify an existing code snippet, and give it an alias of (for example) #demo1
go into your code, type #demo1, press tab and hey presto.
You have your own folder where snippets are installed and anything in there is picked up in eachinstance of visual studio.
have a look at this, and this.
i am using http://www.codeplex.com/SnippetDesigner for exactly your scenario. it's really easy to use. have fun!
Maybe this is what you're looking for.
http://www.csharper.net/blog/new_version_of_clipboard_manager__1_0_0_6_.aspx
you could write a visual studio macro to do it.
Or a clip manager, like jumpcut on MacOSX. Must be something similar for windoze. http://jumpcut.sourceforge.net/

Code snippets for Delphi? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Is there a good code snippets application for Delphi or general purpose with IDE integration? I would like to store Code, queries, notes, etc..
Thanks
GExperts has a Code Librarian feature for code snippets amongst many other nice features and integrates with the IDE. Well worth to check out even if you don't decide to use the Code Librarian feature.
Delphi 2006 and later has Live Templates. They are a bit tricky because you've got to edit XML files to really make them work, but they are powerful when they do. See Nick's Live Templates Camtasia Presentation. Ctrl-J is the shortcut to invoke this.
Prior to that, Delphi 2005 and earlier had simple code snippets. I believe Ctrl-J also invoked them.
Another option is to use Castalia and its Code Templates feature.
Dittos to Ozmosys above.
Also check CodeSnip Database Viewer from the delphidabbler:
http://www.delphidabbler.com/software/codesnip
I use Knowledgebase from Ozmosys. It hasn't been updated in a while, but it works, and it is written in Delphi. Ozmosys
I have to endorse Ozmosys' Knowledge Base too. The reason it hasn't been updated in a while is that it just works. When I DID have issues early in the development of the program, the author was very responsive and quick about doing it. It's logical and easy to post code and other types of hints. I use it every day, juggling the three or so projects that seem to be perpetually on my plate.

Resources