├── Podfile ├── Podfile.lock ├── Pods ├── Manifest.lock ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ └── sakaifumiya.xcuserdatad │ │ └── xcschemes │ │ ├── Pods-WebViewGraphOfSwift.xcscheme │ │ ├── Realm.xcscheme │ │ ├── RealmSwift.xcscheme │ │ └── xcschememanagement.plist ├── Realm │ ├── LICENSE │ ├── README.md │ ├── Realm │ │ ├── NSError+RLMSync.m │ │ ├── ObjectStore │ │ │ └── src │ │ │ │ ├── binding_callback_thread_observer.cpp │ │ │ │ ├── collection_notifications.cpp │ │ │ │ ├── impl │ │ │ │ ├── apple │ │ │ │ │ ├── external_commit_helper.cpp │ │ │ │ │ └── keychain_helper.cpp │ │ │ │ ├── collection_change_builder.cpp │ │ │ │ ├── collection_notifier.cpp │ │ │ │ ├── list_notifier.cpp │ │ │ │ ├── object_notifier.cpp │ │ │ │ ├── realm_coordinator.cpp │ │ │ │ ├── results_notifier.cpp │ │ │ │ ├── transact_log_handler.cpp │ │ │ │ └── weak_realm_notifier.cpp │ │ │ │ ├── index_set.cpp │ │ │ │ ├── list.cpp │ │ │ │ ├── object.cpp │ │ │ │ ├── object_schema.cpp │ │ │ │ ├── object_store.cpp │ │ │ │ ├── placeholder.cpp │ │ │ │ ├── results.cpp │ │ │ │ ├── schema.cpp │ │ │ │ ├── shared_realm.cpp │ │ │ │ ├── sync │ │ │ │ ├── impl │ │ │ │ │ ├── apple │ │ │ │ │ │ ├── network_reachability_observer.cpp │ │ │ │ │ │ └── system_configuration.cpp │ │ │ │ │ ├── sync_file.cpp │ │ │ │ │ └── sync_metadata.cpp │ │ │ │ ├── sync_manager.cpp │ │ │ │ ├── sync_permission.cpp │ │ │ │ ├── sync_session.cpp │ │ │ │ └── sync_user.cpp │ │ │ │ ├── thread_safe_reference.cpp │ │ │ │ └── util │ │ │ │ ├── format.cpp │ │ │ │ └── uuid.cpp │ │ ├── RLMAccessor.mm │ │ ├── RLMAnalytics.mm │ │ ├── RLMArray.mm │ │ ├── RLMClassInfo.mm │ │ ├── RLMCollection.mm │ │ ├── RLMConstants.m │ │ ├── RLMJSONModels.m │ │ ├── RLMListBase.mm │ │ ├── RLMManagedArray.mm │ │ ├── RLMMigration.mm │ │ ├── RLMNetworkClient.mm │ │ ├── RLMObject.mm │ │ ├── RLMObjectBase.mm │ │ ├── RLMObjectSchema.mm │ │ ├── RLMObjectStore.mm │ │ ├── RLMObservation.mm │ │ ├── RLMOptionalBase.mm │ │ ├── RLMPredicateUtil.mm │ │ ├── RLMProperty.mm │ │ ├── RLMQueryUtil.mm │ │ ├── RLMRealm.mm │ │ ├── RLMRealmConfiguration+Sync.mm │ │ ├── RLMRealmConfiguration.mm │ │ ├── RLMRealmUtil.mm │ │ ├── RLMResults.mm │ │ ├── RLMSchema.mm │ │ ├── RLMSwiftSupport.m │ │ ├── RLMSyncConfiguration.mm │ │ ├── RLMSyncCredentials.m │ │ ├── RLMSyncManager.mm │ │ ├── RLMSyncPermission.m │ │ ├── RLMSyncPermissionChange.m │ │ ├── RLMSyncPermissionOffer.m │ │ ├── RLMSyncPermissionOfferResponse.m │ │ ├── RLMSyncPermissionResults.mm │ │ ├── RLMSyncPermissionValue.mm │ │ ├── RLMSyncSession.mm │ │ ├── RLMSyncSessionRefreshHandle.mm │ │ ├── RLMSyncUser.mm │ │ ├── RLMSyncUtil.mm │ │ ├── RLMThreadSafeReference.mm │ │ ├── RLMUpdateChecker.mm │ │ ├── RLMUtil.mm │ │ └── Realm.modulemap │ ├── build.sh │ ├── core │ │ └── librealmcore-ios.a │ └── include │ │ ├── NSError+RLMSync.h │ │ ├── RLMAccessor.h │ │ ├── RLMAccessor.hpp │ │ ├── RLMAnalytics.hpp │ │ ├── RLMArray.h │ │ ├── RLMArray_Private.h │ │ ├── RLMArray_Private.hpp │ │ ├── RLMClassInfo.hpp │ │ ├── RLMCollection.h │ │ ├── RLMCollection_Private.h │ │ ├── RLMCollection_Private.hpp │ │ ├── RLMConstants.h │ │ ├── RLMJSONModels.h │ │ ├── RLMListBase.h │ │ ├── RLMMigration.h │ │ ├── RLMMigration_Private.h │ │ ├── RLMNetworkClient.h │ │ ├── RLMObject.h │ │ ├── RLMObjectBase.h │ │ ├── RLMObjectBase_Dynamic.h │ │ ├── RLMObjectBase_Private.h │ │ ├── RLMObjectSchema.h │ │ ├── RLMObjectSchema_Private.h │ │ ├── RLMObjectSchema_Private.hpp │ │ ├── RLMObjectStore.h │ │ ├── RLMObject_Private.h │ │ ├── RLMObject_Private.hpp │ │ ├── RLMObservation.hpp │ │ ├── RLMOptionalBase.h │ │ ├── RLMPlatform.h │ │ ├── RLMPredicateUtil.hpp │ │ ├── RLMPrefix.h │ │ ├── RLMProperty.h │ │ ├── RLMProperty_Private.h │ │ ├── RLMProperty_Private.hpp │ │ ├── RLMQueryUtil.hpp │ │ ├── RLMRealm.h │ │ ├── RLMRealmConfiguration+Sync.h │ │ ├── RLMRealmConfiguration.h │ │ ├── RLMRealmConfiguration_Private.h │ │ ├── RLMRealmConfiguration_Private.hpp │ │ ├── RLMRealmUtil.hpp │ │ ├── RLMRealm_Dynamic.h │ │ ├── RLMRealm_Private.h │ │ ├── RLMRealm_Private.hpp │ │ ├── RLMResults.h │ │ ├── RLMResults_Private.h │ │ ├── RLMSchema.h │ │ ├── RLMSchema_Private.h │ │ ├── RLMSchema_Private.hpp │ │ ├── RLMSwiftBridgingHeader.h │ │ ├── RLMSwiftSupport.h │ │ ├── RLMSyncConfiguration.h │ │ ├── RLMSyncConfiguration_Private.h │ │ ├── RLMSyncConfiguration_Private.hpp │ │ ├── RLMSyncCredentials.h │ │ ├── RLMSyncManager.h │ │ ├── RLMSyncManager_Private.h │ │ ├── RLMSyncPermission.h │ │ ├── RLMSyncPermissionChange.h │ │ ├── RLMSyncPermissionChange_Private.h │ │ ├── RLMSyncPermissionOffer.h │ │ ├── RLMSyncPermissionOfferResponse.h │ │ ├── RLMSyncPermissionOfferResponse_Private.h │ │ ├── RLMSyncPermissionOffer_Private.h │ │ ├── RLMSyncPermissionResults.h │ │ ├── RLMSyncPermissionResults_Private.hpp │ │ ├── RLMSyncPermissionValue.h │ │ ├── RLMSyncPermissionValue_Private.hpp │ │ ├── RLMSyncPermission_Private.h │ │ ├── RLMSyncSession.h │ │ ├── RLMSyncSessionRefreshHandle.h │ │ ├── RLMSyncSessionRefreshHandle.hpp │ │ ├── RLMSyncSession_Private.hpp │ │ ├── RLMSyncUser.h │ │ ├── RLMSyncUser_Private.hpp │ │ ├── RLMSyncUtil.h │ │ ├── RLMSyncUtil_Private.h │ │ ├── RLMSyncUtil_Private.hpp │ │ ├── RLMThreadSafeReference.h │ │ ├── RLMThreadSafeReference_Private.hpp │ │ ├── RLMUpdateChecker.hpp │ │ ├── RLMUtil.hpp │ │ ├── Realm.h │ │ ├── binding_callback_thread_observer.hpp │ │ ├── binding_context.hpp │ │ ├── collection_notifications.hpp │ │ ├── core │ │ ├── realm.hpp │ │ └── realm │ │ │ ├── alloc.hpp │ │ │ ├── alloc_slab.hpp │ │ │ ├── array.hpp │ │ │ ├── array_basic.hpp │ │ │ ├── array_basic_tpl.hpp │ │ │ ├── array_binary.hpp │ │ │ ├── array_blob.hpp │ │ │ ├── array_blobs_big.hpp │ │ │ ├── array_direct.hpp │ │ │ ├── array_integer.hpp │ │ │ ├── array_string.hpp │ │ │ ├── array_string_long.hpp │ │ │ ├── binary_data.hpp │ │ │ ├── bptree.hpp │ │ │ ├── column.hpp │ │ │ ├── column_backlink.hpp │ │ │ ├── column_binary.hpp │ │ │ ├── column_fwd.hpp │ │ │ ├── column_link.hpp │ │ │ ├── column_linkbase.hpp │ │ │ ├── column_linklist.hpp │ │ │ ├── column_mixed.hpp │ │ │ ├── column_mixed_tpl.hpp │ │ │ ├── column_string.hpp │ │ │ ├── column_string_enum.hpp │ │ │ ├── column_table.hpp │ │ │ ├── column_timestamp.hpp │ │ │ ├── column_tpl.hpp │ │ │ ├── column_type.hpp │ │ │ ├── column_type_traits.hpp │ │ │ ├── data_type.hpp │ │ │ ├── descriptor.hpp │ │ │ ├── descriptor_fwd.hpp │ │ │ ├── disable_sync_to_disk.hpp │ │ │ ├── exceptions.hpp │ │ │ ├── group.hpp │ │ │ ├── group_shared.hpp │ │ │ ├── group_shared_options.hpp │ │ │ ├── group_writer.hpp │ │ │ ├── handover_defs.hpp │ │ │ ├── history.hpp │ │ │ ├── impl │ │ │ ├── array_writer.hpp │ │ │ ├── continuous_transactions_history.hpp │ │ │ ├── destroy_guard.hpp │ │ │ ├── input_stream.hpp │ │ │ ├── instructions.hpp │ │ │ ├── output_stream.hpp │ │ │ ├── sequential_getter.hpp │ │ │ ├── simulated_failure.hpp │ │ │ ├── table_path.hpp │ │ │ └── transact_log.hpp │ │ │ ├── importer.hpp │ │ │ ├── index_string.hpp │ │ │ ├── lang_bind_helper.hpp │ │ │ ├── link_view.hpp │ │ │ ├── link_view_fwd.hpp │ │ │ ├── mixed.hpp │ │ │ ├── null.hpp │ │ │ ├── olddatetime.hpp │ │ │ ├── owned_data.hpp │ │ │ ├── query.hpp │ │ │ ├── query_conditions.hpp │ │ │ ├── query_engine.hpp │ │ │ ├── query_expression.hpp │ │ │ ├── query_operators.hpp │ │ │ ├── realm_nmmintrin.h │ │ │ ├── replication.hpp │ │ │ ├── row.hpp │ │ │ ├── spec.hpp │ │ │ ├── string_data.hpp │ │ │ ├── sync │ │ │ ├── changeset_cooker.hpp │ │ │ ├── client.hpp │ │ │ ├── crypto.hpp │ │ │ ├── crypto_server.hpp │ │ │ ├── feature_token.hpp │ │ │ ├── history.hpp │ │ │ ├── metrics.hpp │ │ │ ├── protocol.hpp │ │ │ ├── server.hpp │ │ │ ├── server_configuration.hpp │ │ │ ├── transform.hpp │ │ │ └── version.hpp │ │ │ ├── table.hpp │ │ │ ├── table_ref.hpp │ │ │ ├── table_view.hpp │ │ │ ├── timestamp.hpp │ │ │ ├── unicode.hpp │ │ │ ├── util │ │ │ ├── assert.hpp │ │ │ ├── base64.hpp │ │ │ ├── basic_system_errors.hpp │ │ │ ├── bind_ptr.hpp │ │ │ ├── buffer.hpp │ │ │ ├── buffer_stream.hpp │ │ │ ├── call_with_tuple.hpp │ │ │ ├── cf_ptr.hpp │ │ │ ├── compression.hpp │ │ │ ├── config.h │ │ │ ├── encrypted_file_mapping.hpp │ │ │ ├── features.h │ │ │ ├── file.hpp │ │ │ ├── file_mapper.hpp │ │ │ ├── hex_dump.hpp │ │ │ ├── http.hpp │ │ │ ├── inspect.hpp │ │ │ ├── interprocess_condvar.hpp │ │ │ ├── interprocess_mutex.hpp │ │ │ ├── json_parser.hpp │ │ │ ├── logger.hpp │ │ │ ├── memory_stream.hpp │ │ │ ├── misc_errors.hpp │ │ │ ├── miscellaneous.hpp │ │ │ ├── network.hpp │ │ │ ├── network_ssl.hpp │ │ │ ├── optional.hpp │ │ │ ├── overload.hpp │ │ │ ├── priority_queue.hpp │ │ │ ├── random.hpp │ │ │ ├── safe_int_ops.hpp │ │ │ ├── scope_exit.hpp │ │ │ ├── shared_ptr.hpp │ │ │ ├── string_buffer.hpp │ │ │ ├── terminate.hpp │ │ │ ├── thread.hpp │ │ │ ├── time.hpp │ │ │ ├── to_string.hpp │ │ │ ├── type_list.hpp │ │ │ ├── type_traits.hpp │ │ │ ├── uri.hpp │ │ │ ├── utf8.hpp │ │ │ └── websocket.hpp │ │ │ ├── utilities.hpp │ │ │ ├── version.hpp │ │ │ ├── version_id.hpp │ │ │ └── views.hpp │ │ ├── descriptor_ordering.hpp │ │ ├── execution_context_id.hpp │ │ ├── feature_checks.hpp │ │ ├── impl │ │ ├── apple │ │ │ ├── external_commit_helper.hpp │ │ │ └── keychain_helper.hpp │ │ ├── collection_change_builder.hpp │ │ ├── collection_notifier.hpp │ │ ├── external_commit_helper.hpp │ │ ├── list_notifier.hpp │ │ ├── object_accessor_impl.hpp │ │ ├── object_notifier.hpp │ │ ├── realm_coordinator.hpp │ │ ├── results_notifier.hpp │ │ ├── transact_log_handler.hpp │ │ └── weak_realm_notifier.hpp │ │ ├── index_set.hpp │ │ ├── list.hpp │ │ ├── object.hpp │ │ ├── object_accessor.hpp │ │ ├── object_schema.hpp │ │ ├── object_store.hpp │ │ ├── property.hpp │ │ ├── results.hpp │ │ ├── schema.hpp │ │ ├── shared_realm.hpp │ │ ├── sync │ │ ├── impl │ │ │ ├── apple │ │ │ │ ├── network_reachability_observer.hpp │ │ │ │ └── system_configuration.hpp │ │ │ ├── network_reachability.hpp │ │ │ ├── sync_client.hpp │ │ │ ├── sync_file.hpp │ │ │ └── sync_metadata.hpp │ │ ├── sync_config.hpp │ │ ├── sync_manager.hpp │ │ ├── sync_permission.hpp │ │ ├── sync_session.hpp │ │ └── sync_user.hpp │ │ ├── thread_safe_reference.hpp │ │ └── util │ │ ├── aligned_union.hpp │ │ ├── any.hpp │ │ ├── apple │ │ └── event_loop_signal.hpp │ │ ├── atomic_shared_ptr.hpp │ │ ├── compiler.hpp │ │ ├── event_loop_signal.hpp │ │ ├── format.hpp │ │ ├── tagged_bool.hpp │ │ ├── time.hpp │ │ └── uuid.hpp ├── RealmSwift │ ├── LICENSE │ ├── README.md │ ├── RealmSwift │ │ ├── Aliases.swift │ │ ├── Error.swift │ │ ├── LinkingObjects.swift │ │ ├── List.swift │ │ ├── Migration.swift │ │ ├── Object.swift │ │ ├── ObjectSchema.swift │ │ ├── ObjectiveCSupport.swift │ │ ├── Optional.swift │ │ ├── Property.swift │ │ ├── Realm.swift │ │ ├── RealmCollection.swift │ │ ├── RealmConfiguration.swift │ │ ├── Results.swift │ │ ├── Schema.swift │ │ ├── SortDescriptor.swift │ │ ├── SwiftVersion.swift │ │ ├── Sync.swift │ │ ├── ThreadSafeReference.swift │ │ └── Util.swift │ └── build.sh └── Target Support Files │ ├── Pods-WebViewGraphOfSwift │ ├── Info.plist │ ├── Pods-WebViewGraphOfSwift-acknowledgements.markdown │ ├── Pods-WebViewGraphOfSwift-acknowledgements.plist │ ├── Pods-WebViewGraphOfSwift-dummy.m │ ├── Pods-WebViewGraphOfSwift-frameworks.sh │ ├── Pods-WebViewGraphOfSwift-resources.sh │ ├── Pods-WebViewGraphOfSwift-umbrella.h │ ├── Pods-WebViewGraphOfSwift.debug.xcconfig │ ├── Pods-WebViewGraphOfSwift.modulemap │ └── Pods-WebViewGraphOfSwift.release.xcconfig │ ├── Realm │ ├── Info.plist │ ├── Realm-dummy.m │ ├── Realm-prefix.pch │ ├── Realm.modulemap │ └── Realm.xcconfig │ └── RealmSwift │ ├── Info.plist │ ├── RealmSwift-dummy.m │ ├── RealmSwift-prefix.pch │ ├── RealmSwift-umbrella.h │ ├── RealmSwift.modulemap │ └── RealmSwift.xcconfig ├── README.md ├── WebViewGraphOfSwift.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── sakaifumiya.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── sakaifumiya.xcuserdatad │ └── xcschemes │ ├── WebViewGraphOfSwift.xcscheme │ └── xcschememanagement.plist ├── WebViewGraphOfSwift.xcworkspace ├── contents.xcworkspacedata └── xcuserdata │ └── sakaifumiya.xcuserdatad │ ├── UserInterfaceState.xcuserstate │ └── xcdebugger │ └── Breakpoints_v2.xcbkptlist ├── WebViewGraphOfSwift ├── AddController.swift ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Calorie.swift ├── CalorieDataCell.swift ├── CalorieDataCell.xib ├── ChangeDateOrString.swift ├── Chart.js ├── GraphStatus.swift ├── Info.plist ├── TextFieldIdentifier.swift ├── ViewController.swift ├── barchart.html ├── linechart.html └── noimage.png ├── WebViewGraphOfSwiftTests ├── Info.plist └── WebViewGraphOfSwiftTests.swift └── WebViewGraphOfSwiftUITests ├── Info.plist └── WebViewGraphOfSwiftUITests.swift /Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '9.0' 2 | swift_version = '3.0' 3 | use_frameworks! 4 | target 'WebViewGraphOfSwift' do 5 | pod 'RealmSwift' 6 | 7 | post_install do |installer| 8 | installer.pods_project.targets.each do |target| 9 | target.build_configurations.each do |config| 10 | config.build_settings['SWIFT_VERSION'] = '3.0' 11 | end 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Realm (2.10.0): 3 | - Realm/Headers (= 2.10.0) 4 | - Realm/Headers (2.10.0) 5 | - RealmSwift (2.10.0): 6 | - Realm (= 2.10.0) 7 | 8 | DEPENDENCIES: 9 | - RealmSwift 10 | 11 | SPEC CHECKSUMS: 12 | Realm: 98b3a25643cf6b3e07d2b99fb43fe0eb9c801dec 13 | RealmSwift: 34073ad3a31232bbaf7c0db898c037940284cba2 14 | 15 | PODFILE CHECKSUM: 09bc4f92f51172ed93713e7fa8961ba7b468d3aa 16 | 17 | COCOAPODS: 1.2.1 18 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Realm (2.10.0): 3 | - Realm/Headers (= 2.10.0) 4 | - Realm/Headers (2.10.0) 5 | - RealmSwift (2.10.0): 6 | - Realm (= 2.10.0) 7 | 8 | DEPENDENCIES: 9 | - RealmSwift 10 | 11 | SPEC CHECKSUMS: 12 | Realm: 98b3a25643cf6b3e07d2b99fb43fe0eb9c801dec 13 | RealmSwift: 34073ad3a31232bbaf7c0db898c037940284cba2 14 | 15 | PODFILE CHECKSUM: 09bc4f92f51172ed93713e7fa8961ba7b468d3aa 16 | 17 | COCOAPODS: 1.2.1 18 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/sakaifumiya.xcuserdatad/xcschemes/Realm.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/sakaifumiya.xcuserdatad/xcschemes/RealmSwift.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/sakaifumiya.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods-WebViewGraphOfSwift.xcscheme 8 | 9 | isShown 10 | 11 | 12 | Realm.xcscheme 13 | 14 | isShown 15 | 16 | 17 | RealmSwift.xcscheme 18 | 19 | isShown 20 | 21 | 22 | 23 | SuppressBuildableAutocreation 24 | 25 | 8B22B1103EB4709E9CF952CBE2E2440B 26 | 27 | primary 28 | 29 | 30 | D6FAFA1108A4EB9FEFD58D57980B646C 31 | 32 | primary 33 | 34 | 35 | E8E43BA64C8C44168B54B0D56BD4B294 36 | 37 | primary 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Pods/Realm/Realm/NSError+RLMSync.m: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2017 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "NSError+RLMSync.h" 20 | 21 | #import "RLMSyncUtil.h" 22 | 23 | @implementation NSError (RLMSync) 24 | 25 | - (void(^)(void))rlmSync_clientResetBlock { 26 | if (self.domain == RLMSyncErrorDomain && self.code == RLMSyncErrorClientResetError) { 27 | return self.userInfo[kRLMSyncInitiateClientResetBlockKey]; 28 | } 29 | return nil; 30 | } 31 | 32 | - (void(^)(void))rlmSync_deleteRealmBlock { 33 | if (self.domain == RLMSyncErrorDomain && self.code == RLMSyncErrorPermissionDeniedError) { 34 | return self.userInfo[kRLMSyncInitiateDeleteRealmBlockKey]; 35 | } 36 | return nil; 37 | } 38 | 39 | - (NSString *)rlmSync_clientResetBackedUpRealmPath { 40 | if (self.domain == RLMSyncErrorDomain && self.code == RLMSyncErrorClientResetError) { 41 | return self.userInfo[kRLMSyncPathOfRealmBackupCopyKey]; 42 | } 43 | return nil; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Pods/Realm/Realm/ObjectStore/src/binding_callback_thread_observer.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2017 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #include "binding_callback_thread_observer.hpp" 20 | 21 | namespace realm { 22 | BindingCallbackThreadObserver* g_binding_callback_thread_observer = nullptr; 23 | } 24 | -------------------------------------------------------------------------------- /Pods/Realm/Realm/ObjectStore/src/collection_notifications.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #include "collection_notifications.hpp" 20 | 21 | #include "impl/collection_notifier.hpp" 22 | 23 | using namespace realm; 24 | using namespace realm::_impl; 25 | 26 | NotificationToken::NotificationToken(std::shared_ptr<_impl::CollectionNotifier> notifier, size_t token) 27 | : m_notifier(std::move(notifier)), m_token(token) 28 | { 29 | } 30 | 31 | NotificationToken::~NotificationToken() 32 | { 33 | // m_notifier itself (and not just the pointed-to thing) needs to be accessed 34 | // atomically to ensure that there are no data races when the token is 35 | // destroyed after being modified on a different thread. 36 | // This is needed despite the token not being thread-safe in general as 37 | // users find it very surprising for obj-c objects to care about what 38 | // thread they are deallocated on. 39 | if (auto notifier = m_notifier.exchange({})) { 40 | notifier->remove_callback(m_token); 41 | } 42 | } 43 | 44 | NotificationToken::NotificationToken(NotificationToken&&) = default; 45 | 46 | NotificationToken& NotificationToken::operator=(realm::NotificationToken&& rgt) 47 | { 48 | if (this != &rgt) { 49 | if (auto notifier = m_notifier.exchange({})) { 50 | notifier->remove_callback(m_token); 51 | } 52 | m_notifier = std::move(rgt.m_notifier); 53 | m_token = rgt.m_token; 54 | } 55 | return *this; 56 | } 57 | 58 | void NotificationToken::suppress_next() 59 | { 60 | m_notifier.load()->suppress_next_notification(m_token); 61 | } 62 | -------------------------------------------------------------------------------- /Pods/Realm/Realm/ObjectStore/src/impl/weak_realm_notifier.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2015 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #include "impl/weak_realm_notifier.hpp" 20 | 21 | #include "shared_realm.hpp" 22 | #include "util/event_loop_signal.hpp" 23 | 24 | using namespace realm; 25 | using namespace realm::_impl; 26 | 27 | 28 | WeakRealmNotifier::WeakRealmNotifier(const std::shared_ptr& realm, bool cache) 29 | : m_realm(realm) 30 | , m_execution_context(realm->config().execution_context) 31 | , m_realm_key(realm.get()) 32 | , m_cache(cache) 33 | , m_signal(std::make_shared>(Callback{realm})) 34 | { 35 | } 36 | 37 | WeakRealmNotifier::~WeakRealmNotifier() = default; 38 | 39 | void WeakRealmNotifier::Callback::operator()() const 40 | { 41 | if (auto realm = weak_realm.lock()) { 42 | realm->notify(); 43 | } 44 | } 45 | 46 | void WeakRealmNotifier::notify() 47 | { 48 | m_signal->notify(); 49 | } 50 | -------------------------------------------------------------------------------- /Pods/Realm/Realm/ObjectStore/src/placeholder.cpp: -------------------------------------------------------------------------------- 1 | // This file is intentionally left blank. 2 | -------------------------------------------------------------------------------- /Pods/Realm/Realm/RLMConstants.m: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | RLMNotification const RLMRealmRefreshRequiredNotification = @"RLMRealmRefreshRequiredNotification"; 22 | RLMNotification const RLMRealmDidChangeNotification = @"RLMRealmDidChangeNotification"; 23 | 24 | NSString * const RLMErrorDomain = @"io.realm"; 25 | 26 | NSString * const RLMUnknownSystemErrorDomain = @"io.realm.unknown"; 27 | 28 | NSString * const RLMExceptionName = @"RLMException"; 29 | 30 | NSString * const RLMRealmVersionKey = @"RLMRealmVersion"; 31 | 32 | NSString * const RLMRealmCoreVersionKey = @"RLMRealmCoreVersion"; 33 | 34 | NSString * const RLMInvalidatedKey = @"invalidated"; 35 | -------------------------------------------------------------------------------- /Pods/Realm/Realm/RLMListBase.mm: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2015 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMListBase.h" 20 | 21 | #import "RLMArray_Private.hpp" 22 | #import "RLMObservation.hpp" 23 | 24 | @interface RLMArray (KVO) 25 | - (NSArray *)objectsAtIndexes:(__unused NSIndexSet *)indexes; 26 | @end 27 | 28 | @implementation RLMListBase { 29 | std::unique_ptr _observationInfo; 30 | } 31 | 32 | - (instancetype)initWithArray:(RLMArray *)array { 33 | self = [super init]; 34 | if (self) { 35 | __rlmArray = array; 36 | } 37 | return self; 38 | } 39 | 40 | - (id)valueForKey:(NSString *)key { 41 | return [__rlmArray valueForKey:key]; 42 | } 43 | 44 | - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id __unsafe_unretained [])buffer count:(NSUInteger)len { 45 | return [__rlmArray countByEnumeratingWithState:state objects:buffer count:len]; 46 | } 47 | 48 | - (NSArray *)objectsAtIndexes:(NSIndexSet *)indexes { 49 | return [__rlmArray objectsAtIndexes:indexes]; 50 | } 51 | 52 | - (void)addObserver:(id)observer 53 | forKeyPath:(NSString *)keyPath 54 | options:(NSKeyValueObservingOptions)options 55 | context:(void *)context { 56 | RLMEnsureArrayObservationInfo(_observationInfo, keyPath, __rlmArray, self); 57 | [super addObserver:observer forKeyPath:keyPath options:options context:context]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /Pods/Realm/Realm/RLMSwiftSupport.m: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMSwiftSupport.h" 20 | 21 | @implementation RLMSwiftSupport 22 | 23 | + (BOOL)isSwiftClassName:(NSString *)className { 24 | return [className rangeOfString:@"."].location != NSNotFound; 25 | } 26 | 27 | + (NSString *)demangleClassName:(NSString *)className { 28 | return [className substringFromIndex:[className rangeOfString:@"."].location + 1]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/Realm/Realm/RLMSyncPermission.m: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMSyncPermission_Private.h" 20 | 21 | @implementation RLMSyncPermission 22 | 23 | + (NSArray *)requiredProperties { 24 | return @[@"updatedAt", @"userId", @"path"]; 25 | } 26 | 27 | + (BOOL)shouldIncludeInDefaultSchema { 28 | return NO; 29 | } 30 | 31 | + (NSString *)_realmObjectName { 32 | return @"Permission"; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Pods/Realm/Realm/RLMSyncPermissionChange.m: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMSyncPermissionChange_Private.h" 20 | #import "RLMSyncUtil_Private.h" 21 | 22 | @implementation RLMSyncPermissionChange 23 | 24 | + (instancetype)permissionChangeWithRealmURL:(NSString *)realmURL 25 | userID:(NSString *)userID 26 | read:(nullable NSNumber *)mayRead 27 | write:(nullable NSNumber *)mayWrite 28 | manage:(nullable NSNumber *)mayManage { 29 | RLMSyncPermissionChange *permissionChange = [RLMSyncPermissionChange new]; 30 | permissionChange.realmUrl = realmURL; 31 | permissionChange.userId = userID; 32 | permissionChange.mayRead = mayRead; 33 | permissionChange.mayWrite = mayWrite; 34 | permissionChange.mayManage = mayManage; 35 | return permissionChange; 36 | } 37 | 38 | + (NSArray *)requiredProperties { 39 | return @[@"id", @"createdAt", @"updatedAt", @"realmUrl", @"userId"]; 40 | } 41 | 42 | + (NSDictionary *)defaultPropertyValues { 43 | NSDate *now = [NSDate date]; 44 | return @{ 45 | @"id": [NSUUID UUID].UUIDString, 46 | @"createdAt": now, 47 | @"updatedAt": now, 48 | @"realmUrl": @"*", 49 | @"userId": @"*" 50 | }; 51 | } 52 | 53 | + (nullable NSString *)primaryKey { 54 | return @"id"; 55 | } 56 | 57 | + (BOOL)shouldIncludeInDefaultSchema { 58 | return NO; 59 | } 60 | 61 | - (RLMSyncManagementObjectStatus)status { 62 | return RLMMakeSyncManagementObjectStatus(self.statusCode); 63 | } 64 | 65 | + (NSString *)_realmObjectName { 66 | return @"PermissionChange"; 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /Pods/Realm/Realm/RLMSyncPermissionOffer.m: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMSyncPermissionOffer_Private.h" 20 | #import "RLMSyncUtil_Private.h" 21 | 22 | @implementation RLMSyncPermissionOffer 23 | 24 | + (instancetype)permissionOfferWithRealmURL:(NSString *)realmURL 25 | expiresAt:(nullable NSDate *)expiresAt 26 | read:(BOOL)mayRead 27 | write:(BOOL)mayWrite 28 | manage:(BOOL)mayManage { 29 | RLMSyncPermissionOffer *permissionOffer = [RLMSyncPermissionOffer new]; 30 | permissionOffer.realmUrl = realmURL; 31 | permissionOffer.expiresAt = expiresAt; 32 | permissionOffer.mayRead = mayRead; 33 | permissionOffer.mayWrite = mayWrite; 34 | permissionOffer.mayManage = mayManage; 35 | return permissionOffer; 36 | } 37 | 38 | + (NSArray *)requiredProperties { 39 | return @[@"id", @"createdAt", @"updatedAt", @"realmUrl"]; 40 | } 41 | 42 | + (NSArray *)indexedProperties { 43 | return @[@"token"]; 44 | } 45 | 46 | + (NSDictionary *)defaultPropertyValues { 47 | NSDate *now = [NSDate date]; 48 | return @{ 49 | @"id": [NSUUID UUID].UUIDString, 50 | @"createdAt": now, 51 | @"updatedAt": now, 52 | @"realmUrl": @"" 53 | }; 54 | } 55 | 56 | + (nullable NSString *)primaryKey { 57 | return @"id"; 58 | } 59 | 60 | + (BOOL)shouldIncludeInDefaultSchema { 61 | return NO; 62 | } 63 | 64 | - (RLMSyncManagementObjectStatus)status { 65 | return RLMMakeSyncManagementObjectStatus(self.statusCode); 66 | } 67 | 68 | + (NSString *)_realmObjectName { 69 | return @"PermissionOffer"; 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /Pods/Realm/Realm/RLMSyncPermissionOfferResponse.m: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMSyncPermissionOfferResponse_Private.h" 20 | #import "RLMSyncUtil_Private.h" 21 | 22 | @implementation RLMSyncPermissionOfferResponse 23 | 24 | + (instancetype)permissionOfferResponseWithToken:(NSString *)token { 25 | RLMSyncPermissionOfferResponse *permissionOfferResponse = [RLMSyncPermissionOfferResponse new]; 26 | permissionOfferResponse.token = token; 27 | return permissionOfferResponse; 28 | } 29 | 30 | + (NSArray *)requiredProperties { 31 | return @[@"id", @"createdAt", @"updatedAt", @"token"]; 32 | } 33 | 34 | + (NSDictionary *)defaultPropertyValues { 35 | NSDate *now = [NSDate date]; 36 | return @{ 37 | @"id": [NSUUID UUID].UUIDString, 38 | @"createdAt": now, 39 | @"updatedAt": now, 40 | @"token": @"", 41 | }; 42 | } 43 | 44 | + (nullable NSString *)primaryKey { 45 | return @"id"; 46 | } 47 | 48 | + (BOOL)shouldIncludeInDefaultSchema { 49 | return NO; 50 | } 51 | 52 | - (RLMSyncManagementObjectStatus)status { 53 | return RLMMakeSyncManagementObjectStatus(self.statusCode); 54 | } 55 | 56 | + (NSString *)_realmObjectName { 57 | return @"PermissionOfferResponse"; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /Pods/Realm/Realm/RLMUpdateChecker.mm: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMUpdateChecker.hpp" 20 | 21 | #import "RLMRealm.h" 22 | #import "RLMUtil.hpp" 23 | 24 | #if TARGET_IPHONE_SIMULATOR && !defined(REALM_COCOA_VERSION) 25 | #import "RLMVersion.h" 26 | #endif 27 | 28 | void RLMCheckForUpdates() { 29 | #if TARGET_IPHONE_SIMULATOR 30 | if (getenv("REALM_DISABLE_UPDATE_CHECKER") || RLMIsRunningInPlayground()) { 31 | return; 32 | } 33 | 34 | auto handler = ^(NSData *data, NSURLResponse *response, NSError *error) { 35 | if (error || ((NSHTTPURLResponse *)response).statusCode != 200) { 36 | return; 37 | } 38 | 39 | NSString *latestVersion = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; 40 | if (![REALM_COCOA_VERSION isEqualToString:latestVersion]) { 41 | NSLog(@"Version %@ of Realm is now available: https://github.com/realm/realm-cocoa/blob/v%@/CHANGELOG.md", latestVersion, latestVersion); 42 | } 43 | }; 44 | 45 | NSString *url = [NSString stringWithFormat:@"https://static.realm.io/update/cocoa?%@", REALM_COCOA_VERSION]; 46 | [[NSURLSession.sharedSession dataTaskWithURL:[NSURL URLWithString:url] completionHandler:handler] resume]; 47 | #endif 48 | } 49 | -------------------------------------------------------------------------------- /Pods/Realm/Realm/Realm.modulemap: -------------------------------------------------------------------------------- 1 | framework module Realm { 2 | umbrella header "Realm.h" 3 | 4 | export * 5 | module * { export * } 6 | 7 | explicit module Private { 8 | header "RLMAccessor.h" 9 | header "RLMArray_Private.h" 10 | header "RLMCollection_Private.h" 11 | header "RLMListBase.h" 12 | header "RLMObject_Private.h" 13 | header "RLMObjectBase_Dynamic.h" 14 | header "RLMObjectBase_Private.h" 15 | header "RLMObjectSchema_Private.h" 16 | header "RLMObjectStore.h" 17 | header "RLMOptionalBase.h" 18 | header "RLMProperty_Private.h" 19 | header "RLMRealm_Private.h" 20 | header "RLMRealmConfiguration_Private.h" 21 | header "RLMResults_Private.h" 22 | header "RLMSchema_Private.h" 23 | header "RLMSyncConfiguration_Private.h" 24 | header "RLMSyncUtil_Private.h" 25 | } 26 | 27 | explicit module Dynamic { 28 | header "RLMRealm_Dynamic.h" 29 | header "RLMObjectBase_Dynamic.h" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Pods/Realm/core/librealmcore-ios.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fumiyasac/WebViewGraphOfSwift/6f01162622ea836ed18a4ea4f58b6d2692177006/Pods/Realm/core/librealmcore-ios.a -------------------------------------------------------------------------------- /Pods/Realm/include/NSError+RLMSync.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2017 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | /// NSError category extension providing methods to get data out of Realm's 24 | /// "client reset" error. 25 | @interface NSError (RLMSync) 26 | 27 | /** 28 | Given a Realm Object Server client reset error, return the block that can 29 | be called to manually initiate the client reset process, or nil if the 30 | error isn't a client reset error. 31 | */ 32 | - (nullable void(^)(void))rlmSync_clientResetBlock NS_REFINED_FOR_SWIFT; 33 | 34 | /** 35 | Given a Realm Object Server permission denied error, return the block that 36 | can be called to manually initiate the Realm file deletion process, or nil 37 | if the error isn't a permission denied error. 38 | */ 39 | - (nullable void(^)(void))rlmSync_deleteRealmBlock NS_REFINED_FOR_SWIFT; 40 | 41 | /** 42 | Given a Realm Object Server client reset error, return the path where the 43 | backup copy of the Realm will be placed once the client reset process is 44 | complete. 45 | */ 46 | - (nullable NSString *)rlmSync_clientResetBackedUpRealmPath NS_SWIFT_UNAVAILABLE(""); 47 | 48 | @end 49 | 50 | NS_ASSUME_NONNULL_END 51 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMAccessor.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | @class RLMObjectSchema, RLMProperty, RLMObjectBase; 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | // 26 | // Accessors Class Creation/Caching 27 | // 28 | 29 | // get accessor classes for an object class - generates classes if not cached 30 | Class RLMManagedAccessorClassForObjectClass(Class objectClass, RLMObjectSchema *schema, const char *name); 31 | Class RLMUnmanagedAccessorClassForObjectClass(Class objectClass, RLMObjectSchema *schema); 32 | 33 | // 34 | // Dynamic getters/setters 35 | // 36 | FOUNDATION_EXTERN void RLMDynamicValidatedSet(RLMObjectBase *obj, NSString *propName, id __nullable val); 37 | FOUNDATION_EXTERN id __nullable RLMDynamicGet(RLMObjectBase *obj, RLMProperty *prop); 38 | FOUNDATION_EXTERN id __nullable RLMDynamicGetByName(RLMObjectBase *obj, NSString *propName, bool asList); 39 | 40 | // by property/column 41 | void RLMDynamicSet(RLMObjectBase *obj, RLMProperty *prop, id val); 42 | 43 | // 44 | // Class modification 45 | // 46 | 47 | // Replace className method for the given class 48 | void RLMReplaceClassNameMethod(Class accessorClass, NSString *className); 49 | 50 | // Replace sharedSchema method for the given class 51 | void RLMReplaceSharedSchemaMethod(Class accessorClass, RLMObjectSchema * __nullable schema); 52 | 53 | NS_ASSUME_NONNULL_END 54 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMArray_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | @interface RLMArray () 24 | - (instancetype)initWithObjectClassName:(NSString *)objectClassName; 25 | - (NSString *)descriptionWithMaxDepth:(NSUInteger)depth; 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMCollection_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | #import 22 | 23 | @protocol RLMFastEnumerable; 24 | 25 | NSArray *RLMCollectionValueForKey(id collection, NSString *key); 26 | void RLMCollectionSetValueForKey(id collection, NSString *key, id value); 27 | FOUNDATION_EXTERN NSString *RLMDescriptionWithMaxDepth(NSString *name, id collection, NSUInteger depth); 28 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMListBase.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | @class RLMArray; 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | // A base class for Swift generic Lists to make it possible to interact with 26 | // them from obj-c 27 | @interface RLMListBase : NSObject 28 | @property (nonatomic, strong) RLMArray *_rlmArray; 29 | 30 | - (instancetype)initWithArray:(RLMArray *)array; 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMMigration_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | #import 21 | #import 22 | 23 | namespace realm { 24 | class Schema; 25 | } 26 | 27 | NS_ASSUME_NONNULL_BEGIN 28 | 29 | @interface RLMMigration () 30 | 31 | @property (nonatomic, strong) RLMRealm *oldRealm; 32 | @property (nonatomic, strong) RLMRealm *realm; 33 | 34 | - (instancetype)initWithRealm:(RLMRealm *)realm oldRealm:(RLMRealm *)oldRealm schema:(realm::Schema &)schema; 35 | 36 | - (void)execute:(RLMMigrationBlock)block; 37 | 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMNetworkClient.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | #import "RLMSyncUtil_Private.h" 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | /// An abstract class representing a server endpoint. 26 | @interface RLMSyncServerEndpoint : NSObject RLM_SYNC_UNINITIALIZABLE 27 | @end 28 | 29 | /// The authentication endpoint. 30 | @interface RLMSyncAuthEndpoint : RLMSyncServerEndpoint RLM_SYNC_UNINITIALIZABLE 31 | + (instancetype)endpoint; 32 | @end 33 | 34 | /// The password change endpoint. 35 | @interface RLMSyncChangePasswordEndpoint : RLMSyncServerEndpoint RLM_SYNC_UNINITIALIZABLE 36 | + (instancetype)endpoint; 37 | @end 38 | 39 | /// The get user info endpoint. 40 | @interface RLMSyncGetUserInfoEndpoint : RLMSyncServerEndpoint RLM_SYNC_UNINITIALIZABLE 41 | + (instancetype)endpoint; 42 | @end 43 | 44 | /** 45 | A simple Realm Object Server network client that wraps `NSURLSession`. 46 | */ 47 | @interface RLMNetworkClient : NSObject 48 | 49 | + (void)sendRequestToEndpoint:(RLMSyncServerEndpoint *)endpoint 50 | server:(NSURL *)serverURL 51 | JSON:(NSDictionary *)jsonDictionary 52 | completion:(RLMSyncCompletionBlock)completionBlock; 53 | 54 | + (void)sendRequestToEndpoint:(RLMSyncServerEndpoint *)endpoint 55 | server:(NSURL *)serverURL 56 | JSON:(NSDictionary *)jsonDictionary 57 | timeout:(NSTimeInterval)timeout 58 | completion:(RLMSyncCompletionBlock)completionBlock; 59 | 60 | NS_ASSUME_NONNULL_END 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMObjectBase.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | @class RLMRealm; 24 | @class RLMSchema; 25 | @class RLMObjectSchema; 26 | 27 | /// :nodoc: 28 | @interface RLMObjectBase : NSObject 29 | 30 | @property (nonatomic, readonly, getter = isInvalidated) BOOL invalidated; 31 | 32 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 33 | 34 | + (NSString *)className; 35 | 36 | // Returns whether the class is included in the default set of classes managed by a Realm. 37 | + (BOOL)shouldIncludeInDefaultSchema; 38 | 39 | + (nullable NSString *)_realmObjectName; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMObjectBase_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2017 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | // RLMObjectBase private 24 | @interface RLMObjectBase () 25 | + (void)initializeLinkedObjectSchemas; 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMObjectSchema.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | @class RLMProperty; 24 | 25 | /** 26 | This class represents Realm model object schemas. 27 | 28 | When using Realm, `RLMObjectSchema` instances allow performing migrations and 29 | introspecting the database's schema. 30 | 31 | Object schemas map to tables in the core database. 32 | */ 33 | @interface RLMObjectSchema : NSObject 34 | 35 | #pragma mark - Properties 36 | 37 | /** 38 | An array of `RLMProperty` instances representing the managed properties of a class described by the schema. 39 | 40 | @see `RLMProperty` 41 | */ 42 | @property (nonatomic, readonly, copy) NSArray *properties; 43 | 44 | /** 45 | The name of the class the schema describes. 46 | */ 47 | @property (nonatomic, readonly) NSString *className; 48 | 49 | /** 50 | The property which serves as the primary key for the class the schema describes, if any. 51 | */ 52 | @property (nonatomic, readonly, nullable) RLMProperty *primaryKeyProperty; 53 | 54 | #pragma mark - Methods 55 | 56 | /** 57 | Retrieves an `RLMProperty` object by the property name. 58 | 59 | @param propertyName The property's name. 60 | 61 | @return An `RLMProperty` object, or `nil` if there is no property with the given name. 62 | */ 63 | - (nullable RLMProperty *)objectForKeyedSubscript:(NSString *)propertyName; 64 | 65 | /** 66 | Returns whether two `RLMObjectSchema` instances are equal. 67 | */ 68 | - (BOOL)isEqualToObjectSchema:(RLMObjectSchema *)objectSchema; 69 | 70 | @end 71 | 72 | NS_ASSUME_NONNULL_END 73 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMObjectSchema_Private.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMObjectSchema_Private.h" 20 | 21 | #import "object_schema.hpp" 22 | 23 | @interface RLMObjectSchema () 24 | // create realm::ObjectSchema copy 25 | - (realm::ObjectSchema)objectStoreCopy; 26 | 27 | // initialize with realm::ObjectSchema 28 | + (instancetype)objectSchemaForObjectStoreSchema:(realm::ObjectSchema const&)objectSchema; 29 | @end 30 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMObject_Private.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMObject_Private.h" 20 | 21 | #import "RLMRealm_Private.hpp" 22 | #import "RLMUtil.hpp" 23 | 24 | #import // required by row.hpp 25 | #import 26 | 27 | class RLMObservationInfo; 28 | 29 | // RLMObject accessor and read/write realm 30 | @interface RLMObjectBase () { 31 | @public 32 | realm::Row _row; 33 | RLMObservationInfo *_observationInfo; 34 | RLMClassInfo *_info; 35 | } 36 | @end 37 | 38 | // FIXME-2.0: This should be folded into initWithRealm:schema:, but changing the 39 | // signature of that is a breaking change for Swift 40 | id RLMCreateManagedAccessor(Class cls, RLMRealm *realm, RLMClassInfo *info) NS_RETURNS_RETAINED; 41 | 42 | // throw an exception if the object is invalidated or on the wrong thread 43 | static inline void RLMVerifyAttached(__unsafe_unretained RLMObjectBase *const obj) { 44 | if (!obj->_row.is_attached()) { 45 | @throw RLMException(@"Object has been deleted or invalidated."); 46 | } 47 | [obj->_realm verifyThread]; 48 | } 49 | 50 | // throw an exception if the object can't be modified for any reason 51 | static inline void RLMVerifyInWriteTransaction(__unsafe_unretained RLMObjectBase *const obj) { 52 | // first verify is attached 53 | RLMVerifyAttached(obj); 54 | 55 | if (!obj->_realm.inWriteTransaction) { 56 | @throw RLMException(@"Attempting to modify object outside of a write transaction - call beginWriteTransaction on an RLMRealm instance first."); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMOptionalBase.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2015 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | #import 21 | 22 | NS_ASSUME_NONNULL_BEGIN 23 | 24 | @class RLMObjectBase, RLMProperty; 25 | 26 | @interface RLMOptionalBase : NSProxy 27 | 28 | - (instancetype)init; 29 | 30 | @property (nonatomic, weak) RLMObjectBase *object; 31 | 32 | @property (nonatomic, unsafe_unretained) RLMProperty *property; 33 | 34 | @property (nonatomic, strong, nullable) id underlyingValue; 35 | 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMPlatform.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fumiyasac/WebViewGraphOfSwift/6f01162622ea836ed18a4ea4f58b6d2692177006/Pods/Realm/include/RLMPlatform.h -------------------------------------------------------------------------------- /Pods/Realm/include/RLMPredicateUtil.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2015 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | 18 | #import 19 | #import 20 | 21 | using ExpressionVisitor = std::function; 22 | NSPredicate *transformPredicate(NSPredicate *, ExpressionVisitor); 23 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMPrefix.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2015 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifdef __OBJC__ 20 | #import 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | #import 25 | #import 26 | #import 27 | #import 28 | #import 29 | 30 | #import 31 | #import 32 | #import 33 | #import 34 | #import 35 | #endif 36 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMProperty_Private.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | #import "property.hpp" 22 | 23 | @interface RLMProperty () 24 | 25 | + (instancetype)propertyForObjectStoreProperty:(const realm::Property&)property; 26 | 27 | - (realm::Property)objectStoreCopy; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMQueryUtil.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | #import 22 | 23 | namespace realm { 24 | class Group; 25 | class Query; 26 | class SortDescriptor; 27 | } 28 | 29 | @class RLMObjectSchema, RLMProperty, RLMSchema, RLMSortDescriptor; 30 | class RLMClassInfo; 31 | 32 | extern NSString * const RLMPropertiesComparisonTypeMismatchException; 33 | extern NSString * const RLMUnsupportedTypesFoundInPropertyComparisonException; 34 | 35 | realm::Query RLMPredicateToQuery(NSPredicate *predicate, RLMObjectSchema *objectSchema, 36 | RLMSchema *schema, realm::Group &group); 37 | 38 | // return property - throw for invalid column name 39 | RLMProperty *RLMValidatedProperty(RLMObjectSchema *objectSchema, NSString *columnName); 40 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMRealmConfiguration+Sync.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | #import "RLMSyncUtil.h" 22 | 23 | @class RLMSyncConfiguration; 24 | 25 | /// Realm configuration options related to Sync. 26 | @interface RLMRealmConfiguration (Sync) 27 | 28 | NS_ASSUME_NONNULL_BEGIN 29 | 30 | /** 31 | A configuration object representing configuration state for Realms intended 32 | to sync with a Realm Object Server. 33 | 34 | This property is mutually exclusive with both `inMemoryIdentifier` and `fileURL`; 35 | setting any one of the three properties will automatically nil out the other two. 36 | 37 | @see `RLMSyncConfiguration` 38 | */ 39 | @property (nullable, nonatomic) RLMSyncConfiguration *syncConfiguration; 40 | 41 | NS_ASSUME_NONNULL_END 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMRealmConfiguration_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2015 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | @class RLMSchema; 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | @interface RLMRealmConfiguration () 26 | 27 | @property (nonatomic, readwrite) bool cache; 28 | @property (nonatomic, readwrite) bool dynamic; 29 | @property (nonatomic, readwrite) bool disableFormatUpgrade; 30 | @property (nonatomic, copy, nullable) RLMSchema *customSchema; 31 | @property (nonatomic, copy) NSString *pathOnDisk; 32 | 33 | // Get the default confiugration without copying it 34 | + (RLMRealmConfiguration *)rawDefaultConfiguration; 35 | 36 | + (void)resetRealmConfigurationState; 37 | @end 38 | 39 | // Get a path in the platform-appropriate documents directory with the given filename 40 | FOUNDATION_EXTERN NSString *RLMRealmPathForFile(NSString *fileName); 41 | FOUNDATION_EXTERN NSString *RLMRealmPathForFileAndBundleIdentifier(NSString *fileName, NSString *mainBundleIdentifier); 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMRealmConfiguration_Private.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMRealmConfiguration_Private.h" 20 | #import "shared_realm.hpp" 21 | 22 | @interface RLMRealmConfiguration () 23 | - (realm::Realm::Config&)config; 24 | 25 | @property (nonatomic) realm::SchemaMode schemaMode; 26 | @end 27 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMRealmUtil.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | #import 21 | #import 22 | 23 | @class RLMRealm; 24 | 25 | namespace realm { 26 | class BindingContext; 27 | } 28 | 29 | // Add a Realm to the weak cache 30 | void RLMCacheRealm(std::string const& path, RLMRealm *realm); 31 | // Get a Realm for the given path which can be used on the current thread 32 | RLMRealm *RLMGetThreadLocalCachedRealmForPath(std::string const& path); 33 | // Get a Realm for the given path 34 | RLMRealm *RLMGetAnyCachedRealmForPath(std::string const& path); 35 | // Clear the weak cache of Realms 36 | void RLMClearRealmCache(); 37 | 38 | std::unique_ptr RLMCreateBindingContext(RLMRealm *realm); 39 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMRealm_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | @class RLMFastEnumerator; 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | // Disable syncing files to disk. Cannot be re-enabled. Use only for tests. 26 | FOUNDATION_EXTERN void RLMDisableSyncToDisk(void); 27 | 28 | FOUNDATION_EXTERN NSData * _Nullable RLMRealmValidatedEncryptionKey(NSData *key); 29 | 30 | // Translate an in-flight exception resulting from opening a SharedGroup to 31 | // an NSError or NSException (if error is nil) 32 | void RLMRealmTranslateException(NSError **error); 33 | 34 | // RLMRealm private members 35 | @interface RLMRealm () 36 | 37 | @property (nonatomic, readonly) BOOL dynamic; 38 | @property (nonatomic, readwrite) RLMSchema *schema; 39 | 40 | + (void)resetRealmState; 41 | 42 | - (void)registerEnumerator:(RLMFastEnumerator *)enumerator; 43 | - (void)unregisterEnumerator:(RLMFastEnumerator *)enumerator; 44 | - (void)detachAllEnumerators; 45 | 46 | - (void)sendNotifications:(RLMNotification)notification; 47 | - (void)verifyThread; 48 | - (void)verifyNotificationsAreSupported; 49 | 50 | @end 51 | 52 | NS_ASSUME_NONNULL_END 53 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMRealm_Private.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMRealm_Private.h" 20 | 21 | #import "RLMClassInfo.hpp" 22 | 23 | namespace realm { 24 | class Group; 25 | class Realm; 26 | } 27 | 28 | @interface RLMRealm () { 29 | @public 30 | std::shared_ptr _realm; 31 | RLMSchemaInfo _info; 32 | } 33 | 34 | // FIXME - group should not be exposed 35 | @property (nonatomic, readonly) realm::Group &group; 36 | @end 37 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMResults_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | @class RLMObjectSchema; 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | @interface RLMResults () 26 | @property (nonatomic, readonly, getter=isAttached) BOOL attached; 27 | 28 | + (instancetype)emptyDetachedResults; 29 | 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSchema_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | @class RLMRealm; 24 | 25 | // 26 | // RLMSchema private interface 27 | // 28 | @interface RLMSchema () 29 | 30 | /** 31 | Returns an `RLMSchema` containing only the given `RLMObject` subclasses. 32 | 33 | @param classes The classes to be included in the schema. 34 | 35 | @return An `RLMSchema` containing only the given classes. 36 | */ 37 | + (instancetype)schemaWithObjectClasses:(NSArray *)classes; 38 | 39 | @property (nonatomic, readwrite, copy) NSArray *objectSchema; 40 | 41 | // schema based on runtime objects 42 | + (instancetype)sharedSchema; 43 | 44 | // schema based upon all currently registered object classes 45 | + (instancetype)partialSharedSchema; 46 | 47 | // private schema based upon all currently registered object classes. 48 | // includes classes that are excluded from the default schema. 49 | + (instancetype)partialPrivateSharedSchema; 50 | 51 | // class for string 52 | + (nullable Class)classForString:(NSString *)className; 53 | 54 | + (nullable RLMObjectSchema *)sharedSchemaForClass:(Class)cls; 55 | 56 | @end 57 | 58 | NS_ASSUME_NONNULL_END 59 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSchema_Private.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2015 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMSchema_Private.h" 20 | 21 | #import 22 | 23 | namespace realm { 24 | class Schema; 25 | class ObjectSchema; 26 | } 27 | 28 | @interface RLMSchema () 29 | + (instancetype)dynamicSchemaFromObjectStoreSchema:(realm::Schema const&)objectStoreSchema; 30 | - (realm::Schema)objectStoreCopy; 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSwiftBridgingHeader.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | #import 21 | 22 | @interface RLMRealm (Swift) 23 | + (void)resetRealmState; 24 | @end 25 | 26 | @interface RLMArray (Swift) 27 | 28 | - (instancetype)initWithObjectClassName:(NSString *)objectClassName; 29 | 30 | - (NSUInteger)indexOfObjectWhere:(NSString *)predicateFormat args:(va_list)args; 31 | - (RLMResults *)objectsWhere:(NSString *)predicateFormat args:(va_list)args; 32 | 33 | @end 34 | 35 | @interface RLMResults (Swift) 36 | 37 | - (NSUInteger)indexOfObjectWhere:(NSString *)predicateFormat args:(va_list)args; 38 | - (RLMResults *)objectsWhere:(NSString *)predicateFormat args:(va_list)args; 39 | 40 | @end 41 | 42 | @interface RLMObjectBase (Swift) 43 | 44 | - (instancetype)initWithRealm:(RLMRealm *)realm schema:(RLMObjectSchema *)schema defaultValues:(BOOL)useDefaults; 45 | 46 | + (RLMResults *)objectsWhere:(NSString *)predicateFormat args:(va_list)args; 47 | + (RLMResults *)objectsInRealm:(RLMRealm *)realm where:(NSString *)predicateFormat args:(va_list)args; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSwiftSupport.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | @interface RLMSwiftSupport : NSObject 24 | 25 | + (BOOL)isSwiftClassName:(NSString *)className; 26 | + (NSString *)demangleClassName:(NSString *)className; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSyncConfiguration_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | typedef NS_ENUM(NSUInteger, RLMSyncStopPolicy) { 24 | RLMSyncStopPolicyImmediately, 25 | RLMSyncStopPolicyLiveIndefinitely, 26 | RLMSyncStopPolicyAfterChangesUploaded, 27 | }; 28 | 29 | @interface RLMSyncConfiguration () 30 | 31 | @property (nonatomic, readwrite) RLMSyncStopPolicy stopPolicy; 32 | 33 | // Internal-only APIs 34 | @property (nullable, nonatomic) NSURL *customFileURL; 35 | 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSyncConfiguration_Private.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMSyncConfiguration_Private.h" 20 | 21 | namespace realm { 22 | struct SyncConfig; 23 | } 24 | 25 | @interface RLMSyncConfiguration () 26 | 27 | - (instancetype)initWithRawConfig:(realm::SyncConfig)config; 28 | 29 | - (realm::SyncConfig)rawConfiguration; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSyncManager_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | #import "RLMSyncUtil_Private.h" 22 | 23 | @class RLMSyncUser, RLMSyncConfiguration; 24 | 25 | // All private API methods are threadsafe and synchronized, unless denoted otherwise. Since they are expected to be 26 | // called very infrequently, this should pose no issues. 27 | 28 | NS_ASSUME_NONNULL_BEGIN 29 | 30 | @interface RLMSyncManager () 31 | 32 | @property (nullable, nonatomic, copy) RLMSyncBasicErrorReportingBlock sessionCompletionNotifier; 33 | 34 | - (nullable NSNumber *)globalSSLValidationDisabled; 35 | 36 | - (void)_fireError:(NSError *)error; 37 | 38 | - (void)_fireErrorWithCode:(int)errorCode 39 | message:(NSString *)message 40 | isFatal:(BOOL)fatal 41 | session:(RLMSyncSession *)session 42 | userInfo:(NSDictionary *)userInfo 43 | errorClass:(RLMSyncSystemErrorKind)errorClass; 44 | 45 | - (NSArray *)_allUsers; 46 | 47 | + (void)resetForTesting; 48 | 49 | NS_ASSUME_NONNULL_END 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSyncPermission.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | #import 21 | 22 | NS_ASSUME_NONNULL_BEGIN 23 | 24 | /** 25 | This model is used to reflect permissions. 26 | 27 | It should be used in conjunction with a `RLMSyncUser`'s Permission Realm. 28 | You can only read this Realm. Use the objects in Management Realm to 29 | make request for modifications of permissions. 30 | 31 | See https://realm.io/docs/realm-object-server/#permissions for general 32 | documentation. 33 | */ 34 | __deprecated_msg("Use `RLMSyncPermissionValue`") 35 | @interface RLMSyncPermission : RLMObject 36 | 37 | /// The date this object was last modified. 38 | @property (readonly) NSDate *updatedAt; 39 | 40 | /// The identity of a user affected by this permission. 41 | @property (readonly) NSString *userId; 42 | 43 | /// The path to the realm. 44 | @property (readonly) NSString *path; 45 | 46 | /// Whether the affected user is allowed to read from the Realm. 47 | @property (readonly) BOOL mayRead; 48 | /// Whether the affected user is allowed to write to the Realm. 49 | @property (readonly) BOOL mayWrite; 50 | /// Whether the affected user is allowed to manage the access rights for others. 51 | @property (readonly) BOOL mayManage; 52 | 53 | @end 54 | 55 | NS_ASSUME_NONNULL_END 56 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSyncPermissionChange_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMSyncPermissionChange.h" 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | @interface RLMSyncPermissionChange() 24 | 25 | @property (readwrite) NSString *id; 26 | @property (readwrite) NSDate *createdAt; 27 | @property (readwrite) NSDate *updatedAt; 28 | @property (nullable, readwrite) NSNumber *statusCode; 29 | @property (nullable, readwrite) NSString *statusMessage; 30 | @property (readwrite) NSString *realmUrl; 31 | @property (readwrite) NSString *userId; 32 | 33 | @property (nullable, readwrite) NSNumber *mayRead; 34 | @property (nullable, readwrite) NSNumber *mayWrite; 35 | @property (nullable, readwrite) NSNumber *mayManage; 36 | 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSyncPermissionOfferResponse_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMSyncPermissionOfferResponse.h" 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | @interface RLMSyncPermissionOfferResponse() 24 | 25 | @property (readwrite) NSString *id; 26 | @property (readwrite) NSDate *createdAt; 27 | @property (readwrite) NSDate *updatedAt; 28 | @property (nullable, readwrite) NSNumber *statusCode; 29 | @property (nullable, readwrite) NSString *statusMessage; 30 | 31 | @property (readwrite) NSString *token; 32 | @property (nullable, readwrite) NSString *realmUrl; 33 | 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSyncPermissionOffer_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMSyncPermissionOffer.h" 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | @interface RLMSyncPermissionOffer() 24 | 25 | @property (readwrite) NSString *id; 26 | @property (readwrite) NSDate *createdAt; 27 | @property (readwrite) NSDate *updatedAt; 28 | @property (nullable, readwrite) NSNumber *statusCode; 29 | @property (nullable, readwrite) NSString *statusMessage; 30 | 31 | @property (nullable, readwrite) NSString *token; 32 | @property (readwrite) NSString *realmUrl; 33 | 34 | @property (readwrite) BOOL mayRead; 35 | @property (readwrite) BOOL mayWrite; 36 | @property (readwrite) BOOL mayManage; 37 | 38 | @property (nullable, readwrite) NSDate *expiresAt; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSyncPermissionResults_Private.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2017 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMSyncPermissionResults.h" 20 | 21 | #import "results.hpp" 22 | 23 | @interface RLMSyncPermissionResults () 24 | 25 | - (instancetype)initWithResults:(realm::Results)results; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSyncPermissionValue_Private.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2017 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMSyncPermissionValue.h" 20 | 21 | #import "sync/sync_permission.hpp" 22 | 23 | @interface RLMSyncPermissionValue () 24 | 25 | - (instancetype)initWithPermission:(realm::Permission)permission; 26 | 27 | - (realm::Permission)rawPermission; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSyncPermission_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMSyncPermission.h" 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | @interface RLMSyncPermission() 24 | 25 | @property (readwrite) NSDate *updatedAt; 26 | @property (readwrite) NSString *userId; 27 | @property (readwrite) NSString *path; 28 | 29 | @property (readwrite) BOOL mayRead; 30 | @property (readwrite) BOOL mayWrite; 31 | @property (readwrite) BOOL mayManage; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSyncSessionRefreshHandle.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2017 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | @class RLMSyncUser; 22 | 23 | /// An object that handles refreshing a session's token periodically, as long 24 | /// as the session remains live and valid. 25 | @interface RLMSyncSessionRefreshHandle : NSObject 26 | 27 | - (void)scheduleRefreshTimer:(NSDate *)dateWhenTokenExpires; 28 | - (void)invalidate; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSyncSessionRefreshHandle.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMSyncSessionRefreshHandle.h" 20 | 21 | #import "RLMSyncUtil_Private.h" 22 | 23 | #import 24 | 25 | namespace realm { 26 | class SyncSession; 27 | class SyncUser; 28 | } 29 | 30 | @class RLMSyncUser; 31 | 32 | @interface RLMSyncSessionRefreshHandle () 33 | 34 | NS_ASSUME_NONNULL_BEGIN 35 | 36 | - (instancetype)initWithRealmURL:(NSURL *)realmURL 37 | user:(std::shared_ptr)user 38 | session:(std::shared_ptr)session 39 | completionBlock:(nullable RLMSyncBasicErrorReportingBlock)completionBlock; 40 | 41 | NS_ASSUME_NONNULL_END 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSyncSession_Private.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMSyncSession.h" 20 | 21 | #import "RLMSyncUtil_Private.h" 22 | #import 23 | 24 | namespace realm { 25 | class SyncSession; 26 | } 27 | 28 | NS_ASSUME_NONNULL_BEGIN 29 | 30 | @interface RLMSyncSession () { 31 | @public // So it's visible to tests 32 | std::weak_ptr _session; 33 | } RLM_SYNC_UNINITIALIZABLE 34 | 35 | - (instancetype)initWithSyncSession:(std::shared_ptr)session; 36 | 37 | /// Wait for pending uploads to complete or the session to expire, and dispatch the callback onto the specified queue. 38 | - (BOOL)waitForUploadCompletionOnQueue:(nullable dispatch_queue_t)queue callback:(void(^)(NSError * _Nullable))callback; 39 | 40 | /// Wait for pending downloads to complete or the session to expire, and dispatch the callback onto the specified queue. 41 | - (BOOL)waitForDownloadCompletionOnQueue:(nullable dispatch_queue_t)queue callback:(void(^)(NSError * _Nullable))callback; 42 | 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMSyncUtil_Private.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMSyncUtil_Private.h" 20 | 21 | #import "RLMSyncConfiguration_Private.h" 22 | 23 | #import "sync/sync_manager.hpp" 24 | #import "realm/util/optional.hpp" 25 | 26 | @class RLMSyncErrorResponseModel; 27 | class CocoaSyncUserContext; 28 | 29 | realm::SyncSessionStopPolicy translateStopPolicy(RLMSyncStopPolicy stopPolicy); 30 | RLMSyncStopPolicy translateStopPolicy(realm::SyncSessionStopPolicy stop_policy); 31 | 32 | std::shared_ptr sync_session_for_realm(RLMRealm *realm); 33 | 34 | #pragma mark - Get user context 35 | 36 | CocoaSyncUserContext& context_for(const std::shared_ptr& user); 37 | 38 | #pragma mark - Error construction 39 | 40 | NSError *make_auth_error_bad_response(NSDictionary *json=nil); 41 | NSError *make_auth_error_http_status(NSInteger status); 42 | NSError *make_auth_error_client_issue(); 43 | NSError *make_auth_error(RLMSyncErrorResponseModel *responseModel); 44 | 45 | NSError *make_permission_error_get(NSString *description, realm::util::Optional code=none); 46 | NSError *make_permission_error_change(NSString *description, realm::util::Optional code=none); 47 | 48 | // Set 'code' to NSNotFound to not actually have an error code. 49 | NSError *make_sync_error(RLMSyncSystemErrorKind kind, NSString *description, NSInteger code, NSDictionary *custom); 50 | NSError *make_sync_error(NSError *wrapped_auth_error); 51 | NSError *make_sync_error(std::error_code, RLMSyncSystemErrorKind kind=RLMSyncSystemErrorKindSession); 52 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMThreadSafeReference_Private.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import "RLMThreadSafeReference.h" 20 | #import "thread_safe_reference.hpp" 21 | 22 | NS_ASSUME_NONNULL_BEGIN 23 | 24 | @protocol RLMThreadConfined_Private 25 | 26 | // Constructs a new `ThreadSafeReference` 27 | - (std::unique_ptr)makeThreadSafeReference; 28 | 29 | // The extra information needed to construct an instance of this type from the Object Store type 30 | @property (nonatomic, readonly, nullable) id objectiveCMetadata; 31 | 32 | // Constructs an new instance of this type 33 | + (nullable instancetype)objectWithThreadSafeReference:(std::unique_ptr)reference 34 | metadata:(nullable id)metadata 35 | realm:(RLMRealm *)realm; 36 | @end 37 | 38 | @interface RLMThreadSafeReference () 39 | 40 | - (nullable id)resolveReferenceInRealm:(RLMRealm *)realm; 41 | 42 | @end 43 | 44 | NS_ASSUME_NONNULL_END 45 | -------------------------------------------------------------------------------- /Pods/Realm/include/RLMUpdateChecker.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | // Asynchronously check for updates to Realm if running on a simulator 20 | void RLMCheckForUpdates(); 21 | -------------------------------------------------------------------------------- /Pods/Realm/include/Realm.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | #import 22 | #import 23 | #import 24 | #import 25 | #import 26 | #import 27 | #import 28 | #import 29 | #import 30 | #import 31 | #import 32 | #import 33 | #import 34 | #import 35 | #import 36 | #import 37 | #import 38 | #import 39 | #import 40 | #import 41 | #import 42 | #import 43 | #import 44 | #import 45 | -------------------------------------------------------------------------------- /Pods/Realm/include/binding_callback_thread_observer.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2017 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifndef REALM_OS_BINDING_CALLBACK_THREAD_OBSERVER_HPP 20 | #define REALM_OS_BINDING_CALLBACK_THREAD_OBSERVER_HPP 21 | 22 | #include 23 | 24 | namespace realm { 25 | // Interface for bindings interested in registering callbacks before/after the ObjectStore thread runs. 26 | // This is for example helpful to attach/detach the pthread to the JavaVM in order to be able to perform JNI calls. 27 | class BindingCallbackThreadObserver { 28 | public: 29 | // This method is called just before the thread is started 30 | virtual void did_create_thread() = 0; 31 | 32 | // This method is called just before the thread is being destroyed 33 | virtual void will_destroy_thread() = 0; 34 | 35 | // This method is called with any exception throws by client.run(). 36 | virtual void handle_error(std::exception const& e) = 0; 37 | }; 38 | 39 | extern BindingCallbackThreadObserver* g_binding_callback_thread_observer; 40 | } 41 | 42 | #endif // REALM_OS_BINDING_CALLBACK_THREAD_OBSERVER_HPP 43 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_HPP 20 | #define REALM_HPP 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | #endif // REALM_HPP 31 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/column_fwd.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_COLUMN_FWD_HPP 20 | #define REALM_COLUMN_FWD_HPP 21 | 22 | #include 23 | 24 | namespace realm { 25 | 26 | // Regular classes 27 | class ColumnBase; 28 | class StringColumn; 29 | class StringEnumColumn; 30 | class BinaryColumn; 31 | class SubtableColumn; 32 | class MixedColumn; 33 | class LinkColumn; 34 | class LinkListColumn; 35 | 36 | // Templated classes 37 | template 38 | class Column; 39 | template 40 | class BasicColumn; 41 | template 42 | class ColumnRandIterator; 43 | 44 | namespace util { 45 | template 46 | class Optional; 47 | } 48 | 49 | // Shortcuts, aka typedefs. 50 | using IntegerColumn = Column; 51 | using IntNullColumn = Column>; 52 | using DoubleColumn = Column; 53 | using FloatColumn = Column; 54 | using IntegerColumnIterator = ColumnRandIterator; 55 | } // namespace realm 56 | 57 | #endif // REALM_COLUMN_FWD_HPP 58 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/column_type.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_COLUMN_TYPE_HPP 20 | #define REALM_COLUMN_TYPE_HPP 21 | 22 | namespace realm { 23 | 24 | 25 | // Note: Enumeration value assignments must be kept in sync with 26 | // . 27 | enum ColumnType { 28 | // Column types 29 | col_type_Int = 0, 30 | col_type_Bool = 1, 31 | col_type_String = 2, 32 | col_type_StringEnum = 3, // double refs 33 | col_type_Binary = 4, 34 | col_type_Table = 5, 35 | col_type_Mixed = 6, 36 | col_type_OldDateTime = 7, 37 | col_type_Timestamp = 8, 38 | col_type_Float = 9, 39 | col_type_Double = 10, 40 | col_type_Reserved4 = 11, // Decimal 41 | col_type_Link = 12, 42 | col_type_LinkList = 13, 43 | col_type_BackLink = 14 44 | }; 45 | 46 | 47 | // Column attributes can be combined using bitwise or. 48 | enum ColumnAttr { 49 | col_attr_None = 0, 50 | col_attr_Indexed = 1, 51 | 52 | /// Specifies that this column forms a unique constraint. It requires 53 | /// `col_attr_Indexed`. 54 | col_attr_Unique = 2, 55 | 56 | /// Reserved for future use. 57 | col_attr_Reserved = 4, 58 | 59 | /// Specifies that the links of this column are strong, not weak. Applies 60 | /// only to link columns (`type_Link` and `type_LinkList`). 61 | col_attr_StrongLinks = 8, 62 | 63 | /// Specifies that elements in the column can be null. 64 | col_attr_Nullable = 16 65 | }; 66 | 67 | 68 | } // namespace realm 69 | 70 | #endif // REALM_COLUMN_TYPE_HPP 71 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/data_type.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_DATA_TYPE_HPP 20 | #define REALM_DATA_TYPE_HPP 21 | 22 | namespace realm { 23 | 24 | class StringData; 25 | class BinaryData; 26 | 27 | typedef int64_t Int; 28 | typedef bool Bool; 29 | typedef float Float; 30 | typedef double Double; 31 | typedef realm::StringData String; 32 | typedef realm::BinaryData Binary; 33 | 34 | 35 | // Note: Value assignments must be kept in sync with 36 | // Note: Value assignments must be kept in sync with 37 | // Note: Value assignments must be kept in sync with 38 | // Note: Value assignments must be kept in sync with "com/realm/ColumnType.java" 39 | // Note: Any change to this enum is a file-format breaking change. 40 | enum DataType { 41 | type_Int = 0, 42 | type_Bool = 1, 43 | type_Float = 9, 44 | type_Double = 10, 45 | type_String = 2, 46 | type_Binary = 4, 47 | type_OldDateTime = 7, 48 | type_Timestamp = 8, 49 | type_Table = 5, 50 | type_Mixed = 6, 51 | type_Link = 12, 52 | type_LinkList = 13 53 | }; 54 | 55 | /// See Descriptor::set_link_type(). 56 | enum LinkType { 57 | link_Strong, 58 | link_Weak, 59 | }; 60 | 61 | } // namespace realm 62 | 63 | #endif // REALM_DATA_TYPE_HPP 64 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/descriptor_fwd.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_DESCRIPTOR_FWD_HPP 20 | #define REALM_DESCRIPTOR_FWD_HPP 21 | 22 | #include 23 | 24 | 25 | namespace realm { 26 | 27 | class Descriptor; 28 | typedef std::shared_ptr DescriptorRef; 29 | typedef std::shared_ptr ConstDescriptorRef; 30 | 31 | } // namespace realm 32 | 33 | #endif // REALM_DESCRIPTOR_FWD_HPP 34 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/disable_sync_to_disk.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_DISABLE_SYNC_TO_DISK_HPP 20 | #define REALM_DISABLE_SYNC_TO_DISK_HPP 21 | 22 | #include 23 | 24 | namespace realm { 25 | 26 | /// Completely disable synchronization with storage device to speed up unit 27 | /// testing. This is an unsafe mode of operation, and should never be used in 28 | /// production. This function is thread safe. 29 | void disable_sync_to_disk(); 30 | 31 | /// Returns true after disable_sync_to_disk() has been called. This function is 32 | /// thread safe. 33 | bool get_disable_sync_to_disk() noexcept; 34 | 35 | } // namespace realm 36 | 37 | #endif // REALM_DISABLE_SYNC_TO_DISK_HPP 38 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/history.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_HISTORY_HPP 20 | #define REALM_HISTORY_HPP 21 | 22 | #include 23 | #include 24 | 25 | #include 26 | 27 | 28 | namespace realm { 29 | 30 | std::unique_ptr make_in_realm_history(const std::string& realm_path); 31 | 32 | } // namespace realm 33 | 34 | 35 | #endif // REALM_HISTORY_HPP 36 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/impl/array_writer.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_ARRAY_WRITER_HPP 20 | #define REALM_ARRAY_WRITER_HPP 21 | 22 | #include 23 | 24 | namespace realm { 25 | namespace _impl { 26 | 27 | class ArrayWriterBase { 28 | public: 29 | virtual ~ArrayWriterBase() 30 | { 31 | } 32 | 33 | /// Write the specified array data and its checksum into free 34 | /// space. 35 | /// 36 | /// Returns the ref (position in the target stream) of the written copy of 37 | /// the specified array data. 38 | virtual ref_type write_array(const char* data, size_t size, uint32_t checksum) = 0; 39 | }; 40 | 41 | } // namespace impl_ 42 | } // namespace realm 43 | 44 | #endif // REALM_ARRAY_WRITER_HPP 45 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/impl/output_stream.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_IMPL_OUTPUT_STREAM_HPP 20 | #define REALM_IMPL_OUTPUT_STREAM_HPP 21 | 22 | #include 23 | #include 24 | 25 | #include 26 | 27 | #include 28 | 29 | #include 30 | 31 | namespace realm { 32 | namespace _impl { 33 | 34 | 35 | class OutputStream : public ArrayWriterBase { 36 | public: 37 | OutputStream(std::ostream&); 38 | ~OutputStream() noexcept; 39 | 40 | ref_type get_ref_of_next_array() const noexcept; 41 | 42 | void write(const char* data, size_t size); 43 | 44 | ref_type write_array(const char* data, size_t size, uint32_t checksum) override; 45 | 46 | private: 47 | ref_type m_next_ref; 48 | std::ostream& m_out; 49 | 50 | void do_write(const char* data, size_t size); 51 | }; 52 | 53 | 54 | // Implementation: 55 | 56 | inline OutputStream::OutputStream(std::ostream& out) 57 | : m_next_ref(0) 58 | , m_out(out) 59 | { 60 | } 61 | 62 | inline OutputStream::~OutputStream() noexcept 63 | { 64 | } 65 | 66 | inline size_t OutputStream::get_ref_of_next_array() const noexcept 67 | { 68 | return m_next_ref; 69 | } 70 | 71 | 72 | } // namespace _impl 73 | } // namespace realm 74 | 75 | #endif // REALM_IMPL_OUTPUT_STREAM_HPP 76 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/link_view_fwd.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_LINK_VIEW_FWD_HPP 20 | #define REALM_LINK_VIEW_FWD_HPP 21 | 22 | #include 23 | 24 | namespace realm { 25 | 26 | class LinkView; 27 | using LinkViewRef = std::shared_ptr; 28 | using ConstLinkViewRef = std::shared_ptr; 29 | 30 | } // namespace realm 31 | 32 | #endif // REALM_LINK_VIEW_FWD_HPP 33 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/query_operators.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2017 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_QUERY_OPERATORS_HPP 20 | #define REALM_QUERY_OPERATORS_HPP 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | namespace realm { 28 | 29 | // This is not supported in the general case 30 | template 31 | struct Size; 32 | 33 | template <> 34 | struct Size { 35 | int64_t operator()(StringData v) const 36 | { 37 | return v.size(); 38 | } 39 | typedef StringData type; 40 | }; 41 | 42 | template <> 43 | struct Size { 44 | int64_t operator()(BinaryData v) const 45 | { 46 | return v.size(); 47 | } 48 | typedef BinaryData type; 49 | }; 50 | 51 | template <> 52 | struct Size { 53 | int64_t operator()(ConstTableRef v) const 54 | { 55 | return v->size(); 56 | } 57 | typedef ConstTableRef type; 58 | }; 59 | 60 | template <> 61 | struct Size { 62 | int64_t operator()(ConstLinkViewRef v) const 63 | { 64 | return v->size(); 65 | } 66 | typedef ConstLinkViewRef type; 67 | }; 68 | 69 | } // namespace realm 70 | 71 | #endif // REALM_QUERY_OPERATORS_HPP 72 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/sync/changeset_cooker.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * REALM CONFIDENTIAL 4 | * __________________ 5 | * 6 | * [2011] - [2015] Realm Inc 7 | * All Rights Reserved. 8 | * 9 | * NOTICE: All information contained herein is, and remains 10 | * the property of Realm Incorporated and its suppliers, 11 | * if any. The intellectual and technical concepts contained 12 | * herein are proprietary to Realm Incorporated 13 | * and its suppliers and may be covered by U.S. and Foreign Patents, 14 | * patents in process, and are protected by trade secret or copyright law. 15 | * Dissemination of this information or reproduction of this material 16 | * is strictly forbidden unless prior written permission is obtained 17 | * from Realm Incorporated. 18 | * 19 | **************************************************************************/ 20 | 21 | #include 22 | 23 | #ifndef REALM_SYNC_CHANGESET_COOKER_HPP 24 | #define REALM_SYNC_CHANGESET_COOKER_HPP 25 | 26 | namespace realm { 27 | namespace sync { 28 | 29 | /// Copy raw changesets unmodified. 30 | class TrivialChangesetCooker: public ClientHistory::ChangesetCooker { 31 | public: 32 | bool cook_changeset(const Group&, const char* changeset, 33 | std::size_t changeset_size, 34 | util::AppendBuffer&) override; 35 | }; 36 | 37 | } // namespace sync 38 | } // namespace realm 39 | 40 | #endif // REALM_SYNC_CHANGESET_COOKER_HPP 41 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/sync/crypto.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * REALM CONFIDENTIAL 4 | * __________________ 5 | * 6 | * [2011] - [2015] Realm Inc 7 | * All Rights Reserved. 8 | * 9 | * NOTICE: All information contained herein is, and remains 10 | * the property of Realm Incorporated and its suppliers, 11 | * if any. The intellectual and technical concepts contained 12 | * herein are proprietary to Realm Incorporated 13 | * and its suppliers and may be covered by U.S. and Foreign Patents, 14 | * patents in process, and are protected by trade secret or copyright law. 15 | * Dissemination of this information or reproduction of this material 16 | * is strictly forbidden unless prior written permission is obtained 17 | * from Realm Incorporated. 18 | * 19 | **************************************************************************/ 20 | 21 | #ifndef REALM_SYNC_CRYPTO_HPP 22 | #define REALM_SYNC_CRYPTO_HPP 23 | 24 | #include 25 | #include 26 | 27 | #include 28 | #include 29 | 30 | namespace realm { 31 | namespace sync { 32 | namespace crypto { 33 | 34 | /// sha1() calculates the sha1 hash value of \param in_buffer of size \param 35 | /// in_buffer_size. The value is placed in \param out_buffer. The value has 36 | /// size 20, and the caller must ensure that \param out_buffer has size at 37 | /// least 20. 38 | /// sha1() throws an exception if the underlying openssl implementation 39 | /// fails, which should just happen in case of memory allocation failure. 40 | void sha1(const char* in_buffer, size_t in_buffer_size, char* out_buffer); 41 | 42 | } // namespace crypto 43 | } // namespace sync 44 | } // namespace realm 45 | 46 | #endif // REALM_SYNC_CRYPTO_HPP 47 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/sync/feature_token.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * REALM CONFIDENTIAL 4 | * __________________ 5 | * 6 | * [2011] - [2012] Realm Inc 7 | * All Rights Reserved. 8 | * 9 | * NOTICE: All information contained herein is, and remains 10 | * the property of Realm Incorporated and its suppliers, 11 | * if any. The intellectual and technical concepts contained 12 | * herein are proprietary to Realm Incorporated 13 | * and its suppliers and may be covered by U.S. and Foreign Patents, 14 | * patents in process, and are protected by trade secret or copyright law. 15 | * Dissemination of this information or reproduction of this material 16 | * is strictly forbidden unless prior written permission is obtained 17 | * from Realm Incorporated. 18 | * 19 | **************************************************************************/ 20 | #ifndef REALM_SYNC_FEATURE_TOKEN_HPP 21 | #define REALM_SYNC_FEATURE_TOKEN_HPP 22 | 23 | #include 24 | #include 25 | 26 | namespace realm { 27 | namespace sync { 28 | 29 | #if !REALM_MOBILE 30 | #define REALM_HAVE_FEATURE_TOKENS 1 31 | 32 | void set_feature_token(StringData token); 33 | 34 | bool is_feature_enabled(StringData feature_name); 35 | #else 36 | #define REALM_HAVE_FEATURE_TOKENS 0 37 | #endif 38 | 39 | } // namespace sync 40 | } // namespace realm 41 | 42 | #endif // REALM_SYNC_FEATURE_TOKEN_HPP -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/sync/version.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * REALM CONFIDENTIAL 4 | * __________________ 5 | * 6 | * [2011] - [2013] Realm Inc 7 | * All Rights Reserved. 8 | * 9 | * NOTICE: All information contained herein is, and remains 10 | * the property of Realm Incorporated and its suppliers, 11 | * if any. The intellectual and technical concepts contained 12 | * herein are proprietary to Realm Incorporated 13 | * and its suppliers and may be covered by U.S. and Foreign Patents, 14 | * patents in process, and are protected by trade secret or copyright law. 15 | * Dissemination of this information or reproduction of this material 16 | * is strictly forbidden unless prior written permission is obtained 17 | * from Realm Incorporated. 18 | * 19 | **************************************************************************/ 20 | #ifndef REALM_SYNC_VERSION_HPP 21 | #define REALM_SYNC_VERSION_HPP 22 | 23 | #include 24 | 25 | #define REALM_SYNC_VER_MAJOR 1 26 | #define REALM_SYNC_VER_MINOR 10 27 | #define REALM_SYNC_VER_PATCH 8 28 | #define REALM_SYNC_PRODUCT_NAME "realm-sync" 29 | 30 | #define REALM_SYNC_VER_STRING REALM_QUOTE(REALM_SYNC_VER_MAJOR) "." \ 31 | REALM_QUOTE(REALM_SYNC_VER_MINOR) "." REALM_QUOTE(REALM_SYNC_VER_PATCH) 32 | #define REALM_SYNC_VER_CHUNK "[" REALM_SYNC_PRODUCT_NAME "-" REALM_SYNC_VER_STRING "]" 33 | 34 | #endif // REALM_SYNC_VERSION_HPP 35 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/util/basic_system_errors.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_UTIL_BASIC_SYSTEM_ERRORS_HPP 20 | #define REALM_UTIL_BASIC_SYSTEM_ERRORS_HPP 21 | 22 | #include 23 | #include 24 | 25 | 26 | namespace realm { 27 | namespace util { 28 | namespace error { 29 | 30 | enum basic_system_errors { 31 | /// Address family not supported by protocol. 32 | address_family_not_supported = EAFNOSUPPORT, 33 | 34 | /// Invalid argument. 35 | invalid_argument = EINVAL, 36 | 37 | /// Cannot allocate memory. 38 | no_memory = ENOMEM, 39 | 40 | /// Operation cancelled. 41 | operation_aborted = ECANCELED, 42 | 43 | /// Connection aborted. 44 | connection_aborted = ECONNABORTED, 45 | 46 | /// Connection reset by peer 47 | connection_reset = ECONNRESET, 48 | 49 | /// Broken pipe 50 | broken_pipe = EPIPE, 51 | 52 | /// Resource temporarily unavailable 53 | resource_unavailable_try_again = EAGAIN, 54 | }; 55 | 56 | std::error_code make_error_code(basic_system_errors) noexcept; 57 | 58 | } // namespace error 59 | } // namespace util 60 | } // namespace realm 61 | 62 | namespace std { 63 | 64 | template <> 65 | class is_error_code_enum { 66 | public: 67 | static const bool value = true; 68 | }; 69 | 70 | } // namespace std 71 | 72 | namespace realm { 73 | namespace util { 74 | 75 | std::error_code make_basic_system_error_code(int) noexcept; 76 | 77 | 78 | // implementation 79 | 80 | inline std::error_code make_basic_system_error_code(int err) noexcept 81 | { 82 | using namespace error; 83 | return make_error_code(basic_system_errors(err)); 84 | } 85 | 86 | } // namespace util 87 | } // namespace realm 88 | 89 | #endif // REALM_UTIL_BASIC_SYSTEM_ERRORS_HPP 90 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/util/call_with_tuple.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_UTIL_CALL_WITH_TUPLE_HPP 20 | #define REALM_UTIL_CALL_WITH_TUPLE_HPP 21 | 22 | #include 23 | #include 24 | 25 | namespace realm { 26 | namespace _impl { 27 | 28 | /// \cond doxygen_skip 29 | /// Doxygen warns about a recursive class relation, but this is intentional. 30 | 31 | template 32 | struct Indexes { 33 | }; 34 | template 35 | struct GenIndexes : GenIndexes { 36 | }; 37 | template 38 | struct GenIndexes<0, I...> { 39 | typedef Indexes type; 40 | }; 41 | 42 | /// \endcond 43 | 44 | template 45 | auto call_with_tuple(F func, std::tuple args, Indexes) -> decltype(func(std::get(args)...)) 46 | { 47 | static_cast(args); // Prevent GCC warning when tuple is empty 48 | return func(std::get(args)...); 49 | } 50 | 51 | } // namespace _impl 52 | 53 | namespace util { 54 | 55 | template 56 | auto call_with_tuple(F func, std::tuple args) 57 | -> decltype(_impl::call_with_tuple(std::move(func), std::move(args), 58 | typename _impl::GenIndexes::type())) 59 | { 60 | return _impl::call_with_tuple(std::move(func), std::move(args), typename _impl::GenIndexes::type()); 61 | } 62 | 63 | } // namespace util 64 | } // namespace realm 65 | 66 | #endif // REALM_UTIL_CALL_WITH_TUPLE_HPP 67 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/util/config.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * CAUTION: DO NOT EDIT THIS FILE -- YOUR CHANGES WILL BE LOST! 4 | * 5 | * This file is generated by config.sh 6 | * 7 | *************************************************************************/ 8 | 9 | #define REALM_VERSION "unknown" 10 | 11 | #define REALM_INSTALL_PREFIX "/Users/realm/workspace/m_realm-core_release_v2.8.6-TACCVQBSGHOUT7MO7V4FECJVQ6R2L5LUCEG2LZTNHXUHJ5LJ5MKQ/install" 12 | #define REALM_INSTALL_EXEC_PREFIX "/Users/realm/workspace/m_realm-core_release_v2.8.6-TACCVQBSGHOUT7MO7V4FECJVQ6R2L5LUCEG2LZTNHXUHJ5LJ5MKQ/install" 13 | #define REALM_INSTALL_INCLUDEDIR "/Users/realm/workspace/m_realm-core_release_v2.8.6-TACCVQBSGHOUT7MO7V4FECJVQ6R2L5LUCEG2LZTNHXUHJ5LJ5MKQ/install/include" 14 | #define REALM_INSTALL_BINDIR "/Users/realm/workspace/m_realm-core_release_v2.8.6-TACCVQBSGHOUT7MO7V4FECJVQ6R2L5LUCEG2LZTNHXUHJ5LJ5MKQ/install/bin" 15 | #define REALM_INSTALL_LIBDIR "/Users/realm/workspace/m_realm-core_release_v2.8.6-TACCVQBSGHOUT7MO7V4FECJVQ6R2L5LUCEG2LZTNHXUHJ5LJ5MKQ/install/lib" 16 | #define REALM_INSTALL_LIBEXECDIR "/Users/realm/workspace/m_realm-core_release_v2.8.6-TACCVQBSGHOUT7MO7V4FECJVQ6R2L5LUCEG2LZTNHXUHJ5LJ5MKQ/install/libexec" 17 | 18 | #ifdef REALM_DEBUG 19 | # define REALM_MAX_BPNODE_SIZE 1000 20 | #else 21 | # define REALM_MAX_BPNODE_SIZE 1000 22 | #endif 23 | 24 | #define REALM_ENABLE_ALLOC_SET_ZERO 0 25 | #define REALM_ENABLE_ENCRYPTION 1 26 | #define REALM_ENABLE_ASSERTIONS 1 27 | #define REALM_ENABLE_MEMDEBUG 0 28 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/util/hex_dump.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_UTIL_HEX_DUMP_HPP 20 | #define REALM_UTIL_HEX_DUMP_HPP 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #include 30 | 31 | namespace realm { 32 | namespace util { 33 | 34 | template 35 | std::string hex_dump(const T* data, size_t size, const char* separator = " ", int min_digits = -1) 36 | { 37 | using U = typename std::make_unsigned::type; 38 | 39 | if (min_digits < 0) 40 | min_digits = (std::numeric_limits::digits + 3) / 4; 41 | 42 | std::ostringstream out; 43 | for (const T* i = data; i != data + size; ++i) { 44 | if (i != data) 45 | out << separator; 46 | out << std::setw(min_digits) << std::setfill('0') << std::hex << std::uppercase << util::promote(U(*i)); 47 | } 48 | return out.str(); 49 | } 50 | 51 | } // namespace util 52 | } // namespace realm 53 | 54 | #endif // REALM_UTIL_HEX_DUMP_HPP 55 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/util/inspect.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_UTIL_INSPECT_HPP 20 | #define REALM_UTIL_INSPECT_HPP 21 | 22 | #include 23 | 24 | namespace realm { 25 | namespace util { 26 | 27 | // LCOV_EXCL_START 28 | // 29 | // Because these are templated functions, every combination of output stream 30 | // type and value(s) type(s) generates a new function. This makes LCOV/GCOVR 31 | // report over 70 functions in this file, with only 6.6% function coverage, 32 | // even though line coverage is at 100%. 33 | 34 | template 35 | void inspect_value(OS& os, const T& value) 36 | { 37 | os << value; 38 | } 39 | 40 | template 41 | void inspect_value(OS& os, const std::string& value) 42 | { 43 | // FIXME: Escape the string. 44 | os << "\"" << value << "\""; 45 | } 46 | 47 | template 48 | void inspect_value(OS& os, const char* value) 49 | { 50 | // FIXME: Escape the string. 51 | os << "\"" << value << "\""; 52 | } 53 | 54 | template 55 | void inspect_all(OS&) 56 | { 57 | // No-op 58 | } 59 | 60 | /// Convert all arguments to strings, and quote string arguments. 61 | template 62 | void inspect_all(OS& os, First&& first, Args&&... args) 63 | { 64 | inspect_value(os, std::forward(first)); 65 | if (sizeof...(Args) != 0) { 66 | os << ", "; 67 | } 68 | inspect_all(os, std::forward(args)...); 69 | } 70 | 71 | // LCOV_EXCL_STOP 72 | 73 | } // namespace util 74 | } // namespace realm 75 | 76 | #endif // REALM_UTIL_INSPECT_HPP 77 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/util/misc_errors.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_UTIL_MISC_ERRORS_HPP 20 | #define REALM_UTIL_MISC_ERRORS_HPP 21 | 22 | #include 23 | 24 | 25 | namespace realm { 26 | namespace util { 27 | namespace error { 28 | 29 | enum misc_errors { 30 | unknown = 1, 31 | }; 32 | 33 | std::error_code make_error_code(misc_errors); 34 | 35 | } // namespace error 36 | } // namespace util 37 | } // namespace realm 38 | 39 | namespace std { 40 | 41 | template <> 42 | class is_error_code_enum { 43 | public: 44 | static const bool value = true; 45 | }; 46 | 47 | } // namespace std 48 | 49 | #endif // REALM_UTIL_MISC_ERRORS_HPP 50 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/util/miscellaneous.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_UTIL_MISCELLANEOUS_HPP 20 | #define REALM_UTIL_MISCELLANEOUS_HPP 21 | 22 | #include 23 | 24 | namespace realm { 25 | namespace util { 26 | 27 | // FIXME: Replace this with std::add_const_t when we switch over to C++14 by 28 | // default. 29 | /// \brief Adds const qualifier, unless T already has the const qualifier 30 | template 31 | using add_const_t = typename std::add_const::type; 32 | 33 | // FIXME: Replace this with std::as_const when we switch over to C++17 by 34 | // default. 35 | /// \brief Forms an lvalue reference to const T 36 | template 37 | constexpr add_const_t& as_const(T& v) noexcept 38 | { 39 | return v; 40 | } 41 | 42 | /// \brief Disallows rvalue arguments 43 | template 44 | add_const_t& as_const(const T&&) = delete; 45 | 46 | } // namespace util 47 | } // namespace realm 48 | 49 | #endif // REALM_UTIL_MISCELLANEOUS_HPP 50 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/util/overload.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2017 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_UTIL_OVERLOAD_HPP 20 | #define REALM_UTIL_OVERLOAD_HPP 21 | 22 | #include 23 | 24 | namespace realm { 25 | 26 | namespace _impl { 27 | 28 | template 29 | struct Overloaded; 30 | 31 | } // namespace _impl 32 | 33 | 34 | namespace util { 35 | 36 | // Declare an overload set using lambdas or other function objects. 37 | // A minimal version of C++ Library Evolution Working Group proposal P0051R2. 38 | 39 | template 40 | _impl::Overloaded overload(Fns&&... f) 41 | { 42 | return _impl::Overloaded(std::forward(f)...); 43 | } 44 | 45 | } // namespace util 46 | 47 | 48 | namespace _impl { 49 | 50 | template 51 | struct Overloaded : Fn, Overloaded { 52 | template 53 | Overloaded(U&& fn, Rest&&... rest) : Fn(std::forward(fn)), Overloaded(std::forward(rest)...) { } 54 | 55 | using Fn::operator(); 56 | using Overloaded::operator(); 57 | }; 58 | 59 | template 60 | struct Overloaded : Fn { 61 | template 62 | Overloaded(U&& fn) : Fn(std::forward(fn)) { } 63 | 64 | using Fn::operator(); 65 | }; 66 | 67 | } // namespace _impl 68 | } // namespace realm 69 | 70 | #endif // REALM_UTIL_OVERLOAD_HPP 71 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/util/scope_exit.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_UTIL_SCOPE_EXIT_HPP 20 | #define REALM_UTIL_SCOPE_EXIT_HPP 21 | 22 | #include 23 | #include 24 | 25 | #include 26 | 27 | namespace realm { 28 | namespace util { 29 | 30 | template 31 | class ScopeExit { 32 | public: 33 | explicit ScopeExit(const H& handler) noexcept(std::is_nothrow_copy_constructible::value) 34 | : m_handler(handler) 35 | { 36 | } 37 | 38 | explicit ScopeExit(H&& handler) noexcept(std::is_nothrow_move_constructible::value) 39 | : m_handler(std::move(handler)) 40 | { 41 | } 42 | 43 | ScopeExit(ScopeExit&& se) noexcept(std::is_nothrow_move_constructible::value) 44 | : m_handler(std::move(se.m_handler)) 45 | { 46 | se.m_handler = none; 47 | } 48 | 49 | ~ScopeExit() noexcept 50 | { 51 | if (m_handler) 52 | (*m_handler)(); 53 | } 54 | 55 | static_assert(noexcept(std::declval()()), "Handler must be nothrow executable"); 56 | static_assert(std::is_nothrow_destructible::value, "Handler must be nothrow destructible"); 57 | 58 | private: 59 | util::Optional m_handler; 60 | }; 61 | 62 | template 63 | ScopeExit::type> make_scope_exit(H&& handler) noexcept( 64 | noexcept(ScopeExit::type>(std::forward(handler)))) 65 | { 66 | return ScopeExit::type>(std::forward(handler)); 67 | } 68 | 69 | } // namespace util 70 | } // namespace realm 71 | 72 | #endif // REALM_UTIL_SCOPE_EXIT_HPP 73 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/util/terminate.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_UTIL_TERMINATE_HPP 20 | #define REALM_UTIL_TERMINATE_HPP 21 | 22 | #include 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | #define REALM_TERMINATE(msg) realm::util::terminate((msg), __FILE__, __LINE__) 29 | 30 | namespace realm { 31 | namespace util { 32 | 33 | REALM_NORETURN void terminate(const char* message, const char* file, long line, 34 | std::initializer_list&& = {}) noexcept; 35 | REALM_NORETURN void terminate_with_info(const char* message, const char* file, long line, 36 | const char* interesting_names, 37 | std::initializer_list&& = {}) noexcept; 38 | 39 | // LCOV_EXCL_START 40 | template 41 | REALM_NORETURN void terminate(const char* message, const char* file, long line, Ts... infos) noexcept 42 | { 43 | static_assert(sizeof...(infos) == 2 || sizeof...(infos) == 4 || sizeof...(infos) == 6, 44 | "Called realm::util::terminate() with wrong number of arguments"); 45 | terminate(message, file, line, {Printable(infos)...}); 46 | } 47 | 48 | template 49 | REALM_NORETURN void terminate_with_info(const char* assert_message, int line, const char* file, 50 | const char* interesting_names, Args&&... interesting_values) noexcept 51 | { 52 | terminate_with_info(assert_message, file, line, interesting_names, {Printable(interesting_values)...}); 53 | } 54 | // LCOV_EXCL_STOP 55 | 56 | } // namespace util 57 | } // namespace realm 58 | 59 | #endif // REALM_UTIL_TERMINATE_HPP 60 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/version.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_VERSION_HPP 20 | #define REALM_VERSION_HPP 21 | 22 | #include 23 | 24 | #include 25 | 26 | 27 | #define REALM_VER_MAJOR 2 28 | #define REALM_VER_MINOR 8 29 | #define REALM_VER_PATCH 6 30 | #define REALM_VER_EXTRA "" 31 | #define REALM_PRODUCT_NAME "realm-core" 32 | 33 | #define REALM_VER_STRING \ 34 | REALM_QUOTE(REALM_VER_MAJOR) "." REALM_QUOTE(REALM_VER_MINOR) "." REALM_QUOTE(REALM_VER_PATCH) 35 | #define REALM_VER_CHUNK "[" REALM_PRODUCT_NAME "-" REALM_VER_STRING "]" 36 | 37 | namespace realm { 38 | 39 | enum Feature { 40 | feature_Debug, 41 | feature_Replication, 42 | }; 43 | 44 | class StringData; 45 | 46 | class Version { 47 | public: 48 | static int get_major() 49 | { 50 | return REALM_VER_MAJOR; 51 | } 52 | static int get_minor() 53 | { 54 | return REALM_VER_MINOR; 55 | } 56 | static int get_patch() 57 | { 58 | return REALM_VER_PATCH; 59 | } 60 | static StringData get_extra(); 61 | static std::string get_version(); 62 | static bool is_at_least(int major, int minor, int patch, StringData extra); 63 | static bool is_at_least(int major, int minor, int patch); 64 | static bool has_feature(Feature feature); 65 | }; 66 | 67 | 68 | } // namespace realm 69 | 70 | #endif // REALM_VERSION_HPP 71 | -------------------------------------------------------------------------------- /Pods/Realm/include/core/realm/version_id.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * Copyright 2016 Realm Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | **************************************************************************/ 18 | 19 | #ifndef REALM_VERSION_ID_HPP 20 | #define REALM_VERSION_ID_HPP 21 | 22 | #ifdef _WIN32 23 | #define __STDC_LIMIT_MACROS 24 | #endif 25 | 26 | #include 27 | 28 | namespace realm { 29 | 30 | struct VersionID { 31 | using version_type = uint_fast64_t; 32 | version_type version = std::numeric_limits::max(); 33 | uint_fast32_t index = 0; 34 | 35 | VersionID() 36 | { 37 | } 38 | VersionID(version_type initial_version, uint_fast32_t initial_index) 39 | { 40 | version = initial_version; 41 | index = initial_index; 42 | } 43 | 44 | bool operator==(const VersionID& other) 45 | { 46 | return version == other.version; 47 | } 48 | bool operator!=(const VersionID& other) 49 | { 50 | return version != other.version; 51 | } 52 | bool operator<(const VersionID& other) 53 | { 54 | return version < other.version; 55 | } 56 | bool operator<=(const VersionID& other) 57 | { 58 | return version <= other.version; 59 | } 60 | bool operator>(const VersionID& other) 61 | { 62 | return version > other.version; 63 | } 64 | bool operator>=(const VersionID& other) 65 | { 66 | return version >= other.version; 67 | } 68 | }; 69 | 70 | } // namespace realm 71 | 72 | #endif // REALM_VERSION_ID_HPP 73 | -------------------------------------------------------------------------------- /Pods/Realm/include/feature_checks.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2017 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifndef REALM_OS_FEATURE_CHECKS_HPP 20 | #define REALM_OS_FEATURE_CHECKS_HPP 21 | 22 | #include 23 | 24 | #ifndef REALM_VERSION_MAJOR 25 | #define REALM_VERSION_MAJOR REALM_VER_MAJOR 26 | #endif 27 | 28 | #define REALM_HAVE_COMPOSABLE_DISTINCT (REALM_VERSION_MAJOR > 2) 29 | 30 | #if REALM_ENABLE_SYNC 31 | 32 | #include 33 | #define REALM_HAVE_SYNC_STABLE_IDS (REALM_SYNC_VER_MAJOR > 1) 34 | 35 | #else 36 | 37 | #define REALM_HAVE_SYNC_STABLE_IDS 0 38 | 39 | #endif // REALM_ENABLE_SYNC 40 | 41 | #endif // REALM_OS_FEATURE_CHECKS_HPP 42 | -------------------------------------------------------------------------------- /Pods/Realm/include/impl/apple/keychain_helper.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifndef REALM_OS_KEYCHAIN_HELPER_HPP 20 | #define REALM_OS_KEYCHAIN_HELPER_HPP 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | namespace realm { 27 | namespace keychain { 28 | 29 | std::vector metadata_realm_encryption_key(); 30 | 31 | class KeychainAccessException : public std::runtime_error { 32 | public: 33 | KeychainAccessException(int32_t error_code); 34 | }; 35 | 36 | } 37 | } 38 | 39 | #endif // REALM_OS_KEYCHAIN_HELPER_HPP 40 | -------------------------------------------------------------------------------- /Pods/Realm/include/impl/external_commit_helper.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifndef REALM_EXTERNAL_COMMIT_HELPER_HPP 20 | #define REALM_EXTERNAL_COMMIT_HELPER_HPP 21 | 22 | #include 23 | 24 | #if (defined(REALM_HAVE_EPOLL) && REALM_HAVE_EPOLL) || REALM_ANDROID || (defined(REALM_PLATFORM_NODE) && REALM_PLATFORM_NODE && !REALM_PLATFORM_APPLE && !defined(_WIN32)) 25 | #define REALM_USE_EPOLL 1 26 | #else 27 | #define REALM_USE_EPOLL 0 28 | #endif 29 | 30 | #if REALM_PLATFORM_APPLE 31 | #include "impl/apple/external_commit_helper.hpp" 32 | #elif REALM_USE_EPOLL 33 | #include "impl/epoll/external_commit_helper.hpp" 34 | #elif defined(_WIN32) 35 | #include "impl/windows/external_commit_helper.hpp" 36 | #else 37 | #include "impl/generic/external_commit_helper.hpp" 38 | #endif 39 | 40 | #endif // REALM_EXTERNAL_COMMIT_HELPER_HPP 41 | -------------------------------------------------------------------------------- /Pods/Realm/include/impl/list_notifier.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifndef REALM_LIST_NOTIFIER_HPP 20 | #define REALM_LIST_NOTIFIER_HPP 21 | 22 | #include "impl/collection_notifier.hpp" 23 | 24 | #include 25 | 26 | namespace realm { 27 | namespace _impl { 28 | class ListNotifier : public CollectionNotifier { 29 | public: 30 | ListNotifier(LinkViewRef lv, std::shared_ptr realm); 31 | 32 | private: 33 | // The linkview, in handover form if this has not been attached to the main 34 | // SharedGroup yet 35 | LinkViewRef m_lv; 36 | std::unique_ptr> m_lv_handover; 37 | 38 | // The last-seen size of the LinkView so that we can report row deletions 39 | // when the LinkView itself is deleted 40 | size_t m_prev_size; 41 | 42 | // The actual change, calculated in run() and delivered in prepare_handover() 43 | CollectionChangeBuilder m_change; 44 | TransactionChangeInfo* m_info; 45 | 46 | void run() override; 47 | 48 | void do_prepare_handover(SharedGroup&) override; 49 | 50 | void do_attach_to(SharedGroup& sg) override; 51 | void do_detach_from(SharedGroup& sg) override; 52 | 53 | void release_data() noexcept override; 54 | bool do_add_required_change_info(TransactionChangeInfo& info) override; 55 | }; 56 | } 57 | } 58 | 59 | #endif // REALM_LIST_NOTIFIER_HPP 60 | -------------------------------------------------------------------------------- /Pods/Realm/include/impl/object_notifier.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2017 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifndef REALM_OS_OBJECT_NOTIFIER_HPP 20 | #define REALM_OS_OBJECT_NOTIFIER_HPP 21 | 22 | #include "impl/collection_notifier.hpp" 23 | 24 | #include 25 | 26 | namespace realm { 27 | namespace _impl { 28 | class ObjectNotifier : public CollectionNotifier { 29 | public: 30 | ObjectNotifier(Row const& row, std::shared_ptr realm); 31 | 32 | private: 33 | std::unique_ptr m_row; 34 | std::unique_ptr> m_handover; 35 | 36 | // The actual change, calculated in run() and delivered in prepare_handover() 37 | CollectionChangeBuilder m_change; 38 | TransactionChangeInfo* m_info; 39 | 40 | void run() override; 41 | 42 | void do_prepare_handover(SharedGroup&) override; 43 | 44 | void do_attach_to(SharedGroup& sg) override; 45 | void do_detach_from(SharedGroup& sg) override; 46 | 47 | void release_data() noexcept override; 48 | bool do_add_required_change_info(TransactionChangeInfo& info) override; 49 | }; 50 | } 51 | } 52 | 53 | #endif // REALM_OS_OBJECT_NOTIFIER_HPP 54 | -------------------------------------------------------------------------------- /Pods/Realm/include/impl/transact_log_handler.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2015 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifndef REALM_TRANSACT_LOG_HANDLER_HPP 20 | #define REALM_TRANSACT_LOG_HANDLER_HPP 21 | 22 | #include 23 | #include 24 | 25 | #include 26 | 27 | namespace realm { 28 | class BindingContext; 29 | class SharedGroup; 30 | 31 | namespace _impl { 32 | class NotifierPackage; 33 | struct TransactionChangeInfo; 34 | 35 | namespace transaction { 36 | // Advance the read transaction version, with change notifications sent to delegate 37 | // Must not be called from within a write transaction. 38 | void advance(const std::unique_ptr& sg, BindingContext* binding_context, NotifierPackage&); 39 | void advance(SharedGroup& sg, BindingContext* binding_context, VersionID); 40 | 41 | // Begin a write transaction 42 | // If the read transaction version is not up to date, will first advance to the 43 | // most recent read transaction and sent notifications to delegate 44 | void begin(const std::unique_ptr& sg, BindingContext* binding_context, NotifierPackage&); 45 | void begin_without_validation(SharedGroup& sg); 46 | 47 | // Commit a write transaction 48 | void commit(SharedGroup& sg); 49 | 50 | // Cancel a write transaction and roll back all changes, with change notifications 51 | // for reverting to the old values sent to delegate 52 | void cancel(SharedGroup& sg, BindingContext* binding_context); 53 | 54 | // Advance the read transaction version, with change information gathered in info 55 | void advance(SharedGroup& sg, TransactionChangeInfo& info, VersionID version=VersionID{}); 56 | } // namespace transaction 57 | } // namespace _impl 58 | } // namespace realm 59 | 60 | #endif /* REALM_TRANSACT_LOG_HANDLER_HPP */ 61 | -------------------------------------------------------------------------------- /Pods/Realm/include/sync/impl/apple/network_reachability_observer.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifndef REALM_OS_NETWORK_REACHABILITY_OBSERVER_HPP 20 | #define REALM_OS_NETWORK_REACHABILITY_OBSERVER_HPP 21 | 22 | #include 23 | #include 24 | 25 | #include 26 | #include 27 | 28 | #include "sync/impl/network_reachability.hpp" 29 | 30 | #if NETWORK_REACHABILITY_AVAILABLE 31 | 32 | #include "sync/impl/apple/system_configuration.hpp" 33 | 34 | namespace realm { 35 | namespace _impl { 36 | 37 | enum NetworkReachabilityStatus { 38 | NotReachable, 39 | ReachableViaWiFi, 40 | ReachableViaWWAN 41 | }; 42 | 43 | class NetworkReachabilityObserver { 44 | public: 45 | NetworkReachabilityObserver(util::Optional hostname, 46 | std::function handler); 47 | 48 | ~NetworkReachabilityObserver(); 49 | 50 | NetworkReachabilityStatus reachability_status() const; 51 | 52 | bool start_observing(); 53 | void stop_observing(); 54 | 55 | private: 56 | void reachability_changed(); 57 | 58 | util::CFPtr m_reachability_ref; 59 | NetworkReachabilityStatus m_previous_status; 60 | dispatch_queue_t m_callback_queue; 61 | std::function m_change_handler; 62 | }; 63 | 64 | } // namespace _impl 65 | } // namespace realm 66 | 67 | #endif // NETWORK_REACHABILITY_AVAILABLE 68 | 69 | #endif // REALM_OS_NETWORK_REACHABILITY_OBSERVER_HPP 70 | -------------------------------------------------------------------------------- /Pods/Realm/include/sync/impl/network_reachability.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2017 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifndef REALM_OS_NETWORK_REACHABILITY_HPP 20 | #define REALM_OS_NETWORK_REACHABILITY_HPP 21 | 22 | #include 23 | 24 | #if REALM_PLATFORM_APPLE 25 | #define NETWORK_REACHABILITY_AVAILABLE !REALM_WATCHOS 26 | #else 27 | #define NETWORK_REACHABILITY_AVAILABLE 0 28 | #endif 29 | 30 | #endif // REALM_OS_NETWORK_REACHABILITY_HPP 31 | -------------------------------------------------------------------------------- /Pods/Realm/include/util/aligned_union.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or utilied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifndef REALM_OS_ALIGNED_UNION_HPP 20 | #define REALM_OS_ALIGNED_UNION_HPP 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | namespace realm { 27 | 28 | // Provide our own implementation of max as GCC 4.9's is not marked as constexpr. 29 | namespace _impl { 30 | 31 | template 32 | static constexpr const T& constexpr_max(const T& a, const T& b) 33 | { 34 | return a > b ? a : b; 35 | } 36 | 37 | template 38 | static constexpr const T& constexpr_max(const T* begin, const T *end) 39 | { 40 | return begin + 1 == end ? *begin : constexpr_max(*begin, constexpr_max(begin + 1, end)); 41 | } 42 | 43 | template 44 | static constexpr const T& constexpr_max(std::initializer_list list) 45 | { 46 | return constexpr_max(list.begin(), list.end()); 47 | } 48 | 49 | } // namespace _impl 50 | 51 | namespace util { 52 | 53 | // Provide our own implementation of `std::aligned_union` as it is missing from GCC 4.9. 54 | template 55 | struct AlignedUnion 56 | { 57 | static constexpr size_t alignment_value = _impl::constexpr_max({alignof(Types)...}); 58 | static constexpr size_t storage_size = _impl::constexpr_max({Len, sizeof(Types)...}); 59 | using type = typename std::aligned_storage::type; 60 | }; 61 | 62 | } // namespace util 63 | } // namespace realm 64 | 65 | #endif // REALM_OS_ALIGNED_UNION_HPP 66 | -------------------------------------------------------------------------------- /Pods/Realm/include/util/compiler.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2015 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifndef REALM_UTIL_COMPILER_HPP 20 | #define REALM_UTIL_COMPILER_HPP 21 | 22 | #ifdef __has_cpp_attribute 23 | #define REALM_HAS_CPP_ATTRIBUTE(attr) __has_cpp_attribute(attr) 24 | #else 25 | #define REALM_HAS_CPP_ATTRIBUTE(attr) 0 26 | #endif 27 | 28 | #if REALM_HAS_CPP_ATTRIBUTE(fallthrough) 29 | #define REALM_FALLTHROUGH [[fallthrough]] 30 | #elif REALM_HAS_CPP_ATTRIBUTE(clang::fallthrough) 31 | #define REALM_FALLTHROUGH [[clang::fallthrough]] 32 | #else 33 | #define REALM_FALLTHROUGH 34 | #endif 35 | 36 | // This should be renamed to REALM_UNREACHABLE as soon as REALM_UNREACHABLE is renamed to 37 | // REALM_ASSERT_NOT_REACHED which will better reflect its nature 38 | #if __GNUC__ || __clang__ 39 | #define REALM_COMPILER_HINT_UNREACHABLE __builtin_unreachable 40 | #else 41 | #define REALM_COMPILER_HINT_UNREACHABLE abort 42 | #endif 43 | 44 | #endif // REALM_UTIL_COMPILER_HPP 45 | -------------------------------------------------------------------------------- /Pods/Realm/include/util/event_loop_signal.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or utilied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifndef REALM_EVENT_LOOP_SIGNAL_HPP 20 | #define REALM_EVENT_LOOP_SIGNAL_HPP 21 | 22 | #include 23 | 24 | #if (defined(REALM_HAVE_UV) && REALM_HAVE_UV && !REALM_PLATFORM_APPLE) || (defined(REALM_PLATFORM_NODE) && REALM_PLATFORM_NODE) 25 | #define REALM_USE_UV 1 26 | #else 27 | #define REALM_USE_UV 0 28 | #endif 29 | 30 | #if !defined(REALM_USE_CF) && REALM_PLATFORM_APPLE 31 | #define REALM_USE_CF 1 32 | #elif !defined(REALM_USE_ALOOPER) && REALM_ANDROID 33 | #define REALM_USE_ALOOPER 1 34 | #endif 35 | 36 | #if REALM_USE_UV 37 | #include "util/uv/event_loop_signal.hpp" 38 | #elif REALM_USE_CF 39 | #include "util/apple/event_loop_signal.hpp" 40 | #elif REALM_USE_ALOOPER 41 | #include "util/android/event_loop_signal.hpp" 42 | #else 43 | #include "util/generic/event_loop_signal.hpp" 44 | #endif 45 | 46 | #endif // REALM_EVENT_LOOP_SIGNAL_HPP 47 | -------------------------------------------------------------------------------- /Pods/Realm/include/util/tagged_bool.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2017 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifndef REALM_OS_UTIL_TAGGED_BOOL_HPP 20 | #define REALM_OS_UTIL_TAGGED_BOOL_HPP 21 | 22 | #include 23 | 24 | namespace realm { 25 | namespace util { 26 | // A type factory which defines a type which is implicitly convertable to and 27 | // from `bool`, but not to other TaggedBool types 28 | // 29 | // Usage: 30 | // using IsIndexed = util::TaggedBool; 31 | // using IsPrimary = util::TaggedBool; 32 | // void foo(IsIndexed is_indexed, IsPrimary is_primary); 33 | // 34 | // foo(IsIndexed{true}, IsPrimary{false}); // compiles 35 | // foo(IsPrimary{true}, IsIndexed{false}); // doesn't compile 36 | template 37 | struct TaggedBool { 38 | // Allow explicit construction from anything convertible to bool 39 | constexpr explicit TaggedBool(bool v) : m_value(v) { } 40 | 41 | // Allow implicit construction from *just* bool and not things convertible 42 | // to bool (such as other types of tagged bools) 43 | template ::value>::type> 44 | constexpr TaggedBool(Bool v) : m_value(v) {} 45 | 46 | constexpr TaggedBool(TaggedBool const& v) : m_value(v.m_value) {} 47 | 48 | constexpr operator bool() const { return m_value; } 49 | constexpr TaggedBool operator!() const { return TaggedBool{!m_value}; } 50 | 51 | friend constexpr bool operator==(TaggedBool l, TaggedBool r) { return l.m_value == r.m_value; } 52 | friend constexpr bool operator!=(TaggedBool l, TaggedBool r) { return l.m_value != r.m_value; } 53 | 54 | private: 55 | bool m_value; 56 | }; 57 | 58 | } 59 | } 60 | #endif // REALM_OS_UTIL_TAGGED_BOOL_HPP 61 | -------------------------------------------------------------------------------- /Pods/Realm/include/util/time.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2017 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifndef REALM_OS_UTIL_TIME_HPP 20 | #define REALM_OS_UTIL_TIME_HPP 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | namespace realm { 28 | namespace util { 29 | 30 | // Like std::localtime, but safe with reentrancy and multiple threads. 31 | inline std::tm localtime(std::time_t time) 32 | { 33 | std::tm calendar_time; 34 | #ifdef _WIN32 35 | auto* result = localtime_s(&time, &calendar_time); 36 | #else 37 | auto* result = localtime_r(&time, &calendar_time); 38 | #endif 39 | if (!result) 40 | throw std::system_error(errno, std::system_category()); 41 | 42 | return calendar_time; 43 | } 44 | 45 | // Like std::put_time, but compatible with GCC 4.9. 46 | inline std::string put_time(std::time_t time, const char *format) 47 | { 48 | std::tm calendar_time = localtime(time); 49 | size_t estimated_length = std::strlen(format) + 1; 50 | 51 | size_t formatted_length; 52 | std::string buffer; 53 | 54 | // Loop until the buffer is large enough to hold the string generated by `strftime`, growing the 55 | // buffer by 8 characters whenever it is too small to hold the resulting string. 56 | do { 57 | buffer.resize(estimated_length); 58 | formatted_length = strftime(&buffer[0], buffer.size(), format, &calendar_time); 59 | estimated_length += 8; 60 | } while (formatted_length == 0); 61 | 62 | buffer.resize(formatted_length); 63 | return buffer; 64 | } 65 | 66 | } // namespace util 67 | } // namespace realm 68 | 69 | #endif // REALM_OS_UTIL_TIME_HPP 70 | -------------------------------------------------------------------------------- /Pods/Realm/include/util/uuid.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2017 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifndef REALM_OS_UTIL_UUID_HPP 20 | #define REALM_OS_UTIL_UUID_HPP 21 | 22 | #include 23 | 24 | namespace realm { 25 | namespace util { 26 | 27 | // Generate a random UUID and return its formatted string representation. 28 | std::string uuid_string(); 29 | 30 | } // namespace util 31 | } // namespace realm 32 | 33 | #endif // REALM_OS_UTIL_UUID_HPP 34 | -------------------------------------------------------------------------------- /Pods/RealmSwift/RealmSwift/Aliases.swift: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | import Foundation 20 | import Realm 21 | 22 | // These types don't change when wrapping in Swift 23 | // so we just typealias them to remove the 'RLM' prefix 24 | 25 | // MARK: Aliases 26 | 27 | /** 28 | `PropertyType` is an enum describing all property types supported in Realm models. 29 | 30 | For more information, see [Realm Models](https://realm.io/docs/swift/latest/#models). 31 | 32 | ### Primitive types 33 | 34 | * `Int` 35 | * `Bool` 36 | * `Float` 37 | * `Double` 38 | 39 | ### Object types 40 | 41 | * `String` 42 | * `Data` 43 | * `Date` 44 | 45 | ### Relationships: Array (in Swift, `List`) and `Object` types 46 | 47 | * `Object` 48 | * `Array` 49 | */ 50 | public typealias PropertyType = RLMPropertyType 51 | 52 | /** 53 | An opaque token which is returned from methods which subscribe to changes to a Realm. 54 | 55 | - see: `addNotificationBlock(_:)` 56 | */ 57 | public typealias NotificationToken = RLMNotificationToken 58 | -------------------------------------------------------------------------------- /Pods/RealmSwift/RealmSwift/Optional.swift: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2015 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | import Realm 20 | 21 | /// A protocol describing types that can parameterize a `RealmOptional`. 22 | public protocol RealmOptionalType {} 23 | extension Int: RealmOptionalType {} 24 | extension Int8: RealmOptionalType {} 25 | extension Int16: RealmOptionalType {} 26 | extension Int32: RealmOptionalType {} 27 | extension Int64: RealmOptionalType {} 28 | extension Float: RealmOptionalType {} 29 | extension Double: RealmOptionalType {} 30 | extension Bool: RealmOptionalType {} 31 | 32 | /** 33 | A `RealmOptional` instance represents an optional value for types that can't be directly declared as `dynamic` in Swift, 34 | such as `Int`, `Float`, `Double`, and `Bool`. 35 | 36 | To change the underlying value stored by a `RealmOptional` instance, mutate the instance's `value` property. 37 | */ 38 | public final class RealmOptional: RLMOptionalBase { 39 | /// The value the optional represents. 40 | public var value: T? { 41 | get { 42 | return underlyingValue.map(dynamicBridgeCast) 43 | } 44 | set { 45 | underlyingValue = newValue.map(dynamicBridgeCast) 46 | } 47 | } 48 | 49 | /** 50 | Creates a `RealmOptional` instance encapsulating the given default value. 51 | 52 | - parameter value: The value to store in the optional, or `nil` if not specified. 53 | */ 54 | public init(_ value: T? = nil) { 55 | super.init() 56 | self.value = value 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Pods/RealmSwift/RealmSwift/Schema.swift: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | import Foundation 20 | import Realm 21 | 22 | /** 23 | `Schema` instances represent collections of model object schemas managed by a Realm. 24 | 25 | When using Realm, `Schema` instances allow performing migrations and introspecting the database's schema. 26 | 27 | Schemas map to collections of tables in the core database. 28 | */ 29 | public struct Schema: CustomStringConvertible { 30 | 31 | // MARK: Properties 32 | 33 | internal let rlmSchema: RLMSchema 34 | 35 | /** 36 | An array of `ObjectSchema`s for all object types in the Realm. 37 | 38 | This property is intended to be used during migrations for dynamic introspection. 39 | */ 40 | public var objectSchema: [ObjectSchema] { 41 | return rlmSchema.objectSchema.map(ObjectSchema.init) 42 | } 43 | 44 | /// A human-readable description of the object schemas contained within. 45 | public var description: String { return rlmSchema.description } 46 | 47 | // MARK: Initializers 48 | 49 | internal init(_ rlmSchema: RLMSchema) { 50 | self.rlmSchema = rlmSchema 51 | } 52 | 53 | // MARK: ObjectSchema Retrieval 54 | 55 | /// Looks up and returns an `ObjectSchema` for the given class name in the Realm, if it exists. 56 | public subscript(className: String) -> ObjectSchema? { 57 | if let rlmObjectSchema = rlmSchema.schema(forClassName: className) { 58 | return ObjectSchema(rlmObjectSchema) 59 | } 60 | return nil 61 | } 62 | } 63 | 64 | // MARK: Equatable 65 | 66 | extension Schema: Equatable { 67 | /// Returns whether the two schemas are equal. 68 | public static func == (lhs: Schema, rhs: Schema) -> Bool { 69 | return lhs.rlmSchema.isEqual(to: rhs.rlmSchema) 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Pods/RealmSwift/RealmSwift/SwiftVersion.swift: -------------------------------------------------------------------------------- 1 | let swiftLanguageVersion = "3.1" 2 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-WebViewGraphOfSwift/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-WebViewGraphOfSwift/Pods-WebViewGraphOfSwift-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_WebViewGraphOfSwift : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_WebViewGraphOfSwift 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-WebViewGraphOfSwift/Pods-WebViewGraphOfSwift-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_WebViewGraphOfSwiftVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_WebViewGraphOfSwiftVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-WebViewGraphOfSwift/Pods-WebViewGraphOfSwift.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Realm" "$PODS_CONFIGURATION_BUILD_DIR/RealmSwift" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Realm/Realm.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RealmSwift/RealmSwift.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "Realm" -framework "RealmSwift" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-WebViewGraphOfSwift/Pods-WebViewGraphOfSwift.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_WebViewGraphOfSwift { 2 | umbrella header "Pods-WebViewGraphOfSwift-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-WebViewGraphOfSwift/Pods-WebViewGraphOfSwift.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Realm" "$PODS_CONFIGURATION_BUILD_DIR/RealmSwift" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Realm/Realm.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RealmSwift/RealmSwift.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "Realm" -framework "RealmSwift" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Realm/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.10.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Realm/Realm-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Realm : NSObject 3 | @end 4 | @implementation PodsDummy_Realm 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Realm/Realm-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Realm/Realm.modulemap: -------------------------------------------------------------------------------- 1 | framework module Realm { 2 | umbrella header "Realm.h" 3 | 4 | export * 5 | module * { export * } 6 | 7 | explicit module Private { 8 | header "RLMAccessor.h" 9 | header "RLMArray_Private.h" 10 | header "RLMCollection_Private.h" 11 | header "RLMListBase.h" 12 | header "RLMObject_Private.h" 13 | header "RLMObjectBase_Dynamic.h" 14 | header "RLMObjectBase_Private.h" 15 | header "RLMObjectSchema_Private.h" 16 | header "RLMObjectStore.h" 17 | header "RLMOptionalBase.h" 18 | header "RLMProperty_Private.h" 19 | header "RLMRealm_Private.h" 20 | header "RLMRealmConfiguration_Private.h" 21 | header "RLMResults_Private.h" 22 | header "RLMSchema_Private.h" 23 | header "RLMSyncConfiguration_Private.h" 24 | header "RLMSyncUtil_Private.h" 25 | } 26 | 27 | explicit module Dynamic { 28 | header "RLMRealm_Dynamic.h" 29 | header "RLMObjectBase_Dynamic.h" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Realm/Realm.xcconfig: -------------------------------------------------------------------------------- 1 | APPLICATION_EXTENSION_API_ONLY = YES 2 | CLANG_CXX_LANGUAGE_STANDARD = c++14 3 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Realm 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 6 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Realm/core" 7 | OTHER_CPLUSPLUSFLAGS = -isystem "${PODS_ROOT}/Realm/include/core" 8 | OTHER_LDFLAGS = -l"c++" -l"realmcore-ios" -l"z" 9 | PODS_BUILD_DIR = $BUILD_DIR 10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_ROOT = ${SRCROOT} 12 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Realm 13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 14 | SKIP_INSTALL = YES 15 | USER_HEADER_SEARCH_PATHS = "${PODS_ROOT}/Realm/include" "${PODS_ROOT}/Realm/include/Realm" 16 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RealmSwift/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.10.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RealmSwift/RealmSwift-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_RealmSwift : NSObject 3 | @end 4 | @implementation PodsDummy_RealmSwift 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RealmSwift/RealmSwift-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RealmSwift/RealmSwift-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double RealmSwiftVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char RealmSwiftVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RealmSwift/RealmSwift.modulemap: -------------------------------------------------------------------------------- 1 | framework module RealmSwift { 2 | umbrella header "RealmSwift-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RealmSwift/RealmSwift.xcconfig: -------------------------------------------------------------------------------- 1 | APPLICATION_EXTENSION_API_ONLY = YES 2 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/RealmSwift 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Realm" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 6 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/RealmSwift 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | SWIFT_WHOLE_MODULE_OPTIMIZATION = YES 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WebViewGraphOfSwift 2 | [ING]WebViewとChart.jsでグラフ表示をする&Realmを使ったカロリー記録サンプルアプリ(iOS Sample Study: Swift) 3 | 4 | 今回ですが、実際のアプリに近い想定でグラフ付きのカロリーデータ記録系のアプリのサンプルを作成しました。 5 | 6 | 7 | ![今回のサンプルの画面一覧](https://qiita-image-store.s3.amazonaws.com/0/17400/5d7b8dc8-e45a-0ab3-1f5f-43dfb87f448c.png) 8 | 9 | 10 | 本サンプルの具体的な機能としては、 11 | 12 | + Realmの基本的な扱い方とデータ永続化処理の実装 13 | + Realmで画像の投稿を可能にする 14 | + テキストフィールドの細かな設定や扱い方 15 | + HTML5とCanvasで動作するChart.jsを利用したなめらかに動くグラフの実装 16 | + その他TableViewスワイプでの削除処理とそれに伴うデータ一覧&グラフの更新処理 17 | 18 | があります。 19 | 20 | 詳細な解説&実装のポイントになる部分はこちらに掲載しておりますので、是非とも実機などがおありの場合はインストールをして挙動や振る舞いをご確認いただければと思います。 21 | 22 | (Qiita) http://qiita.com/fumiyasac@github/items/7463e0e1ea149ee4e9f7 23 | -------------------------------------------------------------------------------- /WebViewGraphOfSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WebViewGraphOfSwift.xcodeproj/project.xcworkspace/xcuserdata/sakaifumiya.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fumiyasac/WebViewGraphOfSwift/6f01162622ea836ed18a4ea4f58b6d2692177006/WebViewGraphOfSwift.xcodeproj/project.xcworkspace/xcuserdata/sakaifumiya.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /WebViewGraphOfSwift.xcodeproj/xcuserdata/sakaifumiya.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | WebViewGraphOfSwift.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | DE702B8D1C1F20BD001C842D 16 | 17 | primary 18 | 19 | 20 | DE702BA11C1F20BE001C842D 21 | 22 | primary 23 | 24 | 25 | DE702BAC1C1F20BE001C842D 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /WebViewGraphOfSwift.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /WebViewGraphOfSwift.xcworkspace/xcuserdata/sakaifumiya.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fumiyasac/WebViewGraphOfSwift/6f01162622ea836ed18a4ea4f58b6d2692177006/WebViewGraphOfSwift.xcworkspace/xcuserdata/sakaifumiya.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /WebViewGraphOfSwift.xcworkspace/xcuserdata/sakaifumiya.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /WebViewGraphOfSwift/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // WebViewGraphOfSwift 4 | // 5 | // Created by 酒井文也 on 2015/12/15. 6 | // Copyright © 2015年 just1factory. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // 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. 24 | // 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. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // 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. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /WebViewGraphOfSwift/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /WebViewGraphOfSwift/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /WebViewGraphOfSwift/CalorieDataCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CalorieDataCell.swift 3 | // WebViewGraphOfSwift 4 | // 5 | // Created by 酒井文也 on 2015/12/17. 6 | // Copyright © 2015年 just1factory. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class CalorieDataCell: UITableViewCell { 12 | 13 | //画面に配置された部品 14 | @IBOutlet var calorieImage: UIImageView! 15 | @IBOutlet var calorieTitle: UILabel! 16 | @IBOutlet var calorieDate: UILabel! 17 | @IBOutlet var calorieValue: UILabel! 18 | 19 | override func awakeFromNib() { 20 | super.awakeFromNib() 21 | } 22 | 23 | override func setSelected(_ selected: Bool, animated: Bool) { 24 | super.setSelected(selected, animated: animated) 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /WebViewGraphOfSwift/ChangeDateOrString.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChangeDateOrString.swift 3 | // WebViewGraphOfSwift 4 | // 5 | // Created by 酒井文也 on 2015/12/18. 6 | // Copyright © 2015年 just1factory. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | //日付をDateまたはStringの相互変換用のstruct 12 | struct ChangeDateOrString { 13 | 14 | //NSDate → Stringへの変換 15 | static func convertDateToString (_ date: Date) -> String { 16 | 17 | let dateFormatter: DateFormatter = DateFormatter() 18 | dateFormatter.locale = Locale(identifier: "ja_JP") 19 | dateFormatter.dateFormat = "yyyy/MM/dd" 20 | let dateString: String = dateFormatter.string(from: date) 21 | return dateString 22 | } 23 | 24 | //String → NSDateへの変換 25 | static func convertStringToDate (_ dateString: String!) -> Date { 26 | 27 | if dateString != nil { 28 | let dateFormatter: DateFormatter = DateFormatter() 29 | dateFormatter.locale = Locale(identifier: "ja") 30 | dateFormatter.dateFormat = "yyyy/MM/dd" 31 | let stringDate: Date = dateFormatter.date(from: dateString)! 32 | return stringDate 33 | } else { 34 | let date = Date() 35 | return date 36 | } 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /WebViewGraphOfSwift/GraphStatus.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GraphStatus.swift 3 | // WebViewGraphOfSwift 4 | // 5 | // Created by 酒井文也 on 2015/12/17. 6 | // Copyright © 2015年 just1factory. All rights reserved. 7 | // 8 | 9 | //グラフのパターンを定義したenum 10 | enum GraphStatus { 11 | 12 | case barGraph 13 | case lineGraph 14 | 15 | //初期値を返す 16 | func initalValue() -> Int { 17 | return 0 18 | } 19 | 20 | //状態に対応する値を返す 21 | func returnValue() -> Int { 22 | switch (self) { 23 | case .barGraph: 24 | return 0 25 | case .lineGraph: 26 | return 1 27 | } 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /WebViewGraphOfSwift/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSPhotoLibraryUsageDescription 6 | uses pictures to save calorie data store. 7 | NSCameraUsageDescription 8 | uses pictures to save calorie data store. 9 | CFBundleDevelopmentRegion 10 | en 11 | CFBundleExecutable 12 | $(EXECUTABLE_NAME) 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | $(PRODUCT_NAME) 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1 27 | LSRequiresIPhoneOS 28 | 29 | UILaunchStoryboardName 30 | LaunchScreen 31 | UIMainStoryboardFile 32 | Main 33 | UIRequiredDeviceCapabilities 34 | 35 | armv7 36 | 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /WebViewGraphOfSwift/TextFieldIdentifier.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TextFieldIdentifier.swift 3 | // WebViewGraphOfSwift 4 | // 5 | // Created by 酒井文也 on 2015/12/17. 6 | // Copyright © 2015年 just1factory. All rights reserved. 7 | // 8 | 9 | //テキストフィールドのパターンを定義したenum 10 | enum TextFieldIdentifier { 11 | 12 | //テキストフィールドの名称 13 | case inputFood 14 | case inputCalorie 15 | case inputDate 16 | 17 | //状態に対応する値を返す 18 | func returnValue() -> Int { 19 | 20 | //各々のケース 21 | switch (self) { 22 | case .inputFood: 23 | return 0 24 | case .inputCalorie: 25 | return 1 26 | case .inputDate: 27 | return 2 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /WebViewGraphOfSwift/barchart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | カロリーBest3 5 | 16 | 17 | 18 | 19 | 40 |
41 | 42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /WebViewGraphOfSwift/linechart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 最新3つの折れ線グラフ 5 | 16 | 17 | 18 | 19 | 42 |
43 | 44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /WebViewGraphOfSwift/noimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fumiyasac/WebViewGraphOfSwift/6f01162622ea836ed18a4ea4f58b6d2692177006/WebViewGraphOfSwift/noimage.png -------------------------------------------------------------------------------- /WebViewGraphOfSwiftTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /WebViewGraphOfSwiftTests/WebViewGraphOfSwiftTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebViewGraphOfSwiftTests.swift 3 | // WebViewGraphOfSwiftTests 4 | // 5 | // Created by 酒井文也 on 2015/12/15. 6 | // Copyright © 2015年 just1factory. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import WebViewGraphOfSwift 11 | 12 | class WebViewGraphOfSwiftTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /WebViewGraphOfSwiftUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /WebViewGraphOfSwiftUITests/WebViewGraphOfSwiftUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebViewGraphOfSwiftUITests.swift 3 | // WebViewGraphOfSwiftUITests 4 | // 5 | // Created by 酒井文也 on 2015/12/15. 6 | // Copyright © 2015年 just1factory. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class WebViewGraphOfSwiftUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | --------------------------------------------------------------------------------