realm/realm-cocoa — pull request #645 by jpsim (2014-07-22 11:40:28+00:00)
Title: New examples structure and packaging

The previous examples structure was not working very well. We had to run `sh build.sh build` to build the framework in order to build the examples. This PR moves the structure around and only introduces a single Xcode project per platform/language group, with the appropriate Realm Xcode subproject. So the new examples structure looks like this:

```
examples/
README.md
ios/
objc/
RealmExamples.xcodeproj
Encryption/
Migration/
REST/
Simple/
TableView/
swift/
RealmExamples.xcodeproj
Encryption/
Migration/
Simple/
TableView/
rubymotion/
Simple/
osx/
objc/
RealmExamples.xcodeproj
JSONImport/
```

The process to package examples for release is:

1. Install Xcodeproj gem from master (https://github.com/CocoaPods/Xcodeproj)
2. Run `./scripts/package_examples.rb`
3. Move the folders in these locations

Follow these steps and all projects should build. Note that there are 3 `Realm.framework`'s. One for iOS, one for OSX and one for Swift (iOS).

```
ios/
Realm.framework
examples/
README.md
objc/
RealmExamples.xcodeproj
Encryption/
Migration/
REST/
Simple/
TableView/
swift/
Realm.framework
RealmExamples.xcodeproj
Encryption/
Migration/
Simple/
TableView/
rubymotion/
Simple/
osx/
Realm.framework
examples/
README.md
objc/
RealmExamples.xcodeproj
JSONImport/
LICENSE.txt
browser/
Realm Browser.app
docs.webloc
plugin/
RealmPlugin.xcodeproj
RealmPlugin/
```

@emanuelez let me know if you have any questions since you'll be the one integrating this in Jenkins.