├── .gitignore ├── README.md ├── RNUberBridge ├── RNUberBridge.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── RNUberBridge.xcscmblueprint └── RNUberBridge │ ├── LoginButton.h │ ├── LoginButton.m │ ├── LoginButtonManager.h │ ├── LoginButtonManager.m │ ├── RideRequestButton.h │ ├── RideRequestButton.m │ ├── RideRequestButtonManager.h │ └── RideRequestButtonManager.m ├── RNUberSDK ├── OHHTTPStubs │ ├── .gitignore │ ├── .travis.yml │ ├── OHHTTPStubs.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── OHHTTPStubs Mac Framework.xcscheme │ │ │ ├── OHHTTPStubs iOS Framework.xcscheme │ │ │ ├── OHHTTPStubs iOS StaticLib.xcscheme │ │ │ └── OHHTTPStubs tvOS Framework.xcscheme │ ├── OHHTTPStubs.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── WorkspaceSettings.xcsettings │ ├── Podfile │ ├── Podfile.lock │ ├── Pods │ │ ├── AFNetworking │ │ │ ├── AFNetworking │ │ │ │ ├── AFHTTPSessionManager.h │ │ │ │ ├── AFHTTPSessionManager.m │ │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ │ ├── AFNetworkReachabilityManager.m │ │ │ │ ├── AFNetworking.h │ │ │ │ ├── AFSecurityPolicy.h │ │ │ │ ├── AFSecurityPolicy.m │ │ │ │ ├── AFURLRequestSerialization.h │ │ │ │ ├── AFURLRequestSerialization.m │ │ │ │ ├── AFURLResponseSerialization.h │ │ │ │ ├── AFURLResponseSerialization.m │ │ │ │ ├── AFURLSessionManager.h │ │ │ │ └── AFURLSessionManager.m │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── UIKit+AFNetworking │ │ │ │ ├── AFAutoPurgingImageCache.h │ │ │ │ ├── AFAutoPurgingImageCache.m │ │ │ │ ├── AFImageDownloader.h │ │ │ │ ├── AFImageDownloader.m │ │ │ │ ├── AFNetworkActivityIndicatorManager.h │ │ │ │ ├── AFNetworkActivityIndicatorManager.m │ │ │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ │ │ ├── UIActivityIndicatorView+AFNetworking.m │ │ │ │ ├── UIButton+AFNetworking.h │ │ │ │ ├── UIButton+AFNetworking.m │ │ │ │ ├── UIImage+AFNetworking.h │ │ │ │ ├── UIImageView+AFNetworking.h │ │ │ │ ├── UIImageView+AFNetworking.m │ │ │ │ ├── UIKit+AFNetworking.h │ │ │ │ ├── UIProgressView+AFNetworking.h │ │ │ │ ├── UIProgressView+AFNetworking.m │ │ │ │ ├── UIRefreshControl+AFNetworking.h │ │ │ │ ├── UIRefreshControl+AFNetworking.m │ │ │ │ ├── UIWebView+AFNetworking.h │ │ │ │ └── UIWebView+AFNetworking.m │ │ ├── Headers │ │ │ ├── Private │ │ │ │ └── AFNetworking │ │ │ │ │ ├── AFAutoPurgingImageCache.h │ │ │ │ │ ├── AFHTTPSessionManager.h │ │ │ │ │ ├── AFImageDownloader.h │ │ │ │ │ ├── AFNetworkActivityIndicatorManager.h │ │ │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ │ │ ├── AFNetworking.h │ │ │ │ │ ├── AFSecurityPolicy.h │ │ │ │ │ ├── AFURLRequestSerialization.h │ │ │ │ │ ├── AFURLResponseSerialization.h │ │ │ │ │ ├── AFURLSessionManager.h │ │ │ │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ │ │ │ ├── UIButton+AFNetworking.h │ │ │ │ │ ├── UIImage+AFNetworking.h │ │ │ │ │ ├── UIImageView+AFNetworking.h │ │ │ │ │ ├── UIKit+AFNetworking.h │ │ │ │ │ ├── UIProgressView+AFNetworking.h │ │ │ │ │ ├── UIRefreshControl+AFNetworking.h │ │ │ │ │ └── UIWebView+AFNetworking.h │ │ │ └── Public │ │ │ │ └── AFNetworking │ │ │ │ ├── AFAutoPurgingImageCache.h │ │ │ │ ├── AFHTTPSessionManager.h │ │ │ │ ├── AFImageDownloader.h │ │ │ │ ├── AFNetworkActivityIndicatorManager.h │ │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ │ ├── AFNetworking.h │ │ │ │ ├── AFSecurityPolicy.h │ │ │ │ ├── AFURLRequestSerialization.h │ │ │ │ ├── AFURLResponseSerialization.h │ │ │ │ ├── AFURLSessionManager.h │ │ │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ │ │ ├── UIButton+AFNetworking.h │ │ │ │ ├── UIImage+AFNetworking.h │ │ │ │ ├── UIImageView+AFNetworking.h │ │ │ │ ├── UIKit+AFNetworking.h │ │ │ │ ├── UIProgressView+AFNetworking.h │ │ │ │ ├── UIRefreshControl+AFNetworking.h │ │ │ │ └── UIWebView+AFNetworking.h │ │ ├── Manifest.lock │ │ ├── Pods.xcodeproj │ │ │ └── project.pbxproj │ │ └── Target Support Files │ │ │ ├── AFNetworking-iOS7.0 │ │ │ ├── AFNetworking-iOS7.0-dummy.m │ │ │ ├── AFNetworking-iOS7.0-prefix.pch │ │ │ └── AFNetworking-iOS7.0.xcconfig │ │ │ ├── AFNetworking-iOS8.0 │ │ │ ├── AFNetworking-iOS8.0-dummy.m │ │ │ ├── AFNetworking-iOS8.0-prefix.pch │ │ │ └── AFNetworking-iOS8.0.xcconfig │ │ │ ├── AFNetworking-tvOS9.0 │ │ │ ├── AFNetworking-tvOS9.0-dummy.m │ │ │ ├── AFNetworking-tvOS9.0-prefix.pch │ │ │ └── AFNetworking-tvOS9.0.xcconfig │ │ │ ├── AFNetworking.root-NSURLSession-Reachability-Security-Serialization │ │ │ ├── AFNetworking.root-NSURLSession-Reachability-Security-Serialization-dummy.m │ │ │ ├── AFNetworking.root-NSURLSession-Reachability-Security-Serialization-prefix.pch │ │ │ └── AFNetworking.root-NSURLSession-Reachability-Security-Serialization.xcconfig │ │ │ ├── Pods-TestingPods-OHHTTPStubs Mac Tests │ │ │ ├── Pods-TestingPods-OHHTTPStubs Mac Tests-acknowledgements.markdown │ │ │ ├── Pods-TestingPods-OHHTTPStubs Mac Tests-acknowledgements.plist │ │ │ ├── Pods-TestingPods-OHHTTPStubs Mac Tests-dummy.m │ │ │ ├── Pods-TestingPods-OHHTTPStubs Mac Tests-frameworks.sh │ │ │ ├── Pods-TestingPods-OHHTTPStubs Mac Tests-resources.sh │ │ │ ├── Pods-TestingPods-OHHTTPStubs Mac Tests.debug.xcconfig │ │ │ └── Pods-TestingPods-OHHTTPStubs Mac Tests.release.xcconfig │ │ │ ├── Pods-TestingPods-OHHTTPStubs iOS Fmk Tests │ │ │ ├── Pods-TestingPods-OHHTTPStubs iOS Fmk Tests-acknowledgements.markdown │ │ │ ├── Pods-TestingPods-OHHTTPStubs iOS Fmk Tests-acknowledgements.plist │ │ │ ├── Pods-TestingPods-OHHTTPStubs iOS Fmk Tests-dummy.m │ │ │ ├── Pods-TestingPods-OHHTTPStubs iOS Fmk Tests-frameworks.sh │ │ │ ├── Pods-TestingPods-OHHTTPStubs iOS Fmk Tests-resources.sh │ │ │ ├── Pods-TestingPods-OHHTTPStubs iOS Fmk Tests.debug.xcconfig │ │ │ └── Pods-TestingPods-OHHTTPStubs iOS Fmk Tests.release.xcconfig │ │ │ ├── Pods-TestingPods-OHHTTPStubs iOS Lib Tests │ │ │ ├── Pods-TestingPods-OHHTTPStubs iOS Lib Tests-acknowledgements.markdown │ │ │ ├── Pods-TestingPods-OHHTTPStubs iOS Lib Tests-acknowledgements.plist │ │ │ ├── Pods-TestingPods-OHHTTPStubs iOS Lib Tests-dummy.m │ │ │ ├── Pods-TestingPods-OHHTTPStubs iOS Lib Tests-frameworks.sh │ │ │ ├── Pods-TestingPods-OHHTTPStubs iOS Lib Tests-resources.sh │ │ │ ├── Pods-TestingPods-OHHTTPStubs iOS Lib Tests.debug.xcconfig │ │ │ └── Pods-TestingPods-OHHTTPStubs iOS Lib Tests.release.xcconfig │ │ │ └── Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests │ │ │ ├── Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests-acknowledgements.markdown │ │ │ ├── Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests-acknowledgements.plist │ │ │ ├── Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests-dummy.m │ │ │ ├── Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests-frameworks.sh │ │ │ ├── Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests-resources.sh │ │ │ ├── Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests.debug.xcconfig │ │ │ └── Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests.release.xcconfig │ ├── Sources │ │ ├── Compatibility.h │ │ ├── HTTPMessage │ │ │ ├── OHHTTPStubsResponse+HTTPMessage.h │ │ │ └── OHHTTPStubsResponse+HTTPMessage.m │ │ ├── JSON │ │ │ ├── OHHTTPStubsResponse+JSON.h │ │ │ └── OHHTTPStubsResponse+JSON.m │ │ ├── Mocktail │ │ │ ├── OHHTTPStubs+Mocktail.h │ │ │ └── OHHTTPStubs+Mocktail.m │ │ ├── NSURLSession │ │ │ ├── NSURLRequest+HTTPBodyTesting.h │ │ │ ├── NSURLRequest+HTTPBodyTesting.m │ │ │ ├── OHHTTPStubs+NSURLSessionConfiguration.m │ │ │ ├── OHHTTPStubsMethodSwizzling.h │ │ │ └── OHHTTPStubsMethodSwizzling.m │ │ ├── OHHTTPStubs.h │ │ ├── OHHTTPStubs.m │ │ ├── OHHTTPStubsResponse.h │ │ ├── OHHTTPStubsResponse.m │ │ ├── OHPathHelpers │ │ │ ├── OHPathHelpers.h │ │ │ └── OHPathHelpers.m │ │ └── Swift │ │ │ └── OHHTTPStubsSwift.swift │ ├── Supporting Files │ │ ├── OHHTTPStubs Mac-Info.plist │ │ ├── OHHTTPStubs iOS-Info.plist │ │ ├── OHHTTPStubsUmbrella.h │ │ └── module.modulemap │ └── UnitTests │ │ ├── Fixtures │ │ ├── empty.bundle │ │ │ └── nothingtoseehere.json │ │ └── emptyfile.json │ │ ├── MocktailFolder │ │ ├── cards.tail │ │ ├── login.tail │ │ └── logos_ebay.tail │ │ ├── OHPathHelpersTests.m │ │ ├── Test Suites │ │ ├── AFNetworkingTests.m │ │ ├── MocktailTests.m │ │ ├── NSURLConnectionDelegateTests.m │ │ ├── NSURLConnectionTests.m │ │ ├── NSURLSessionTests.m │ │ ├── NilValuesTests.m │ │ ├── SwiftHelpersTests.swift │ │ ├── TimingTests.m │ │ └── WithContentsOfURLTests.m │ │ ├── UnitTests-Info.plist │ │ ├── UnitTests-Prefix.pch │ │ ├── login.tail │ │ ├── login_content_type.tail │ │ ├── login_content_type_and_headers.tail │ │ └── login_headers.tail ├── ObjectMapper │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── ObjectMapper.podspec │ ├── ObjectMapper.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── ObjectMapper-Mac.xcscheme │ │ │ ├── ObjectMapper-iOS.xcscheme │ │ │ ├── ObjectMapper-tvOS.xcscheme │ │ │ └── ObjectMapper-watchOS.xcscheme │ ├── ObjectMapper.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── ObjectMapper.xcscmblueprint │ ├── ObjectMapper │ │ ├── Core │ │ │ ├── FromJSON.swift │ │ │ ├── Map.swift │ │ │ ├── Mappable.swift │ │ │ ├── Mapper.swift │ │ │ ├── Operators.swift │ │ │ └── ToJSON.swift │ │ ├── Info.plist │ │ ├── ObjectMapper.h │ │ └── Transforms │ │ │ ├── CustomDateFormatTransform.swift │ │ │ ├── DateFormatterTransform.swift │ │ │ ├── DateTransform.swift │ │ │ ├── EnumTransform.swift │ │ │ ├── ISO8601DateTransform.swift │ │ │ ├── NSDecimalNumberTransform.swift │ │ │ ├── TransformOf.swift │ │ │ ├── TransformType.swift │ │ │ └── URLTransform.swift │ ├── ObjectMapperTests │ │ ├── BasicTypes.swift │ │ ├── BasicTypesTestsFromJSON.swift │ │ ├── BasicTypesTestsToJSON.swift │ │ ├── ClassClusterTests.swift │ │ ├── CustomTransformTests.swift │ │ ├── Info.plist │ │ ├── MapContextTests.swift │ │ ├── MappableExtensionsTests.swift │ │ ├── MappableTypesWithTransformsTests.swift │ │ ├── NSDecimalNumberTransformTests.swift │ │ ├── NestedArrayTests.swift │ │ ├── NestedKeysTests.swift │ │ ├── NullableKeysFromJSONTests.swift │ │ ├── ObjectMapperTests.swift │ │ ├── PerformanceTests.swift │ │ └── ToObjectTests.swift │ └── README.md ├── RNUberSDK.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── RNUberSDK.xcscmblueprint ├── RNUberSDK │ ├── Info.plist │ └── RNUberSDK.h ├── UberRides.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── UberRides.xcscmblueprint │ └── xcshareddata │ │ └── xcschemes │ │ └── UberRides.xcscheme ├── UberRides │ ├── AppStoreDeeplink.swift │ ├── AuthenticationDeeplink.swift │ ├── BaseDeeplink.swift │ ├── Configuration.swift │ ├── DeeplinkErrorFactory.swift │ ├── DeeplinkErrorType.swift │ ├── DeeplinkRequestingBehavior.swift │ ├── DeeplinkingProtocol.swift │ ├── EndpointsManager.swift │ ├── Info.plist │ ├── LoginButton.swift │ ├── ModalRideRequestViewController.swift │ ├── ModalViewController.swift │ ├── Model │ │ ├── DistanceEstimate.swift │ │ ├── Driver.swift │ │ ├── PaymentMethod.swift │ │ ├── Place.swift │ │ ├── PriceEstimate.swift │ │ ├── Ride.swift │ │ ├── RideCharge.swift │ │ ├── RideEstimate.swift │ │ ├── RideMap.swift │ │ ├── RideParameters.swift │ │ ├── RideReceipt.swift │ │ ├── RideRequestDataBuilder.swift │ │ ├── RideRequestLocation.swift │ │ ├── RideStatus.swift │ │ ├── RidesError.swift │ │ ├── RidesScope.swift │ │ ├── TimeEstimate.swift │ │ ├── UberProduct.swift │ │ ├── UserActivity.swift │ │ ├── UserProfile.swift │ │ └── Vehicle.swift │ ├── ModelMapper.swift │ ├── OAuth │ │ ├── AccessToken.swift │ │ ├── AccessTokenFactory.swift │ │ ├── AuthorizationCodeGrantAuthenticator.swift │ │ ├── BaseAuthenticator.swift │ │ ├── ImplicitGrantAuthenticator.swift │ │ ├── KeychainWrapper.swift │ │ ├── LoginManager.swift │ │ ├── LoginManagingProtocol.swift │ │ ├── LoginView.swift │ │ ├── LoginViewAuthenticator.swift │ │ ├── NativeAuthenticator.swift │ │ ├── OAuthViewController.swift │ │ └── UberAuthenticatingProtocol.swift │ ├── Request.swift │ ├── RequestDeeplink.swift │ ├── RequestURLBuilder.swift │ ├── Resources │ │ ├── Media.xcassets │ │ │ ├── Badge.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── ios_rides-api_badge.png │ │ │ │ ├── ios_rides-api_badge@2x.png │ │ │ │ └── ios_rides-api_badge@3x.png │ │ │ ├── Contents.json │ │ │ ├── Surge-BlackOutline.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── surgeIconDark.pdf │ │ │ ├── Surge-WhiteOutline.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── page1.pdf │ │ │ ├── ic_back_arrow_white.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── back_arrow@1x.png │ │ │ │ ├── back_arrow@2x.png │ │ │ │ └── back_arrow@3x.png │ │ │ └── ic_logo_white.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── uber_logotype_white@1x.png │ │ │ │ ├── uber_logotype_white@2x.png │ │ │ │ └── uber_logotype_white@3x.png │ │ ├── en.lproj │ │ │ └── Localizable.strings │ │ ├── hi-In.lproj │ │ │ └── Localizable.strings │ │ ├── zh-Hans.lproj │ │ │ └── Localizable.strings │ │ └── zh-Hant.lproj │ │ │ └── Localizable.strings │ ├── RideRequestButton.swift │ ├── RideRequestView.swift │ ├── RideRequestViewController.swift │ ├── RideRequestViewErrorFactory.swift │ ├── RideRequestViewErrorType.swift │ ├── RideRequestViewRequestingBehavior.swift │ ├── RideRequestingProtocol.swift │ ├── RidesAppDelegate.swift │ ├── RidesClient.swift │ ├── TokenManager.swift │ ├── UberButton.swift │ ├── UberRides.h │ └── Utilities │ │ ├── AuthenticationURLUtility.swift │ │ └── RidesUtil.swift └── UberRidesTests │ ├── APIManagerTests.swift │ ├── AccessTokenFactoryTests.swift │ ├── AuthenticationDeeplinkTests.swift │ ├── AuthenticationURLUtilityTests.swift │ ├── BaseAuthenticatorTests.swift │ ├── BaseDeeplinkTests.swift │ ├── ConfigurationTests.swift │ ├── DeeplinkErrorFactoryTests.swift │ ├── DeeplinkRequestingBehaviorTests.swift │ ├── Info.plist │ ├── LocalizationUtilTests.swift │ ├── LoginButtonTests.swift │ ├── LoginManagerTests.swift │ ├── ModalViewControllerTests.swift │ ├── NativeAuthenticatorTests.swift │ ├── OAuthTests.swift │ ├── OauthEndpointTests.swift │ ├── ObjectMappingTests.swift │ ├── RefreshEndpointTests.swift │ ├── RequestButtonTests.swift │ ├── RequestDeeplinkTests.swift │ ├── RequestEstimateNoCars.json │ ├── RequestLayerTests.swift │ ├── RequestURLUtilTests.swift │ ├── RideParametersTest.swift │ ├── RideReceiptNullSurgeTotalOwed.json │ ├── RideRequestViewControllerTests.swift │ ├── RideRequestViewErrorFactoryTests.swift │ ├── RideRequestViewRequestingBehaviorTests.swift │ ├── RideRequestViewTests.swift │ ├── RidesAppDelegateTests.swift │ ├── RidesAuthenticationErrorFactoryTests.swift │ ├── RidesClientTests.swift │ ├── RidesMocks.swift │ ├── RidesScopeExtensionsTests.swift │ ├── RidesScopeFactoryTests.swift │ ├── TokenManagerTests.swift │ ├── UberRidesTests.swift │ ├── WidgetsEndpointTests.swift │ ├── gethistory.json │ ├── getme.json │ ├── getpaymentmethods.json │ ├── getpriceestimates.json │ ├── getproductid.json │ ├── getproducts.json │ ├── getrequest.json │ ├── gettimeestimateproduct.json │ ├── gettimeestimates.json │ ├── place.json │ ├── postrequests.json │ ├── refresh.json │ ├── requestestimate.json │ ├── ridemap.json │ ├── ridereceipt.json │ ├── testInfo.plist │ ├── testInfoMissingCallbacks.plist │ └── testInfoNoServerToken.plist ├── index.js ├── package.json └── src ├── LoginButton.js └── RideRequestButton.js /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | ios/*.xcworkspace 24 | ios/Pods/ 25 | ios/Podfile.lock 26 | 27 | # Android/IJ 28 | # 29 | .idea 30 | .gradle 31 | local.properties 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | 38 | # BUCK 39 | buck-out/ 40 | \.buckd/ 41 | android/app/libs 42 | android/keystores/debug.keystore 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Uber Rides SDK port to React Native 2 | 3 | ![Uber Rides for React Native](https://s31.postimg.org/5s35dq9kb/uber.jpg) 4 | 5 | ## Get Started 6 | 7 | ### Prerequirements 8 | - xcode 8.0+ 9 | - deployment target 8.0+ 10 | 11 | ### Installation steps 12 | 1. `$ rnpm install react-native-uber-rides` 13 | 2. [Configure SDK](https://github.com/uber/rides-ios-sdk#configuring-ios-90) 14 | 3. Use it: 15 | 16 | ```js 17 | import {LoginButton, RideRequestButton} from 'react-native-uber-rides'; 18 | // ... 19 | class Foo extends React.Component { 20 | render() { 21 | return ( 22 | 23 | 27 | 30 | 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /RNUberBridge/RNUberBridge.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RNUberBridge/RNUberBridge.xcodeproj/project.xcworkspace/xcshareddata/RNUberBridge.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "526DD915DB5C3CA0F74F4BB92FE1DAD68718938B", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "526DD915DB5C3CA0F74F4BB92FE1DAD68718938B" : 0, 8 | "8EE5486B89998B2B0B61B56D411A6801883A40F5" : 0 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "7D80C16D-2185-419A-8F7F-475F5F29581E", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "526DD915DB5C3CA0F74F4BB92FE1DAD68718938B" : "react-native-uber-rides\/", 13 | "8EE5486B89998B2B0B61B56D411A6801883A40F5" : "react-native-uber-rides\/RNUberSDK\/" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "RNUberBridge", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "RNUberBridge\/RNUberBridge.xcodeproj", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:Kureev\/react-native-uber-rides.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "526DD915DB5C3CA0F74F4BB92FE1DAD68718938B" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:Kureev\/RNUberSDK.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "8EE5486B89998B2B0B61B56D411A6801883A40F5" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /RNUberBridge/RNUberBridge/LoginButton.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "UIView+React.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | /** 8 | * View that has a single UBSDKLoginButton in the center 9 | */ 10 | @interface LoginButton : UIView 11 | 12 | - (instancetype)initWithFrame:(CGRect)frame 13 | scopes:(NSArray *)scopes 14 | loginManager:(UBSDKLoginManager *)loginManager; 15 | 16 | @property (nonatomic, weak) id _Nullable delegate; 17 | @property (nonatomic, copy) RCTBubblingEventBlock onLogin; 18 | @property (nonatomic, copy) RCTBubblingEventBlock onLogout; 19 | @property (nonatomic, copy) RCTBubblingEventBlock onLoginError; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /RNUberBridge/RNUberBridge/LoginButtonManager.h: -------------------------------------------------------------------------------- 1 | #import "RCTViewManager.h" 2 | 3 | @interface LoginButtonManager : RCTViewManager 4 | @end 5 | -------------------------------------------------------------------------------- /RNUberBridge/RNUberBridge/LoginButtonManager.m: -------------------------------------------------------------------------------- 1 | #import "LoginButton.h" 2 | #import "LoginButtonManager.h" 3 | 4 | @interface LoginButtonManager() 5 | 6 | @property (nonatomic, nonnull) UBSDKLoginManager *loginManager; 7 | 8 | @end 9 | 10 | 11 | @implementation LoginButtonManager 12 | 13 | RCT_EXPORT_MODULE() 14 | 15 | RCT_EXPORT_VIEW_PROPERTY(onLogin, RCTBubblingEventBlock) 16 | RCT_EXPORT_VIEW_PROPERTY(onLogout, RCTBubblingEventBlock) 17 | RCT_EXPORT_VIEW_PROPERTY(onLoginError, RCTBubblingEventBlock) 18 | 19 | - (UIView *)view 20 | { 21 | NSArray *scopes = @[UBSDKRidesScope.Profile]; 22 | _loginManager = [[UBSDKLoginManager alloc] initWithLoginType:UBSDKLoginTypeNative]; 23 | LoginButton *loginButton = [[LoginButton alloc] 24 | initWithFrame:CGRectZero 25 | scopes:scopes 26 | loginManager:_loginManager]; 27 | return loginButton; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /RNUberBridge/RNUberBridge/RideRequestButton.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "UIView+React.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface RideRequestButton : UIView 8 | 9 | - (instancetype)initWithFrame:(CGRect)frame; 10 | - (void)initRouteForButton; 11 | 12 | @property (nonatomic, weak) id _Nullable delegate; 13 | @property (nonatomic, strong) NSDictionary *pickup; 14 | @property (nonatomic, strong) NSDictionary *dropoff; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /RNUberBridge/RNUberBridge/RideRequestButtonManager.h: -------------------------------------------------------------------------------- 1 | #import "RCTViewManager.h" 2 | #import 3 | 4 | @interface RideRequestButtonManager : RCTViewManager 5 | @end 6 | -------------------------------------------------------------------------------- /RNUberBridge/RNUberBridge/RideRequestButtonManager.m: -------------------------------------------------------------------------------- 1 | #import "RideRequestButton.h" 2 | #import "RideRequestButtonManager.h" 3 | 4 | 5 | @interface RideRequestButtonManager() 6 | @end 7 | 8 | 9 | @implementation RideRequestButtonManager 10 | 11 | RCT_EXPORT_MODULE() 12 | 13 | - (UIView *)view 14 | { 15 | RideRequestButton *rideRequestButton = [[RideRequestButton alloc] initWithFrame:CGRectZero]; 16 | 17 | return rideRequestButton; 18 | } 19 | 20 | - (BOOL) canFetchRoute: (RideRequestButton *)rideRequestButton { 21 | return rideRequestButton.dropoff && rideRequestButton.pickup; 22 | } 23 | 24 | RCT_CUSTOM_VIEW_PROPERTY(pickup, NSDictionary, RideRequestButton) 25 | { 26 | view.pickup = [RCTConvert NSDictionary:json]; 27 | 28 | if ([self canFetchRoute:view]) { 29 | [view initRouteForButton]; 30 | } 31 | } 32 | 33 | RCT_CUSTOM_VIEW_PROPERTY(dropoff, NSDictionary, RideRequestButton) 34 | { 35 | view.dropoff = [RCTConvert NSDictionary:json]; 36 | 37 | if ([self canFetchRoute:view]) { 38 | [view initRouteForButton]; 39 | } 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | build/ 3 | *.pbxuser 4 | !default.pbxuser 5 | *.mode1v3 6 | !default.mode1v3 7 | *.mode2v3 8 | !default.mode2v3 9 | *.perspectivev3 10 | !default.perspectivev3 11 | xcuserdata 12 | profile 13 | *.moved-aside 14 | .DS_Store 15 | *.xccheckout 16 | 17 | # Carthage 18 | Carthage/ 19 | OHHTTPStubs.framework.zip 20 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode7.3 3 | 4 | before_install: 5 | - gem install xcpretty --no-rdoc --no-ri --no-document --quiet 6 | 7 | env: 8 | #- RAKETASK="simlist" 9 | #- RAKETASK="ios[iOS StaticLib,7.1,test]" 10 | - RAKETASK="ios[iOS StaticLib,latest,test]" 11 | - RAKETASK="ios[iOS Framework,latest,test]" 12 | - RAKETASK="osx[Mac Framework,x86_64,test]" 13 | - RAKETASK="tvos[tvOS Framework,latest,test]" 14 | 15 | script: 16 | - rake "$RAKETASK" 17 | 18 | before_deploy: 19 | - carthage build --no-skip-current 20 | - carthage archive OHHTTPStubs 21 | 22 | deploy: 23 | provider: releases 24 | api_key: 25 | secure: LJfogUcxlaXczvPyu+s2SAG7SXyhjQbc/kCiNjEO61ehLg0dK0bmfXHm0yeBQQPoQCF5qiWC+5HYQnCaMNmEhP4WHy6RZtmmrg1iiNbeLsRzk8COm2vv+zRgoFXU5K7j2LkfvTSrLPTYR1d+PM/S/XJzMDxrJjryM+mf12DxlnA= 26 | file: OHHTTPStubs.framework.zip 27 | skip_cleanup: true 28 | on: 29 | tags: true 30 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/OHHTTPStubs.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/OHHTTPStubs.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 9 | 10 | 12 | 13 | 15 | 16 | 18 | 19 | 21 | 22 | 24 | 25 | 26 | 28 | 29 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/OHHTTPStubs.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | project 'OHHTTPStubs.xcodeproj' 4 | inhibit_all_warnings! 5 | 6 | abstract_target 'TestingPods' do 7 | pod 'AFNetworking', '~> 3.0' 8 | 9 | target 'OHHTTPStubs iOS Lib Tests' do 10 | platform :ios, '7.0' 11 | end 12 | 13 | target 'OHHTTPStubs iOS Fmk Tests' do 14 | platform :ios, '8.0' 15 | end 16 | 17 | target 'OHHTTPStubs Mac Tests' do 18 | platform :osx, '10.9' 19 | end 20 | 21 | target 'OHHTTPStubs tvOS Fmk Tests' do 22 | platform :tvos, '9.0' 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AFNetworking (3.0.4): 3 | - AFNetworking/NSURLSession (= 3.0.4) 4 | - AFNetworking/Reachability (= 3.0.4) 5 | - AFNetworking/Security (= 3.0.4) 6 | - AFNetworking/Serialization (= 3.0.4) 7 | - AFNetworking/UIKit (= 3.0.4) 8 | - AFNetworking/NSURLSession (3.0.4): 9 | - AFNetworking/Reachability 10 | - AFNetworking/Security 11 | - AFNetworking/Serialization 12 | - AFNetworking/Reachability (3.0.4) 13 | - AFNetworking/Security (3.0.4) 14 | - AFNetworking/Serialization (3.0.4) 15 | - AFNetworking/UIKit (3.0.4): 16 | - AFNetworking/NSURLSession 17 | 18 | DEPENDENCIES: 19 | - AFNetworking (~> 3.0) 20 | 21 | SPEC CHECKSUMS: 22 | AFNetworking: a0075feb321559dc78d9d85b55d11caa19eabb93 23 | 24 | PODFILE CHECKSUM: ab605926fc3d98d845e7184ed2ef16ce3df929c2 25 | 26 | COCOAPODS: 1.0.1 27 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/AFNetworking/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | // AFNetworking.h 2 | // 3 | // Copyright (c) 2013 AFNetworking (http://afnetworking.com/) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import 25 | #import 26 | 27 | #ifndef _AFNETWORKING_ 28 | #define _AFNETWORKING_ 29 | 30 | #import "AFURLRequestSerialization.h" 31 | #import "AFURLResponseSerialization.h" 32 | #import "AFSecurityPolicy.h" 33 | 34 | #if !TARGET_OS_WATCH 35 | #import "AFNetworkReachabilityManager.h" 36 | #endif 37 | 38 | #import "AFURLSessionManager.h" 39 | #import "AFHTTPSessionManager.h" 40 | 41 | #endif /* _AFNETWORKING_ */ 42 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/AFNetworking/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIActivityIndicatorView+AFNetworking.h 2 | // Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | #import 25 | 26 | #if TARGET_OS_IOS || TARGET_OS_TV 27 | 28 | #import 29 | 30 | /** 31 | This category adds methods to the UIKit framework's `UIActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a session task. 32 | */ 33 | @interface UIActivityIndicatorView (AFNetworking) 34 | 35 | ///---------------------------------- 36 | /// @name Animating for Session Tasks 37 | ///---------------------------------- 38 | 39 | /** 40 | Binds the animating state to the state of the specified task. 41 | 42 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. 43 | */ 44 | - (void)setAnimatingWithStateOfTask:(nullable NSURLSessionTask *)task; 45 | 46 | @end 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+AFNetworking.h 3 | // 4 | // 5 | // Created by Paulo Ferreira on 08/07/15. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #if TARGET_OS_IOS || TARGET_OS_TV 26 | 27 | #import 28 | 29 | @interface UIImage (AFNetworking) 30 | 31 | + (UIImage*) safeImageWithData:(NSData*)data; 32 | 33 | @end 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIKit+AFNetworking.h 2 | // 3 | // Copyright (c) 2013 AFNetworking (http://afnetworking.com/) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #if TARGET_OS_IOS || TARGET_OS_TV 24 | #import 25 | 26 | #ifndef _UIKIT_AFNETWORKING_ 27 | #define _UIKIT_AFNETWORKING_ 28 | 29 | #if TARGET_OS_IOS 30 | #import "AFAutoPurgingImageCache.h" 31 | #import "AFImageDownloader.h" 32 | #import "AFNetworkActivityIndicatorManager.h" 33 | #import "UIRefreshControl+AFNetworking.h" 34 | #import "UIWebView+AFNetworking.h" 35 | #endif 36 | 37 | #import "UIActivityIndicatorView+AFNetworking.h" 38 | #import "UIButton+AFNetworking.h" 39 | #import "UIImageView+AFNetworking.h" 40 | #import "UIProgressView+AFNetworking.h" 41 | #endif /* _UIKIT_AFNETWORKING_ */ 42 | #endif 43 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIRefreshControl+AFNetworking.m 2 | // 3 | // Copyright (c) 2014 AFNetworking (http://afnetworking.com) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | 25 | #import 26 | 27 | #if TARGET_OS_IOS 28 | 29 | #import 30 | 31 | NS_ASSUME_NONNULL_BEGIN 32 | 33 | /** 34 | This category adds methods to the UIKit framework's `UIRefreshControl` class. The methods in this category provide support for automatically beginning and ending refreshing depending on the loading state of a session task. 35 | */ 36 | @interface UIRefreshControl (AFNetworking) 37 | 38 | ///----------------------------------- 39 | /// @name Refreshing for Session Tasks 40 | ///----------------------------------- 41 | 42 | /** 43 | Binds the refreshing state to the state of the specified task. 44 | 45 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. 46 | */ 47 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; 48 | 49 | @end 50 | 51 | NS_ASSUME_NONNULL_END 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/AFAutoPurgingImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/AFImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFImageDownloader.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/UIButton+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/UIImage+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/UIImageView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Private/AFNetworking/UIWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/AFAutoPurgingImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/AFImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFImageDownloader.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/UIButton+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/UIImage+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/UIImageView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Headers/Public/AFNetworking/UIWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AFNetworking (3.0.4): 3 | - AFNetworking/NSURLSession (= 3.0.4) 4 | - AFNetworking/Reachability (= 3.0.4) 5 | - AFNetworking/Security (= 3.0.4) 6 | - AFNetworking/Serialization (= 3.0.4) 7 | - AFNetworking/UIKit (= 3.0.4) 8 | - AFNetworking/NSURLSession (3.0.4): 9 | - AFNetworking/Reachability 10 | - AFNetworking/Security 11 | - AFNetworking/Serialization 12 | - AFNetworking/Reachability (3.0.4) 13 | - AFNetworking/Security (3.0.4) 14 | - AFNetworking/Serialization (3.0.4) 15 | - AFNetworking/UIKit (3.0.4): 16 | - AFNetworking/NSURLSession 17 | 18 | DEPENDENCIES: 19 | - AFNetworking (~> 3.0) 20 | 21 | SPEC CHECKSUMS: 22 | AFNetworking: a0075feb321559dc78d9d85b55d11caa19eabb93 23 | 24 | PODFILE CHECKSUM: ab605926fc3d98d845e7184ed2ef16ce3df929c2 25 | 26 | COCOAPODS: 1.0.1 27 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/AFNetworking-iOS7.0/AFNetworking-iOS7.0-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AFNetworking_iOS7_0 : NSObject 3 | @end 4 | @implementation PodsDummy_AFNetworking_iOS7_0 5 | @end 6 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/AFNetworking-iOS7.0/AFNetworking-iOS7.0-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #ifndef TARGET_OS_IOS 6 | #define TARGET_OS_IOS TARGET_OS_IPHONE 7 | #endif 8 | 9 | #ifndef TARGET_OS_WATCH 10 | #define TARGET_OS_WATCH 0 11 | #endif 12 | 13 | #ifndef TARGET_OS_TV 14 | #define TARGET_OS_TV 0 15 | #endif 16 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/AFNetworking-iOS7.0/AFNetworking-iOS7.0.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AFNetworking-iOS7.0 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 4 | OTHER_LDFLAGS = -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/AFNetworking-iOS8.0/AFNetworking-iOS8.0-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AFNetworking_iOS8_0 : NSObject 3 | @end 4 | @implementation PodsDummy_AFNetworking_iOS8_0 5 | @end 6 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/AFNetworking-iOS8.0/AFNetworking-iOS8.0-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #ifndef TARGET_OS_IOS 6 | #define TARGET_OS_IOS TARGET_OS_IPHONE 7 | #endif 8 | 9 | #ifndef TARGET_OS_WATCH 10 | #define TARGET_OS_WATCH 0 11 | #endif 12 | 13 | #ifndef TARGET_OS_TV 14 | #define TARGET_OS_TV 0 15 | #endif 16 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/AFNetworking-iOS8.0/AFNetworking-iOS8.0.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AFNetworking-iOS8.0 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 4 | OTHER_LDFLAGS = -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/AFNetworking-tvOS9.0/AFNetworking-tvOS9.0-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AFNetworking_tvOS9_0 : NSObject 3 | @end 4 | @implementation PodsDummy_AFNetworking_tvOS9_0 5 | @end 6 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/AFNetworking-tvOS9.0/AFNetworking-tvOS9.0-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #ifndef TARGET_OS_IOS 6 | #define TARGET_OS_IOS TARGET_OS_IPHONE 7 | #endif 8 | 9 | #ifndef TARGET_OS_WATCH 10 | #define TARGET_OS_WATCH 0 11 | #endif 12 | 13 | #ifndef TARGET_OS_TV 14 | #define TARGET_OS_TV 0 15 | #endif 16 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/AFNetworking-tvOS9.0/AFNetworking-tvOS9.0.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AFNetworking-tvOS9.0 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 4 | OTHER_LDFLAGS = -framework "Security" -framework "SystemConfiguration" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/AFNetworking.root-NSURLSession-Reachability-Security-Serialization/AFNetworking.root-NSURLSession-Reachability-Security-Serialization-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AFNetworking_root_NSURLSession_Reachability_Security_Serialization : NSObject 3 | @end 4 | @implementation PodsDummy_AFNetworking_root_NSURLSession_Reachability_Security_Serialization 5 | @end 6 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/AFNetworking.root-NSURLSession-Reachability-Security-Serialization/AFNetworking.root-NSURLSession-Reachability-Security-Serialization-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #ifndef TARGET_OS_IOS 6 | #define TARGET_OS_IOS TARGET_OS_IPHONE 7 | #endif 8 | 9 | #ifndef TARGET_OS_WATCH 10 | #define TARGET_OS_WATCH 0 11 | #endif 12 | 13 | #ifndef TARGET_OS_TV 14 | #define TARGET_OS_TV 0 15 | #endif 16 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/AFNetworking.root-NSURLSession-Reachability-Security-Serialization/AFNetworking.root-NSURLSession-Reachability-Security-Serialization.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AFNetworking.root-NSURLSession-Reachability-Security-Serialization 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 4 | OTHER_LDFLAGS = -framework "CoreServices" -framework "Security" -framework "SystemConfiguration" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs Mac Tests/Pods-TestingPods-OHHTTPStubs Mac Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## AFNetworking 5 | 6 | Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs Mac Tests/Pods-TestingPods-OHHTTPStubs Mac Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | Title 38 | AFNetworking 39 | Type 40 | PSGroupSpecifier 41 | 42 | 43 | FooterText 44 | Generated by CocoaPods - https://cocoapods.org 45 | Title 46 | 47 | Type 48 | PSGroupSpecifier 49 | 50 | 51 | StringsTable 52 | Acknowledgements 53 | Title 54 | Acknowledgements 55 | 56 | 57 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs Mac Tests/Pods-TestingPods-OHHTTPStubs Mac Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_TestingPods_OHHTTPStubs_Mac_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_TestingPods_OHHTTPStubs_Mac_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs Mac Tests/Pods-TestingPods-OHHTTPStubs Mac Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking.root-NSURLSession-Reachability-Security-Serialization" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking.root-NSURLSession-Reachability-Security-Serialization" -framework "CoreServices" -framework "Security" -framework "SystemConfiguration" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs Mac Tests/Pods-TestingPods-OHHTTPStubs Mac Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking.root-NSURLSession-Reachability-Security-Serialization" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking.root-NSURLSession-Reachability-Security-Serialization" -framework "CoreServices" -framework "Security" -framework "SystemConfiguration" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## AFNetworking 5 | 6 | Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | Title 38 | AFNetworking 39 | Type 40 | PSGroupSpecifier 41 | 42 | 43 | FooterText 44 | Generated by CocoaPods - https://cocoapods.org 45 | Title 46 | 47 | Type 48 | PSGroupSpecifier 49 | 50 | 51 | StringsTable 52 | Acknowledgements 53 | Title 54 | Acknowledgements 55 | 56 | 57 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_TestingPods_OHHTTPStubs_iOS_Fmk_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_TestingPods_OHHTTPStubs_iOS_Fmk_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking-iOS8.0" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking-iOS8.0" -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking-iOS8.0" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking-iOS8.0" -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs iOS Lib Tests/Pods-TestingPods-OHHTTPStubs iOS Lib Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## AFNetworking 5 | 6 | Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs iOS Lib Tests/Pods-TestingPods-OHHTTPStubs iOS Lib Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | Title 38 | AFNetworking 39 | Type 40 | PSGroupSpecifier 41 | 42 | 43 | FooterText 44 | Generated by CocoaPods - https://cocoapods.org 45 | Title 46 | 47 | Type 48 | PSGroupSpecifier 49 | 50 | 51 | StringsTable 52 | Acknowledgements 53 | Title 54 | Acknowledgements 55 | 56 | 57 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs iOS Lib Tests/Pods-TestingPods-OHHTTPStubs iOS Lib Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_TestingPods_OHHTTPStubs_iOS_Lib_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_TestingPods_OHHTTPStubs_iOS_Lib_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs iOS Lib Tests/Pods-TestingPods-OHHTTPStubs iOS Lib Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking-iOS7.0" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking-iOS7.0" -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs iOS Lib Tests/Pods-TestingPods-OHHTTPStubs iOS Lib Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking-iOS7.0" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking-iOS7.0" -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## AFNetworking 5 | 6 | Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | Title 38 | AFNetworking 39 | Type 40 | PSGroupSpecifier 41 | 42 | 43 | FooterText 44 | Generated by CocoaPods - https://cocoapods.org 45 | Title 46 | 47 | Type 48 | PSGroupSpecifier 49 | 50 | 51 | StringsTable 52 | Acknowledgements 53 | Title 54 | Acknowledgements 55 | 56 | 57 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_TestingPods_OHHTTPStubs_tvOS_Fmk_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_TestingPods_OHHTTPStubs_tvOS_Fmk_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking-tvOS9.0" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking-tvOS9.0" -framework "Security" -framework "SystemConfiguration" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking-tvOS9.0" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking-tvOS9.0" -framework "Security" -framework "SystemConfiguration" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Sources/Compatibility.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************************** 2 | * 3 | * Copyright (c) 2012 Olivier Halligon 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | * 23 | ***********************************************************************************/ 24 | 25 | 26 | /* 27 | * This file allows to keep compatibility with older SDKs which didn't have 28 | * the latest features and associated macros yet. 29 | */ 30 | 31 | 32 | #ifndef NS_DESIGNATED_INITIALIZER 33 | #if __has_attribute(objc_designated_initializer) 34 | #define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) 35 | #else 36 | #define NS_DESIGNATED_INITIALIZER 37 | #endif 38 | #endif 39 | 40 | // Allow to use nullability macros and keywords even if not supported yet 41 | #if ! __has_feature(nullability) 42 | #define NS_ASSUME_NONNULL_BEGIN 43 | #define NS_ASSUME_NONNULL_END 44 | #define nullable 45 | #define __nullable 46 | #define __nonnull 47 | #endif 48 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.m: -------------------------------------------------------------------------------- 1 | /*********************************************************************************** 2 | * 3 | * Copyright (c) 2012 Olivier Halligon 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | * 23 | ***********************************************************************************/ 24 | 25 | 26 | #import "OHHTTPStubsResponse+JSON.h" 27 | 28 | @implementation OHHTTPStubsResponse (JSON) 29 | 30 | /*! @name Building a response from JSON objects */ 31 | 32 | + (instancetype)responseWithJSONObject:(id)jsonObject 33 | statusCode:(int)statusCode 34 | headers:(nullable NSDictionary *)httpHeaders 35 | { 36 | if (!httpHeaders[@"Content-Type"]) 37 | { 38 | NSMutableDictionary* mutableHeaders = [NSMutableDictionary dictionaryWithDictionary:httpHeaders]; 39 | mutableHeaders[@"Content-Type"] = @"application/json"; 40 | httpHeaders = [NSDictionary dictionaryWithDictionary:mutableHeaders]; // make immutable again 41 | } 42 | 43 | return [self responseWithData:[NSJSONSerialization dataWithJSONObject:jsonObject options:0 error:nil] 44 | statusCode:statusCode 45 | headers:httpHeaders]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************************** 2 | * 3 | * Copyright (c) 2016 Sebastian Hagedorn, Felix Lamouroux 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | * 23 | ***********************************************************************************/ 24 | 25 | //////////////////////////////////////////////////////////////////////////////// 26 | #pragma mark - Imports 27 | 28 | #import 29 | 30 | // This category is only useful when NSURLSession is present 31 | #if defined(__IPHONE_7_0) || defined(__MAC_10_9) 32 | 33 | //////////////////////////////////////////////////////////////////////////////// 34 | #pragma mark - NSURLRequest+HTTPBodyTesting 35 | 36 | @interface NSURLRequest (HTTPBodyTesting) 37 | /** 38 | * Unfortunately, when sending POST requests (with a body) using NSURLSession, 39 | * by the time the request arrives at OHHTTPStubs, the HTTPBody of the 40 | * NSURLRequest has been reset to nil. 41 | * 42 | * You can use this method to retrieve the HTTPBody for testing and use it to 43 | * conditionally stub your requests. 44 | */ 45 | - (NSData *)OHHTTPStubs_HTTPBody; 46 | @end 47 | 48 | #endif /* __IPHONE_7_0 || __MAC_10_9 */ 49 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.m: -------------------------------------------------------------------------------- 1 | /*********************************************************************************** 2 | * 3 | * Copyright (c) 2012 Olivier Halligon, 2016 Sebastian Hagedorn 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | * 23 | ***********************************************************************************/ 24 | 25 | //////////////////////////////////////////////////////////////////////////////// 26 | #pragma mark - Imports 27 | 28 | #import "OHHTTPStubsMethodSwizzling.h" 29 | 30 | ////////////////////////////////////////////////////////////////////////////////////////////////// 31 | #pragma mark - Method Swizzling Helpers 32 | 33 | IMP OHHTTPStubsReplaceMethod(SEL selector, 34 | IMP newImpl, 35 | Class affectedClass, 36 | BOOL isClassMethod) 37 | { 38 | Method origMethod = isClassMethod ? class_getClassMethod(affectedClass, selector) : class_getInstanceMethod(affectedClass, selector); 39 | IMP origImpl = method_getImplementation(origMethod); 40 | 41 | if (!class_addMethod(isClassMethod ? object_getClass(affectedClass) : affectedClass, selector, newImpl, method_getTypeEncoding(origMethod))) 42 | { 43 | method_setImplementation(origMethod, newImpl); 44 | } 45 | 46 | return origImpl; 47 | } 48 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.m: -------------------------------------------------------------------------------- 1 | /*********************************************************************************** 2 | * 3 | * Copyright (c) 2012 Olivier Halligon 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | * 23 | ***********************************************************************************/ 24 | 25 | 26 | #import "OHPathHelpers.h" 27 | 28 | NSString* __nullable OHPathForFile(NSString* fileName, Class inBundleForClass) 29 | { 30 | NSBundle* bundle = [NSBundle bundleForClass:inBundleForClass]; 31 | return OHPathForFileInBundle(fileName, bundle); 32 | } 33 | 34 | NSString* __nullable OHPathForFileInBundle(NSString* fileName, NSBundle* bundle) 35 | { 36 | return [bundle pathForResource:[fileName stringByDeletingPathExtension] 37 | ofType:[fileName pathExtension]]; 38 | } 39 | 40 | NSString* __nullable OHPathForFileInDocumentsDir(NSString* fileName) 41 | { 42 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 43 | NSString *basePath = (paths.count > 0) ? paths[0] : nil; 44 | return [basePath stringByAppendingPathComponent:fileName]; 45 | } 46 | 47 | NSBundle* __nullable OHResourceBundle(NSString* bundleBasename, Class inBundleForClass) 48 | { 49 | NSBundle* classBundle = [NSBundle bundleForClass:inBundleForClass]; 50 | return [NSBundle bundleWithPath:[classBundle pathForResource:bundleBasename 51 | ofType:@"bundle"]]; 52 | } 53 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Supporting Files/OHHTTPStubs Mac-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 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 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSHumanReadableCopyright 24 | Copyright © 2014 AliSoftware. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Supporting Files/OHHTTPStubs iOS-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 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 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSHumanReadableCopyright 24 | Copyright © 2014 AliSoftware. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Supporting Files/OHHTTPStubsUmbrella.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************************** 2 | * 3 | * Copyright (c) 2012 Olivier Halligon 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | * 23 | ***********************************************************************************/ 24 | 25 | #import "Compatibility.h" 26 | #import "NSURLRequest+HTTPBodyTesting.h" 27 | #import "OHHTTPStubs.h" 28 | #import "OHHTTPStubsResponse.h" 29 | 30 | #import "OHHTTPStubsResponse+JSON.h" 31 | #import "OHHTTPStubsResponse+HTTPMessage.h" 32 | #import "OHHTTPStubs+Mocktail.h" 33 | #import "OHPathHelpers.h" 34 | 35 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/Supporting Files/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module OHHTTPStubs { 2 | umbrella header "OHHTTPStubsUmbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/UnitTests/Fixtures/empty.bundle/nothingtoseehere.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kureev/react-native-uber-rides/0fcb5d2857d2b97f179963c67220a56e0c4286f0/RNUberSDK/OHHTTPStubs/UnitTests/Fixtures/empty.bundle/nothingtoseehere.json -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/UnitTests/Fixtures/emptyfile.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kureev/react-native-uber-rides/0fcb5d2857d2b97f179963c67220a56e0c4286f0/RNUberSDK/OHHTTPStubs/UnitTests/Fixtures/emptyfile.json -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/UnitTests/MocktailFolder/cards.tail: -------------------------------------------------------------------------------- 1 | GET 2 | .*/cards 3 | 200 4 | application/json 5 | 6 | [ 7 | { 8 | "gift_card_id": "91857d87-481a-490b-8aff-c72614094398", 9 | "card_number": "515676xxxxxx1234", 10 | "amount": "$25.28", 11 | "expiration_date": "2014-04" 12 | }, 13 | { 14 | "gift_card_id": "0578ebe0-015b-11e4-9191-0800200c9a66", 15 | "card_number": "515676xxxxxx2345", 16 | "amount": "$55.38", 17 | "expiration_date": "2014-05" 18 | } 19 | ] -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/UnitTests/MocktailFolder/login.tail: -------------------------------------------------------------------------------- 1 | GET|POST 2 | .*/users 3 | 200 4 | application/json 5 | 6 | 7 | { 8 | "user_id": "happyuser1", 9 | "user_token": "happytoken", 10 | "status": "SUCCESS" 11 | } -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/UnitTests/OHPathHelpersTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #if OHHTTPSTUBS_USE_STATIC_LIBRARY 4 | #import "OHHTTPStubs.h" 5 | #import "OHPathHelpers.h" 6 | #else 7 | @import OHHTTPStubs; 8 | #endif 9 | 10 | @interface OHPathHelpersTests : XCTestCase 11 | @end 12 | 13 | @implementation OHPathHelpersTests 14 | 15 | - (void)testOHResourceBundle { 16 | NSBundle *classBundle = [NSBundle bundleForClass:self.class]; 17 | NSBundle *expectedBundle = [NSBundle bundleWithPath:[classBundle pathForResource:@"empty" 18 | ofType:@"bundle"]]; 19 | 20 | XCTAssertEqual(OHResourceBundle(@"empty", self.class), expectedBundle); 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/UnitTests/UnitTests-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 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/UnitTests/UnitTests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OHHTTPStubs Unit Tests' target in the 'OHHTTPStubs Unit Tests' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/UnitTests/login.tail: -------------------------------------------------------------------------------- 1 | GET|POST 2 | .*/users 3 | 200 4 | application/json 5 | 6 | { 7 | "user_id": "happyuser1", 8 | "user_token": "happytoken", 9 | "status": "SUCCESS" 10 | } -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/UnitTests/login_content_type.tail: -------------------------------------------------------------------------------- 1 | GET|POST 2 | .*/users 3 | 200 4 | application/json 5 | 6 | { 7 | "user_id": "happyuser1", 8 | "user_token": "happytoken", 9 | "status": "SUCCESS" 10 | } -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/UnitTests/login_content_type_and_headers.tail: -------------------------------------------------------------------------------- 1 | GET|POST 2 | .*/users 3 | 200 4 | application/json 5 | Connection: Close 6 | 7 | { 8 | "user_id": "happyuser1", 9 | "user_token": "happytoken", 10 | "status": "SUCCESS" 11 | } -------------------------------------------------------------------------------- /RNUberSDK/OHHTTPStubs/UnitTests/login_headers.tail: -------------------------------------------------------------------------------- 1 | GET|POST 2 | .*/users 3 | 200 4 | Content-Type: application/json 5 | Connection: Close 6 | 7 | { 8 | "user_id": "happyuser1", 9 | "user_token": "happytoken", 10 | "status": "SUCCESS" 11 | } -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | build/ 3 | *.pbxuser 4 | !default.pbxuser 5 | *.mode1v3 6 | !default.mode1v3 7 | *.mode2v3 8 | !default.mode2v3 9 | *.perspectivev3 10 | !default.perspectivev3 11 | xcuserdata 12 | *.xccheckout 13 | *.moved-aside 14 | DerivedData 15 | *.xcuserstate 16 | # AppCode etc. 17 | .idea/ 18 | # Desktop Servies 19 | .DS_Store 20 | 21 | # Carthage 22 | Carthage/Build 23 | -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2014 Hearst 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapper.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'ObjectMapper' 3 | s.version = '1.2.0' 4 | s.license = 'MIT' 5 | s.summary = 'JSON Object mapping written in Swift' 6 | s.homepage = 'https://github.com/Hearst-DD/ObjectMapper' 7 | s.authors = { 'Tristan Himmelman' => 'tristanhimmelman@gmail.com' } 8 | s.source = { :git => 'https://github.com/Hearst-DD/ObjectMapper.git', :tag => s.version.to_s } 9 | 10 | s.watchos.deployment_target = '2.0' 11 | s.ios.deployment_target = '8.0' 12 | s.osx.deployment_target = '10.9' 13 | s.tvos.deployment_target = '9.0' 14 | 15 | s.requires_arc = 'true' 16 | s.source_files = 'ObjectMapper/**/*.swift' 17 | end 18 | -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapper.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapper.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapper.xcworkspace/xcshareddata/ObjectMapper.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "58AAB0051E2B4EEDF1845A552012E6D0EBAD9127", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "58AAB0051E2B4EEDF1845A552012E6D0EBAD9127" : 0, 8 | "95438028B10BBB846574013D29F154A00556A9D1" : 0 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "A42BB54B-7EE9-41B5-B851-0FC3BB5A9811", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "58AAB0051E2B4EEDF1845A552012E6D0EBAD9127" : "ObjectMapper", 13 | "95438028B10BBB846574013D29F154A00556A9D1" : "ObjectMapperCarthage\/Checkouts\/Nimble" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "ObjectMapper", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 203, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "ObjectMapper.xcworkspace", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/Hearst-DD\/ObjectMapper.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "58AAB0051E2B4EEDF1845A552012E6D0EBAD9127" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/Quick\/Nimble.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "95438028B10BBB846574013D29F154A00556A9D1" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapper/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 | 0.14 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapper/ObjectMapper.h: -------------------------------------------------------------------------------- 1 | // 2 | // ObjectMapper.h 3 | // ObjectMapper 4 | // 5 | // Created by Tristan Himmelman on 2014-10-16. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | 30 | #import 31 | 32 | //! Project version number for ObjectMapper. 33 | FOUNDATION_EXPORT double ObjectMapperVersionNumber; 34 | 35 | //! Project version string for ObjectMapper. 36 | FOUNDATION_EXPORT const unsigned char ObjectMapperVersionString[]; 37 | 38 | // In this header, you should import all the public headers of your framework using statements like #import 39 | 40 | 41 | -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapper/Transforms/CustomDateFormatTransform.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomDateFormatTransform.swift 3 | // ObjectMapper 4 | // 5 | // Created by Dan McCracken on 3/8/15. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | import Foundation 30 | 31 | public class CustomDateFormatTransform: DateFormatterTransform { 32 | 33 | public init(formatString: String) { 34 | let formatter = NSDateFormatter() 35 | formatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") 36 | formatter.dateFormat = formatString 37 | 38 | super.init(dateFormatter: formatter) 39 | } 40 | } -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapper/Transforms/DateFormatterTransform.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DateFormatterTransform.swift 3 | // ObjectMapper 4 | // 5 | // Created by Tristan Himmelman on 2015-03-09. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | import Foundation 30 | 31 | public class DateFormatterTransform: TransformType { 32 | public typealias Object = NSDate 33 | public typealias JSON = String 34 | 35 | let dateFormatter: NSDateFormatter 36 | 37 | public init(dateFormatter: NSDateFormatter) { 38 | self.dateFormatter = dateFormatter 39 | } 40 | 41 | public func transformFromJSON(value: AnyObject?) -> NSDate? { 42 | if let dateString = value as? String { 43 | return dateFormatter.dateFromString(dateString) 44 | } 45 | return nil 46 | } 47 | 48 | public func transformToJSON(value: NSDate?) -> String? { 49 | if let date = value { 50 | return dateFormatter.stringFromDate(date) 51 | } 52 | return nil 53 | } 54 | } -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapper/Transforms/DateTransform.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DateTransform.swift 3 | // ObjectMapper 4 | // 5 | // Created by Tristan Himmelman on 2014-10-13. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | import Foundation 30 | 31 | public class DateTransform: TransformType { 32 | public typealias Object = NSDate 33 | public typealias JSON = Double 34 | 35 | public init() {} 36 | 37 | public func transformFromJSON(value: AnyObject?) -> NSDate? { 38 | if let timeInt = value as? Double { 39 | return NSDate(timeIntervalSince1970: NSTimeInterval(timeInt)) 40 | } 41 | 42 | if let timeStr = value as? String { 43 | return NSDate(timeIntervalSince1970: NSTimeInterval(atof(timeStr))) 44 | } 45 | 46 | return nil 47 | } 48 | 49 | public func transformToJSON(value: NSDate?) -> Double? { 50 | if let date = value { 51 | return Double(date.timeIntervalSince1970) 52 | } 53 | return nil 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapper/Transforms/EnumTransform.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EnumTransform.swift 3 | // ObjectMapper 4 | // 5 | // Created by Kaan Dedeoglu on 3/20/15. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | import Foundation 30 | 31 | public class EnumTransform: TransformType { 32 | public typealias Object = T 33 | public typealias JSON = T.RawValue 34 | 35 | public init() {} 36 | 37 | public func transformFromJSON(value: AnyObject?) -> T? { 38 | if let raw = value as? T.RawValue { 39 | return T(rawValue: raw) 40 | } 41 | return nil 42 | } 43 | 44 | public func transformToJSON(value: T?) -> T.RawValue? { 45 | if let obj = value { 46 | return obj.rawValue 47 | } 48 | return nil 49 | } 50 | } -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapper/Transforms/ISO8601DateTransform.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ISO8601DateTransform.swift 3 | // ObjectMapper 4 | // 5 | // Created by Jean-Pierre Mouilleseaux on 21 Nov 2014. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | import Foundation 30 | 31 | public class ISO8601DateTransform: DateFormatterTransform { 32 | 33 | public init() { 34 | let formatter = NSDateFormatter() 35 | formatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") 36 | formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" 37 | 38 | super.init(dateFormatter: formatter) 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapper/Transforms/NSDecimalNumberTransform.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public class NSDecimalNumberTransform: TransformType { 4 | public typealias Object = NSDecimalNumber 5 | public typealias JSON = String 6 | 7 | public init() {} 8 | 9 | public func transformFromJSON(value: AnyObject?) -> NSDecimalNumber? { 10 | if let string = value as? String { 11 | return NSDecimalNumber(string: string) 12 | } 13 | if let double = value as? Double { 14 | return NSDecimalNumber(double: double) 15 | } 16 | return nil 17 | } 18 | 19 | public func transformToJSON(value: NSDecimalNumber?) -> String? { 20 | guard let value = value else { return nil } 21 | return value.description 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapper/Transforms/TransformOf.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TransformOf.swift 3 | // ObjectMapper 4 | // 5 | // Created by Syo Ikeda on 1/23/15. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | public class TransformOf: TransformType { 30 | public typealias Object = ObjectType 31 | public typealias JSON = JSONType 32 | 33 | private let fromJSON: JSONType? -> ObjectType? 34 | private let toJSON: ObjectType? -> JSONType? 35 | 36 | public init(fromJSON: JSONType? -> ObjectType?, toJSON: ObjectType? -> JSONType?) { 37 | self.fromJSON = fromJSON 38 | self.toJSON = toJSON 39 | } 40 | 41 | public func transformFromJSON(value: AnyObject?) -> ObjectType? { 42 | return fromJSON(value as? JSONType) 43 | } 44 | 45 | public func transformToJSON(value: ObjectType?) -> JSONType? { 46 | return toJSON(value) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapper/Transforms/TransformType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TransformType.swift 3 | // ObjectMapper 4 | // 5 | // Created by Syo Ikeda on 2/4/15. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | public protocol TransformType { 30 | associatedtype Object 31 | associatedtype JSON 32 | 33 | func transformFromJSON(value: AnyObject?) -> Object? 34 | func transformToJSON(value: Object?) -> JSON? 35 | } 36 | -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapper/Transforms/URLTransform.swift: -------------------------------------------------------------------------------- 1 | // 2 | // URLTransform.swift 3 | // ObjectMapper 4 | // 5 | // Created by Tristan Himmelman on 2014-10-27. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | import Foundation 30 | 31 | public class URLTransform: TransformType { 32 | public typealias Object = NSURL 33 | public typealias JSON = String 34 | 35 | public init() {} 36 | 37 | public func transformFromJSON(value: AnyObject?) -> NSURL? { 38 | if let URLString = value as? String { 39 | return NSURL(string: URLString) 40 | } 41 | return nil 42 | } 43 | 44 | public func transformToJSON(value: NSURL?) -> String? { 45 | if let URL = value { 46 | return URL.absoluteString 47 | } 48 | return nil 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapperTests/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 | -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapperTests/MapContextTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MapContextTests.swift 3 | // ObjectMapper 4 | // 5 | // Created by Tristan Himmelman on 2016-05-10. 6 | // Copyright © 2016 hearst. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import ObjectMapper 11 | 12 | class MapContextTests: 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 testMappingWithContext() { 25 | let JSON = ["name":"Tristan"] 26 | let context = Context(shouldMap: true) 27 | 28 | let person = Mapper(context: context).map(JSON) 29 | 30 | XCTAssertNotNil(person) 31 | XCTAssertNotNil(person?.name) 32 | } 33 | 34 | func testMappingWithoutContext() { 35 | let JSON = ["name" : "Tristan"] 36 | 37 | let person = Mapper().map(JSON) 38 | 39 | XCTAssertNotNil(person) 40 | XCTAssertNil(person?.name) 41 | } 42 | 43 | struct Context: MapContext { 44 | var shouldMap = false 45 | 46 | init(shouldMap: Bool){ 47 | self.shouldMap = shouldMap 48 | } 49 | } 50 | 51 | class Person: Mappable { 52 | var name: String? 53 | 54 | required init?(_ map: Map){ 55 | 56 | } 57 | 58 | func mapping(map: Map) { 59 | if (map.context as? Context)?.shouldMap == true { 60 | name <- map["name"] 61 | } 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapperTests/MappableExtensionsTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MappableExtensionsTests.swift 3 | // ObjectMapper 4 | // 5 | // Created by Scott Hoyt on 10/25/15. 6 | // Copyright © 2015 hearst. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import XCTest 11 | import ObjectMapper 12 | 13 | struct TestMappable : Mappable, Equatable, Hashable { 14 | static let valueForString = "This string should work" 15 | static let workingJSONString = "{ \"value\" : \"\(valueForString)\" }" 16 | static let workingJSON: [String: AnyObject] = ["value" : valueForString] 17 | static let workingJSONArrayString = "[\(workingJSONString)]" 18 | 19 | var value: String? 20 | 21 | init() {} 22 | init?(_ map: Map) { } 23 | 24 | mutating func mapping(map: Map) { 25 | value <- map["value"] 26 | } 27 | 28 | var hashValue: Int { 29 | if let value = value { 30 | return value.hashValue 31 | } 32 | return [].hashValue 33 | } 34 | } 35 | 36 | func ==(lhs: TestMappable, rhs: TestMappable) -> Bool { 37 | return lhs.value == rhs.value 38 | } 39 | 40 | class MappableExtensionsTests: XCTestCase { 41 | 42 | var testMappable: TestMappable! 43 | 44 | override func setUp() { 45 | super.setUp() 46 | testMappable = TestMappable() 47 | testMappable.value = TestMappable.valueForString 48 | } 49 | 50 | func testInitFromString() { 51 | let mapped = TestMappable(JSONString: TestMappable.workingJSONString) 52 | 53 | XCTAssertNotNil(mapped) 54 | XCTAssertEqual(mapped?.value, TestMappable.valueForString) 55 | } 56 | 57 | func testToJSONAndBack() { 58 | let mapped = TestMappable(JSON: testMappable.toJSON()) 59 | XCTAssertEqual(mapped, testMappable) 60 | } 61 | 62 | func testArrayFromString() { 63 | let mapped = [TestMappable](JSONString: TestMappable.workingJSONArrayString)! 64 | XCTAssertEqual(mapped, [testMappable]) 65 | } 66 | 67 | func testArrayToJSONAndBack() { 68 | let mapped = [TestMappable](JSONArray: [testMappable].toJSON()) 69 | XCTAssertEqual(mapped!, [testMappable]) 70 | } 71 | 72 | func testSetInitFailsWithEmptyString() { 73 | XCTAssertNil(Set(JSONString: "")) 74 | } 75 | 76 | func testSetFromString() { 77 | let mapped = Set(JSONString: TestMappable.workingJSONArrayString)! 78 | XCTAssertEqual(mapped, Set([testMappable])) 79 | } 80 | 81 | func testSetToJSONAndBack() { 82 | let mapped = Set(JSONArray: Set([testMappable]).toJSON()) 83 | XCTAssertEqual(mapped, [testMappable]) 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /RNUberSDK/ObjectMapper/ObjectMapperTests/NSDecimalNumberTransformTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import ObjectMapper 3 | 4 | class NSDecimalNumberTransformTests: XCTestCase { 5 | 6 | let mapper = Mapper() 7 | 8 | func testNSDecimalNumberTransform() { 9 | let int: Int = 11 10 | let double: Double = 11.11 11 | let intString = "\(int)" 12 | let doubleString = "\(double)" 13 | let JSONString = "{\"double\" : \(double), \"int\" : \(int), \"intString\" : \"\(intString)\", \"doubleString\" : \"\(doubleString)\"}" 14 | 15 | let mappedObject = mapper.map(JSONString) 16 | 17 | XCTAssertNotNil(mappedObject) 18 | XCTAssertEqual(mappedObject?.int, NSDecimalNumber(integer: int)) 19 | XCTAssertEqual(mappedObject?.double, NSDecimalNumber(double: double)) 20 | XCTAssertEqual(mappedObject?.intString, NSDecimalNumber(string: intString)) 21 | XCTAssertEqual(mappedObject?.doubleString, NSDecimalNumber(string: doubleString)) 22 | } 23 | } 24 | 25 | class NSDecimalNumberType: Mappable { 26 | 27 | var int: NSDecimalNumber? 28 | var double: NSDecimalNumber? 29 | var intString: NSDecimalNumber? 30 | var doubleString: NSDecimalNumber? 31 | 32 | init(){ 33 | 34 | } 35 | 36 | required init?(_ map: Map){ 37 | 38 | } 39 | 40 | func mapping(map: Map) { 41 | int <- (map["int"], NSDecimalNumberTransform()) 42 | double <- (map["double"], NSDecimalNumberTransform()) 43 | intString <- (map["intString"], NSDecimalNumberTransform()) 44 | doubleString <- (map["doubleString"], NSDecimalNumberTransform()) 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /RNUberSDK/RNUberSDK.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RNUberSDK/RNUberSDK/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 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /RNUberSDK/RNUberSDK/RNUberSDK.h: -------------------------------------------------------------------------------- 1 | // 2 | // RNUberSDK.h 3 | // RNUberSDK 4 | // 5 | // Created by Alexey Kureev on 30/06/16. 6 | // Copyright © 2016 oss. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for RNUberSDK. 12 | FOUNDATION_EXPORT double RNUberSDKVersionNumber; 13 | 14 | //! Project version string for RNUberSDK. 15 | FOUNDATION_EXPORT const unsigned char RNUberSDKVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides.xcodeproj/project.xcworkspace/xcshareddata/UberRides.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "4403BC53303025133276511ADA74288E4A8B27AA", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "58AAB0051E2B4EEDF1845A552012E6D0EBAD9127" : 0, 8 | "4403BC53303025133276511ADA74288E4A8B27AA" : 0, 9 | "A11A2549D5CB40607BCC5ED8DF4A3BF3E6CE30E2" : 0 10 | }, 11 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "89DAB4AA-9E20-449F-8872-70F1F06E95C7", 12 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 13 | "58AAB0051E2B4EEDF1845A552012E6D0EBAD9127" : "rides-ios-sdk\/Carthage\/Checkouts\/ObjectMapper\/", 14 | "4403BC53303025133276511ADA74288E4A8B27AA" : "rides-ios-sdk\/", 15 | "A11A2549D5CB40607BCC5ED8DF4A3BF3E6CE30E2" : "rides-ios-sdk\/Carthage\/Checkouts\/OHHTTPStubs\/" 16 | }, 17 | "DVTSourceControlWorkspaceBlueprintNameKey" : "UberRides", 18 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 19 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "source\/UberRides.xcodeproj", 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 21 | { 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/uber\/rides-ios-sdk", 23 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 24 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "4403BC53303025133276511ADA74288E4A8B27AA" 25 | }, 26 | { 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/Hearst-DD\/ObjectMapper.git", 28 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 29 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "58AAB0051E2B4EEDF1845A552012E6D0EBAD9127" 30 | }, 31 | { 32 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/AliSoftware\/OHHTTPStubs.git", 33 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 34 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "A11A2549D5CB40607BCC5ED8DF4A3BF3E6CE30E2" 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRides/AppStoreDeeplink.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppStoreDeeplink.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import Foundation 26 | 27 | /** 28 | * A Deeplinking object for authenticating a user via the native Uber app 29 | */ 30 | @objc(UBSDKAppStoreDeeplink) public class AppStoreDeeplink: BaseDeeplink { 31 | 32 | /** 33 | Initializes an App Store Deeplink to bring the user to the appstore 34 | 35 | - returns: An initialized AppStoreDeeplink 36 | */ 37 | public init(userAgent: String?) { 38 | let scheme = "https" 39 | let domain = "m.uber.com" 40 | let path = "/sign-up" 41 | 42 | let clientIDQueryItem = NSURLQueryItem(name: "client_id", value: Configuration.getClientID()) 43 | 44 | let userAgent = userAgent ?? "rides-ios-v\(Configuration.sdkVersion)" 45 | 46 | let userAgentQueryItem = NSURLQueryItem(name: "user-agent", value: userAgent) 47 | 48 | let queryItems = [clientIDQueryItem, userAgentQueryItem] 49 | 50 | super.init(scheme: scheme, domain: domain, path: path, queryItems: queryItems)! 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/AuthenticationDeeplink.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AuthenticationDeeplink.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import Foundation 26 | 27 | /** 28 | * A Deeplinking object for authenticating a user via the native Uber app 29 | */ 30 | @objc(UBSDKAuthenticationDeeplink) public class AuthenticationDeeplink: BaseDeeplink { 31 | 32 | /** 33 | Initializes an Authentication Deeplink to request the provided scopes 34 | 35 | - parameter scopes: An array of RidesScopes you would like to request 36 | 37 | - returns: An initialized AuthenticationDeeplink 38 | */ 39 | public init(scopes: [RidesScope]) { 40 | let queryItems = AuthenticationURLUtility.buildQueryParameters(scopes) 41 | let scheme = "uberauth" 42 | let domain = "connect" 43 | 44 | super.init(scheme: scheme, domain: domain, path: nil, queryItems: queryItems)! 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/DeeplinkErrorFactory.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeeplinkErrorFactory.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | /// Factory class for creating DeeplinkErrors 26 | class DeeplinkErrorFactory { 27 | 28 | static let errorDomain = "com.uber.rides-ios-sdk.deeplinkerror" 29 | 30 | /** 31 | Creates a NSError using the provided DeeplinkErrorType 32 | 33 | - parameter deeplinkErrorType: The DeeplinkErrorType to create the error with 34 | 35 | - returns: An initialized NSError 36 | */ 37 | static func errorForType(deeplinkErrorType: DeeplinkErrorType) -> NSError { 38 | return NSError(domain: errorDomain, code: deeplinkErrorType.rawValue, userInfo: nil) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/DeeplinkErrorType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeeplinkErrorType.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | /** 26 | Possible deeplink error types 27 | 28 | - DeeplinkNotFollowed: The user declined a prompt to follow the deeplink (iOS 9+ only) 29 | - UnableToFollow: The deeplink attempted to open the url, but failed 30 | - UnableToOpen: The application either is unable to open the URL or was unable to query for the provided deeplink scheme (iOS 9+ only). The latter requires you to add it to your application's plist file under LSQpplicationQueriesSchemes 31 | */ 32 | @objc enum DeeplinkErrorType : Int { 33 | case DeeplinkNotFollowed 34 | case UnableToFollow 35 | case UnableToOpen 36 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRides/DeeplinkRequestingBehavior.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeeplinkRequestingBehavior.swift 3 | // UberRides 4 | // 5 | // Copyright © 2015 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | @objc(UBSDKDeeplinkRequestingBehavior) public class DeeplinkRequestingBehavior : NSObject, RideRequesting { 25 | 26 | /** 27 | Requests a ride using a RequestDeeplink that is constructed using the provided 28 | rideParameters 29 | 30 | - parameter rideParameters: The RideParameters to use for building and executing 31 | the deeplink 32 | */ 33 | @objc public func requestRide(rideParameters: RideParameters?) { 34 | guard let rideParameters = rideParameters else { 35 | return 36 | } 37 | let deeplink = createDeeplink(rideParameters) 38 | 39 | let deeplinkCompletion: (NSError?) -> () = { error in 40 | if let error = error where error.code != DeeplinkErrorType.DeeplinkNotFollowed.rawValue { 41 | self.createAppStoreDeeplink(rideParameters).execute(nil) 42 | } 43 | } 44 | 45 | deeplink.execute(deeplinkCompletion) 46 | } 47 | 48 | func createDeeplink(rideParameters: RideParameters) -> RequestDeeplink { 49 | return RequestDeeplink(rideParameters: rideParameters) 50 | } 51 | 52 | func createAppStoreDeeplink(rideParameters: RideParameters) -> Deeplinking { 53 | return AppStoreDeeplink(userAgent: rideParameters.userAgent) 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/DeeplinkingProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeeplinkingProtocol.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | /** 26 | * Protocol for defining a deeplink that can be executed to open an external app 27 | */ 28 | @objc(UBSDKDeeplinking) public protocol Deeplinking { 29 | 30 | /// The deeplink scheme to use, where a deeplink takes the form scheme://domain/path?query 31 | var scheme: String { get } 32 | 33 | /// The domain of the deeplink, where a deeplink takes the form scheme://domain/path?query 34 | var domain: String { get } 35 | 36 | /// The path of the deeplink, where a deeplink takes the form scheme://domain/path?query 37 | var path: String? { get } 38 | 39 | /// The query parameter items for the deeplink, where a deeplink takes the form scheme://domain/path?query 40 | var queryItems: [NSURLQueryItem]? { get } 41 | 42 | /// The deeplink URL that the deeplink will execute 43 | var deeplinkURL: NSURL { get } 44 | 45 | /** 46 | Execute a deeplink to launch into an external app 47 | 48 | - returns: true if the deeplink was executed, false otherwise. 49 | */ 50 | 51 | /** 52 | Execute a deeplink to launch into an external app 53 | 54 | - parameter completion: The completion block to execute once the deeplink has 55 | executed. Passes in True if the url was successfully opened, false otherwise. 56 | */ 57 | @objc func execute(completion: ((NSError?) -> ())?) 58 | } 59 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/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 | 0.5.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Model/DistanceEstimate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DistanceEstimate.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import ObjectMapper 26 | 27 | // MARK: DistanceEstimate 28 | 29 | /** 30 | * Estimate information on an Uber trip. 31 | */ 32 | @objc(UBSDKDistanceEstimate) public class DistanceEstimate: NSObject { 33 | 34 | /// Expected activity distance. 35 | public private(set) var distance: Double = 0.0 36 | 37 | /// The unit of distance (mile or km). 38 | public private(set) var distanceUnit: String? 39 | 40 | /// Expected activity duration (in seconds). 41 | public private(set) var duration: Int = 0 42 | 43 | public required init?(_ map: Map) { 44 | } 45 | } 46 | 47 | extension DistanceEstimate: UberModel { 48 | public func mapping(map: Map) { 49 | distance <- map["distance_estimate"] 50 | distanceUnit <- map["distance_unit"] 51 | duration <- map["duration_estimate"] 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Model/Driver.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Driver.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import ObjectMapper 26 | 27 | // MARK: Driver 28 | 29 | /** 30 | * Contains information for an Uber driver dispatched for a ride request. 31 | */ 32 | @objc(UBSDKDriver) public class Driver: NSObject { 33 | 34 | /// The first name of the driver. 35 | public private(set) var name: String? 36 | 37 | /// The URL to the photo of the driver. 38 | public private(set) var pictureURL: String? 39 | 40 | /// The formatted phone number for contacting the driver. 41 | public private(set) var phoneNumber: String? 42 | 43 | /// The driver's star rating out of 5 stars. 44 | public private(set) var rating: Double = 0.0 45 | 46 | public required init?(_ map: Map) { 47 | } 48 | } 49 | 50 | extension Driver: UberModel { 51 | public func mapping(map: Map) { 52 | name <- map["name"] 53 | pictureURL <- map["picture_url"] 54 | phoneNumber <- map["phone_number"] 55 | rating <- map["rating"] 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Model/PaymentMethod.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PaymentMethod.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import ObjectMapper 26 | 27 | // MARK: PaymentMethods 28 | 29 | /** 30 | * Internal struct for handling a list of payment methods 31 | */ 32 | struct PaymentMethods { 33 | var lastUsed: String? 34 | var list: [PaymentMethod]? 35 | 36 | init?(_ map: Map) { 37 | } 38 | } 39 | 40 | extension PaymentMethods: UberModel { 41 | mutating func mapping(map: Map) { 42 | lastUsed <- map["last_used"] 43 | list <- map["payment_methods"] 44 | } 45 | } 46 | 47 | // MARK: PaymentMethod 48 | 49 | @objc(UBSDKPaymentMethod) public class PaymentMethod: NSObject { 50 | 51 | /// The account identification or description associated with the payment method. 52 | public private(set) var paymentDescription: String? 53 | 54 | /// Unique identifier of the payment method. 55 | public private(set) var methodID: String? 56 | 57 | /// The type of the payment method. See https://developer.uber.com/docs/v1-payment-methods. 58 | public private(set) var type: String? 59 | 60 | public required init?(_ map: Map) { 61 | } 62 | } 63 | 64 | extension PaymentMethod: UberModel { 65 | public func mapping(map: Map) { 66 | paymentDescription <- map["description"] 67 | methodID <- map["payment_method_id"] 68 | type <- map["type"] 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Model/Place.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Place.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import ObjectMapper 26 | 27 | /** 28 | * Describes a pre-set place for an Uber account (home or work). 29 | */ 30 | @objc(UBSDKPlace) public class Place: NSObject { 31 | 32 | /// Convenience constant for "home" place ID 33 | public static let Home = "home" 34 | 35 | /// Convenience constant for "work" place ID 36 | public static let Work = "work" 37 | 38 | /// Fully qualified address of the location. 39 | public private(set) var address: String? 40 | 41 | public required init?(_ map: Map) { 42 | } 43 | } 44 | 45 | extension Place: UberModel { 46 | public func mapping(map: Map) { 47 | address <- map["address"] 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Model/RideCharge.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RideCharge.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import ObjectMapper 26 | 27 | // MARK: RideCharge 28 | 29 | /** 30 | * Describes the charges made against the rider in a ride receipt. 31 | */ 32 | @objc(UBSDKRideCharge) public class RideCharge: NSObject { 33 | 34 | /// The amount of the charge. 35 | public private(set) var amount: Float = 0.0 36 | 37 | /// The name of the charge. 38 | public private(set) var name: String? 39 | 40 | /// The type of the charge. 41 | public private(set) var type: String? 42 | 43 | public required init?(_ map: Map) { 44 | } 45 | } 46 | 47 | extension RideCharge: UberModel { 48 | public func mapping(map: Map) { 49 | amount <- map["amount"] 50 | name <- map["name"] 51 | type <- map["type"] 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Model/RideEstimate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RideEstimate.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import ObjectMapper 26 | 27 | // MARK: RideEstimate 28 | 29 | /** 30 | * Contains estimates for a desired ride request. 31 | */ 32 | @objc(UBSDKRideEstimate) public class RideEstimate: NSObject { 33 | 34 | /// Details of the estimated fare. If end location omitted, only the minimum is returned. 35 | public private(set) var priceEstimate: PriceEstimate? 36 | 37 | /// Details of the estimated distance. Nil if end location is omitted. 38 | public private(set) var distanceEstimate: DistanceEstimate? 39 | 40 | /// The estimated time of vehicle arrival in minutes. -1 if there are no cars available. 41 | public private(set) var pickupEstimate: Int = -1 42 | 43 | public required init?(_ map: Map) { 44 | } 45 | } 46 | 47 | extension RideEstimate: UberModel { 48 | public func mapping(map: Map) { 49 | priceEstimate <- map["price"] 50 | distanceEstimate <- map["trip"] 51 | pickupEstimate <- map["pickup_estimate"] 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Model/RideMap.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RideMap.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import ObjectMapper 26 | 27 | // MARK: RideMap 28 | 29 | /** 30 | * Visual representation of a ride request, only available after a request is accepted. 31 | */ 32 | @objc(UBSDKRideMap) public class RideMap: NSObject { 33 | 34 | /// URL to a map representing the requested trip. 35 | public private(set) var path: String? 36 | 37 | /// Unique identifier representing a ride request. 38 | public private(set) var requestID: String? 39 | 40 | public required init?(_ map: Map) { 41 | } 42 | } 43 | 44 | extension RideMap: UberModel { 45 | public func mapping(map: Map) { 46 | path <- map["href"] 47 | requestID <- map["request_id"] 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Model/RideRequestLocation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RideRequestLocation.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import ObjectMapper 26 | 27 | // MARK: RideRequestLocation 28 | 29 | /** 30 | * Location of a pickup or destination in a ride request. 31 | */ 32 | @objc(UBSDKRideRequestLocation) public class RideRequestLocation: NSObject { 33 | 34 | /// The current bearing in degrees for a moving location. 35 | public private(set) var bearing: Int = 0 36 | 37 | /// ETA is only available when the trips is accepted or arriving. 38 | public private(set) var eta: Int = 0 39 | 40 | /// The latitude of the location. 41 | public private(set) var latitude: Double = 0 42 | 43 | /// The longitude of the location. 44 | public private(set) var longitude: Double = 0 45 | 46 | public required init?(_ map: Map) { 47 | } 48 | } 49 | 50 | extension RideRequestLocation: UberModel { 51 | public func mapping(map: Map) { 52 | bearing <- map["bearing"] 53 | eta <- map["eta"] 54 | latitude <- map["latitude"] 55 | longitude <- map["longitude"] 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Model/TimeEstimate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TimeEstimate.swift 3 | // UberRides 4 | // 5 | // Copyright © 2015 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import ObjectMapper 26 | 27 | // MARK: TimeEstimates 28 | 29 | /** 30 | * Internal object that contains a list of ETAs for Uber products. 31 | */ 32 | struct TimeEstimates { 33 | var list: [TimeEstimate]? 34 | init?(_ map: Map) { 35 | } 36 | } 37 | 38 | extension TimeEstimates: UberModel { 39 | mutating func mapping(map: Map) { 40 | list <- map["times"] 41 | } 42 | } 43 | 44 | // MARK: TimeEstimate 45 | 46 | /** 47 | * Contains information regarding the ETA of an Uber product. 48 | */ 49 | @objc(UBSDKTimeEstimate) public class TimeEstimate: NSObject { 50 | /// Unique identifier representing a specific product for a given latitude & longitude. 51 | public private(set) var productID: String? 52 | 53 | /// Display name of product. Ex: "UberBLACK". 54 | public private(set) var name: String? 55 | 56 | /// ETA for the product (in seconds). 57 | public private(set) var estimate: Int = 0 58 | 59 | public required init?(_ map: Map) { 60 | } 61 | } 62 | 63 | extension TimeEstimate: UberModel { 64 | public func mapping(map: Map) { 65 | productID <- map["product_id"] 66 | name <- map["display_name"] 67 | estimate <- map["estimate"] 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Model/UserProfile.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserProfile.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import ObjectMapper 26 | 27 | // MARK: UserProfile 28 | 29 | /** 30 | * Information regarding an Uber user. 31 | */ 32 | @objc(UBSDKUserProfile) public class UserProfile: NSObject { 33 | /// First name of the Uber user. 34 | public private(set) var firstName: String? 35 | 36 | /// Last name of the Uber user. 37 | public private(set) var lastName: String? 38 | 39 | /// Email address of the Uber user. 40 | public private(set) var email: String? 41 | 42 | /// Image URL of the Uber user. 43 | public private(set) var picturePath: String? 44 | 45 | /// Promo code of the Uber user. 46 | public private(set) var promoCode: String? 47 | 48 | /// Unique identifier of the Uber user. 49 | public private(set) var UUID: String? 50 | 51 | public required init?(_ map: Map) { 52 | } 53 | } 54 | 55 | extension UserProfile: UberModel { 56 | public func mapping(map: Map) { 57 | firstName <- map["first_name"] 58 | lastName <- map["last_name"] 59 | email <- map["email"] 60 | picturePath <- map["picture"] 61 | promoCode <- map["promo_code"] 62 | UUID <- map["uuid"] 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Model/Vehicle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Vehicle.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import ObjectMapper 26 | 27 | // MARK: Vehicle 28 | 29 | /** 30 | * Contains information for an Uber driver's car. 31 | */ 32 | @objc(UBSDKVehicle) public class Vehicle: NSObject { 33 | 34 | /// The license plate number of the vehicle. 35 | public private(set) var licensePlate: String? 36 | 37 | /// The vehicle make or brand. 38 | public private(set) var make: String? 39 | 40 | /// The vehicle model or type. 41 | public private(set) var model: String? 42 | 43 | /// The URL to a stock photo of the vehicle (may be null). 44 | public private(set) var pictureURL: String? 45 | 46 | public required init?(_ map: Map) { 47 | } 48 | } 49 | 50 | extension Vehicle: UberModel { 51 | public func mapping(map: Map) { 52 | make <- map["make"] 53 | model <- map["model"] 54 | licensePlate <- map["license_plate"] 55 | pictureURL <- map["picture_url"] 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/ModelMapper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ModelMapper.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import ObjectMapper 26 | 27 | protocol UberModel: Mappable { 28 | init?(_ map: Map) 29 | mutating func mapping(map: Map) 30 | } 31 | 32 | /** 33 | * Layer between models and external callers mapping JSON to and from models. 34 | */ 35 | struct ModelMapper { 36 | /** 37 | Map a JSON string representation to a model that conforms to the Mappable protocol. 38 | 39 | - parameter json: string representing the JSON information. 40 | - returns: an object that conforms to the Mappable protocol. 41 | */ 42 | func mapFromJSON(json: NSString) -> U? { 43 | return Mapper().map(json) 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/OAuth/ImplicitGrantAuthenticator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImplicitGrantAuthenticator.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import UIKit 26 | 27 | /** 28 | * Defines the implicit grant authorization flow where access token is extracted from redirect fragment. 29 | */ 30 | @objc(UBSDKImplicitGrantAuthenticator) public class ImplicitGrantAuthenticator: LoginViewAuthenticator { 31 | 32 | override var endpoint: UberAPI { 33 | return OAuth.ImplicitLogin(clientID: Configuration.getClientID(), scopes: self.scopes, redirect: Configuration.getCallbackURIString(.Implicit)) 34 | } 35 | 36 | override public init(presentingViewController: UIViewController, scopes: [RidesScope]) { 37 | super.init(presentingViewController: presentingViewController, scopes: scopes) 38 | callbackURIType = .Implicit 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/OAuth/LoginViewAuthenticator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LoginViewAuthenticator.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import UIKit 26 | 27 | /// Base class for authorization flows that use the LoginView. 28 | @objc public class LoginViewAuthenticator: BaseAuthenticator { 29 | 30 | /// View controller that will present the login 31 | public var presentingViewController: UIViewController 32 | 33 | /// Endpoint to hit for authorization request. 34 | var endpoint: UberAPI { 35 | fatalError("Must initialize subclass") 36 | } 37 | 38 | @objc public init(presentingViewController: UIViewController, scopes: [RidesScope]) { 39 | self.presentingViewController = presentingViewController 40 | 41 | super.init(scopes: scopes) 42 | } 43 | 44 | override func login() { 45 | let oauthViewController = OAuthViewController(loginAuthenticator: self) 46 | let navController = UINavigationController(rootViewController: oauthViewController) 47 | presentingViewController.presentViewController(navController, animated: true, completion: nil) 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/OAuth/UberAuthenticatingProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UberAuthenticatingProtocol.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import UIKit 26 | 27 | /** 28 | * Protocol to conform to for defining an authorization flow. 29 | */ 30 | protocol UberAuthenticating { 31 | 32 | /// Optional access token identifier for keychain. 33 | var accessTokenIdentifier: String? { get set } 34 | 35 | /// Optional access group for keychain. 36 | var keychainAccessGroup: String? { get set } 37 | 38 | /// Completion handler for success and errors. 39 | var loginCompletion: ((accessToken: AccessToken?, error: NSError?) -> Void)? { get set } 40 | 41 | /// Scopes to request during authorization. 42 | var scopes: [RidesScope] { get set } 43 | 44 | /// The Callback URL Type to use for this authentication method 45 | var callbackURIType: CallbackURIType { get } 46 | 47 | /** 48 | Handles a request from the web view to see if it's a redirect. 49 | Redirects are handled differently for different authorization types. 50 | 51 | - parameter request: the URL request. 52 | 53 | - returns: true if a redirect was handled, false otherwise. 54 | */ 55 | func handleRedirectRequest(request: NSURLRequest) -> Bool 56 | 57 | /** 58 | Performs login for the requested scopes. 59 | */ 60 | func login() 61 | } 62 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/RequestDeeplink.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RequestDeeplink.swift 3 | // UberRides 4 | // 5 | // Copyright © 2015 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | import CoreLocation 27 | import UIKit 28 | 29 | /** 30 | * Builds and executes a deeplink to the native Uber app to request a ride. 31 | */ 32 | @objc(UBSDKRequestDeeplink) public class RequestDeeplink: BaseDeeplink { 33 | 34 | private let parameters: RideParameters 35 | private let clientID: String 36 | 37 | static let sourceString = "deeplink" 38 | 39 | @objc public init(rideParameters: RideParameters = RideParametersBuilder().build()) { 40 | parameters = rideParameters 41 | clientID = Configuration.getClientID() 42 | 43 | if rideParameters.source == nil { 44 | rideParameters.source = RequestDeeplink.sourceString 45 | } 46 | 47 | let queryItems = RequestURLUtil.buildRequestQueryParameters(rideParameters) 48 | let scheme = "uber" 49 | let domain = "" 50 | 51 | super.init(scheme: scheme, domain: domain, path: nil, queryItems: queryItems)! 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/Badge.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ios_rides-api_badge.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ios_rides-api_badge@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ios_rides-api_badge@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/Badge.imageset/ios_rides-api_badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kureev/react-native-uber-rides/0fcb5d2857d2b97f179963c67220a56e0c4286f0/RNUberSDK/UberRides/Resources/Media.xcassets/Badge.imageset/ios_rides-api_badge.png -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/Badge.imageset/ios_rides-api_badge@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kureev/react-native-uber-rides/0fcb5d2857d2b97f179963c67220a56e0c4286f0/RNUberSDK/UberRides/Resources/Media.xcassets/Badge.imageset/ios_rides-api_badge@2x.png -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/Badge.imageset/ios_rides-api_badge@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kureev/react-native-uber-rides/0fcb5d2857d2b97f179963c67220a56e0c4286f0/RNUberSDK/UberRides/Resources/Media.xcassets/Badge.imageset/ios_rides-api_badge@3x.png -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/Surge-BlackOutline.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "surgeIconDark.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/Surge-BlackOutline.imageset/surgeIconDark.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kureev/react-native-uber-rides/0fcb5d2857d2b97f179963c67220a56e0c4286f0/RNUberSDK/UberRides/Resources/Media.xcassets/Surge-BlackOutline.imageset/surgeIconDark.pdf -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/Surge-WhiteOutline.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "page1.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/Surge-WhiteOutline.imageset/page1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kureev/react-native-uber-rides/0fcb5d2857d2b97f179963c67220a56e0c4286f0/RNUberSDK/UberRides/Resources/Media.xcassets/Surge-WhiteOutline.imageset/page1.pdf -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/ic_back_arrow_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "back_arrow@1x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "back_arrow@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "back_arrow@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/ic_back_arrow_white.imageset/back_arrow@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kureev/react-native-uber-rides/0fcb5d2857d2b97f179963c67220a56e0c4286f0/RNUberSDK/UberRides/Resources/Media.xcassets/ic_back_arrow_white.imageset/back_arrow@1x.png -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/ic_back_arrow_white.imageset/back_arrow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kureev/react-native-uber-rides/0fcb5d2857d2b97f179963c67220a56e0c4286f0/RNUberSDK/UberRides/Resources/Media.xcassets/ic_back_arrow_white.imageset/back_arrow@2x.png -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/ic_back_arrow_white.imageset/back_arrow@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kureev/react-native-uber-rides/0fcb5d2857d2b97f179963c67220a56e0c4286f0/RNUberSDK/UberRides/Resources/Media.xcassets/ic_back_arrow_white.imageset/back_arrow@3x.png -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/ic_logo_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "uber_logotype_white@1x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "uber_logotype_white@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "uber_logotype_white@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/ic_logo_white.imageset/uber_logotype_white@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kureev/react-native-uber-rides/0fcb5d2857d2b97f179963c67220a56e0c4286f0/RNUberSDK/UberRides/Resources/Media.xcassets/ic_logo_white.imageset/uber_logotype_white@1x.png -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/ic_logo_white.imageset/uber_logotype_white@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kureev/react-native-uber-rides/0fcb5d2857d2b97f179963c67220a56e0c4286f0/RNUberSDK/UberRides/Resources/Media.xcassets/ic_logo_white.imageset/uber_logotype_white@2x.png -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/Media.xcassets/ic_logo_white.imageset/uber_logotype_white@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kureev/react-native-uber-rides/0fcb5d2857d2b97f179963c67220a56e0c4286f0/RNUberSDK/UberRides/Resources/Media.xcassets/ic_logo_white.imageset/uber_logotype_white@3x.png -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* The title of the request button that deep links to the Uber app */ 2 | "Ride there with Uber" = "Ride there with Uber"; 3 | "Get a ride" = "Get a ride"; 4 | "Sign in with Uber" = "Sign in with Uber"; 5 | "There was a problem authenticating you." = "There was a problem authenticating you."; 6 | "The Ride Request Widget encountered a problem." = "The Ride Request Widget encountered a problem."; 7 | "OK" = "OK"; 8 | "Done" = "Done"; 9 | "Invalid Client ID provided." = "Invalid Client ID provided."; 10 | "Invalid Redirect URI provided." = "Invalid Redirect URI provided."; 11 | "The server was unable to understand your request." = "The server was unable to understand your request."; 12 | "Unable to interpret the response from the server." = "Unable to interpret the response from the server."; 13 | "Your app is not authorized for the requested scopes." = "Your app is not authorized for the requested scopes."; 14 | "The Redirect URI provided did not match what was expected." = "The Redirect URI provided did not match what was expected."; 15 | "A server error occurred." = "A server error occurred."; 16 | "Unable to present the login view." = "Unable to present the login view."; 17 | "Unable to save the access token." = "Unable to save the access token."; 18 | "Login is temporarily unavailable." = "Login is temporarily unavailable."; 19 | "User cancelled the login process." = "User cancelled the login process."; 20 | "Try Again" = "Try Again"; 21 | "Cancel" = "Cancel"; 22 | "The operation you are attempting is not supported on the current device." = "The operation you are attempting is not supported on the current device."; 23 | "%d min away" = "%d min away"; 24 | "%d mins away" = "%d mins away"; 25 | "%1$@ for %2$@" = "%1$@ for %2$@"; 26 | "Sign In" = "Sign In"; 27 | "Sign Out" = "Sign Out"; 28 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/hi-In.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* The title of the request button that deep links to the Uber app */ 2 | "Ride there with Uber" = "Uber के साथ राइड करें"; 3 | "Get a ride" = "एक राइड पाएं"; 4 | "Sign in with Uber" = "Uber के साथ साइन इन करें"; 5 | "There was a problem authenticating you." = "आपका प्रमाणन करने में कोई समस्या थी."; 6 | "The Ride Request Widget encountered a problem." = "राइड अनुरोध विजेट में कोई समस्या आई."; 7 | "OK" = "ठीक"; 8 | "Done" = "संपन्न हुआ"; 9 | "Invalid Client ID provided." = "अमान्य Client ID उपलब्ध की गई."; 10 | "Invalid Redirect URI provided." = "अमान्य रीडायरेक्ट URI उपलब्ध किया गया."; 11 | "The server was unable to understand your request." = "सर्वर आपके अनुरोध को समझने में असमर्थ था."; 12 | "Unable to interpret the response from the server." = "सर्वर से प्रतिसाद की व्याख्या करने में असमर्थ हैं."; 13 | "Your app is not authorized for the requested scopes." = "अनुरोधित स्कोप के लिए आपका एप्लिकेशन प्राधिकृत नहीं है."; 14 | "The Redirect URI provided did not match what was expected." = "उपलब्ध रीडायरेक्ट URI अपेक्षित से मेल नहीं खा रहा था."; 15 | "A server error occurred." = "एक सर्वर त्रुटि उत्पन्न हुई."; 16 | "Unable to present the login view." = "लॉगिन दृश्य दिखाने में असमर्थ."; 17 | "Unable to save the access token." = "पहुँच टोकन को सहेजने में असमर्थ हैं."; 18 | "Login is temporarily unavailable." = "लॉगिन अस्थायी रूप से अनुपलब्ध है."; 19 | "User cancelled the login process." = "उपयोगकर्ता द्वारा लॉगिन प्रक्रिया रद्द की गई."; 20 | "Try Again" = "पुन: प्रयास करें"; 21 | "Cancel" = "रद्द"; 22 | "The operation you are attempting is not supported on the current device." = "The operation you are attempting is not supported on the current device."; 23 | "%d min away" = "%d मिनट दूर"; 24 | "%d mins away" = "%d मिनट दूर"; 25 | "%1$@ for %2$@" = "%2$@ के लिए %1$@"; 26 | "Sign In" = "साइन इन करें"; 27 | "Sign Out" = "साइन आउट करें"; 28 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/zh-Hans.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* The title of the request button that deep links to the Uber app */ 2 | "Ride there with Uber" = "搭乘优步前往"; 3 | "Get a ride" = "开始搭乘"; 4 | "Sign in with Uber" = "登录 Uber"; 5 | "There was a problem authenticating you." = "身份验证错误。"; 6 | "The Ride Request Widget encountered a problem." = "优步叫车插件错误。"; 7 | "OK" = "确定"; 8 | "Done" = "完成"; 9 | "Invalid Client ID provided." = "提供的客户端 ID 无效。"; 10 | "Invalid Redirect URI provided." = "提供的重定向 URI 无效。"; 11 | "The server was unable to understand your request." = "服务器无法理解您的请求。"; 12 | "Unable to interpret the response from the server." = "无法解释服务器的响应。"; 13 | "Your app is not authorized for the requested scopes." = "您的应用程序在请求的范围内无授权。"; 14 | "The Redirect URI provided did not match what was expected." = "提供的重定向 URI 与预期的 URI 不符。"; 15 | "A server error occurred." = "服务器出现错误。"; 16 | "Unable to present the login view." = "无法显示登录界面。"; 17 | "Unable to save the access token." = "无法保存访问口令。"; 18 | "Login is temporarily unavailable." = "暂时无法登录。"; 19 | "User cancelled the login process." = "用户已取消登录过程。"; 20 | "Try Again" = "重试"; 21 | "Cancel" = "取消"; 22 | "The operation you are attempting is not supported on the current device." = "The operation you are attempting is not supported on the current device."; 23 | "%d min away" = "%d 分钟后到达"; 24 | "%d mins away" = "%d 分钟后到达"; 25 | "%1$@ for %2$@" = "%2$@ 的 %1$@"; 26 | "Sign In" = "登录"; 27 | "Sign Out" = "退出"; 28 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/Resources/zh-Hant.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* The title of the request button that deep links to the Uber app */ 2 | "Ride there with Uber" = "搭乘优步前往"; 3 | "Get a ride" = "開始搭乘"; 4 | "Sign in with Uber" = "登入到Uber網站"; 5 | "There was a problem authenticating you." = "身份驗證發生問題。"; 6 | "The Ride Request Widget encountered a problem." = "乘客預約側邊欄出現問題。"; 7 | "OK" = "確定"; 8 | "Done" = "完成"; 9 | "Invalid Client ID provided." = "提供的客戶ID無效。"; 10 | "Invalid Redirect URI provided." = "所提供的重新導向URI無效。"; 11 | "The server was unable to understand your request." = "伺服器無法理解您的要求。"; 12 | "Unable to interpret the response from the server." = "無法解釋來自伺服器的回應。"; 13 | "Your app is not authorized for the requested scopes." = "您的應用程序無請求範圍的授權。"; 14 | "The Redirect URI provided did not match what was expected." = "所提供嘅重新導向 URI 與期望不符。"; 15 | "A server error occurred." = "伺服器發生錯誤。"; 16 | "Unable to present the login view." = "無法顯示登入畫面。"; 17 | "Unable to save the access token." = "無法儲存存取權杖。"; 18 | "Login is temporarily unavailable." = "暫時無法登入。"; 19 | "User cancelled the login process." = "使用者取消了登入程序。"; 20 | "Try Again" = "再試"; 21 | "Cancel" = "取消"; 22 | "The operation you are attempting is not supported on the current device." = "The operation you are attempting is not supported on the current device."; 23 | "%d min away" = "相距 %d 分鐘"; 24 | "%d mins away" = "相距 %d 分鐘"; 25 | "%1$@ for %2$@" = "%2$@ 的估價為 %1$@"; 26 | "Sign In" = "登入"; 27 | "Sign Out" = "登出"; 28 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/RideRequestViewErrorType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RideRequestViewErrorType.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | /** 26 | Possible errors that can occur in the RideRequestView. 27 | 28 | - AccessTokenMissing: There is no access token to make the request with 29 | - AccessTokenExpired: Access token has expired. 30 | - NetworkError: A network error occured 31 | - NotSupported: The functionality attempted is not supported on the current device 32 | - Unknown: Unknown error occured. 33 | */ 34 | @objc public enum RideRequestViewErrorType: Int { 35 | case AccessTokenExpired 36 | case AccessTokenMissing 37 | case NetworkError 38 | case NotSupported 39 | case Unknown 40 | 41 | func toString() -> String { 42 | switch self { 43 | case .AccessTokenExpired: 44 | return "unauthorized" 45 | case .AccessTokenMissing: 46 | return "no_access_token" 47 | case .NetworkError: 48 | return "network_error" 49 | case .NotSupported: 50 | return "not_supported" 51 | case .Unknown: 52 | return "unknown" 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/RideRequestingProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RideRequestingProtocol.swift 3 | // UberRides 4 | // 5 | // Copyright © 2016 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | /** 26 | * Protocol for an object that defines how to request a ride. Is expected to be used 27 | * by any control that can request a ride for a user. 28 | */ 29 | @objc(UBSDKRideRequesting) public protocol RideRequesting { 30 | /** 31 | Requests a ride using the provided RideParameters. 32 | 33 | - parameter rideParameters: The RideParameters to use for the ride request 34 | */ 35 | @objc func requestRide(rideParameters: RideParameters?) 36 | } 37 | -------------------------------------------------------------------------------- /RNUberSDK/UberRides/UberRides.h: -------------------------------------------------------------------------------- 1 | // 2 | // UberRides.h 3 | // UberRides 4 | // 5 | // Copyright © 2015 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | #import 27 | 28 | //! Project version number for UberRides. 29 | FOUNDATION_EXPORT double UberRidesVersionNumber; 30 | 31 | //! Project version string for UberRides. 32 | FOUNDATION_EXPORT const unsigned char UberRidesVersionString[]; 33 | 34 | // In this header, you should import all the public headers of your framework using statements like #import 35 | -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/DeeplinkErrorFactoryTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeeplinkErrorFactoryTests.swift 3 | // UberRides 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | import XCTest 24 | @testable import UberRides 25 | 26 | class DeeplinkErrorFactoryTests: XCTestCase { 27 | let expectedErrorToValueMapping = [ 28 | DeeplinkErrorType.DeeplinkNotFollowed : DeeplinkErrorType.DeeplinkNotFollowed.rawValue, 29 | DeeplinkErrorType.UnableToFollow : DeeplinkErrorType.UnableToFollow.rawValue, 30 | DeeplinkErrorType.UnableToOpen : DeeplinkErrorType.UnableToOpen.rawValue, 31 | ] 32 | 33 | func testCreateErrorsByErrorType() { 34 | 35 | for errorType in expectedErrorToValueMapping.keys { 36 | let deeplinkError = DeeplinkErrorFactory.errorForType(errorType) 37 | 38 | XCTAssertNotNil(deeplinkError) 39 | XCTAssertEqual(deeplinkError.code , errorType.rawValue) 40 | XCTAssertEqual(deeplinkError.domain , DeeplinkErrorFactory.errorDomain) 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/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 | 0.4.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/RequestEstimateNoCars.json: -------------------------------------------------------------------------------- 1 | { 2 | "price":{ 3 | "surge_confirmation_href": "https:\/\/api.uber.com\/v1\/surge-confirmations\/7d604f5e", 4 | "high_estimate": 6, 5 | "surge_confirmation_id": "7d604f5e", 6 | "minimum": 5, 7 | "low_estimate": 5, 8 | "surge_multiplier": 1.2, 9 | "display": "$5-6", 10 | "currency_code": "USD", 11 | }, 12 | "trip":{ 13 | "distance_unit": "mile", 14 | "duration_estimate": 540, 15 | "distance_estimate": 2.1 16 | }, 17 | "pickup_estimate":null 18 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/RideReceiptNullSurgeTotalOwed.json: -------------------------------------------------------------------------------- 1 | { 2 | "request_id": "b5512127-a134-4bf4-b1ba-fe9f48f56d9d", 3 | "charges": [ 4 | { 5 | "name": "Base Fare", 6 | "amount": 2.20, 7 | "type": "base_fare" 8 | }, 9 | { 10 | "name": "Distance", 11 | "amount": 2.75, 12 | "type": "distance", 13 | }, 14 | { 15 | "name": "Time", 16 | "amount": 3.57, 17 | "type": "time", 18 | } 19 | ], 20 | "surge_charge" : null, 21 | "charge_adjustments" : [ 22 | { 23 | "name": "Promotion", 24 | "amount": -2.43, 25 | "type": "promotion", 26 | }, 27 | { 28 | "name": "Booking Fee", 29 | "amount": 1.00, 30 | "type": "booking_fee", 31 | }, 32 | { 33 | "name": "Rounding Down", 34 | "amount": 0.78, 35 | "type": "rounding_down", 36 | }, 37 | ], 38 | "normal_fare": "$8.52", 39 | "subtotal": "$12.78", 40 | "total_charged": "$5.92", 41 | "total_owed": 0.50, 42 | "currency_code": "USD", 43 | "duration": "00:11:35", 44 | "distance": "1.49", 45 | "distance_label": "miles", 46 | } 47 | -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/UberRidesTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UberRidesTests.swift 3 | // UberRidesTests 4 | // 5 | // Copyright © 2015 Uber Technologies, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | import XCTest 27 | @testable import UberRides 28 | 29 | class UberRidesTests: XCTestCase { 30 | 31 | override func setUp() { 32 | super.setUp() 33 | // Put setup code here. This method is called before the invocation of each test method in the class. 34 | } 35 | 36 | override func tearDown() { 37 | // Put teardown code here. This method is called after the invocation of each test method in the class. 38 | super.tearDown() 39 | } 40 | 41 | func testExample() { 42 | // This is an example of a functional test case. 43 | // Use XCTAssert and related functions to verify your tests produce the correct results. 44 | } 45 | 46 | func testPerformanceExample() { 47 | // This is an example of a performance test case. 48 | self.measureBlock { 49 | // Put the code you want to measure the time of here. 50 | } 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/gethistory.json: -------------------------------------------------------------------------------- 1 | { 2 | "offset": 0, 3 | "limit": 5, 4 | "count": 1, 5 | "history": [ 6 | { 7 | "status":"completed", 8 | "distance":1.64691465, 9 | "request_time":1428876188, 10 | "start_time":1428876374, 11 | "start_city":{ 12 | "latitude":37.7749295, 13 | "display_name":"San Francisco", 14 | "longitude":-122.4194155 15 | }, 16 | "end_time":1428876927, 17 | "request_id":"37d57a99-2647-4114-9dd2-c43bccf4c30b", 18 | "product_id":"a1111c8c-c720-46c3-8534-2fcdd730040d" 19 | }, 20 | ] 21 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/getme.json: -------------------------------------------------------------------------------- 1 | { 2 | "first_name": "Uber", 3 | "last_name": "Developer", 4 | "email": "developer@uber.com", 5 | "picture": "https://profile-picture.jpg", 6 | "promo_code": "teypo", 7 | "uuid": "91d81273-45c2-4b57-8124-d0165f8240c0" 8 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/getpaymentmethods.json: -------------------------------------------------------------------------------- 1 | { 2 | "payment_methods": [ 3 | { 4 | "payment_method_id": "5f384f7d-8323-4207-a297-51c571234a8c", 5 | "type": "baidu_wallet", 6 | "description": "***53", 7 | }, 8 | { 9 | "payment_method_id": "f33847de-8113-4587-c307-51c2d13a823c", 10 | "type": "alipay", 11 | "description": "ga***@uber.com", 12 | }, 13 | { 14 | "payment_method_id": "f43847de-8113-4587-c307-51c2d13a823c", 15 | "type": "visa", 16 | "description": "***23" 17 | }, 18 | { 19 | "payment_method_id": "f53847de-8113-4587-c307-51c2d13a823c", 20 | "type": "business_account", 21 | "description": "Late Night Ride" 22 | } 23 | ], 24 | "last_used": "f53847de-8113-4587-c307-51c2d13a823c" 25 | } 26 | -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/getpriceestimates.json: -------------------------------------------------------------------------------- 1 | { 2 | "prices": [ 3 | { 4 | "product_id": "08f17084-23fd-4103-aa3e-9b660223934b", 5 | "currency_code": "USD", 6 | "display_name": "UberBLACK", 7 | "estimate": "$23-29", 8 | "low_estimate": 23, 9 | "high_estimate": 29, 10 | "surge_multiplier": 1, 11 | "duration": 640, 12 | "distance": 5.34 13 | }, 14 | { 15 | "product_id": "9af0174c-8939-4ef6-8e91-1a43a0e7c6f6", 16 | "currency_code": "USD", 17 | "display_name": "UberSUV", 18 | "estimate": "$36-44", 19 | "low_estimate": 36, 20 | "high_estimate": 44, 21 | "surge_multiplier": 1.25, 22 | "duration": 640, 23 | "distance": 5.34 24 | }, 25 | { 26 | "product_id": "aca52cea-9701-4903-9f34-9a2395253acb", 27 | "currency_code": null, 28 | "display_name": "uberTAXI", 29 | "estimate": "Metered", 30 | "low_estimate": null, 31 | "high_estimate": null, 32 | "surge_multiplier": 1, 33 | "duration": 640, 34 | "distance": 5.34 35 | }, 36 | { 37 | "product_id": "productID1234", 38 | "currency_code": "USD", 39 | "display_name": "uberX", 40 | "estimate": "$15", 41 | "low_estimate": 15, 42 | "high_estimate": 15, 43 | "surge_multiplier": 1, 44 | "duration": 640, 45 | "distance": 5.34 46 | } 47 | ] 48 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/getproductid.json: -------------------------------------------------------------------------------- 1 | { 2 | "capacity": 4, 3 | "description": "The original Uber", 4 | "price_details": { 5 | "distance_unit": "mile", 6 | "cost_per_minute": 0.65, 7 | "service_fees": [ 8 | { 9 | "fee": 1.0, 10 | "name": "Safe Rides Fee" 11 | } 12 | ], 13 | "minimum": 15.0, 14 | "cost_per_distance": 3.75, 15 | "base": 8.0, 16 | "cancellation_fee": 10.0, 17 | "currency_code": "USD" 18 | }, 19 | "image": "http://d1a3f4spazzrp4.cloudfront.net/car.jpg", 20 | "display_name": "UberBLACK", 21 | "product_id": "d4abaae7-f4d6-4152-91cc-77523e8165a4" 22 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/getrequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "request_id":"17cb78a7-b672-4d34-a288-a6c6e44d5315", 3 | "status":"accepted", 4 | "location":{ 5 | "latitude":37.7886532015, 6 | "longitude":-122.3961987534, 7 | "bearing":135 8 | }, 9 | "pickup":{ 10 | "latitude":37.7872486012, 11 | "longitude":-122.4026315287, 12 | "eta":5 13 | }, 14 | "destination":{ 15 | "latitude":37.7766874, 16 | "longitude":-122.394857, 17 | "eta":19 18 | }, 19 | "driver": { 20 | "phone_number": "(555)555-5555", 21 | "rating": 5, 22 | "picture_url": "https://d1w2poirtb3as9.cloudfront.net/img.jpeg", 23 | "name": "Bob" 24 | }, 25 | "vehicle":{ 26 | "make": "Bugatti", 27 | "model": "Veyron", 28 | "license_plate": "I<3Uber", 29 | "picture_url": "https://d1w2poirtb3as9.cloudfront.net/car.jpeg" 30 | }, 31 | "surge_multiplier":1.0, 32 | "eta": 5 33 | } 34 | -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/gettimeestimateproduct.json: -------------------------------------------------------------------------------- 1 | { 2 | "times": [ 3 | { 4 | "product_id": "productID1234", 5 | "display_name": "uberX", 6 | "estimate": 288 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/gettimeestimates.json: -------------------------------------------------------------------------------- 1 | { 2 | "times": [ 3 | { 4 | "product_id": "5f41547d-805d-4207-a297-51c571cf2a8c", 5 | "display_name": "UberBLACK", 6 | "estimate": 410 7 | }, 8 | { 9 | "product_id": "694558c9-b34b-4836-855d-821d68a4b944", 10 | "display_name": "UberSUV", 11 | "estimate": 535 12 | }, 13 | { 14 | "product_id": "65af3521-a04f-4f80-8ce2-6d88fb6648bc", 15 | "display_name": "uberTAXI", 16 | "estimate": 294 17 | }, 18 | { 19 | "product_id": "17b011d3-65be-421d-adf6-a5480a366453", 20 | "display_name": "uberX", 21 | "estimate": 288 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/place.json: -------------------------------------------------------------------------------- 1 | { 2 | "address": "685 Market St, San Francisco, CA 94103, USA" 3 | } 4 | -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/postrequests.json: -------------------------------------------------------------------------------- 1 | { 2 | "request_id": "852b8fdd-4369-4659-9628-e122662ad257", 3 | "status": "processing", 4 | "vehicle": null, 5 | "driver": null, 6 | "location": null, 7 | "eta": 5, 8 | "surge_multiplier": null 9 | } 10 | -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/refresh.json: -------------------------------------------------------------------------------- 1 | { 2 | "last_authenticated": 1464137596, 3 | "access_token": "Access999Token", 4 | "expires_in": 2592000, 5 | "token_type": "Bearer", 6 | "scope": "request all_trips profile ride_widgets history places history_lite", 7 | "refresh_token": "888RefreshToken" 8 | } -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/requestestimate.json: -------------------------------------------------------------------------------- 1 | { 2 | "price":{ 3 | "surge_confirmation_href": "https://api.uber.com/v1/surge-confirmations/7d604f5e", 4 | "high_estimate": 6, 5 | "surge_confirmation_id": "7d604f5e", 6 | "minimum": 5, 7 | "low_estimate": 5, 8 | "surge_multiplier": 1.2, 9 | "display": "$5-6", 10 | "currency_code": "USD" 11 | }, 12 | "trip":{ 13 | "distance_unit": "mile", 14 | "duration_estimate": 540, 15 | "distance_estimate": 2.1 16 | }, 17 | "pickup_estimate":2 18 | } 19 | -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/ridemap.json: -------------------------------------------------------------------------------- 1 | { 2 | "request_id":"b5512127-a134-4bf4-b1ba-fe9f48f56d9d", 3 | "href":"https://trip.uber.com/abc123" 4 | } 5 | -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/ridereceipt.json: -------------------------------------------------------------------------------- 1 | { 2 | "request_id": "b5512127-a134-4bf4-b1ba-fe9f48f56d9d", 3 | "charges": [ 4 | { 5 | "name": "Base Fare", 6 | "amount": 2.20, 7 | "type": "base_fare" 8 | }, 9 | { 10 | "name": "Distance", 11 | "amount": 2.75, 12 | "type": "distance", 13 | }, 14 | { 15 | "name": "Time", 16 | "amount": 3.57, 17 | "type": "time", 18 | } 19 | ], 20 | "surge_charge" : { 21 | "name": "Surge x1.5", 22 | "amount": 4.26, 23 | "type": "surge", 24 | }, 25 | "charge_adjustments" : [ 26 | { 27 | "name": "Promotion", 28 | "amount": -2.43, 29 | "type": "promotion", 30 | }, 31 | { 32 | "name": "Booking Fee", 33 | "amount": 1.00, 34 | "type": "booking_fee", 35 | }, 36 | { 37 | "name": "Rounding Down", 38 | "amount": 0.78, 39 | "type": "rounding_down", 40 | }, 41 | ], 42 | "normal_fare": "$8.52", 43 | "subtotal": "$12.78", 44 | "total_charged": "$5.92", 45 | "total_owed": null, 46 | "currency_code": "USD", 47 | "duration": "00:11:35", 48 | "distance": "1.49", 49 | "distance_label": "miles", 50 | } 51 | -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/testInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UberClientID 6 | testClientID 7 | UberDisplayName 8 | My Awesome App 9 | UberServerToken 10 | testServerToken 11 | UberCallbackURI 12 | testUri://uberConnect 13 | UberCallbackURIs 14 | 15 | 16 | UberCallbackURIType 17 | General 18 | URIString 19 | testURI://uberConnectGeneral 20 | 21 | 22 | UberCallbackURIType 23 | AuthorizationCode 24 | URIString 25 | testURI://uberConnectAuthorizationCode 26 | 27 | 28 | UberCallbackURIType 29 | Implicit 30 | URIString 31 | testURI://uberConnectImplicit 32 | 33 | 34 | UberCallbackURIType 35 | Native 36 | URIString 37 | testURI://uberConnectNative 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/testInfoMissingCallbacks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UberClientID 6 | testClientID 7 | UberDisplayName 8 | My Awesome App 9 | UberServerToken 10 | testServerToken 11 | UberCallbackURI 12 | testURI://uberConnect 13 | 14 | -------------------------------------------------------------------------------- /RNUberSDK/UberRidesTests/testInfoNoServerToken.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UberClientID 6 | testClientID 7 | UberDisplayName 8 | My Awesome App 9 | 10 | 11 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import LoginComponent from './src/LoginButton'; 2 | import RideRequestComponent from './src/RideRequestButton'; 3 | 4 | export default { 5 | LoginButton: LoginComponent, 6 | RideRequestButton: RideRequestComponent 7 | } 8 | 9 | export const LoginButton = LoginComponent; 10 | export const RideRequestButton = RideRequestComponent; 11 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-uber-rides", 3 | "version": "0.4.3", 4 | "description": "React Native port for Uber Rides SDK", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/Kureev/react-native-uber-rides.git" 12 | }, 13 | "keywords": [ 14 | "uber" 15 | ], 16 | "author": "Alexey Kureev (https://github.com/Kureev)", 17 | "license": "MIT", 18 | "bugs": { 19 | "url": "https://github.com/Kureev/react-native-uber-rides/issues" 20 | }, 21 | "rnpm": { 22 | "ios": { 23 | "project": "RNUberBridge/RNUberBridge.xcodeproj", 24 | "sharedLibraries": [ 25 | "RNUberSDK" 26 | ] 27 | } 28 | }, 29 | "homepage": "https://github.com/Kureev/react-native-uber-rides#readme" 30 | } 31 | -------------------------------------------------------------------------------- /src/LoginButton.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {requireNativeComponent, StyleSheet} from 'react-native'; 3 | 4 | const style = StyleSheet.create({ 5 | button: { 6 | width: 250, 7 | height: 50, 8 | backgroundColor: 'black', 9 | borderRadius: 7, 10 | }, 11 | }); 12 | 13 | const Button = requireNativeComponent('LoginButton', null); 14 | 15 | function UberLoginButton(props) { 16 | const {onLogin, onLogout, onLoginError} = props; 17 | return ( 18 |