Showing preview only (324K chars total). Download the full file or copy to clipboard to get everything.
Repository: boundsj/ObjectiveDDP
Branch: master
Commit: bd34e49242d1
Files: 95
Total size: 297.7 KB
Directory structure:
gitextract_2gf25u8g/
├── .gitignore
├── .swift-version
├── .travis.yml
├── Example/
│ ├── Example/
│ │ ├── Example/
│ │ │ ├── AddViewController.h
│ │ │ ├── AddViewController.m
│ │ │ ├── AddViewController.xib
│ │ │ ├── AppDelegate.h
│ │ │ ├── AppDelegate.m
│ │ │ ├── Images.xcassets/
│ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── green_light.imageset/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── red_light.imageset/
│ │ │ │ └── Contents.json
│ │ │ ├── Info.plist
│ │ │ ├── ListViewController.h
│ │ │ ├── ListViewController.m
│ │ │ ├── ListViewController.xib
│ │ │ ├── LoginViewController.h
│ │ │ ├── LoginViewController.m
│ │ │ ├── LoginViewController.xib
│ │ │ ├── ViewController.h
│ │ │ ├── ViewController.m
│ │ │ ├── ViewController.xib
│ │ │ ├── en.lproj/
│ │ │ │ └── InfoPlist.strings
│ │ │ └── main.m
│ │ ├── Example.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ └── contents.xcworkspacedata
│ │ ├── Example.xcworkspace/
│ │ │ └── contents.xcworkspacedata
│ │ ├── Podfile
│ │ └── example.txt
│ ├── swiftExample/
│ │ ├── Podfile
│ │ ├── bridge.m
│ │ ├── swiftddp/
│ │ │ ├── AddViewController.swift
│ │ │ ├── AddViewController.xib
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Example-Info.plist
│ │ │ ├── Info.plist
│ │ │ ├── ListViewController.swift
│ │ │ ├── ListViewController.xib
│ │ │ ├── LoginViewController.swift
│ │ │ ├── LoginViewController.xib
│ │ │ ├── ViewController.swift
│ │ │ ├── ViewController.xib
│ │ │ └── images.xcassets/
│ │ │ ├── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ └── LaunchImage.launchimage/
│ │ │ └── Contents.json
│ │ ├── swiftddp-Bridging-Header.h
│ │ ├── swiftddp.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ └── contents.xcworkspacedata
│ │ ├── swiftddp.xcworkspace/
│ │ │ └── contents.xcworkspacedata
│ │ └── swiftddpTests/
│ │ ├── Info.plist
│ │ └── swiftddpTests.swift
│ └── todos/
│ ├── .meteor/
│ │ ├── .finished-upgraders
│ │ ├── .gitignore
│ │ ├── .id
│ │ ├── packages
│ │ ├── platforms
│ │ ├── release
│ │ └── versions
│ ├── server.css
│ ├── server.html
│ └── server.js
├── LICENSE.txt
├── ObjectiveDDP/
│ ├── BSONIdGenerator.h
│ ├── BSONIdGenerator.m
│ ├── DependencyProvider.h
│ ├── DependencyProvider.m
│ ├── MeteorClient+Parsing.m
│ ├── MeteorClient+Private.h
│ ├── MeteorClient.h
│ ├── MeteorClient.m
│ ├── ObjectiveDDP-Prefix.pch
│ ├── ObjectiveDDP.h
│ └── ObjectiveDDP.m
├── ObjectiveDDP.podspec
├── ObjectiveDDP.xcodeproj/
│ ├── project.pbxproj
│ └── project.xcworkspace/
│ └── contents.xcworkspacedata
├── ObjectiveDDP.xcworkspace/
│ └── contents.xcworkspacedata
├── Podfile
├── README.md
├── Rakefile
├── Specs/
│ ├── DDPSpecHelper.h
│ ├── DDPSpecHelper.m
│ ├── DependencyProvider+Spec.m
│ ├── MeteorClientSpec.mm
│ ├── Mocks/
│ │ ├── FakeDependencyProvider.h
│ │ ├── FakeDependencyProvider.m
│ │ ├── MockObjectiveDDPDelegate.h
│ │ ├── MockObjectiveDDPDelegate.m
│ │ ├── MockSRWebSocket.h
│ │ └── MockSRWebSocket.m
│ ├── NSObject+Spec.m
│ ├── ObjectiveDDPSpec.mm
│ ├── Specs-Info.plist
│ ├── Specs-Prefix.pch
│ ├── en.lproj/
│ │ └── InfoPlist.strings
│ └── main.m
└── thrust.yml
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
.idea
xcuserdata
xcshareddata
Example/Pods
Example/swiftExample/Pods
build
Pods
.DS_Store
Podfile.lock
================================================
FILE: .swift-version
================================================
2.3
================================================
FILE: .travis.yml
================================================
language: objective-c
install:
- brew install ios-sim
- gem install thrust
script: rake specs
================================================
FILE: Example/Example/Example/AddViewController.h
================================================
#import <UIKit/UIKit.h>
@protocol AddViewControllerDelegate;
@interface AddViewController : UIViewController
@property (assign, nonatomic) id <AddViewControllerDelegate> delegate;
@property (weak, nonatomic) IBOutlet UITextView *messageTextView;
@end
@protocol AddViewControllerDelegate
- (void)didAddThing:(NSString *)message;
@end
================================================
FILE: Example/Example/Example/AddViewController.m
================================================
#import "AddViewController.h"
@interface AddViewController ()
@end
@implementation AddViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (IBAction)didTouchAddButton:(id)sender {
[self.delegate didAddThing: self.messageTextView.text];
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[self.view endEditing:YES];
}
@end
================================================
FILE: Example/Example/Example/AddViewController.xib
================================================
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1552</int>
<string key="IBDocument.SystemVersion">12D78</string>
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
<string key="IBDocument.AppKitVersion">1187.37</string>
<string key="IBDocument.HIToolboxVersion">626.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">2083</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBNSLayoutConstraint</string>
<string>IBProxyObject</string>
<string>IBUIButton</string>
<string>IBUILabel</string>
<string>IBUITextView</string>
<string>IBUIView</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</array>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<object class="IBProxyObject" id="372490531">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBProxyObject" id="975951072">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIView" id="191373211">
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUITextView" id="1057224011">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">274</int>
<string key="NSFrame">{{20, 96}, {280, 176}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="133997615"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC45MDE5NjA3OTAyIDAuOTAxOTYwNzkwMiAwLjkwMTk2MDc5MDIAA</bytes>
</object>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIMultipleTouchEnabled">YES</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText"/>
<object class="IBUITextInputTraits" key="IBUITextInputTraits">
<int key="IBUIAutocapitalizationType">2</int>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">1</int>
<double key="pointSize">22</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica</string>
<double key="NSSize">22</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUILabel" id="196202203">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 20}, {280, 68}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1057224011"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">NEW TODO</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwIDAAA</bytes>
<string key="IBUIColorCocoaTouchKeyPath">darkTextColor</string>
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">0</int>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">1</int>
<double key="pointSize">43</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica</string>
<double key="NSSize">43</double>
<int key="NSfFlags">16</int>
</object>
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
</object>
<object class="IBUIButton" id="133997615">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 297}, {280, 51}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC45MDE5NjA3OTAyIDAuOTAxOTYwNzkwMiAwLjkwMTk2MDc5MDIAA</bytes>
</object>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<string key="IBUINormalTitle">Add</string>
<object class="NSColor" key="IBUIHighlightedTitleColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
</object>
<object class="NSColor" key="IBUINormalTitleShadowColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC41AA</bytes>
</object>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">2</int>
<double key="pointSize">31</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">31</double>
<int key="NSfFlags">16</int>
</object>
</object>
</array>
<string key="NSFrame">{{0, 20}, {320, 548}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="196202203"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
<object class="NSColorSpace" key="NSCustomColorSpace">
<int key="NSID">2</int>
</object>
</object>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<object class="IBUIScreenMetrics" key="IBUISimulatedDestinationMetrics">
<string key="IBUISimulatedSizeMetricsClass">IBUIScreenMetrics</string>
<object class="NSMutableDictionary" key="IBUINormalizedOrientationToSizeMap">
<bool key="EncodedWithXMLCoder">YES</bool>
<array key="dict.sortedKeys">
<integer value="1"/>
<integer value="3"/>
</array>
<array key="dict.values">
<string>{320, 568}</string>
<string>{568, 320}</string>
</array>
</object>
<string key="IBUITargetRuntime">IBCocoaTouchFramework</string>
<string key="IBUIDisplayName">Retina 4 Full Screen</string>
<int key="IBUIType">2</int>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="191373211"/>
</object>
<int key="connectionID">3</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">messageTextView</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="1057224011"/>
</object>
<int key="connectionID">110</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">didTouchAddButton:</string>
<reference key="source" ref="133997615"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">109</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<array key="object" id="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1</int>
<reference key="object" ref="191373211"/>
<array class="NSMutableArray" key="children">
<object class="IBNSLayoutConstraint" id="401894823">
<reference key="firstItem" ref="191373211"/>
<int key="firstAttribute">4</int>
<int key="relation">0</int>
<reference key="secondItem" ref="133997615"/>
<int key="secondAttribute">4</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">200</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="950255045">
<reference key="firstItem" ref="191373211"/>
<int key="firstAttribute">6</int>
<int key="relation">0</int>
<reference key="secondItem" ref="133997615"/>
<int key="secondAttribute">6</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
<double key="value">20</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="655781733">
<reference key="firstItem" ref="133997615"/>
<int key="firstAttribute">5</int>
<int key="relation">0</int>
<reference key="secondItem" ref="191373211"/>
<int key="secondAttribute">5</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
<double key="value">20</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="32810466">
<reference key="firstItem" ref="1057224011"/>
<int key="firstAttribute">3</int>
<int key="relation">0</int>
<reference key="secondItem" ref="196202203"/>
<int key="secondAttribute">4</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
<double key="value">8</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="720169817">
<reference key="firstItem" ref="1057224011"/>
<int key="firstAttribute">5</int>
<int key="relation">0</int>
<reference key="secondItem" ref="191373211"/>
<int key="secondAttribute">5</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
<double key="value">20</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="278246914">
<reference key="firstItem" ref="191373211"/>
<int key="firstAttribute">6</int>
<int key="relation">0</int>
<reference key="secondItem" ref="1057224011"/>
<int key="secondAttribute">6</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
<double key="value">20</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="674932954">
<reference key="firstItem" ref="191373211"/>
<int key="firstAttribute">6</int>
<int key="relation">0</int>
<reference key="secondItem" ref="196202203"/>
<int key="secondAttribute">6</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
<double key="value">20</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="476697332">
<reference key="firstItem" ref="196202203"/>
<int key="firstAttribute">3</int>
<int key="relation">0</int>
<reference key="secondItem" ref="191373211"/>
<int key="secondAttribute">3</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
<double key="value">20</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="734243576">
<reference key="firstItem" ref="196202203"/>
<int key="firstAttribute">5</int>
<int key="relation">0</int>
<reference key="secondItem" ref="191373211"/>
<int key="secondAttribute">5</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
<double key="value">20</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<reference ref="1057224011"/>
<reference ref="196202203"/>
<reference ref="133997615"/>
</array>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="372490531"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="975951072"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">11</int>
<reference key="object" ref="1057224011"/>
<array class="NSMutableArray" key="children">
<object class="IBNSLayoutConstraint" id="903285478">
<reference key="firstItem" ref="1057224011"/>
<int key="firstAttribute">8</int>
<int key="relation">0</int>
<nil key="secondItem"/>
<int key="secondAttribute">0</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">176</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="1057224011"/>
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
</object>
</array>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">25</int>
<reference key="object" ref="278246914"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">26</int>
<reference key="object" ref="720169817"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">27</int>
<reference key="object" ref="196202203"/>
<array class="NSMutableArray" key="children">
<object class="IBNSLayoutConstraint" id="734939316">
<reference key="firstItem" ref="196202203"/>
<int key="firstAttribute">8</int>
<int key="relation">0</int>
<nil key="secondItem"/>
<int key="secondAttribute">0</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">68</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="196202203"/>
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
</object>
</array>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">34</int>
<reference key="object" ref="32810466"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">59</int>
<reference key="object" ref="734243576"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">61</int>
<reference key="object" ref="476697332"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">62</int>
<reference key="object" ref="133997615"/>
<array class="NSMutableArray" key="children">
<object class="IBNSLayoutConstraint" id="50832180">
<reference key="firstItem" ref="133997615"/>
<int key="firstAttribute">8</int>
<int key="relation">0</int>
<nil key="secondItem"/>
<int key="secondAttribute">0</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">51</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="133997615"/>
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
</object>
</array>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">67</int>
<reference key="object" ref="655781733"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">71</int>
<reference key="object" ref="950255045"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">80</int>
<reference key="object" ref="734939316"/>
<reference key="parent" ref="196202203"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">81</int>
<reference key="object" ref="50832180"/>
<reference key="parent" ref="133997615"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">91</int>
<reference key="object" ref="674932954"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">107</int>
<reference key="object" ref="903285478"/>
<reference key="parent" ref="1057224011"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">108</int>
<reference key="object" ref="401894823"/>
<reference key="parent" ref="191373211"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.CustomClassName">AddViewController</string>
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="-2.CustomClassName">UIResponder</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<array class="NSMutableArray" key="1.IBViewMetadataConstraints">
<reference ref="734243576"/>
<reference ref="476697332"/>
<reference ref="674932954"/>
<reference ref="278246914"/>
<reference ref="720169817"/>
<reference ref="32810466"/>
<reference ref="655781733"/>
<reference ref="950255045"/>
<reference ref="401894823"/>
</array>
<string key="107.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="108.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="11.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<array class="NSMutableArray" key="11.IBViewMetadataConstraints">
<reference ref="903285478"/>
</array>
<boolean value="NO" key="11.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="25.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="26.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="27.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<array class="NSMutableArray" key="27.IBViewMetadataConstraints">
<reference ref="734939316"/>
</array>
<boolean value="NO" key="27.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="34.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="59.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="61.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="62.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<array class="NSMutableArray" key="62.IBViewMetadataConstraints">
<reference ref="50832180"/>
</array>
<boolean value="NO" key="62.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="67.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="71.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="80.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="81.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="91.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">110</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">AddViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">didTouchAddButton:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">didTouchAddButton:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">didTouchAddButton:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">messageTextView</string>
<string key="NS.object.0">UITextView</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">messageTextView</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">messageTextView</string>
<string key="candidateClassName">UITextView</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/AddViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSLayoutConstraint</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/NSLayoutConstraint.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<bool key="IBDocument.UseAutolayout">YES</bool>
<string key="IBCocoaTouchPluginVersion">2083</string>
</data>
</archive>
================================================
FILE: Example/Example/Example/AppDelegate.h
================================================
#import <UIKit/UIKit.h>
@class ViewController, MeteorClient;
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) ViewController *viewController;
@property (strong, nonatomic) UINavigationController *navController;
@property (strong, nonatomic) MeteorClient *meteorClient;
@end
================================================
FILE: Example/Example/Example/AppDelegate.m
================================================
#import "AppDelegate.h"
#import "ViewController.h"
#import "LoginViewController.h"
#import "ObjectiveDDP.h"
#import <ObjectiveDDP/MeteorClient.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.meteorClient = [[MeteorClient alloc] initWithDDPVersion:@"pre2"];
[self.meteorClient addSubscription:@"things"];
[self.meteorClient addSubscription:@"lists"];
LoginViewController *loginController = [[LoginViewController alloc] initWithNibName:@"LoginViewController"
bundle:nil];
loginController.meteor = self.meteorClient;
ObjectiveDDP *ddp = [[ObjectiveDDP alloc] initWithURLString:@"wss://ddptester.meteor.com/websocket" delegate:self.meteorClient];
// local testing
//ObjectiveDDP *ddp = [[ObjectiveDDP alloc] initWithURLString:@"ws://localhost:3000/websocket" delegate:self.meteorClient];
self.meteorClient.ddp = ddp;
[self.meteorClient.ddp connectWebSocket];
self.navController = [[UINavigationController alloc] initWithRootViewController:loginController];
self.navController.navigationBarHidden = YES;
self.window.rootViewController = self.navController;
[self.window makeKeyAndVisible];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reportConnection) name:MeteorClientDidConnectNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reportDisconnection) name:MeteorClientDidDisconnectNotification object:nil];
return YES;
}
- (void)reportConnection {
NSLog(@"================> connected to server!");
}
- (void)reportDisconnection {
NSLog(@"================> disconnected from server!");
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
[self.meteorClient.ddp connectWebSocket];
}
@end
================================================
FILE: Example/Example/Example/Images.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: Example/Example/Example/Images.xcassets/green_light.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "green_light.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "green_light@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: Example/Example/Example/Images.xcassets/red_light.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "red_light.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "red_light@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: Example/Example/Example/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.boundsj.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
================================================
FILE: Example/Example/Example/ListViewController.h
================================================
#import <UIKit/UIKit.h>
#import <ObjectiveDDP/MeteorClient.h>
@interface ListViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>
@property (nonatomic, strong) MeteorClient *meteor;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
meteor:(MeteorClient *)meteor;
@property (copy, nonatomic) NSString *userId;
@end
================================================
FILE: Example/Example/Example/ListViewController.m
================================================
#import "ListViewController.h"
#import "ViewController.h"
#import "MeteorClient.h"
@interface ListViewController ()
@property (weak, nonatomic) IBOutlet UITableView *tableview;
@property (strong, nonatomic) M13MutableOrderedDictionary *lists;
@end
@implementation ListViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
meteor:(MeteorClient *)meteor {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.meteor = meteor;
self.lists = self.meteor.collections[@"lists"];
}
return self;
}
- (void)viewWillAppear:(BOOL)animated {
self.navigationItem.title = @"My Lists";
self.navigationController.navigationBarHidden = NO;
self.navigationItem.hidesBackButton = YES;
UIBarButtonItem *logoutButton = [[UIBarButtonItem alloc] initWithTitle:@"Logout" style:UIBarButtonItemStylePlain target:self action:@selector(logout)];
self.navigationItem.rightBarButtonItem = logoutButton;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(didReceiveUpdate:)
name:@"added"
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(didReceiveUpdate:)
name:@"removed"
object:nil];
}
- (void)didReceiveUpdate:(NSNotification *)notification {
[self.tableview reloadData];
}
- (void)logout {
[self.meteor logout];
[self.navigationController popToRootViewControllerAnimated:YES];
}
#pragma mark <UITableViewDataSource>
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [self.lists count];
}
static NSDictionary *selectedList;
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellIdentifier = @"list";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (!cell) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:cellIdentifier];
}
NSDictionary *list = self.lists[indexPath.row];
selectedList = list;
cell.textLabel.text = list[@"name"];
UIButton *shareButton = [UIButton buttonWithType:UIButtonTypeCustom];
shareButton.frame = CGRectMake(255.0f, 5.0f, 55.0f, 34.0f);
shareButton.backgroundColor = [UIColor greenColor];
[shareButton setTitle:@"Share" forState:UIControlStateNormal];
[shareButton addTarget:self action:@selector(didClickShareButton:forEvent:) forControlEvents:UIControlEventTouchUpInside];
// XXX: shareButton needs to be able to link to its list
// shareButton
[cell addSubview:shareButton];
return cell;
}
static UITextField *shareWithTF;
- (void)didClickShareButton:(id)sender forEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView:self.view];
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0.0, location.y, 320.0, 100.0)];
view.backgroundColor = [UIColor whiteColor];
UITextField *shareWithTextField = [[UITextField alloc] initWithFrame:CGRectMake(10.0, 50.0, 240.0, 44.0)];
shareWithTF = shareWithTextField;
shareWithTextField.borderStyle = UITextBorderStyleLine;
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(255.0, 50.0, 60.0, 44.0);
button.backgroundColor = [UIColor greenColor];
[button setTitle:@"Send" forState:UIControlStateNormal];
[button addTarget:self action:@selector(didClickShareWithButton:) forControlEvents:UIControlEventTouchUpInside];
[view addSubview:shareWithTextField];
[view addSubview:button];
UIView *modalBackground = [[UIView alloc] initWithFrame:self.view.frame];
modalBackground.backgroundColor = [UIColor blackColor];
modalBackground.alpha = 0.7;
[self.view addSubview:modalBackground];
[self.view addSubview:view];
}
- (void)didClickShareWithButton:(id)sender {
NSArray *parameters = @[@{@"_id": selectedList[@"_id"]}, @{@"$set":@{@"share_with": shareWithTF.text}}];
[self.meteor callMethodName:@"/lists/update" parameters:parameters responseCallback:nil];
[[[self.view subviews] lastObject] removeFromSuperview];
[[[self.view subviews] lastObject] removeFromSuperview];
}
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
return YES;
}
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
forRowAtIndexPath:(NSIndexPath *)indexPath {
NSDictionary *list = self.lists[indexPath.row];
[self.meteor callMethodName:@"/lists/remove" parameters:@[@{@"_id": list[@"_id"]}] responseCallback:nil];
}
#pragma mark <UITableViewDelegate>
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSDictionary *list = self.lists[indexPath.row];
ViewController *controller = [[ViewController alloc] initWithNibName:@"ViewController"
bundle:nil
meteor:self.meteor
listName:list[@"name"]];
controller.userId = self.userId;
[self.navigationController pushViewController:controller animated:YES];
}
@end
================================================
FILE: Example/Example/Example/ListViewController.xib
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4510" systemVersion="12F37" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment defaultVersion="1552" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ListViewController">
<connections>
<outlet property="tableview" destination="4" id="23"/>
<outlet property="view" destination="1" id="3"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="1">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="4">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<connections>
<outlet property="dataSource" destination="-1" id="24"/>
<outlet property="delegate" destination="-1" id="26"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="4" firstAttribute="trailing" secondItem="1" secondAttribute="trailing" id="9"/>
<constraint firstItem="4" firstAttribute="leading" secondItem="1" secondAttribute="leading" id="11"/>
<constraint firstItem="4" firstAttribute="bottom" secondItem="1" secondAttribute="bottom" id="12"/>
<constraint firstItem="4" firstAttribute="top" secondItem="1" secondAttribute="top" id="28"/>
</constraints>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
</view>
</objects>
</document>
================================================
FILE: Example/Example/Example/LoginViewController.h
================================================
#import <UIKit/UIKit.h>
@class MeteorClient;
@interface LoginViewController : UIViewController
@property (weak, nonatomic) IBOutlet UITextField *email;
@property (weak, nonatomic) IBOutlet UITextField *password;
@property (weak, nonatomic) IBOutlet UILabel *connectionStatusText;
@property (weak, nonatomic) IBOutlet UIImageView *connectionStatusLight;
@property (weak, nonatomic) IBOutlet UIButton *loginButton;
@property (strong, nonatomic) MeteorClient *meteor;
@property (weak, nonatomic) IBOutlet UIButton *sayHiButton;
- (IBAction)didTapLoginButton:(id)sender;
@end
================================================
FILE: Example/Example/Example/LoginViewController.m
================================================
#import "LoginViewController.h"
#import "ListViewController.h"
#import <ObjectiveDDP/MeteorClient.h>
@implementation LoginViewController
- (void)viewWillAppear:(BOOL)animated {
[self.meteor addObserver:self
forKeyPath:@"websocketReady"
options:NSKeyValueObservingOptionNew
context:nil];
}
#pragma mark <NSKeyValueObserving>
- (void)observeValueForKeyPath:(NSString *)keyPath
ofObject:(id)object
change:(NSDictionary *)change
context:(void *)context {
if ([keyPath isEqualToString:@"websocketReady"] && self.meteor.websocketReady) {
self.connectionStatusText.text = @"Connected to Todo Server";
UIImage *image = [UIImage imageNamed: @"green_light.png"];
[self.connectionStatusLight setImage:image];
}
}
#pragma mark UI Actions
- (IBAction)didTapLoginButton:(id)sender {
if (!self.meteor.websocketReady) {
UIAlertView *notConnectedAlert = [[UIAlertView alloc] initWithTitle:@"Connection Error"
message:@"Can't find the Todo server, try again"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[notConnectedAlert show];
return;
}
[self.meteor logonWithEmail:self.email.text password:self.password.text responseCallback:^(NSDictionary *response, NSError *error) {
if (error) {
[self handleFailedAuth:error];
return;
}
[self handleSuccessfulAuth];
}];
}
- (IBAction)didTapSayHiButton {
[self.meteor callMethodName:@"sayHelloTo" parameters:@[self.email.text] responseCallback:^(NSDictionary *response, NSError *error) {
NSString *message = response[@"result"];
[[[UIAlertView alloc] initWithTitle:@"Meteor Todos" message:message delegate:nil cancelButtonTitle:@"Great" otherButtonTitles:nil] show];
}];
}
#pragma mark - Internal
- (void)handleSuccessfulAuth {
ListViewController *controller = [[ListViewController alloc] initWithNibName:@"ListViewController"
bundle:nil
meteor:self.meteor];
controller.userId = self.meteor.userId;
[self.navigationController pushViewController:controller animated:YES];
}
- (void)handleFailedAuth:(NSError *)error {
[[[UIAlertView alloc] initWithTitle:@"Meteor Todos" message:[error localizedDescription] delegate:nil cancelButtonTitle:@"Try Again" otherButtonTitles:nil] show];
}
@end
================================================
FILE: Example/Example/Example/LoginViewController.xib
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment defaultVersion="1552" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="LoginViewController">
<connections>
<outlet property="connectionStatusLight" destination="95" id="146"/>
<outlet property="connectionStatusText" destination="111" id="145"/>
<outlet property="email" destination="4" id="WVD-E0-3i7"/>
<outlet property="loginButton" destination="33" id="147"/>
<outlet property="password" destination="17" id="153"/>
<outlet property="sayHiButton" destination="abm-Si-OaD" id="VXX-Ry-XiJ"/>
<outlet property="view" destination="1" id="3"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="1">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="jesse@rebounds.net" borderStyle="line" placeholder="username" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="4">
<rect key="frame" x="20" y="147" width="280" height="46"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="46" id="16"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<textInputTraits key="textInputTraits"/>
</textField>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="airport" borderStyle="line" placeholder="password" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="17">
<rect key="frame" x="20" y="201" width="280" height="46"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="46" id="18"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<textInputTraits key="textInputTraits" secureTextEntry="YES"/>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="33">
<rect key="frame" x="20" y="263" width="280" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.90196079019999997" green="0.90196079019999997" blue="0.90196079019999997" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="39"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Login">
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="didTapLoginButton:" destination="-1" eventType="touchUpInside" id="148"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" ambiguous="YES" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="abm-Si-OaD">
<rect key="frame" x="20" y="315" width="280" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.90196079019999997" green="0.90196079019999997" blue="0.90196079019999997" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="EVb-Xo-SeN"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Say Hello">
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="didTapSayHiButton" destination="-1" eventType="touchUpInside" id="Urv-XX-2VO"/>
</connections>
</button>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Meteor TodoS" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="40">
<rect key="frame" x="20" y="82" width="280" height="41"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<constraints>
<constraint firstAttribute="height" constant="41" id="61"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="35"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="red_light.png" translatesAutoresizingMaskIntoConstraints="NO" id="95">
<rect key="frame" x="280" y="528" width="20" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<constraints>
<constraint firstAttribute="width" constant="20" id="106"/>
<constraint firstAttribute="height" constant="20" id="107"/>
</constraints>
</imageView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Not Connected to Todo Server" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="111">
<rect key="frame" x="20" y="528" width="256" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<constraints>
<constraint firstAttribute="width" constant="256" id="141"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="4" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="13"/>
<constraint firstAttribute="trailing" secondItem="4" secondAttribute="trailing" constant="20" symbolic="YES" id="15"/>
<constraint firstItem="17" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="22"/>
<constraint firstItem="17" firstAttribute="top" secondItem="4" secondAttribute="bottom" constant="8" symbolic="YES" id="23"/>
<constraint firstAttribute="trailing" secondItem="17" secondAttribute="trailing" constant="20" symbolic="YES" id="24"/>
<constraint firstItem="33" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="36"/>
<constraint firstAttribute="trailing" secondItem="33" secondAttribute="trailing" constant="20" symbolic="YES" id="38"/>
<constraint firstItem="40" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="46"/>
<constraint firstAttribute="trailing" secondItem="40" secondAttribute="trailing" constant="20" symbolic="YES" id="48"/>
<constraint firstItem="33" firstAttribute="top" secondItem="1" secondAttribute="top" constant="263" id="92"/>
<constraint firstItem="40" firstAttribute="top" secondItem="1" secondAttribute="top" constant="82" id="93"/>
<constraint firstItem="4" firstAttribute="top" secondItem="1" secondAttribute="top" constant="147" id="94"/>
<constraint firstAttribute="trailing" secondItem="95" secondAttribute="trailing" constant="20" symbolic="YES" id="109"/>
<constraint firstItem="111" firstAttribute="centerY" secondItem="95" secondAttribute="centerY" id="138"/>
<constraint firstItem="111" firstAttribute="top" secondItem="95" secondAttribute="top" id="139"/>
<constraint firstItem="111" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="142"/>
<constraint firstAttribute="bottom" secondItem="95" secondAttribute="bottom" constant="20" symbolic="YES" id="143"/>
</constraints>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
</view>
</objects>
<resources>
<image name="red_light.png" width="50" height="50"/>
</resources>
</document>
================================================
FILE: Example/Example/Example/ViewController.h
================================================
#import <UIKit/UIKit.h>
#import "AddViewController.h"
#import <ObjectiveDDP/MeteorClient.h>
@interface ViewController : UIViewController <UITableViewDataSource, AddViewControllerDelegate>
@property (strong, nonatomic) MeteorClient *meteor;
@property (copy, nonatomic) NSString *userId;
- (id)initWithNibName:(NSString *)nibNameOrNil
bundle:(NSBundle *)nibBundleOrNil
meteor:(MeteorClient *)meteor
listName:(NSString *)listName;
@end
================================================
FILE: Example/Example/Example/ViewController.m
================================================
#import "ViewController.h"
#import <ObjectiveDDP/BSONIdGenerator.h>
@interface ViewController ()
@property (weak, nonatomic) IBOutlet UITableView *tableview;
@property (copy, nonatomic) NSString *listName;
@end
@implementation ViewController
- (id)initWithNibName:(NSString *)nibNameOrNil
bundle:(NSBundle *)nibBundleOrNil
meteor:(MeteorClient *)meteor
listName:(NSString *) listName {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.meteor = meteor;
self.listName = listName;
}
return self;
}
- (void)viewWillAppear:(BOOL)animated {
self.navigationItem.title = self.listName;
UIBarButtonItem *addButton = [[UIBarButtonItem alloc ] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd
target:self
action:@selector(didTouchAdd:)];
[self.navigationItem setRightBarButtonItem:addButton];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(didReceiveUpdate:)
name:@"added"
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(didReceiveUpdate:)
name:@"removed"
object:nil];
}
- (void)viewWillDisappear:(BOOL)animated {
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)didReceiveUpdate:(NSNotification *)notification {
[self.tableview reloadData];
}
- (NSArray *)computedList {
NSPredicate *pred = [NSPredicate predicateWithFormat:@"(listName like %@)", self.listName];
M13MutableOrderedDictionary *things = self.meteor.collections[@"things"];
return [things.allObjects filteredArrayUsingPredicate:pred];
}
#pragma mark UI Actions
- (IBAction)didTouchAdd:(id)sender {
AddViewController *addController = [[AddViewController alloc] initWithNibName:@"AddViewController"
bundle:nil];
addController.delegate = self;
[self presentViewController:addController animated:YES completion:nil];
}
#pragma mark <UITableViewDataSource>
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [self.computedList count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellIdentifier = @"thing";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:cellIdentifier];
}
NSDictionary *thing = self.computedList[indexPath.row];
cell.textLabel.text = thing[@"msg"];
return cell;
}
- (BOOL)tableView:(UITableView *)tableView
canEditRowAtIndexPath:(NSIndexPath *)indexPath {
return YES;
}
- (void)tableView:(UITableView *)tableView
commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
NSDictionary *thing = self.computedList[indexPath.row];
[self.meteor callMethodName:@"/things/remove" parameters:@[@{@"_id": thing[@"_id"]}] responseCallback:nil];
}
}
- (void)didAddThing:(NSString *)message {
[self dismissViewControllerAnimated:YES completion:nil];
NSArray *parameters = @[@{@"_id": [[NSUUID UUID] UUIDString],
@"msg": message,
@"owner": self.userId,
@"listName": self.listName}];
[self.meteor callMethodName:@"/things/insert" parameters:parameters responseCallback:nil];
}
@end
================================================
FILE: Example/Example/Example/ViewController.xib
================================================
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1552</int>
<string key="IBDocument.SystemVersion">12D78</string>
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
<string key="IBDocument.AppKitVersion">1187.37</string>
<string key="IBDocument.HIToolboxVersion">626.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">2083</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBNSLayoutConstraint</string>
<string>IBProxyObject</string>
<string>IBUITableView</string>
<string>IBUIView</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</array>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<object class="IBProxyObject" id="372490531">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBProxyObject" id="843779117">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIView" id="774585933">
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUITableView" id="542337920">
<reference key="NSNextResponder" ref="774585933"/>
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{320, 548}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<bool key="IBUIClipsSubviews">YES</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIAlwaysBounceVertical">YES</bool>
<int key="IBUISeparatorStyle">1</int>
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
<bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
<float key="IBUIRowHeight">44</float>
<float key="IBUISectionHeaderHeight">22</float>
<float key="IBUISectionFooterHeight">22</float>
</object>
</array>
<string key="NSFrame">{{0, 20}, {320, 548}}</string>
<reference key="NSSuperview"/>
<reference key="NSNextKeyView"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC43NQA</bytes>
<object class="NSColorSpace" key="NSCustomColorSpace">
<int key="NSID">2</int>
</object>
</object>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<object class="IBUIScreenMetrics" key="IBUISimulatedDestinationMetrics">
<string key="IBUISimulatedSizeMetricsClass">IBUIScreenMetrics</string>
<object class="NSMutableDictionary" key="IBUINormalizedOrientationToSizeMap">
<bool key="EncodedWithXMLCoder">YES</bool>
<array key="dict.sortedKeys">
<integer value="1"/>
<integer value="3"/>
</array>
<array key="dict.values">
<string>{320, 568}</string>
<string>{568, 320}</string>
</array>
</object>
<string key="IBUITargetRuntime">IBCocoaTouchFramework</string>
<string key="IBUIDisplayName">Retina 4 Full Screen</string>
<int key="IBUIType">2</int>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="774585933"/>
</object>
<int key="connectionID">7</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">tableview</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="542337920"/>
</object>
<int key="connectionID">54</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">dataSource</string>
<reference key="source" ref="542337920"/>
<reference key="destination" ref="372490531"/>
</object>
<int key="connectionID">53</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<array key="object" id="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="372490531"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="843779117"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">6</int>
<reference key="object" ref="774585933"/>
<array class="NSMutableArray" key="children">
<object class="IBNSLayoutConstraint" id="738600801">
<reference key="firstItem" ref="542337920"/>
<int key="firstAttribute">3</int>
<int key="relation">0</int>
<reference key="secondItem" ref="774585933"/>
<int key="secondAttribute">3</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">0.0</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="774585933"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="601065340">
<reference key="firstItem" ref="542337920"/>
<int key="firstAttribute">4</int>
<int key="relation">0</int>
<reference key="secondItem" ref="774585933"/>
<int key="secondAttribute">4</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">0.0</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="774585933"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="1003816812">
<reference key="firstItem" ref="542337920"/>
<int key="firstAttribute">6</int>
<int key="relation">0</int>
<reference key="secondItem" ref="774585933"/>
<int key="secondAttribute">6</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">0.0</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="774585933"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="890703414">
<reference key="firstItem" ref="542337920"/>
<int key="firstAttribute">5</int>
<int key="relation">0</int>
<reference key="secondItem" ref="774585933"/>
<int key="secondAttribute">5</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">0.0</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="774585933"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<reference ref="542337920"/>
</array>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">22</int>
<reference key="object" ref="542337920"/>
<array class="NSMutableArray" key="children"/>
<reference key="parent" ref="774585933"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">29</int>
<reference key="object" ref="890703414"/>
<reference key="parent" ref="774585933"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">32</int>
<reference key="object" ref="1003816812"/>
<reference key="parent" ref="774585933"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">84</int>
<reference key="object" ref="601065340"/>
<reference key="parent" ref="774585933"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">89</int>
<reference key="object" ref="738600801"/>
<reference key="parent" ref="774585933"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.CustomClassName">ViewController</string>
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="-2.CustomClassName">UIResponder</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="22.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<boolean value="NO" key="22.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="29.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="32.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<array key="6.IBViewMetadataConstraints">
<reference ref="890703414"/>
<reference ref="1003816812"/>
<reference ref="601065340"/>
<reference ref="738600801"/>
</array>
<string key="84.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="89.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">89</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<bool key="IBDocument.UseAutolayout">YES</bool>
<string key="IBCocoaTouchPluginVersion">2083</string>
</data>
</archive>
================================================
FILE: Example/Example/Example/en.lproj/InfoPlist.strings
================================================
/* Localized versions of Info.plist keys */
================================================
FILE: Example/Example/Example/main.m
================================================
//
// main.m
// Example
//
// Created by Michael Arthur on 14/10/14.
// Copyright (c) 2014 Jesse Bounds. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
================================================
FILE: Example/Example/Example.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
0B3B61448B57250B0026C6F1 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F8D62AFA66EC41C7B554BB8B /* libPods.a */; };
EAC693A319EC94C000F0627B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = EAC693A219EC94C000F0627B /* main.m */; };
EAC693A619EC94C000F0627B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EAC693A519EC94C000F0627B /* AppDelegate.m */; };
EAC693A919EC94C000F0627B /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EAC693A819EC94C000F0627B /* ViewController.m */; };
EAC693AE19EC94C000F0627B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EAC693AD19EC94C000F0627B /* Images.xcassets */; };
EAC693C919EC94EC00F0627B /* AddViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EAC693C719EC94EC00F0627B /* AddViewController.m */; };
EAC693CA19EC94EC00F0627B /* AddViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EAC693C819EC94EC00F0627B /* AddViewController.xib */; };
EAC693D119EC94F700F0627B /* ListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EAC693CC19EC94F700F0627B /* ListViewController.m */; };
EAC693D219EC94F700F0627B /* ListViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EAC693CD19EC94F700F0627B /* ListViewController.xib */; };
EAC693D319EC94F700F0627B /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EAC693CF19EC94F700F0627B /* LoginViewController.m */; };
EAC693D419EC94F700F0627B /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EAC693D019EC94F700F0627B /* LoginViewController.xib */; };
EAC693DA19EC95A700F0627B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = EAC693D619EC95A700F0627B /* InfoPlist.strings */; };
EAC693DD19EC95C800F0627B /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EAC693DC19EC95C800F0627B /* ViewController.xib */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7548EC47874C5A256237302C /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
831424A6A73DAFA3814E1212 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
EAC6939D19EC94C000F0627B /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
EAC693A119EC94C000F0627B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
EAC693A219EC94C000F0627B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
EAC693A419EC94C000F0627B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
EAC693A519EC94C000F0627B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
EAC693A719EC94C000F0627B /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
EAC693A819EC94C000F0627B /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
EAC693AD19EC94C000F0627B /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
EAC693C619EC94EC00F0627B /* AddViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddViewController.h; sourceTree = "<group>"; };
EAC693C719EC94EC00F0627B /* AddViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AddViewController.m; sourceTree = "<group>"; };
EAC693C819EC94EC00F0627B /* AddViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AddViewController.xib; sourceTree = "<group>"; };
EAC693CB19EC94F700F0627B /* ListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListViewController.h; sourceTree = "<group>"; };
EAC693CC19EC94F700F0627B /* ListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ListViewController.m; sourceTree = "<group>"; };
EAC693CD19EC94F700F0627B /* ListViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ListViewController.xib; sourceTree = "<group>"; };
EAC693CE19EC94F700F0627B /* LoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginViewController.h; sourceTree = "<group>"; };
EAC693CF19EC94F700F0627B /* LoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginViewController.m; sourceTree = "<group>"; };
EAC693D019EC94F700F0627B /* LoginViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = "<group>"; };
EAC693D719EC95A700F0627B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = InfoPlist.strings; sourceTree = "<group>"; };
EAC693DC19EC95C800F0627B /* ViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ViewController.xib; sourceTree = "<group>"; };
F8D62AFA66EC41C7B554BB8B /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
EAC6939A19EC94C000F0627B /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0B3B61448B57250B0026C6F1 /* libPods.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
0665AB3D930148AD9C6AF02D /* Frameworks */ = {
isa = PBXGroup;
children = (
F8D62AFA66EC41C7B554BB8B /* libPods.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
1CE09A3E15BC83048B99A0FD /* Pods */ = {
isa = PBXGroup;
children = (
831424A6A73DAFA3814E1212 /* Pods.debug.xcconfig */,
7548EC47874C5A256237302C /* Pods.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
EAC6939419EC94C000F0627B = {
isa = PBXGroup;
children = (
EAC6939F19EC94C000F0627B /* Example */,
EAC6939E19EC94C000F0627B /* Products */,
1CE09A3E15BC83048B99A0FD /* Pods */,
0665AB3D930148AD9C6AF02D /* Frameworks */,
);
sourceTree = "<group>";
};
EAC6939E19EC94C000F0627B /* Products */ = {
isa = PBXGroup;
children = (
EAC6939D19EC94C000F0627B /* Example.app */,
);
name = Products;
sourceTree = "<group>";
};
EAC6939F19EC94C000F0627B /* Example */ = {
isa = PBXGroup;
children = (
EAC693CB19EC94F700F0627B /* ListViewController.h */,
EAC693CC19EC94F700F0627B /* ListViewController.m */,
EAC693CD19EC94F700F0627B /* ListViewController.xib */,
EAC693CE19EC94F700F0627B /* LoginViewController.h */,
EAC693CF19EC94F700F0627B /* LoginViewController.m */,
EAC693D019EC94F700F0627B /* LoginViewController.xib */,
EAC693D519EC95A700F0627B /* en.lproj */,
EAC693C619EC94EC00F0627B /* AddViewController.h */,
EAC693C719EC94EC00F0627B /* AddViewController.m */,
EAC693C819EC94EC00F0627B /* AddViewController.xib */,
EAC693A419EC94C000F0627B /* AppDelegate.h */,
EAC693A519EC94C000F0627B /* AppDelegate.m */,
EAC693A719EC94C000F0627B /* ViewController.h */,
EAC693A819EC94C000F0627B /* ViewController.m */,
EAC693DC19EC95C800F0627B /* ViewController.xib */,
EAC693AD19EC94C000F0627B /* Images.xcassets */,
EAC693A019EC94C000F0627B /* Supporting Files */,
);
path = Example;
sourceTree = "<group>";
};
EAC693A019EC94C000F0627B /* Supporting Files */ = {
isa = PBXGroup;
children = (
EAC693A119EC94C000F0627B /* Info.plist */,
EAC693A219EC94C000F0627B /* main.m */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
EAC693D519EC95A700F0627B /* en.lproj */ = {
isa = PBXGroup;
children = (
EAC693D619EC95A700F0627B /* InfoPlist.strings */,
);
path = en.lproj;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
EAC6939C19EC94C000F0627B /* Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = EAC693C019EC94C000F0627B /* Build configuration list for PBXNativeTarget "Example" */;
buildPhases = (
E824E0346DA8AEFE30585424 /* Check Pods Manifest.lock */,
EAC6939919EC94C000F0627B /* Sources */,
EAC6939A19EC94C000F0627B /* Frameworks */,
EAC6939B19EC94C000F0627B /* Resources */,
7E1438145A4311B6E1F83379 /* Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = Example;
productName = Example;
productReference = EAC6939D19EC94C000F0627B /* Example.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
EAC6939519EC94C000F0627B /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0600;
ORGANIZATIONNAME = "Jesse Bounds";
TargetAttributes = {
EAC6939C19EC94C000F0627B = {
CreatedOnToolsVersion = 6.0.1;
};
};
};
buildConfigurationList = EAC6939819EC94C000F0627B /* Build configuration list for PBXProject "Example" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = EAC6939419EC94C000F0627B;
productRefGroup = EAC6939E19EC94C000F0627B /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
EAC6939C19EC94C000F0627B /* Example */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
EAC6939B19EC94C000F0627B /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
EAC693D419EC94F700F0627B /* LoginViewController.xib in Resources */,
EAC693CA19EC94EC00F0627B /* AddViewController.xib in Resources */,
EAC693AE19EC94C000F0627B /* Images.xcassets in Resources */,
EAC693D219EC94F700F0627B /* ListViewController.xib in Resources */,
EAC693DD19EC95C800F0627B /* ViewController.xib in Resources */,
EAC693DA19EC95A700F0627B /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
7E1438145A4311B6E1F83379 /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
showEnvVarsInLog = 0;
};
E824E0346DA8AEFE30585424 /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
EAC6939919EC94C000F0627B /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
EAC693D119EC94F700F0627B /* ListViewController.m in Sources */,
EAC693A919EC94C000F0627B /* ViewController.m in Sources */,
EAC693D319EC94F700F0627B /* LoginViewController.m in Sources */,
EAC693A619EC94C000F0627B /* AppDelegate.m in Sources */,
EAC693C919EC94EC00F0627B /* AddViewController.m in Sources */,
EAC693A319EC94C000F0627B /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
EAC693D619EC95A700F0627B /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
EAC693D719EC95A700F0627B /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
EAC693BE19EC94C000F0627B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
EAC693BF19EC94C000F0627B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
EAC693C119EC94C000F0627B /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 831424A6A73DAFA3814E1212 /* Pods.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Example/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
EAC693C219EC94C000F0627B /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7548EC47874C5A256237302C /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Example/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
EAC6939819EC94C000F0627B /* Build configuration list for PBXProject "Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
EAC693BE19EC94C000F0627B /* Debug */,
EAC693BF19EC94C000F0627B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
EAC693C019EC94C000F0627B /* Build configuration list for PBXNativeTarget "Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
EAC693C119EC94C000F0627B /* Debug */,
EAC693C219EC94C000F0627B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = EAC6939519EC94C000F0627B /* Project object */;
}
================================================
FILE: Example/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Example.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: Example/Example/Example.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Example.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: Example/Example/Podfile
================================================
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.1'
pod 'ObjectiveDDP', :git => 'https://github.com/boundsj/ObjectiveDDP.git', :branch => 'master'
================================================
FILE: Example/Example/example.txt
================================================
if you intend to do meteor auth with your ios client then add -lcrypto to other linker flags in settings
================================================
FILE: Example/swiftExample/Podfile
================================================
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.1'
pod 'ObjectiveDDP', :git => 'https://github.com/boundsj/ObjectiveDDP.git', :branch => 'master'
================================================
FILE: Example/swiftExample/bridge.m
================================================
//
// bridge.m
// swiftddp
//
// Created by Michael Arthur on 7/6/14.
// Copyright (c) 2014 . All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MeteorClient.h"
#import "ObjectiveDDP.h"
#import <ObjectiveDDP/MeteorClient.h>
MeteorClient* initialiseMeteor(NSString* version, NSString* endpoint) {
MeteorClient *meteorClient = [[MeteorClient alloc] initWithDDPVersion:version];
ObjectiveDDP *ddp = [[ObjectiveDDP alloc] initWithURLString:endpoint delegate:meteorClient];
meteorClient.ddp = ddp;
[meteorClient.ddp connectWebSocket];
return meteorClient;
}
================================================
FILE: Example/swiftExample/swiftddp/AddViewController.swift
================================================
//
// AddViewController.swift
// swiftddp
//
// Created by Michael Arthur on 13/08/14.
// Copyright (c) 2014. All rights reserved.
//
import Foundation
import UIKit
class AddViewController : UIViewController {
@IBOutlet weak var messageTextView: UITextView!
var delegate:AddViewControllerDelegate!
required init(coder aDecoder: NSCoder) {
fatalError("NSCoding not supported")
}
override init(nibName nibNameOrNil: String!, bundle nibBundleOrNil: NSBundle!) {
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
}
override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
self.view.endEditing(true)
}
@IBAction func didTouchAddButton(sender: AnyObject!) {
self.delegate.didAddThing(self.messageTextView.text)
}
}
protocol AddViewControllerDelegate {
func didAddThing(message:NSString!)
}
================================================
FILE: Example/swiftExample/swiftddp/AddViewController.xib
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="AddViewController">
<connections>
<outlet property="messageTextView" destination="11" id="111"/>
<outlet property="view" destination="1" id="113"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="1">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="11">
<rect key="frame" x="20" y="96" width="280" height="176"/>
<color key="backgroundColor" red="0.90196079019999997" green="0.90196079019999997" blue="0.90196079019999997" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="176" id="107"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="22"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="NEW TODO" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="27">
<rect key="frame" x="20" y="20" width="280" height="68"/>
<constraints>
<constraint firstAttribute="height" constant="68" id="80"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="43"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="62">
<rect key="frame" x="20" y="317" width="280" height="51"/>
<color key="backgroundColor" red="0.90196079019999997" green="0.90196079019999997" blue="0.90196079019999997" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="51" id="81"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="31"/>
<state key="normal" title="Add">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="didTouchAddButton:" destination="-1" eventType="touchUpInside" id="112"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="11" secondAttribute="trailing" constant="20" symbolic="YES" id="25"/>
<constraint firstItem="11" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="26"/>
<constraint firstItem="11" firstAttribute="top" secondItem="27" secondAttribute="bottom" constant="8" symbolic="YES" id="34"/>
<constraint firstItem="27" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="59"/>
<constraint firstItem="27" firstAttribute="top" secondItem="1" secondAttribute="top" constant="20" symbolic="YES" id="61"/>
<constraint firstItem="62" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="67"/>
<constraint firstAttribute="trailing" secondItem="62" secondAttribute="trailing" constant="20" symbolic="YES" id="71"/>
<constraint firstAttribute="trailing" secondItem="27" secondAttribute="trailing" constant="20" symbolic="YES" id="91"/>
<constraint firstAttribute="bottom" secondItem="62" secondAttribute="bottom" constant="200" id="108"/>
</constraints>
</view>
</objects>
</document>
================================================
FILE: Example/swiftExample/swiftddp/AppDelegate.swift
================================================
//
// AppDelegate.swift
// swiftddp
//
// Created by Michael Arthur on 7/6/14.
// Copyright (c) 2014 . All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var navController: UINavigationController!
// Override point for customization after application launch. creates our singleton
var meteorClient = initialiseMeteor("pre2", "wss://ddptester.meteor.com/websocket");
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
meteorClient.addSubscription("things")
meteorClient.addSubscription("lists")
let loginController:LoginViewController = LoginViewController(nibName: "LoginViewController", bundle: nil)
loginController.meteor = self.meteorClient
self.navController = UINavigationController(rootViewController:loginController)
self.navController.navigationBarHidden = true
//This needs to be modified to fix the screen size issue. (Currently a Bug)
self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
self.window!.rootViewController = self.navController
self.window!.makeKeyAndVisible()
print(self.window?.frame)
NSNotificationCenter.defaultCenter().addObserver(self, selector: "reportConnection", name: MeteorClientDidConnectNotification, object: nil)
NSNotificationCenter.defaultCenter().addObserver(self, selector: "reportDisconnection", name: MeteorClientDidDisconnectNotification, object: nil)
return true
}
func reportConnection() {
print("================> connected to server!")
}
func reportDisconnection() {
print("================> disconnected from server!")
}
func applicationWillResignActive(application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
func applicationDidEnterBackground(application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
================================================
FILE: Example/swiftExample/swiftddp/Example-Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.rebounds.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
================================================
FILE: Example/swiftExample/swiftddp/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
</dict>
</plist>
================================================
FILE: Example/swiftExample/swiftddp/ListViewController.swift
================================================
//
// ListViewController.swift
// swiftddp
//
// Created by Michael Arthur on 13/08/14.
// Copyright (c) 2014. All rights reserved.
//
import Foundation
import UIKit
class ListViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
@IBOutlet weak var tableview: UITableView!
var meteor:MeteorClient!
var lists:M13MutableOrderedDictionary!
var userId:String?
required init(coder aDecoder: NSCoder) {
fatalError("NSCoding not supported")
}
init(nibName nibNameOrNil: String!, bundle nibBundleOrNil: NSBundle!, meteor: MeteorClient!) {
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
self.meteor = meteor
self.lists = self.meteor.collections["lists"] as! M13MutableOrderedDictionary
}
override func viewWillAppear(animated: Bool) {
self.meteor.addObserver(self, forKeyPath: "websocketReady", options: NSKeyValueObservingOptions.New, context: nil)
self.navigationItem.title = "My Lists"
self.navigationController?.navigationBarHidden = false
self.navigationItem.hidesBackButton = true
let logoutButton:UIBarButtonItem = UIBarButtonItem(title: "Logout", style: UIBarButtonItemStyle.Plain, target: self, action: "logout")
self.navigationItem.rightBarButtonItem = logoutButton
NSNotificationCenter.defaultCenter().addObserver(self, selector: "didReceiveUpdate:", name: "lists_added", object: nil)
NSNotificationCenter.defaultCenter().addObserver(self, selector: "didReceiveUpdate:", name: "lists_removed", object: nil)
}
func didReceiveUpdate(notification:NSNotification) {
self.tableview.reloadData()
}
func logout() {
self.meteor.logout()
self.navigationController?.popToRootViewControllerAnimated(true)
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return Int(self.lists.count())
}
//
// override func observeValueForKeyPath(keyPath: String, ofObject object: AnyObject!, change: [NSObject : AnyObject]!, context: UnsafeMutablePointer<()>) {
//
// if (keyPath == "websocketReady" && meteor.websocketReady) {
//
// }
// }
var selectedList:[String:String]!
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cellIdentifier = "list"
var cell:UITableViewCell
if let tmpCell: AnyObject = tableView.dequeueReusableCellWithIdentifier(cellIdentifier) {
cell = tmpCell as! UITableViewCell
} else {
cell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: cellIdentifier) as UITableViewCell
}
selectedList = self.lists.objectAtIndex(UInt(indexPath.row)) as? [String:String]
cell.textLabel?.text = selectedList["name"]
let shareButton:UIButton = UIButton(type: UIButtonType.Custom) as UIButton
shareButton.frame = CGRectMake(255.0, 5.0, 55.0, 34.0)
shareButton.backgroundColor = UIColor.greenColor()
shareButton.setTitle("Share", forState: UIControlState.Normal)
shareButton.addTarget(self, action: "didClickShareButton:forEvent:", forControlEvents: .TouchUpInside)
cell.addSubview(shareButton)
return cell
}
var shareWithTF:UITextField!
func didClickShareButton(sender:AnyObject!,forEvent event:UIEvent!) {
let touch = event.allTouches()! as Set<UITouch>
let location:CGPoint = touch.first!.locationInView(self.view)
let view:UIView = UIView(frame: CGRectMake(0.0, location.y, 320.0, 100.0))
view.backgroundColor = UIColor.whiteColor()
let shareWithTextField:UITextField = UITextField(frame: CGRectMake(10.0, 50.0, 240.0, 44.0))
shareWithTF = shareWithTextField
shareWithTextField.borderStyle = UITextBorderStyle.Line
let button:UIButton = UIButton(type: UIButtonType.Custom) as UIButton
button.frame = CGRectMake(255.0, 50.0, 60.0, 44.0)
button.backgroundColor = UIColor.greenColor()
button.setTitle("Send", forState: UIControlState.Normal)
button.addTarget(self, action: "didClickShareWithButton:forEvent:", forControlEvents: .TouchUpInside)
view .addSubview(shareWithTextField)
view .addSubview(button)
let modalBackground:UIView = UIView(frame: self.view.frame)
modalBackground.backgroundColor = UIColor.blackColor()
modalBackground.alpha = 0.7
self.view .addSubview(modalBackground)
self.view .addSubview(view)
}
func didClickShareWithButton(sender: AnyObject!, forEvent event:UIEvent!) {
let id = selectedList["_id"] as String!
let parameters = [["_id":id!], ["set": ["share_with":shareWithTF.text!]]] //This has to be an NSArray
self.meteor.callMethodName("/lists/update", parameters: parameters, responseCallback: {(response, error) -> Void in
if((error) != nil) {
self.handleFailedShare(error)
return
}
self.handleSuccessfulShare()
}
)
self.view.subviews.last?.removeFromSuperview()
self.view.subviews.last?.removeFromSuperview()
}
func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
return true
}
func tableView(tableView: UITableView,commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath){
var list = self.lists.objectAtIndex(UInt(indexPath.row)) as! [String:AnyObject]
let id = list["_id"] as! String
self.meteor.callMethodName("/lists/remove", parameters: [["_id":id]], responseCallback: nil)
}
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
var list = self.lists.objectAtIndex(UInt(indexPath.row)) as! [String:AnyObject]
let viewController:ViewController = ViewController(nibNameOrNil: "ViewController", bundle: nil, meteor: self.meteor, listName: list["name"] as! String)
viewController.userId = self.userId
self.navigationController?.pushViewController(viewController, animated: true)
}
func handleSuccessfulShare() {
UIAlertView(title: "Shared", message:"Success", delegate: nil, cancelButtonTitle: "Dismiss").show()
}
func handleFailedShare(error: NSError) {
UIAlertView(title: "Meteor Todos", message:error.localizedDescription, delegate: nil, cancelButtonTitle: "Try Again").show()
}
}
================================================
FILE: Example/swiftExample/swiftddp/ListViewController.xib
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ListViewController">
<connections>
<outlet property="tableview" destination="4" id="O2i-je-6bV"/>
<outlet property="view" destination="1" id="LOj-w0-8qC"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="1">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="4">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<connections>
<outlet property="dataSource" destination="-1" id="4vR-t4-21n"/>
<outlet property="delegate" destination="-1" id="qhj-a1-dmf"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="4" firstAttribute="trailing" secondItem="1" secondAttribute="trailing" id="9"/>
<constraint firstItem="4" firstAttribute="leading" secondItem="1" secondAttribute="leading" id="11"/>
<constraint firstItem="4" firstAttribute="bottom" secondItem="1" secondAttribute="bottom" id="12"/>
<constraint firstItem="4" firstAttribute="top" secondItem="1" secondAttribute="top" id="28"/>
</constraints>
</view>
</objects>
</document>
================================================
FILE: Example/swiftExample/swiftddp/LoginViewController.swift
================================================
//
// LoginViewController.swift
// swiftddp
//
// Created by Michael Arthur on 12/08/14.
// Copyright (c) 2014. All rights reserved.
//
import Foundation
import UIKit
class LoginViewController: UIViewController {
@IBOutlet weak var email: UITextField!
@IBOutlet weak var password: UITextField!
@IBOutlet weak var connectionStatusLight: UIImageView!
@IBOutlet weak var connectionStatusText: UILabel!
var meteor:MeteorClient!
override func viewWillAppear(animated: Bool) {
let observingOption = NSKeyValueObservingOptions.New
meteor.addObserver(self, forKeyPath:"websocketReady", options: observingOption, context:nil)
}
override func observeValueForKeyPath(keyPath: String?, ofObject object: AnyObject?, change: [String : AnyObject]?, context: UnsafeMutablePointer<Void>) {
if (keyPath == "websocketReady" && meteor.websocketReady) {
connectionStatusText.text = "Connected to Todo Server"
let image:UIImage = UIImage(named: "green_light.png")!
connectionStatusLight.image = image
}
}
@IBAction func didTapLoginButton(sender: AnyObject) {
if (!meteor.websocketReady) {
let notConnectedAlert = UIAlertView(title: "Connection Error", message: "Can't find the Todo server, try again", delegate: nil, cancelButtonTitle: "OK")
notConnectedAlert.show()
return
}
meteor.logonWithEmail(self.email.text, password: self.password.text) {(response, error) -> Void in
if((error) != nil) {
self.handleFailedAuth(error)
return
}
self.handleSuccessfulAuth()
}
}
func handleSuccessfulAuth() {
let listViewController = ListViewController(nibName: "ListViewController", bundle: nil, meteor: self.meteor)
listViewController.userId = self.meteor.userId
self.navigationController?.pushViewController(listViewController, animated: true)
}
func handleFailedAuth(error: NSError) {
UIAlertView(title: "Meteor Todos", message:error.localizedDescription, delegate: nil, cancelButtonTitle: "Try Again").show()
}
@IBAction func didTapSayHiButton(sender: AnyObject) {
self.meteor.callMethodName("sayHelloTo", parameters:[self.email.text!]) {(response, error) -> Void in
if((error) != nil) {
self.handleFailedAuth(error)
return
}
let message = response["result"] as! String
UIAlertView(title: "Meteor Todos", message: message, delegate: nil, cancelButtonTitle:"Great").show()
}
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
self.view.endEditing(true)
}
}
================================================
FILE: Example/swiftExample/swiftddp/LoginViewController.xib
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="LoginViewController">
<connections>
<outlet property="connectionStatusLight" destination="95" id="KrX-7d-NZI"/>
<outlet property="connectionStatusText" destination="111" id="JN1-S9-Wn5"/>
<outlet property="email" destination="4" id="BXQ-UI-OUJ"/>
<outlet property="password" destination="17" id="aFI-zW-c5Q"/>
<outlet property="view" destination="1" id="499-2p-HxI"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="1">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="jesse@rebounds.net" borderStyle="line" placeholder="username" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="4">
<rect key="frame" x="20" y="147" width="280" height="46"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="46" id="16"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<textInputTraits key="textInputTraits"/>
</textField>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="airport" borderStyle="line" placeholder="password" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="17">
<rect key="frame" x="20" y="201" width="280" height="46"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="46" id="18"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<textInputTraits key="textInputTraits" secureTextEntry="YES"/>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="33">
<rect key="frame" x="20" y="263" width="280" height="44"/>
<color key="backgroundColor" red="0.90196079019999997" green="0.90196079019999997" blue="0.90196079019999997" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="39"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Login">
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="didTapLoginButton:" destination="-1" eventType="touchUpInside" id="SjW-vH-7nE"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="abm-Si-OaD">
<rect key="frame" x="20" y="315" width="280" height="44"/>
<color key="backgroundColor" red="0.90196079019999997" green="0.90196079019999997" blue="0.90196079019999997" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="EVb-Xo-SeN"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Say Hello">
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="didTapSayHiButton:" destination="-1" eventType="touchUpInside" id="47Q-Pl-3X5"/>
</connections>
</button>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Meteor TodoS" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="40">
<rect key="frame" x="20" y="82" width="280" height="41"/>
<constraints>
<constraint firstAttribute="height" constant="41" id="61"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="35"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="red_light.png" translatesAutoresizingMaskIntoConstraints="NO" id="95">
<rect key="frame" x="280" y="528" width="20" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="20" id="106"/>
<constraint firstAttribute="height" constant="20" id="107"/>
</constraints>
</imageView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Not Connected to Todo Server" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="111">
<rect key="frame" x="20" y="528" width="256" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="256" id="141"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="4" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="13"/>
<constraint firstAttribute="trailing" secondItem="4" secondAttribute="trailing" constant="20" symbolic="YES" id="15"/>
<constraint firstItem="17" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="22"/>
<constraint firstItem="17" firstAttribute="top" secondItem="4" secondAttribute="bottom" constant="8" symbolic="YES" id="23"/>
<constraint firstAttribute="trailing" secondItem="17" secondAttribute="trailing" constant="20" symbolic="YES" id="24"/>
<constraint firstItem="33" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="36"/>
<constraint firstAttribute="trailing" secondItem="33" secondAttribute="trailing" constant="20" symbolic="YES" id="38"/>
<constraint firstItem="40" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="46"/>
<constraint firstAttribute="trailing" secondItem="40" secondAttribute="trailing" constant="20" symbolic="YES" id="48"/>
<constraint firstItem="33" firstAttribute="top" secondItem="1" secondAttribute="top" constant="263" id="92"/>
<constraint firstItem="40" firstAttribute="top" secondItem="1" secondAttribute="top" constant="82" id="93"/>
<constraint firstItem="4" firstAttribute="top" secondItem="1" secondAttribute="top" constant="147" id="94"/>
<constraint firstAttribute="trailing" secondItem="95" secondAttribute="trailing" constant="20" symbolic="YES" id="109"/>
<constraint firstItem="111" firstAttribute="centerY" secondItem="95" secondAttribute="centerY" id="138"/>
<constraint firstItem="111" firstAttribute="top" secondItem="95" secondAttribute="top" id="139"/>
<constraint firstItem="111" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="142"/>
<constraint firstAttribute="bottom" secondItem="95" secondAttribute="bottom" constant="20" symbolic="YES" id="143"/>
<constraint firstItem="abm-Si-OaD" firstAttribute="trailing" secondItem="33" secondAttribute="trailing" id="E8o-Dq-uWz"/>
<constraint firstItem="abm-Si-OaD" firstAttribute="top" secondItem="33" secondAttribute="bottom" constant="8" symbolic="YES" id="IcR-I3-Rv4"/>
<constraint firstItem="abm-Si-OaD" firstAttribute="leading" secondItem="33" secondAttribute="leading" id="r71-nk-QOW"/>
</constraints>
</view>
</objects>
<resources>
<image name="red_light.png" width="50" height="50"/>
</resources>
</document>
================================================
FILE: Example/swiftExample/swiftddp/ViewController.swift
================================================
//
// ViewController.swift
// swiftddp
//
// Created by Michael Arthur on 7/6/14.
// Copyright (c) 2014. All rights reserved.
//
import UIKit
class ViewController: UIViewController,UITableViewDataSource, AddViewControllerDelegate {
var meteor:MeteorClient!
var listName:String!
var userId:String!
@IBOutlet weak var tableview: UITableView!
required init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)!
}
override init(nibName nibNameOrNil: String!, bundle nibBundleOrNil: NSBundle!) {
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
}
init(nibNameOrNil: String!, bundle nibBundleOrNil: NSBundle!, meteor: MeteorClient!, listName:String!) {
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
// if(self != nil) {
self.meteor = meteor
self.listName = listName
//}
}
override func viewWillAppear(animated: Bool) {
self.navigationItem.title = self.listName
let addButton:UIBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Add, target: self, action: "didTouchAdd:")
self.navigationItem.setRightBarButtonItem(addButton, animated: true)
NSNotificationCenter.defaultCenter().addObserver(self, selector: "didReceiveUpdate:", name: "things_added", object: nil)
NSNotificationCenter.defaultCenter().addObserver(self, selector: "didReceiveUpdate:", name: "things_changed", object: nil)
NSNotificationCenter.defaultCenter().addObserver(self, selector: "didReceiveUpdate:", name: "things_removed", object: nil)
}
override func viewWillDisappear(animated: Bool) {
NSNotificationCenter.defaultCenter().removeObserver(self)
}
func didReceiveUpdate(notification:NSNotification) {
self.tableview.reloadData()
}
func computedList() -> NSArray {
let pred:NSPredicate = NSPredicate(format: "(listName like %@)", self.listName)
let temp = self.meteor.collections["things"] as! M13MutableOrderedDictionary
let temp2 = temp.allObjects() as NSArray
return temp2.filteredArrayUsingPredicate(pred)
}
@IBAction func didTouchAdd(sender: AnyObject) {
let addController = AddViewController(nibName: "AddViewController", bundle: nil)
addController.delegate = self
self.presentViewController(addController, animated: true, completion: nil)
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if(self.meteor.collections["things"] != nil){
return self.computedList().count
}
return 0
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cellIdentifier:String! = "thing"
var cell:UITableViewCell
if let tmpCell: AnyObject = tableView.dequeueReusableCellWithIdentifier(cellIdentifier) {
cell = tmpCell as! UITableViewCell
} else {
cell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: cellIdentifier) as UITableViewCell
}
if(self.meteor.collections["things"] != nil){
let thing:NSDictionary = self.computedList()[indexPath.row] as! NSDictionary
cell.textLabel?.text = thing["msg"] as? String
return cell
}
cell.textLabel?.text = "dummy"
return cell
}
func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
return true
}
func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
if(editingStyle == UITableViewCellEditingStyle.Delete) {
//If statement prevents crash
if(self.meteor.collections["things"] != nil){
let thing:NSDictionary = self.computedList()[indexPath.row] as! NSDictionary
let thingy = thing["_id"] as! String
self.meteor.callMethodName("/things/remove", parameters: [["_id":thingy]], responseCallback: nil)
}
}
}
func didAddThing(message: NSString!) {
self.dismissViewControllerAnimated(true, completion: nil)
let parameters:NSArray = [["_id": NSUUID().UUIDString,
"msg":message,
"owner":self.userId,
"listName":self.listName]]
self.meteor.callMethodName("/things/insert", parameters: parameters as [AnyObject], responseCallback: nil)
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
================================================
FILE: Example/swiftExample/swiftddp/ViewController.xib
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ViewController">
<connections>
<outlet property="tableview" destination="22" id="92"/>
<outlet property="view" destination="6" id="93"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="6">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="22">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<connections>
<outlet property="dataSource" destination="-1" id="96"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" white="0.75" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="22" firstAttribute="leading" secondItem="6" secondAttribute="leading" id="29"/>
<constraint firstItem="22" firstAttribute="trailing" secondItem="6" secondAttribute="trailing" id="32"/>
<constraint firstItem="22" firstAttribute="bottom" secondItem="6" secondAttribute="bottom" id="84"/>
<constraint firstItem="22" firstAttribute="top" secondItem="6" secondAttribute="top" id="89"/>
</constraints>
</view>
</objects>
</document>
================================================
FILE: Example/swiftExample/swiftddp/images.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: Example/swiftExample/swiftddp/images.xcassets/LaunchImage.launchimage/Contents.json
================================================
{
"images" : [
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"subtype" : "retina4",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: Example/swiftExample/swiftddp-Bridging-Header.h
================================================
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import <SocketRocket/SRWebSocket.h>
#import "MeteorClient.h"
#import "ObjectiveDDP.h"
#import <ObjectiveDDP/MeteorClient.h>
#import <ObjectiveDDP/BSONIdGenerator.h>
#import "bridge.m"
================================================
FILE: Example/swiftExample/swiftddp.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
028E8AFD1969A9E8006F2115 /* bridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 028E8AFC1969A9E8006F2115 /* bridge.m */; };
02E399621969A81300E2FE77 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02E399611969A81300E2FE77 /* AppDelegate.swift */; };
02E399641969A81300E2FE77 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02E399631969A81300E2FE77 /* ViewController.swift */; };
02E399691969A81300E2FE77 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 02E399681969A81300E2FE77 /* Images.xcassets */; };
02E399751969A81300E2FE77 /* swiftddpTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02E399741969A81300E2FE77 /* swiftddpTests.swift */; };
EA1C0B47199AEFC4005545A7 /* ListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA1C0B46199AEFC4005545A7 /* ListViewController.swift */; };
EA8054BE199B5C3B00805893 /* AddViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA8054BD199B5C3B00805893 /* AddViewController.swift */; };
EA97639619998E2E00866844 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EA97639519998E2E00866844 /* ViewController.xib */; };
EA97639A19998E4500866844 /* AddViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EA97639719998E4500866844 /* AddViewController.xib */; };
EA97639B19998E4500866844 /* ListViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EA97639819998E4500866844 /* ListViewController.xib */; };
EA97639C19998E4500866844 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EA97639919998E4500866844 /* LoginViewController.xib */; };
EA9763A219998E7600866844 /* green_light.png in Resources */ = {isa = PBXBuildFile; fileRef = EA97639D19998E7600866844 /* green_light.png */; };
EA9763A319998E7600866844 /* green_light@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = EA97639E19998E7600866844 /* green_light@2x.png */; };
EA9763A419998E7600866844 /* red_light.png in Resources */ = {isa = PBXBuildFile; fileRef = EA97639F19998E7600866844 /* red_light.png */; };
EA9763A519998E7600866844 /* red_light@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = EA9763A019998E7600866844 /* red_light@2x.png */; };
EA9763A619998E7600866844 /* Example-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = EA9763A119998E7600866844 /* Example-Info.plist */; };
EA9763A81999905400866844 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9763A71999905400866844 /* LoginViewController.swift */; };
F085ED994E3844018475E51E /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EBABBCC4B77C49EAA6854302 /* libPods.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
02E3996F1969A81300E2FE77 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 02E399541969A81300E2FE77 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 02E3995B1969A81300E2FE77;
remoteInfo = swiftddp;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
028E8AFB1969A9E8006F2115 /* swiftddp-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "swiftddp-Bridging-Header.h"; sourceTree = "<group>"; };
028E8AFC1969A9E8006F2115 /* bridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = bridge.m; sourceTree = "<group>"; };
02E3995C1969A81300E2FE77 /* swiftddp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = swiftddp.app; sourceTree = BUILT_PRODUCTS_DIR; };
02E399601969A81300E2FE77 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
02E399611969A81300E2FE77 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
02E399631969A81300E2FE77 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
02E399681969A81300E2FE77 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
02E3996E1969A81300E2FE77 /* swiftddpTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = swiftddpTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
02E399731969A81300E2FE77 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
02E399741969A81300E2FE77 /* swiftddpTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = swiftddpTests.swift; sourceTree = "<group>"; };
68DC64A1F8BABCBDDEDFBCE4 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
EA1C0B46199AEFC4005545A7 /* ListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListViewController.swift; sourceTree = "<group>"; };
EA8054BD199B5C3B00805893 /* AddViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddViewController.swift; sourceTree = "<group>"; };
EA97639519998E2E00866844 /* ViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ViewController.xib; sourceTree = "<group>"; };
EA97639719998E4500866844 /* AddViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AddViewController.xib; sourceTree = "<group>"; };
EA97639819998E4500866844 /* ListViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ListViewController.xib; sourceTree = "<group>"; };
EA97639919998E4500866844 /* LoginViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = "<group>"; };
EA97639D19998E7600866844 /* green_light.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = green_light.png; sourceTree = "<group>"; };
EA97639E19998E7600866844 /* green_light@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "green_light@2x.png"; sourceTree = "<group>"; };
EA97639F19998E7600866844 /* red_light.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = red_light.png; sourceTree = "<group>"; };
EA9763A019998E7600866844 /* red_light@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "red_light@2x.png"; sourceTree = "<group>"; };
EA9763A119998E7600866844 /* Example-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Example-Info.plist"; sourceTree = "<group>"; };
EA9763A71999905400866844 /* LoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = "<group>"; };
EBABBCC4B77C49EAA6854302 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
FAD4C15CAE906A029B1F8C9C /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
02E399591969A81300E2FE77 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F085ED994E3844018475E51E /* libPods.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
02E3996B1969A81300E2FE77 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
02E399531969A81300E2FE77 = {
isa = PBXGroup;
children = (
028E8AFB1969A9E8006F2115 /* swiftddp-Bridging-Header.h */,
028E8AFC1969A9E8006F2115 /* bridge.m */,
02E3995E1969A81300E2FE77 /* swiftddp */,
02E399711969A81300E2FE77 /* swiftddpTests */,
02E3995D1969A81300E2FE77 /* Products */,
71997703989144BE8A6BA401 /* Frameworks */,
2ADD1B4FCCC14601FC099EA0 /* Pods */,
);
sourceTree = "<group>";
};
02E3995D1969A81300E2FE77 /* Products */ = {
isa = PBXGroup;
children = (
02E3995C1969A81300E2FE77 /* swiftddp.app */,
02E3996E1969A81300E2FE77 /* swiftddpTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
02E3995E1969A81300E2FE77 /* swiftddp */ = {
isa = PBXGroup;
children = (
EA8054BD199B5C3B00805893 /* AddViewController.swift */,
EA97639719998E4500866844 /* AddViewController.xib */,
EA1C0B46199AEFC4005545A7 /* ListViewController.swift */,
EA97639819998E4500866844 /* ListViewController.xib */,
EA97639919998E4500866844 /* LoginViewController.xib */,
EA9763A71999905400866844 /* LoginViewController.swift */,
EA97639519998E2E00866844 /* ViewController.xib */,
02E399631969A81300E2FE77 /* ViewController.swift */,
02E399611969A81300E2FE77 /* AppDelegate.swift */,
02E399681969A81300E2FE77 /* Images.xcassets */,
02E3995F1969A81300E2FE77 /* Supporting Files */,
);
path = swiftddp;
sourceTree = "<group>";
};
02E3995F1969A81300E2FE77 /* Supporting Files */ = {
isa = PBXGroup;
children = (
EA97639D19998E7600866844 /* green_light.png */,
EA97639E19998E7600866844 /* green_light@2x.png */,
EA97639F19998E7600866844 /* red_light.png */,
EA9763A019998E7600866844 /* red_light@2x.png */,
EA9763A119998E7600866844 /* Example-Info.plist */,
02E399601969A81300E2FE77 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
02E399711969A81300E2FE77 /* swiftddpTests */ = {
isa = PBXGroup;
children = (
02E399741969A81300E2FE77 /* swiftddpTests.swift */,
02E399721969A81300E2FE77 /* Supporting Files */,
);
path = swiftddpTests;
sourceTree = "<group>";
};
02E399721969A81300E2FE77 /* Supporting Files */ = {
isa = PBXGroup;
children = (
02E399731969A81300E2FE77 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
2ADD1B4FCCC14601FC099EA0 /* Pods */ = {
isa = PBXGroup;
children = (
FAD4C15CAE906A029B1F8C9C /* Pods.debug.xcconfig */,
68DC64A1F8BABCBDDEDFBCE4 /* Pods.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
71997703989144BE8A6BA401 /* Frameworks */ = {
isa = PBXGroup;
children = (
EBABBCC4B77C49EAA6854302 /* libPods.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
02E3995B1969A81300E2FE77 /* swiftddp */ = {
isa = PBXNativeTarget;
buildConfigurationList = 02E399781969A81300E2FE77 /* Build configuration list for PBXNativeTarget "swiftddp" */;
buildPhases = (
F9079674B49640559CB2094C /* Check Pods Manifest.lock */,
02E399581969A81300E2FE77 /* Sources */,
02E399591969A81300E2FE77 /* Frameworks */,
02E3995A1969A81300E2FE77 /* Resources */,
6DD3D46A18134164A66CCBBE /* Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = swiftddp;
productName = swiftddp;
productReference = 02E3995C1969A81300E2FE77 /* swiftddp.app */;
productType = "com.apple.product-type.application";
};
02E3996D1969A81300E2FE77 /* swiftddpTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 02E3997B1969A81300E2FE77 /* Build configuration list for PBXNativeTarget "swiftddpTests" */;
buildPhases = (
02E3996A1969A81300E2FE77 /* Sources */,
02E3996B1969A81300E2FE77 /* Frameworks */,
02E3996C1969A81300E2FE77 /* Resources */,
);
buildRules = (
);
dependencies = (
02E399701969A81300E2FE77 /* PBXTargetDependency */,
);
name = swiftddpTests;
productName = swiftddpTests;
productReference = 02E3996E1969A81300E2FE77 /* swiftddpTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
02E399541969A81300E2FE77 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0700;
ORGANIZATIONNAME = RainHaven;
TargetAttributes = {
02E3995B1969A81300E2FE77 = {
CreatedOnToolsVersion = 6.0;
};
02E3996D1969A81300E2FE77 = {
CreatedOnToolsVersion = 6.0;
TestTargetID = 02E3995B1969A81300E2FE77;
};
};
};
buildConfigurationList = 02E399571969A81300E2FE77 /* Build configuration list for PBXProject "swiftddp" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 02E399531969A81300E2FE77;
productRefGroup = 02E3995D1969A81300E2FE77 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
02E3995B1969A81300E2FE77 /* swiftddp */,
02E3996D1969A81300E2FE77 /* swiftddpTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
02E3995A1969A81300E2FE77 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
EA9763A219998E7600866844 /* green_light.png in Resources */,
EA97639C19998E4500866844 /* LoginViewController.xib in Resources */,
EA9763A419998E7600866844 /* red_light.png in Resources */,
EA9763A619998E7600866844 /* Example-Info.plist in Resources */,
EA97639A19998E4500866844 /* AddViewController.xib in Resources */,
EA97639619998E2E00866844 /* ViewController.xib in Resources */,
EA97639B19998E4500866844 /* ListViewController.xib in Resources */,
02E399691969A81300E2FE77 /* Images.xcassets in Resources */,
EA9763A319998E7600866844 /* green_light@2x.png in Resources */,
EA9763A519998E7600866844 /* red_light@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
02E3996C1969A81300E2FE77 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
6DD3D46A18134164A66CCBBE /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
showEnvVarsInLog = 0;
};
F9079674B49640559CB2094C /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
02E399581969A81300E2FE77 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
EA9763A81999905400866844 /* LoginViewController.swift in Sources */,
028E8AFD1969A9E8006F2115 /* bridge.m in Sources */,
EA8054BE199B5C3B00805893 /* AddViewController.swift in Sources */,
02E399641969A81300E2FE77 /* ViewController.swift in Sources */,
EA1C0B47199AEFC4005545A7 /* ListViewController.swift in Sources */,
02E399621969A81300E2FE77 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
02E3996A1969A81300E2FE77 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
02E399751969A81300E2FE77 /* swiftddpTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
02E399701969A81300E2FE77 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 02E3995B1969A81300E2FE77 /* swiftddp */;
targetProxy = 02E3996F1969A81300E2FE77 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
02E399761969A81300E2FE77 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
METAL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
02E399771969A81300E2FE77 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
METAL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
02E399791969A81300E2FE77 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = FAD4C15CAE906A029B1F8C9C /* Pods.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ENABLE_MODULES = YES;
INFOPLIST_FILE = swiftddp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "bounds.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "swiftddp-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
02E3997A1969A81300E2FE77 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 68DC64A1F8BABCBDDEDFBCE4 /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ENABLE_MODULES = YES;
INFOPLIST_FILE = swiftddp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "bounds.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "swiftddp-Bridging-Header.h";
};
name = Release;
};
02E3997C1969A81300E2FE77 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/swiftddp.app/swiftddp";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = swiftddpTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
METAL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = "bounds.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
};
name = Debug;
};
02E3997D1969A81300E2FE77 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/swiftddp.app/swiftddp";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = swiftddpTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
METAL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "bounds.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
02E399571969A81300E2FE77 /* Build configuration list for PBXProject "swiftddp" */ = {
isa = XCConfigurationList;
buildConfigurations = (
02E399761969A81300E2FE77 /* Debug */,
02E399771969A81300E2FE77 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
02E399781969A81300E2FE77 /* Build configuration list for PBXNativeTarget "swiftddp" */ = {
isa = XCConfigurationList;
buildConfigurations = (
02E399791969A81300E2FE77 /* Debug */,
02E3997A1969A81300E2FE77 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
02E3997B1969A81300E2FE77 /* Build configuration list for PBXNativeTarget "swiftddpTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
02E3997C1969A81300E2FE77 /* Debug */,
02E3997D1969A81300E2FE77 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 02E399541969A81300E2FE77 /* Project object */;
}
================================================
FILE: Example/swiftExample/swiftddp.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:swiftddp.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: Example/swiftExample/swiftddp.xcworkspace/contents.xcworkspacedata
================================================
<?xml version='1.0' encoding='UTF-8'?><Workspace version='1.0'><FileRef location='group:swiftddp.xcodeproj'/><FileRef location='group:Pods/Pods.xcodeproj'/></Workspace>
================================================
FILE: Example/swiftExample/swiftddpTests/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
================================================
FILE: Example/swiftExample/swiftddpTests/swiftddpTests.swift
================================================
//
// swiftddpTests.swift
// swiftddpTests
//
// Created by Michael Arthur on 7/6/14.
// Copyright (c) 2014 . All rights reserved.
//
import XCTest
class swiftddpTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
XCTAssert(true, "Pass")
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measureBlock() {
// Put the code you want to measure the time of here.
}
}
}
================================================
FILE: Example/todos/.meteor/.finished-upgraders
================================================
# This file contains information which helps Meteor properly upgrade your
# app when you run 'meteor update'. You should check it into version control
# with your project.
notices-for-0.9.0
notices-for-0.9.1
0.9.4-platform-file
================================================
FILE: Example/todos/.meteor/.gitignore
================================================
local
================================================
FILE: Example/todos/.meteor/.id
================================================
# This file contains a token that is unique to your project.
# Check it into your repository along with the rest of this directory.
# It can be used for purposes such as:
# - ensuring you don't accidentally deploy one app on top of another
# - providing package authors with aggregated statistics
1tbs2bs1n5hbv0mlpjek
================================================
FILE: Example/todos/.meteor/packages
================================================
# Meteor packages used by this project, one per line.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
accounts-password
accounts-ui
bootstrap
insecure
standard-app-packages
================================================
FILE: Example/todos/.meteor/platforms
================================================
server
browser
================================================
FILE: Example/todos/.meteor/release
================================================
METEOR@1.0
================================================
FILE: Example/todos/.meteor/versions
================================================
accounts-base@1.1.2
accounts-password@1.0.4
accounts-ui-unstyled@1.1.4
accounts-ui@1.1.3
application-configuration@1.0.3
autoupdate@1.1.3
base64@1.0.1
binary-heap@1.0.1
blaze-tools@1.0.1
blaze@2.0.3
boilerplate-generator@1.0.1
bootstrap@1.0.1
callback-hook@1.0.1
check@1.0.2
ctl-helper@1.0.4
ctl@1.0.2
ddp@1.0.11
deps@1.0.5
ejson@1.0.4
email@1.0.4
fastclick@1.0.1
follower-livedata@1.0.2
geojson-utils@1.0.1
html-tools@1.0.2
htmljs@1.0.2
http@1.0.8
id-map@1.0.1
insecure@1.0.1
jquery@1.0.1
json@1.0.1
launch-screen@1.0.0
less@1.0.11
livedata@1.0.11
localstorage@1.0.1
logging@1.0.5
meteor-platform@1.2.0
meteor@1.1.3
minifiers@1.1.2
minimongo@1.0.5
mobile-status-bar@1.0.1
mongo@1.0.8
npm-bcrypt@0.7.7
observe-sequence@1.0.3
ordered-dict@1.0.1
random@1.0.1
reactive-dict@1.0.4
reactive-var@1.0.3
reload@1.1.1
retry@1.0.1
routepolicy@1.0.2
service-configuration@1.0.2
session@1.0.4
sha@1.0.1
spacebars-compiler@1.0.3
spacebars@1.0.3
srp@1.0.1
standard-app-packages@1.0.3
templating@1.0.9
tracker@1.0.3
ui@1.0.4
underscore@1.0.1
url@1.0.2
webapp-hashing@1.0.1
webapp@1.1.4
================================================
FILE: Example/todos/server.css
================================================
/* CSS declarations go here */
================================================
FILE: Example/todos/server.html
================================================
<head>
<title>TodoS</title>
</head>
<body>
{{> header }}
{{> main }}
</body>
<template name="header">
<div class="navbar">
<div class="navbar-inner">
<a class="brand" href="#">TodoS</a>
<div style="float: right">
{{> loginButtons align="right" }}
</div>
</div>
</div>
</template>
<template name="main">
<div class="container">
<div class="row">
<div class="span2">
<h3>Lists:</h3>
<ul>
{{#each lists}}
<div class="row">
<li class="list-name pull-left">{{name}}</li>
<i class="remove-list icon-minus-sign pull-right"></i>
<i rel="popover" class="share-list {{ _id }} icon-share pull-right"></i>
</div>
{{/each}}
</ul>
<button class="add-list"><i class="icon-plus-sign"></i></button>
<input class="list-input hidden" type="text" placeholder="List Name">
</div>
<div class="span10">
<h3>Things:</h3>
<ul>
{{#each things}}
<div class="well">
<li>{{msg}} <button class="remove-item">Delete</button></li>
</div>
{{/each}}
</ul>
<button class="add-item"><i class="icon-plus-sign"></i></button>
<input class="todo-input hidden" type="text" placeholder="Remember to brush teeth">
</div>
</div>
</div>
</template>
================================================
FILE: Example/todos/server.js
================================================
Things = new Meteor.Collection('things');
Lists = new Meteor.Collection('lists');
if (Meteor.isClient) {
Meteor.subscribe('things');
Meteor.subscribe('lists');
Template.main.helpers({
things: function () {
return Things.find({listName: Session.get('list-name')});
},
lists: function() {
return Lists.find();
}
});
Template.main.events({
'click .add-item': function () {
$('.todo-input').removeClass('hidden');
},
'blur .todo-input': function() {
var todoInput = $('.todo-input');
todoInput.addClass('hidden');
Things.insert({
msg: todoInput.val(),
owner: Meteor.userId(),
listName: Session.get('list-name'),
share_with: Session.get('share-with'),
listOwner: Session.get('list-owner')
});
},
'click .remove-item': function() {
Things.remove(this._id);
},
'click .add-list': function () {
$('.list-input').removeClass('hidden');
},
'blur .list-input': function() {
var listInput = $('.list-input');
listInput.addClass('hidden');
Lists.insert({
name: listInput.val(),
owner: Meteor.userId()
});
Session.set('list-name', listInput.val());
},
'click .list-name': function() {
Session.set('list-name', this.name);
Session.set('share-with', this.share_with);
Session.set('list-owner', this.owner);
},
'click .remove-list': function() {
Lists.remove(this._id);
},
'click .share-list': function() {
var self = this;
$("." + this._id).popover('destroy');
var content = '<input class="share-input" value="name@email.com"></input><a href="#" class="btn cancel-share">Cancel</a><a href="#" class="btn send-share">Send</a>';
$("." + this._id).popover({ title: 'Invite a Friend! ' + this._id, content: content, html: true });
$("." + this._id).popover('show');
$(".cancel-share").click(function() {
$("." + self._id).popover('destroy');
});
$(".send-share").click(function() {
$("." + self._id).popover('destroy');
var email = $('.share-input').val();
Lists.update(self._id, {$set: {share_with: email}});
Meteor.call('updateRelatedThings', self.name, email);
});
}
});
}
if (Meteor.isServer) {
Meteor.startup(function () {
var getEmailFromUserId = function(userId) {
var email = Meteor.users.findOne({_id: userId }, {emails: 1});
if (email && email['emails']) {
return email['emails'][0]['address'];
}
return null;
}
var getUserIdFromEmail = function(email) {
return Meteor.users.findOne({"emails.address": {$in: [email]}}, {_id: 1})
}
Meteor.publish('things', function() {
return Things.find({$or: [{"share_with": getEmailFromUserId(this.userId)},
{"owner": this.userId},
{"listOwner": this.userId}]});
});
Meteor.publish('lists', function() {
return Lists.find({$or: [{"share_with": getEmailFromUserId(this.userId)},
{"owner": this.userId}]});
});
Things.allow({
insert: function(userId, doc) {
return (userId && doc.owner === userId);
},
remove: function(userId, doc) {
return (userId && (doc.owner === userId || doc.share_with === getEmailFromUserId(userId) || doc.listOwner === userId));
}
});
Lists.allow({
insert: function(userId, doc) {
return (userId && doc.owner === userId);
},
remove: function(userId, doc) {
var allow = (userId && doc.owner === userId);
deleteRelatedThings(allow, doc);
return allow;
},
update: function(userId, doc) {
return (userId && doc.owner === userId);
}
});
});
Meteor.methods({
updateRelatedThings: function(listName, shareWith) {
Things.update({listName: listName}, {$set: {share_with: shareWith}}, {multi: true});
},
sayHelloTo: function(name) {
return "hello " + name;
}
});
var deleteRelatedThings = function(allow, doc) {
// this breaks because allow is done for the list, not for the listName
// we could lose all Things that have a name "blarg" even if "blarg"
// is on two totally diff lists
if (allow) {
Things.remove({listName: doc.name});
}
}
}
================================================
FILE: LICENSE.txt
================================================
The MIT License (MIT)
Copyright (c) 2013 Jesse Bounds
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: ObjectiveDDP/BSONIdGenerator.h
================================================
#import <Foundation/Foundation.h>
@interface BSONIdGenerator : NSObject
+ (NSString *)generate;
@end
================================================
FILE: ObjectiveDDP/BSONIdGenerator.m
================================================
#import "BSONIdGenerator.h"
@implementation BSONIdGenerator
static NSInteger methodCallCount = 1;
+ (NSString *)generate {
return [NSString stringWithFormat:@"%ld", (long)methodCallCount++];
}
@end
================================================
FILE: ObjectiveDDP/DependencyProvider.h
================================================
#import <Foundation/Foundation.h>
@class SRWebSocket;
@interface DependencyProvider : NSObject
+ (DependencyProvider *)sharedProvider;
- (SRWebSocket *)provideSRWebSocketWithRequest:(NSURLRequest *)request;
@end
================================================
FILE: ObjectiveDDP/DependencyProvider.m
================================================
#import "DependencyProvider.h"
#import <SocketRocket/SRWebSocket.h>
@implementation DependencyProvider
static DependencyProvider *sharedProvider = nil;
+ (DependencyProvider *)sharedProvider {
if (!sharedProvider) {
sharedProvider = [[DependencyProvider alloc] init];
}
return sharedProvider;
}
- (SRWebSocket *)provideSRWebSocketWithRequest:(NSURLRequest *)request {
return [[SRWebSocket alloc] initWithURLRequest:request];
}
@end
================================================
FILE: ObjectiveDDP/MeteorClient+Parsing.m
================================================
#import "MeteorClient+Private.h"
#import <M13OrderedDictionary/M13OrderedDictionary.h>
@implementation MeteorClient (Parsing)
- (void)_handleMethodResultMessageWithMessageId:(NSString *)messageId message:(NSDictionary *)message msg:(NSString *)msg {
if ([_methodIds containsObject:messageId]) {
if([msg isEqualToString:@"result"]) {
MeteorClientMethodCallback callback = _responseCallbacks[messageId];
id response;
if(message[@"error"]) {
NSDictionary *errorDesc = message[@"error"];
NSDictionary *userInfo = @{NSLocalizedDescriptionKey: errorDesc[@"message"]};
NSError *responseError = [NSError errorWithDomain:errorDesc[@"errorType"] code:[errorDesc[@"error"] integerValue] userInfo:userInfo];
if (callback) {
callback(nil, responseError);
}
response = responseError;
} else {
if (callback) {
callback(message, nil);
}
}
NSString *notificationName = [NSString stringWithFormat:@"response_%@", messageId];
[[NSNotificationCenter defaultCenter] postNotificationName:notificationName object:self userInfo:response];
[_responseCallbacks removeObjectForKey:messageId];
[_methodIds removeObject:messageId];
}
}
}
- (void)_handleAddedMessage:(NSDictionary *)message msg:(NSString *)msg {
if ([msg isEqualToString:@"added"]
&& message[@"collection"]) {
NSDictionary *object = [self _parseObjectAndAddToCollection:message];
NSString *notificationName = [NSString stringWithFormat:@"%@_added", message[@"collection"]];
[[NSNotificationCenter defaultCenter] postNotificationName:notificationName object:self userInfo:object];
[[NSNotificationCenter defaultCenter] postNotificationName:@"added" object:self userInfo:object];
}
}
- (void)_handleAddedBeforeMessage:(NSDictionary *)message msg:(NSString *)msg {
if ([msg isEqualToString:@"addedBefore"]
&& message[@"collection"]) {
NSDictionary *object = [self _parseObjectAndAddToCollection:message beforeId:[message valueForKey:@"before"]];
NSString *notificationName = [NSString stringWithFormat:@"%@_addedBefore", message[@"collection"]];
[[NSNotificationCenter defaultCenter] postNotificationName:notificationName object:self userInfo:object];
[[NSNotificationCenter defaultCenter] postNotificationName:@"addedBefore" object:self userInfo:object];
}
}
- (void)_handleMovedBeforeMessage:(NSDictionary *)message msg:(NSString *)msg {
if ([msg isEqualToString:@"movedBefore"]
&& message[@"collection"]) {
NSDictionary *object = [self _parseMovedBefore:message];
NSString *notificationName = [NSString stringWithFormat:@"%@_movedBefore", message[@"collection"]];
[[NSNotificationCenter defaultCenter] postNotificationName:notificationName object:self userInfo:object];
[[NSNotificationCenter defaultCenter] postNotificationName:@"movedBefore" object:self userInfo:object];
}
}
- (NSDictionary *)_parseMovedBefore:(NSDictionary *)message {
NSMutableDictionary *object = [NSMutableDictionary dictionaryWithDictionary:@{@"_id": message[@"id"]}];
M13MutableOrderedDictionary *collection = self.collections[message[@"collection"]];
NSString * beforeDocumentId = [message valueForKey:@"before"];
//if document doesn't exist, add it to end
if (!beforeDocumentId) {
[collection addObject:object pairedWithKey:message[@"id"]];
}
//move document to before index
else{
NSUInteger currentIndex = [collection indexOfKey:message[@"id"]];
NSUInteger moveToIndex = [collection indexOfKey:beforeDocumentId];
if (currentIndex != NSNotFound && moveToIndex != NSNotFound) {
//remove object from its current place
object = [collection objectForKey:message[@"id"]];
[collection removeObjectForKey:message[@"id"]];
//insert object at before index
[collection insertObject:object pairedWithKey:message[@"id"] atIndex:moveToIndex];
}
}
return object;
}
- (NSUInteger)_indexForDocumentId:(NSString*)documentId inCollection:(NSMutableArray*)collection {
//get index of document to insert before
NSUInteger documentIndex = [collection indexOfObjectPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) {
if ([[obj valueForKey:@"_id"] isEqualToString:documentId]) {
*stop = YES;
return YES;
}
return NO;
}];
if (documentIndex != NSNotFound) {
NSLog(@"The title of category at index %lu is %@", (unsigned long)documentIndex, [[collection objectAtIndex:documentIndex] valueForKey:@"_id"]);
}
else {
NSLog(@"Not found");
}
return documentIndex;
}
- (NSDictionary *)_parseObjectAndAddToCollection:(NSDictionary *)message {
NSMutableDictionary *object = [NSMutableDictionary dictionaryWithDictionary:@{@"_id": message[@"id"]}];
for (id key in message[@"fields"]) {
object[key] = message[@"fields"][key];
}
if (!self.collections[message[@"collection"]]) {
self.collections[message[@"collection"]] = [M13MutableOrderedDictionary new];
}
M13MutableOrderedDictionary *collection = self.collections[message[@"collection"]];
[collection addObject:object pairedWithKey:message[@"id"]];
return object;
}
- (NSDictionary *)_parseObjectAndAddToCollection:(NSDictionary *)message beforeId:(NSString*)documentId {
NSMutableDictionary *object = [NSMutableDictionary dictionaryWithDictionary:@{@"_id": message[@"id"]}];
for (id key in message[@"fields"]) {
object[key] = message[@"fields"][key];
}
M13MutableOrderedDictionary *collection = self.collections[message[@"collection"]];
//if documentId, insert at beforeId index
if (documentId) {
NSUInteger documentIndex = [collection indexOfKey:documentId]; // _indexForDocumentId:documentId inCollection:collection];
if (documentIndex != NSNotFound) {
[collection insertObject:object pairedWithKey:message[@"id"] atIndex:documentIndex];
}
}
//if no documentId, insert at end
else{
[collection addObject:object pairedWithKey:message[@"id"]];
}
return object;
}
- (void)_handleRemovedMessage:(NSDictionary *)message msg:(NSString *)msg {
if ([msg isEqualToString:@"removed"]
&& message[@"collection"]) {
[self _parseRemoved:message];
NSString *notificationName = [NSString stringWithFormat:@"%@_removed", message[@"collection"]];
[[NSNotificationCenter defaultCenter] postNotificationName:notificationName object:self userInfo:@{@"_id": message[@"id"]}];
[[NSNotificationCenter defaultCenter] postNotificationName:@"removed" object:self];
}
}
- (void)_parseRemoved:(NSDictionary *)message {
M13MutableOrderedDictionary *collection = self.collections[message[@"collection"]];
[collection removeObjectForKey:message[@"id"]];
}
- (void)_handleChangedMessage:(NSDictionary *)message msg:(NSString *)msg {
if ([msg isEqualToString:@"changed"]
&& message[@"collection"]) {
NSDictionary *object = [self _parseObjectAndUpdateCollection:message];
NSString *notificationName = [NSString stringWithFormat:@"%@_changed", message[@"collection"]];
[[NSNotificationCenter defaultCenter] postNotificationName:notificationName object:self userInfo:object];
[[NSNotificationCenter defaultCenter] postNotificationName:@"changed" object:self userInfo:object];
}
}
- (NSDictionary *)_parseObjectAndUpdateCollection:(NSDictionary *)message {
M13MutableOrderedDictionary *collection = self.collections[message[@"collection"]];
NSMutableDictionary *object = [collection objectForKey:message[@"id"]];
for (id key in message[@"fields"]) {
object[key] = message[@"fields"][key];
}
for (id key in message[@"cleared"]) {
[object removeObjectForKey:key];
}
return object;
}
@end
================================================
FILE: ObjectiveDDP/MeteorClient+Private.h
================================================
#import "MeteorClient.h"
@interface MeteorClient () {
@public // for tests. This header is not exported anyway.
NSMutableDictionary *_subscriptions;
NSMutableSet *_methodIds;
NSMutableDictionary *_responseCallbacks;
NSString *_userName;
NSString *_password;
NSMutableDictionary *_subscriptionsParameters;
BOOL _disconnecting;
double _tries;
double _maxRetryIncrement;
}
// These are public and should be KVO compliant so use accessor instead of direct ivar access
@property (nonatomic, copy, readwrite) NSString *userId;
@property (nonatomic, copy, readwrite) NSString *sessionToken;
@property (nonatomic, assign, readwrite) BOOL connected;
@property (nonatomic, strong, readwrite) NSMutableDictionary *collections;
@property (nonatomic, assign, readwrite) BOOL websocketReady;
@property (nonatomic, assign, readwrite) AuthState authState;
//xxx: temporary methods to corral state vars
- (void)_setAuthStateToLoggingIn;
- (void)_setAuthStateToLoggedIn:(NSString *)userId withToken:()token;
- (void)_setAuthStatetoLoggedOut;
- (NSDictionary *)_buildUserParametersWithUsername:(NSString *)username password:(NSString *)password;
- (NSDictionary *)_buildUserParametersWithEmail:(NSString *)email password:(NSString *)password;
- (NSDictionary *)_buildUserParametersWithUsernameOrEmail:(NSString *)usernameOrEmail password:(NSString *)password;
@end
@interface MeteorClient (Parsing)
- (void)_handleMethodResultMessageWithMessageId:(NSString *)messageId message:(NSDictionary *)message msg:(NSString *)msg;
- (void)_handleAddedMessage:(NSDictionary *)message msg:(NSString *)msg;
- (void)_handleAddedBeforeMessage:(NSDictionary *)message msg:(NSString *)msg;
- (void)_handleMovedBeforeMessage:(NSDictionary *)message msg:(NSString *)msg;
- (void)_handleRemovedMessage:(NSDictionary *)message msg:(NSString *)msg;
- (void)_handleChangedMessage:(NSDictionary *)message msg:(NSString *)msg;
@end
================================================
FILE: ObjectiveDDP/MeteorClient.h
================================================
#import "ObjectiveDDP.h"
@protocol DDPAuthDelegate;
extern NSString * const MeteorClientConnectionReadyNotification;
extern NSString * const MeteorClientDidConnectNotification;
extern NSString * const MeteorClientDidDisconnectNotification;
/** Errors due to transport (connection) problems will have this domain. For errors being reported
from the backend, they will have the "errorType" key as their error domain. */
extern NSString * const MeteorClientTransportErrorDomain;
// xxx:
typedef NS_ENUM(NSUInteger, MeteorClientError) {
MeteorClientErrorNotConnected,
MeteorClientErrorDisconnectedBeforeCallbackComplete,
MeteorClientErrorLogonRejected
};
typedef NS_ENUM(NSUInteger, AuthState) {
AuthStateNoAuth,
AuthStateLoggingIn,
AuthStateLoggedIn,
/* implies using auth but not currently authorized */
AuthStateLoggedOut
};
typedef void(^MeteorClientMethodCallback)(NSDictionary *response, NSError *error);
@interface MeteorClient : NSObject<ObjectiveDDPDelegate>
@property (nonatomic, strong) ObjectiveDDP *ddp;
@property (nonatomic, weak) id<DDPAuthDelegate> authDelegate;
@property (nonatomic, strong, readonly) NSMutableDictionary *collections;
@property (nonatomic, copy, readonly) NSString *userId;
@property (nonatomic, copy, readonly) NSString *sessionToken;
@property (nonatomic, assign, readonly) BOOL websocketReady;
@property (nonatomic, assign, readonly) BOOL connected;
@property (nonatomic, assign, readonly) AuthState authState;
@property (nonatomic, copy, readonly) NSString *ddpVersion;
@property (nonatomic, strong ,readonly) NSArray *supportedVersions;
// In flux; use "pre1" for meteor versions up to v0.8.0.1
// use "pre2" for meteor versions v0.8.1.1 and above (until they change it again)
// use "1" for meteor versions v0.8.9 and above
- (id)initWithDDPVersion:(NSString *)ddpVersion;
// Prevent user from start with this methods
- (id)init __attribute__((unavailable("Must use initWithDDPVersion: instead.")));
+ (instancetype)new __attribute__((unavailable("Must use initWithDDPVersion: instead.")));
#pragma mark - Methods
- (void) logonWithSessionToken:(NSString *) sessionToken responseCallback:(MeteorClientMethodCallback)responseCallback;
- (NSString *)callMethodName:(NSString *)methodName parameters:(NSArray *)parameters responseCallback:(MeteorClientMethodCallback)responseCallback;
- (void)logonWithUsername:(NSString *)username password:(NSString *)password responseCallback:(MeteorClientMethodCallback)responseCallback;
- (void)logonWithEmail:(NSString *)email password:(NSString *)password responseCallback:(MeteorClientMethodCallback)responseCallback;
- (void)logonWithUsernameOrEmail:(NSString *)usernameOrEmail password:(NSString *)password responseCallback:(MeteorClientMethodCallback)responseCallback;
- (void)logonWithOAuthAccessToken: (NSString *)accessToken serviceName: (NSString *) serviceName responseCallback: (MeteorClientMethodCallback)responseCallback;
- (void)logonWithOAuthAccessToken:(NSString *)accessToken serviceName:(NSString *)serviceName optionsKey:(NSString *)key responseCallback:(MeteorClientMethodCallback)responseCallback;
- (void)logonWithUserParameters:(NSDictionary *)userParameters responseCallback:(MeteorClientMethodCallback)responseCallback;
- (void)signupWithUsernameAndEmail:(NSString *)username email:(NSString *)email password:(NSString *)password fullname:(NSString *)fullname responseCallback:(MeteorClientMethodCallback)responseCallback;
- (void)signupWithUsernameAndEmail:(NSString *)username email:(NSString *)email password:(NSString *)password userParameters:(NSDictionary *)userParameters responseCallback:(MeteorClientMethodCallback)responseCallback;
- (void)signupWithUsername:(NSString *)username password:(NSString *)password fullname:(NSString *)fullname responseCallback:(MeteorClientMethodCallback)responseCallback;
- (void)signupWithEmail:(NSString *)email password:(NSString *)password fullname:(NSString *)fullname responseCallback:(MeteorClientMethodCallback)responseCallback;
- (void)signupWithEmail:(NSString *)email password:(NSString *)password firstName:(NSString *)firstName lastName:(NSString *)lastName responseCallback:(MeteorClientMethodCallback)responseCallback;
- (void)signupWithUserParameters:userParameters responseCallback:(MeteorClientMethodCallback) responseCallback;
- (void)addSubscription:(NSString *)subscriptionName;
- (void)addSubscription:(NSString *)subscriptionName withParameters:(NSArray *)parameters;
- (void)removeSubscription:(NSString *)subscriptionName;
- (void)logout;
- (void)disconnect;
- (void)reconnect;
- (void)ping;
// Deprecated methods
- (void)logonWithUsername:(NSString *)username password:(NSString *)password __attribute__((deprecated("use logonWithUsername:password:responseCallback: instead")));
- (NSString *)sendWithMethodName:(NSString *)methodName parameters:(NSArray *)parameters notifyOnResponse:(BOOL)notify __attribute__((deprecated("use callMethodName:parameters:responseCallback: instead")));
- (void)sendWithMethodName:(NSString *)methodName parameters:(NSArray *)parameters __attribute__((deprecated("use callMethodName:parameters:responseCallback: instead")));
@end
#pragma mark - <DDPAuthDelegate>
@protocol DDPAuthDelegate <NSObject>
- (void)authenticationWasSuccessful;
- (void)authenticationFailedWithError:(NSError *)reason;
@end
================================================
FILE: ObjectiveDDP/MeteorClient.m
================================================
#import <CommonCrypto/CommonDigest.h>
#import "DependencyProvider.h"
#import "MeteorClient.h"
#import "MeteorClient+Private.h"
#import "BSONIdGenerator.h"
#import <SocketRocket/SRWebSocket.h>
NSString * const MeteorClientConnectionReadyNotification = @"bounsj.objectiveddp.ready";
NSString * const MeteorClientDidConnectNotification = @"boundsj.objectiveddp.connected";
NSString * const MeteorClientDidDisconnectNotification = @"boundsj.objectiveddp.disconnected";
NSString * const MeteorC
gitextract_2gf25u8g/ ├── .gitignore ├── .swift-version ├── .travis.yml ├── Example/ │ ├── Example/ │ │ ├── Example/ │ │ │ ├── AddViewController.h │ │ │ ├── AddViewController.m │ │ │ ├── AddViewController.xib │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Images.xcassets/ │ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ │ └── Contents.json │ │ │ │ ├── green_light.imageset/ │ │ │ │ │ └── Contents.json │ │ │ │ └── red_light.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── Info.plist │ │ │ ├── ListViewController.h │ │ │ ├── ListViewController.m │ │ │ ├── ListViewController.xib │ │ │ ├── LoginViewController.h │ │ │ ├── LoginViewController.m │ │ │ ├── LoginViewController.xib │ │ │ ├── ViewController.h │ │ │ ├── ViewController.m │ │ │ ├── ViewController.xib │ │ │ ├── en.lproj/ │ │ │ │ └── InfoPlist.strings │ │ │ └── main.m │ │ ├── Example.xcodeproj/ │ │ │ ├── project.pbxproj │ │ │ └── project.xcworkspace/ │ │ │ └── contents.xcworkspacedata │ │ ├── Example.xcworkspace/ │ │ │ └── contents.xcworkspacedata │ │ ├── Podfile │ │ └── example.txt │ ├── swiftExample/ │ │ ├── Podfile │ │ ├── bridge.m │ │ ├── swiftddp/ │ │ │ ├── AddViewController.swift │ │ │ ├── AddViewController.xib │ │ │ ├── AppDelegate.swift │ │ │ ├── Example-Info.plist │ │ │ ├── Info.plist │ │ │ ├── ListViewController.swift │ │ │ ├── ListViewController.xib │ │ │ ├── LoginViewController.swift │ │ │ ├── LoginViewController.xib │ │ │ ├── ViewController.swift │ │ │ ├── ViewController.xib │ │ │ └── images.xcassets/ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ └── Contents.json │ │ │ └── LaunchImage.launchimage/ │ │ │ └── Contents.json │ │ ├── swiftddp-Bridging-Header.h │ │ ├── swiftddp.xcodeproj/ │ │ │ ├── project.pbxproj │ │ │ └── project.xcworkspace/ │ │ │ └── contents.xcworkspacedata │ │ ├── swiftddp.xcworkspace/ │ │ │ └── contents.xcworkspacedata │ │ └── swiftddpTests/ │ │ ├── Info.plist │ │ └── swiftddpTests.swift │ └── todos/ │ ├── .meteor/ │ │ ├── .finished-upgraders │ │ ├── .gitignore │ │ ├── .id │ │ ├── packages │ │ ├── platforms │ │ ├── release │ │ └── versions │ ├── server.css │ ├── server.html │ └── server.js ├── LICENSE.txt ├── ObjectiveDDP/ │ ├── BSONIdGenerator.h │ ├── BSONIdGenerator.m │ ├── DependencyProvider.h │ ├── DependencyProvider.m │ ├── MeteorClient+Parsing.m │ ├── MeteorClient+Private.h │ ├── MeteorClient.h │ ├── MeteorClient.m │ ├── ObjectiveDDP-Prefix.pch │ ├── ObjectiveDDP.h │ └── ObjectiveDDP.m ├── ObjectiveDDP.podspec ├── ObjectiveDDP.xcodeproj/ │ ├── project.pbxproj │ └── project.xcworkspace/ │ └── contents.xcworkspacedata ├── ObjectiveDDP.xcworkspace/ │ └── contents.xcworkspacedata ├── Podfile ├── README.md ├── Rakefile ├── Specs/ │ ├── DDPSpecHelper.h │ ├── DDPSpecHelper.m │ ├── DependencyProvider+Spec.m │ ├── MeteorClientSpec.mm │ ├── Mocks/ │ │ ├── FakeDependencyProvider.h │ │ ├── FakeDependencyProvider.m │ │ ├── MockObjectiveDDPDelegate.h │ │ ├── MockObjectiveDDPDelegate.m │ │ ├── MockSRWebSocket.h │ │ └── MockSRWebSocket.m │ ├── NSObject+Spec.m │ ├── ObjectiveDDPSpec.mm │ ├── Specs-Info.plist │ ├── Specs-Prefix.pch │ ├── en.lproj/ │ │ └── InfoPlist.strings │ └── main.m └── thrust.yml
SYMBOL INDEX (3 symbols across 2 files)
FILE: ObjectiveDDP/MeteorClient+Private.h
function interface (line 3) | interface MeteorClient () {
FILE: ObjectiveDDP/MeteorClient.h
type MeteorClientErrorNotConnected (line 14) | typedef NS_ENUM(NSUInteger, MeteorClientError) {
type AuthStateNoAuth (line 20) | typedef NS_ENUM(NSUInteger, AuthState) {
Condensed preview — 95 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (335K chars).
[
{
"path": ".gitignore",
"chars": 103,
"preview": ".idea\nxcuserdata\nxcshareddata\nExample/Pods\nExample/swiftExample/Pods\nbuild\nPods\n.DS_Store\nPodfile.lock\n"
},
{
"path": ".swift-version",
"chars": 4,
"preview": "2.3\n"
},
{
"path": ".travis.yml",
"chars": 100,
"preview": "language: objective-c\n\ninstall:\n - brew install ios-sim\n - gem install thrust\n\nscript: rake specs\n"
},
{
"path": "Example/Example/Example/AddViewController.h",
"chars": 338,
"preview": "#import <UIKit/UIKit.h>\n\n@protocol AddViewControllerDelegate;\n\n@interface AddViewController : UIViewController\n\n@propert"
},
{
"path": "Example/Example/Example/AddViewController.m",
"chars": 547,
"preview": "#import \"AddViewController.h\"\n\n@interface AddViewController ()\n\n@end\n\n@implementation AddViewController\n\n- (id)initWithN"
},
{
"path": "Example/Example/Example/AddViewController.xib",
"chars": 26618,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<archive type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"8.00\">\n\t<data"
},
{
"path": "Example/Example/Example/AppDelegate.h",
"chars": 368,
"preview": "#import <UIKit/UIKit.h>\n\n@class ViewController, MeteorClient;\n\n@interface AppDelegate : UIResponder <UIApplicationDelega"
},
{
"path": "Example/Example/Example/AppDelegate.m",
"chars": 2051,
"preview": "#import \"AppDelegate.h\"\n#import \"ViewController.h\"\n#import \"LoginViewController.h\"\n#import \"ObjectiveDDP.h\"\n#import <Obj"
},
{
"path": "Example/Example/Example/Images.xcassets/AppIcon.appiconset/Contents.json",
"chars": 1077,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"29x29\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\""
},
{
"path": "Example/Example/Example/Images.xcassets/green_light.imageset/Contents.json",
"chars": 349,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"scale\" : \"1x\",\n \"filename\" : \"green_light.png\"\n },\n "
},
{
"path": "Example/Example/Example/Images.xcassets/red_light.imageset/Contents.json",
"chars": 345,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"scale\" : \"1x\",\n \"filename\" : \"red_light.png\"\n },\n "
},
{
"path": "Example/Example/Example/Info.plist",
"chars": 1456,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Example/Example/Example/ListViewController.h",
"chars": 390,
"preview": "#import <UIKit/UIKit.h>\n#import <ObjectiveDDP/MeteorClient.h>\n\n@interface ListViewController : UIViewController <UITable"
},
{
"path": "Example/Example/Example/ListViewController.m",
"chars": 5762,
"preview": "#import \"ListViewController.h\"\n#import \"ViewController.h\"\n#import \"MeteorClient.h\"\n\n@interface ListViewController ()\n\n@p"
},
{
"path": "Example/Example/Example/ListViewController.xib",
"chars": 2791,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "Example/Example/Example/LoginViewController.h",
"chars": 577,
"preview": "#import <UIKit/UIKit.h>\n\n@class MeteorClient;\n\n@interface LoginViewController : UIViewController\n\n@property (weak, nonat"
},
{
"path": "Example/Example/Example/LoginViewController.m",
"chars": 2828,
"preview": "#import \"LoginViewController.h\"\n#import \"ListViewController.h\"\n#import <ObjectiveDDP/MeteorClient.h>\n\n@implementation Lo"
},
{
"path": "Example/Example/Example/LoginViewController.xib",
"chars": 11661,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "Example/Example/Example/ViewController.h",
"chars": 479,
"preview": "#import <UIKit/UIKit.h>\n#import \"AddViewController.h\"\n#import <ObjectiveDDP/MeteorClient.h>\n\n@interface ViewController :"
},
{
"path": "Example/Example/Example/ViewController.m",
"chars": 4136,
"preview": "#import \"ViewController.h\"\n#import <ObjectiveDDP/BSONIdGenerator.h>\n\n@interface ViewController ()\n\n@property (weak, nona"
},
{
"path": "Example/Example/Example/ViewController.xib",
"chars": 11917,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<archive type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"8.00\">\n\t<data"
},
{
"path": "Example/Example/Example/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "Example/Example/Example/main.m",
"chars": 341,
"preview": "//\n// main.m\n// Example\n//\n// Created by Michael Arthur on 14/10/14.\n// Copyright (c) 2014 Jesse Bounds. All rights "
},
{
"path": "Example/Example/Example.xcodeproj/project.pbxproj",
"chars": 17688,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "Example/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 152,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:Example.xcodepr"
},
{
"path": "Example/Example/Example.xcworkspace/contents.xcworkspacedata",
"chars": 225,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"group:Example.xcodep"
},
{
"path": "Example/Example/Podfile",
"chars": 166,
"preview": "source 'https://github.com/CocoaPods/Specs.git'\n\nplatform :ios, '7.1'\n\npod 'ObjectiveDDP', :git => 'https://github.com/b"
},
{
"path": "Example/Example/example.txt",
"chars": 105,
"preview": "if you intend to do meteor auth with your ios client then add -lcrypto to other linker flags in settings\n"
},
{
"path": "Example/swiftExample/Podfile",
"chars": 165,
"preview": "source 'https://github.com/CocoaPods/Specs.git'\n\nplatform :ios, '7.1'\n\npod 'ObjectiveDDP', :git => 'https://github.com/b"
},
{
"path": "Example/swiftExample/bridge.m",
"chars": 595,
"preview": "//\n// bridge.m\n// swiftddp\n//\n// Created by Michael Arthur on 7/6/14.\n// Copyright (c) 2014 . All rights reserved.\n/"
},
{
"path": "Example/swiftExample/swiftddp/AddViewController.swift",
"chars": 969,
"preview": "//\n// AddViewController.swift\n// swiftddp\n//\n// Created by Michael Arthur on 13/08/14.\n// Copyright (c) 2014. All ri"
},
{
"path": "Example/swiftExample/swiftddp/AddViewController.xib",
"chars": 5586,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "Example/swiftExample/swiftddp/AppDelegate.swift",
"chars": 3617,
"preview": "//\n// AppDelegate.swift\n// swiftddp\n//\n// Created by Michael Arthur on 7/6/14.\n// Copyright (c) 2014 . All rights re"
},
{
"path": "Example/swiftExample/swiftddp/Example-Info.plist",
"chars": 1169,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Example/swiftExample/swiftddp/Info.plist",
"chars": 858,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Example/swiftExample/swiftddp/ListViewController.swift",
"chars": 6925,
"preview": "//\n// ListViewController.swift\n// swiftddp\n//\n// Created by Michael Arthur on 13/08/14.\n// Copyright (c) 2014. All r"
},
{
"path": "Example/swiftExample/swiftddp/ListViewController.xib",
"chars": 2541,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "Example/swiftExample/swiftddp/LoginViewController.swift",
"chars": 3063,
"preview": "//\n// LoginViewController.swift\n// swiftddp\n//\n// Created by Michael Arthur on 12/08/14.\n// Copyright (c) 2014. All "
},
{
"path": "Example/swiftExample/swiftddp/LoginViewController.xib",
"chars": 11046,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "Example/swiftExample/swiftddp/ViewController.swift",
"chars": 5117,
"preview": "//\n// ViewController.swift\n// swiftddp\n//\n// Created by Michael Arthur on 7/6/14.\n// Copyright (c) 2014. All rights "
},
{
"path": "Example/swiftExample/swiftddp/ViewController.xib",
"chars": 2468,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "Example/swiftExample/swiftddp/images.xcassets/AppIcon.appiconset/Contents.json",
"chars": 585,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"29x29\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\""
},
{
"path": "Example/swiftExample/swiftddp/images.xcassets/LaunchImage.launchimage/Contents.json",
"chars": 442,
"preview": "{\n \"images\" : [\n {\n \"orientation\" : \"portrait\",\n \"idiom\" : \"iphone\",\n \"extent\" : \"full-screen\",\n "
},
{
"path": "Example/swiftExample/swiftddp-Bridging-Header.h",
"chars": 289,
"preview": "//\n// Use this file to import your target's public headers that you would like to expose to Swift.\n//\n#import <SocketRo"
},
{
"path": "Example/swiftExample/swiftddp.xcodeproj/project.pbxproj",
"chars": 23796,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "Example/swiftExample/swiftddp.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 153,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:swiftddp.xcodep"
},
{
"path": "Example/swiftExample/swiftddp.xcworkspace/contents.xcworkspacedata",
"chars": 168,
"preview": "<?xml version='1.0' encoding='UTF-8'?><Workspace version='1.0'><FileRef location='group:swiftddp.xcodeproj'/><FileRef lo"
},
{
"path": "Example/swiftExample/swiftddpTests/Info.plist",
"chars": 733,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Example/swiftExample/swiftddpTests/swiftddpTests.swift",
"chars": 881,
"preview": "//\n// swiftddpTests.swift\n// swiftddpTests\n//\n// Created by Michael Arthur on 7/6/14.\n// Copyright (c) 2014 . All ri"
},
{
"path": "Example/todos/.meteor/.finished-upgraders",
"chars": 229,
"preview": "# This file contains information which helps Meteor properly upgrade your\n# app when you run 'meteor update'. You should"
},
{
"path": "Example/todos/.meteor/.gitignore",
"chars": 6,
"preview": "local\n"
},
{
"path": "Example/todos/.meteor/.id",
"chars": 323,
"preview": "# This file contains a token that is unique to your project.\n# Check it into your repository along with the rest of this"
},
{
"path": "Example/todos/.meteor/packages",
"chars": 228,
"preview": "# Meteor packages used by this project, one per line.\n#\n# 'meteor add' and 'meteor remove' will edit this file for you,\n"
},
{
"path": "Example/todos/.meteor/platforms",
"chars": 15,
"preview": "server\nbrowser\n"
},
{
"path": "Example/todos/.meteor/release",
"chars": 11,
"preview": "METEOR@1.0\n"
},
{
"path": "Example/todos/.meteor/versions",
"chars": 1071,
"preview": "accounts-base@1.1.2\naccounts-password@1.0.4\naccounts-ui-unstyled@1.1.4\naccounts-ui@1.1.3\napplication-configuration@1.0.3"
},
{
"path": "Example/todos/server.css",
"chars": 31,
"preview": "/* CSS declarations go here */\n"
},
{
"path": "Example/todos/server.html",
"chars": 1517,
"preview": "<head>\n <title>TodoS</title>\n</head>\n\n<body>\n {{> header }}\n {{> main }}\n</body>\n\n<template name=\"header\">\n<div class"
},
{
"path": "Example/todos/server.js",
"chars": 4521,
"preview": "Things = new Meteor.Collection('things');\nLists = new Meteor.Collection('lists');\n\nif (Meteor.isClient) {\n Meteor.subsc"
},
{
"path": "LICENSE.txt",
"chars": 1079,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2013 Jesse Bounds\n\nPermission is hereby granted, free of charge, to any person obta"
},
{
"path": "ObjectiveDDP/BSONIdGenerator.h",
"chars": 102,
"preview": "#import <Foundation/Foundation.h>\n\n@interface BSONIdGenerator : NSObject\n+ (NSString *)generate;\n@end\n"
},
{
"path": "ObjectiveDDP/BSONIdGenerator.m",
"chars": 203,
"preview": "#import \"BSONIdGenerator.h\"\n\n@implementation BSONIdGenerator\n\nstatic NSInteger methodCallCount = 1;\n+ (NSString *)genera"
},
{
"path": "ObjectiveDDP/DependencyProvider.h",
"chars": 216,
"preview": "#import <Foundation/Foundation.h>\n\n@class SRWebSocket;\n\n@interface DependencyProvider : NSObject\n\n+ (DependencyProvider "
},
{
"path": "ObjectiveDDP/DependencyProvider.m",
"chars": 461,
"preview": "#import \"DependencyProvider.h\"\n#import <SocketRocket/SRWebSocket.h>\n\n@implementation DependencyProvider\n\nstatic Dependen"
},
{
"path": "ObjectiveDDP/MeteorClient+Parsing.m",
"chars": 8261,
"preview": "#import \"MeteorClient+Private.h\"\n#import <M13OrderedDictionary/M13OrderedDictionary.h>\n\n@implementation MeteorClient (Pa"
},
{
"path": "ObjectiveDDP/MeteorClient+Private.h",
"chars": 1932,
"preview": "#import \"MeteorClient.h\"\n\n@interface MeteorClient () {\n@public // for tests. This header is not exported anyway.\n NSM"
},
{
"path": "ObjectiveDDP/MeteorClient.h",
"chars": 5372,
"preview": "#import \"ObjectiveDDP.h\"\n\n@protocol DDPAuthDelegate;\n\nextern NSString * const MeteorClientConnectionReadyNotification;\ne"
},
{
"path": "ObjectiveDDP/MeteorClient.m",
"chars": 24604,
"preview": "#import <CommonCrypto/CommonDigest.h>\n#import \"DependencyProvider.h\"\n#import \"MeteorClient.h\"\n#import \"MeteorClient+Priv"
},
{
"path": "ObjectiveDDP/ObjectiveDDP-Prefix.pch",
"chars": 200,
"preview": "//\n// Prefix header for all source files of the 'ObjectiveDDP' target in the 'ObjectiveDDP' project\n//\n\n#ifdef __OBJC__\n"
},
{
"path": "ObjectiveDDP/ObjectiveDDP.h",
"chars": 1319,
"preview": "#import <Foundation/Foundation.h>\n@class SRWebSocket;\n@protocol SRWebSocketDelegate;\n@protocol ObjectiveDDPDelegate;\n\n@i"
},
{
"path": "ObjectiveDDP/ObjectiveDDP.m",
"chars": 5010,
"preview": "#import \"ObjectiveDDP.h\"\n#import \"DependencyProvider.h\"\n#import <SocketRocket/SRWebSocket.h>\n#import <M13OrderedDictiona"
},
{
"path": "ObjectiveDDP.podspec",
"chars": 626,
"preview": "Pod::Spec.new do |s|\n s.name = 'ObjectiveDDP'\n s.ios.deployment_target = '7.1'\n s.osx.deployment_target = '"
},
{
"path": "ObjectiveDDP.xcodeproj/project.pbxproj",
"chars": 34806,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "ObjectiveDDP.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 157,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:ObjectiveDDP.xc"
},
{
"path": "ObjectiveDDP.xcworkspace/contents.xcworkspacedata",
"chars": 172,
"preview": "<?xml version='1.0' encoding='UTF-8'?><Workspace version='1.0'><FileRef location='group:ObjectiveDDP.xcodeproj'/><FileRe"
},
{
"path": "Podfile",
"chars": 230,
"preview": "source 'https://github.com/CocoaPods/Specs.git'\n\nplatform :ios, '7.1'\nplatform :osx, '10.7'\n\ntarget :ObjectiveDDP do\n "
},
{
"path": "README.md",
"chars": 7471,
"preview": "ObjectiveDDP\n============\n\n[\n\n#pragma clang diagnostic push\n#pragma clang d"
},
{
"path": "Specs/MeteorClientSpec.mm",
"chars": 28060,
"preview": "#import \"MeteorClient+Private.h\"\n#import \"ObjectiveDDP.h\"\n#import <M13OrderedDictionary/M13OrderedDictionary.h>\n\nusing n"
},
{
"path": "Specs/Mocks/FakeDependencyProvider.h",
"chars": 183,
"preview": "#import \"DependencyProvider.h\"\n\n@class MockSRWebSocket;\n\n@interface FakeDependencyProvider : DependencyProvider\n\n@proper"
},
{
"path": "Specs/Mocks/FakeDependencyProvider.m",
"chars": 323,
"preview": "#import \"FakeDependencyProvider.h\"\n#import \"MockSRWebSocket.h\"\n\n@implementation FakeDependencyProvider\n\n- (SRWebSocket *"
},
{
"path": "Specs/Mocks/MockObjectiveDDPDelegate.h",
"chars": 134,
"preview": "#import <Foundation/Foundation.h>\n#import \"ObjectiveDDP.h\"\n\n@interface MockObjectiveDDPDelegate : NSObject <ObjectiveDDP"
},
{
"path": "Specs/Mocks/MockObjectiveDDPDelegate.m",
"chars": 264,
"preview": "#import \"MockObjectiveDDPDelegate.h\"\n\n@implementation MockObjectiveDDPDelegate\n\n- (void)didOpen {\n\n}\n\n- (void)didReceive"
},
{
"path": "Specs/Mocks/MockSRWebSocket.h",
"chars": 287,
"preview": "#import <Foundation/Foundation.h>\n#import <SocketRocket/SRWebSocket.h>\n\n@interface MockSRWebSocket : SRWebSocket\n\n- (voi"
},
{
"path": "Specs/Mocks/MockSRWebSocket.m",
"chars": 631,
"preview": "#import \"MockSRWebSocket.h\"\n\n@implementation MockSRWebSocket\n\n- (void)connectionSuccess {\n [self.delegate webSocketDid"
},
{
"path": "Specs/NSObject+Spec.m",
"chars": 225,
"preview": "@implementation NSObject (Spec)\n\n- (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInte"
},
{
"path": "Specs/ObjectiveDDPSpec.mm",
"chars": 6442,
"preview": "#import \"ObjectiveDDP.h\"\n#import \"MockObjectiveDDPDelegate.h\"\n#import \"MockSRWebSocket.h\"\n\nusing namespace Cedar::Matche"
},
{
"path": "Specs/Specs-Info.plist",
"chars": 944,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Specs/Specs-Prefix.pch",
"chars": 231,
"preview": "//\n// Prefix header for all source files of the 'Specs' target in the 'Specs' project\n//\n\n#ifdef __OBJC__\n #import <U"
},
{
"path": "Specs/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "Specs/main.m",
"chars": 295,
"preview": "//\n// main.m\n// Specs\n//\n// Created by Jesse Bounds on 4/5/13.\n// Copyright (c) 2013 Rebounds. All rights reserved.\n"
},
{
"path": "thrust.yml",
"chars": 2056,
"preview": "thrust_version: 0.5\nworkspace_name: ObjectiveDDP # use if building with an xcode workspace\napp_name: ObjectiveDDP\nios_si"
}
]
About this extraction
This page contains the full source code of the boundsj/ObjectiveDDP GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 95 files (297.7 KB), approximately 81.5k tokens, and a symbol index with 3 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.