xcode framework & API? - objective-c

I am new to iphone development, but my question is for example,
resignFirstResponder
Where you guys found that? Is that considered a built-in function in xcode framework/API? Where do I find those built-in ones or API to use on my learning projects to see which one I need?

If you have a project open in Xcode and you see a call like that you can typically:
cmd-click on that method call to show the declaration.
opt-click on the method call to see documentation, if any is available.
But, if you are new to iPhone development, this is the last place you should start. You should start at the overviews, concept guides, etc... and work down to needing to know about individual methods.
Specifically, start here.

Related

Mono + Xcode: How to author a library in C# using Xamarin Studio, and consume it in a CocoaTouch project within Xcode?

For an iOS app that will eventually be ported to Android/Winphone, I would love to be able to write some re-usable libraries in c#, but author the iOS UI in traditional Obj-C and reference the library written in c# from Xcode and consume it from Obj-C.
I've found lots of docs that talk about going the other way via bindings (Obj-C -> C#), but not much pertaining to my question. Also, a similar question was asked 4 years ago here, but a lot has changed in the ecosystem, the info seems out of date, and some of the links in the answers now redirect elsewhere:
Is there a way to mix MonoTouch and Objective-C?
So, is this possible? If so how, and what's the best way to achieve it today? (Or alternately, is this a bad idea and should be abandoned?)
No, it is not currently possible to consume a C# library from Objective-C.
Note that it is usually possible to do it the other way with some ingenuity - the only real requirement is that the app must be a Xamarin.iOS app and the entry point the managed Main method. In your Main method you can call into native (C/Objective-C) code and have all your logic there.

Objective-C playground?

Is there any sort of Mac app, Web app, or others like JSFiddle for Objective-C/Cocoa purposes?
It's not entirely the same, but look into F-Script: http://www.fscript.org/
It lets you rapid-prototype and experiment. You can also hook it into existing apps very easily. It has been invaluable for me for certain types of UI debugging.
I've also found CodeRunner to be quite handy for boilerplate app generation and one-click console running to try language snippets out. Available on the AppStore at a price.
I created playgrounds for Objective-C on top of code injection, so you can experiment with normal iOS simulator, it's open source on GitHub
Video showing them in action

Phonegap iOS custom context menu

I'm developing a phonegap app for iOS, an would like to insert a new option in the context menu that shows up after selecting text. I had a look to several post which are quite related, and almost all of them led to this link. I followed the instructions of that example, but couldn't make it work, due to my lack of experience with Objective-c. Even so, I'm not sure if that one is a valid solution using Cordova/Phonegap, at least without hacking the framework.
Has somebody accomplished this task?

How check the availably of all objective-c function in source code for Cocoa

When you read the Class Reference of every object of iOS, you will find:
Available in iOS 2.0 and later.
There are a program or a way to list all function and the minimum iOS system?
How can I know if the iPhone with iOS 3.0 will run all iOS function? I can check it in runtime with respondToSelector, but can be more easy with source code?
Set your project's base SDK to iOS 3, and see if it builds.
AFAIK there is no way to list all the APIs you use in your app into one list and check that you are building past the minimum for all those APIs. You will just have to check each one, one by one. Highlight the API in Xcode, and then click escape and it will tell you very easily.
But also I have to mention that this won't be extremely necessary since you should test on the minimum OS you are building for and if it crashes at any point then you have your issue for that certain API.

Documentation for Objective C and Cocoa APIs?

Super-newbie question!
I've been looking for a list of all the classes that come with Objective-C and Cocoa but can't seem to find one.
Hoping that it has matching methods and syntax(?) as well.
Be gentle with me!
Thanks,
Spencer.
I would start here: http://developer.apple.com/referencelibrary/Cocoa/index.html
The system is broken up into frameworks, so you will not find a single listing. It depends on which frameworks you include with your project. good luck.
If you're using XCode, there's a documentation browser (Help -> Documentation) that's searchable. If you want to browse by classes you can also do so here. You might need to subscribe or download the documentation first though.
I'm finding this very convenient for iPhone development at least, since I can just type in a class or method name and get its documentation very quickly. YMMV for Mac OS X documentation though since I haven't used that at all.