This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require_relative '../node_modules/react-native/scripts/react_native_pods' | |
| require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' | |
| platform :ios, '10.0' | |
| target 'AwesomeProject' do | |
| config = use_native_modules! | |
| use_react_native!(:path => config["reactNativePath"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // An object of couch view functions that we use | |
| // Note that spacing is very important. | |
| // Do not reformat these values | |
| var validCouchViews = { | |
| getAllIdsByDate : function(doc) {if (doc.dateModified) {emit(doc.dateModified, doc);}}, | |
| searchByQueryString : function(doc) {if ((doc.datumFields) && (doc.session)) {var obj = {};for (i = 0; i < doc.datumFields.length; i++) {if (doc.datumFields[i].mask) {obj[doc.datumFields[i].label] = doc.datumFields[i].mask;}}if (doc.session.sessionFields) {for (j = 0; j < doc.session.sessionFields.length; j++) {if (doc.session.sessionFields[j].mask) {obj[doc.session.sessionFields[j].label] = doc.session.sessionFields[j].mask;}}}emit(obj, doc._id);}} | |
| }; | |
| for (var view in validCouchViews) { | |
| if (fun.map.toString() == validCouchViews[view].toString()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Meal = Backbone.Model.extend({ | |
| changePouch : function(couchConnection, callback) { | |
| this.pouch = Backbone.sync.pouch(couchConnection.pouchname); | |
| callback(); | |
| }, | |
| saveAndInterConnectInApp : function(callback) { | |
| callback(); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var emit = function(key, val) { | |
| var viewRow = { | |
| id: current._id, | |
| key: key, | |
| value: val | |
| } | |
| if (options.include_docs) { | |
| viewRow.doc = current.doc; | |
| } | |
| results.push(viewRow); |