DB creation in Realm-Swift - ios

I'm an newbie in ios programming. I'll use swift and realm for my app. But I'm not getting how'll I create an DB and table in Realm.
I'm studying raywenderlich and realm.io.
But here nothing is so much clear to me. I've placed
1) realm.framework
under project's general tab's embedded binaries section. Now what to do.
Any help would be appreciated.

You can refer to this steps https://realm.io/docs/swift/latest/#prerequisites
But I will advise you, as others have mention to use dependency manager such as cocoa pods. Save you a lot of headaches
https://cocoapods.org

Related

Basic Mechanics of iOS Frameworks and Xcode (and Swift)

I think I just must be stupid.
I'm having a lot trouble understanding very basic things concerning frameworks in Xcode/iOs/Swift. While I've certainly gotten some things to work, I've gotten more and more confused about what I'm actually doing. And the documentation on the web just confuses me more.
When I see discussions about how to import particular frameworks (e.g. https://github.com/danielgindi/Charts is the library I'm playing with, but I've seen this pattern repeated in other libraries) they seem to always tell me include the Xcode project file as a child project of my project, in addition to linking things as an embedded binary. This confuses me. Is it not possible to link an already compiled framework to my project without including all the source code of the project?
That is, can't I just take a library.framework file, and add it to my embedded libraries list and be done with it?
In the frameworks I've played with (again https://github.com/danielgindi/Charts is my primary example, but this is true in many others I've played with) I can't seem to use the framework without Carthage or CocoaPods. For me at this stage, that is just confusing... I accept that they are useful tools to automate a difficult process, but I'd really like to understand what that process actually is before I let a tool automate it for me. As I search the web I just seem to always be led back to these tools as being the correct way to do things.
So here are my questions.
If I find a framework library on the web... do I need its source code or can I somehow just link to a compiled version of the framework?
In my reading, it seems that libraries made with Swift are somehow second-class citizens because Swift is a newer thing. Is that still the case? (The articles I read about this seems to date from 2014-2015).
Is there are good place to understand how Apple expects me to add a framework to a project, without using CocoaPods or Carthage?
No need to add source code. Just add the framework to Target ->
General -> Linked Framework and Libraries -> Tap on + and select
your framework.
In my opinion, many new libraries are being written is Swift. So you won't be left behind for using swift.
Apple has documentation about adding frameworks to XCode. But I would suggest to use Cocoapods , as its easy to manage libraries.
Cheers :)

How to create framework with other frameworks and library dependency?

I know, there are so many same questions but I didn't get answer for my requirement.
First time I am creating framework. I have created test framework using Raywenderlich example. But my requirement is little bit different. I used so many different frameworks and also used SQLCipher in my project. Now, I want to convert this project into framework. I followed all the steps but the problem is occur when I am trying to build. Getting an error for SQLCypher because I didn’t add to my framework to avoid conflicts. Finally, I have added SQLCypher library to create build without error and it worked but now I am getting linker error when I am using that framework to test in testProject. I didn’t find any example with third parties. Please help me to solve this issue.
I had the same issue.
One solution is to change all method names of other frameworks or libs, but some lib is not open source.
Another solution is work for me which is to use cocoapods. But the user
who wants to use your framework will be forced using cocoapods, depending iOS 8.0 or above, depending the same version of 3rd libs. I have nothing to do with this restriction.
Seems the best way is do not depend 3rd libs in a framework.

Use of three20 framework in ios programming

I am working on old project there use of three20 framework but i don,t know about three20, So please tell me about it deeply?
what will we can use instead of three20 in current time?
I've also fondly used Three20 on numerous projects and tried hanging on to it for a while. However, iOS8 causes numerous runtime errors / crashes on my Three20 projects. It's actually surprising to see how much functionality still works but you're strongly advised to not use it. There's no real community behind it anymore and no one is maintaining / supporting it.
I'm migrating to NimbusKit - it's developed by some of the original developers of Three20. They also have a good migration guide.
The old Three20 GitHub project is still available, with all of the code and samples still intact on a different branch.
See the "Articles" folder for documentation, and "samples" for sample projects.

Adding Cocos2d to existing project

I would like to appologize in advance however I think this question is overlooked. I have a project I have been working on and I would like to incorporate coco2d. How can I implement the coco2d-iphone-2.0 download. All the tutorials I have tried have either been outdated or left me with errors.
I keep getting ARC Semantic Issue and ARC Restriction once I follow steps of other tutorials to add coco2d to an existing project.
Thus, could someone be so kind as to put a step but step approach to adding the latest stable version of coco2d to an already existing project.
Sorry if this seems trivial.
I think the easiest way would be through cocoapods. have a look at this web site http://cocoapods.org/

CPAN/gem-like repository for Objective-C and Cocoa?

Is there any centralized repository of useful Objective-C / Cocoa libraries as there is for Perl, Ruby, Python, etc.?
In building my first iPhone app, I'm finding myself implementing some very basic functions that would be just a quick "gem install" away in Ruby.
There's a project for that! It's called CocoaPods!
Homepage: http://cocoapods.org/
Source: https://github.com/CocoaPods/CocoaPods
Unfortunately not :(
There are some very useful sites however. I find one of the best is cocoadev.com as it contains lots of useful information about many of the more obscure classes usually including snippets of code to do some really cool things :)
Maybe we (the cocoa community) should look into building something like this!
Oh and I just remembered this site cocoadevcentral.com which is also very good for starting out with cocoa.
Daniel mentioned http://cocoadev.com.
More specifically, check out http://www.cocoadev.com/index.pl?ObjectLibrary.
"This page is for tracking re-usable Cocoa classes that can be mixed, matched, and dropped fairly easily into existing Cocoa projects to add useful functionality."
I'd be interested in what kind of "basic functions" you're having to implement. There's actually quite a lot already there in the provided libraries, and I wonder if you're just not finding functionality that's already there...
There's a new index of reusable code for Mac OS and iOS: Cocoa Objects
I might be confused or missing something here... But doesn't apple provide all the Foundation / Cocoa / AppKit / CoreAudio / Qtkit / etc libraries that should provide all of the very basic functions you are looking for?
Other than what xcode comes with or is on the apple dev site, there are no centralized repo's for Cocoa.
Google Code also has some objective C things up. It depends on what you are looking for...
Also see GitHub, many useful Objective-C projects, especially re iPhone. See activerecord & cocoaoniguruma, for instance.
http://github.com/search?q=objective-c
http://github.com/search?q=objc
Google has Google toolbox for mac which got me started unit testing my iPhone application which was the main thing I found missing.

Resources