diff --git a/.circleci/config.yml b/.circleci/config.yml index 0b1da66e766..88a1492f41d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,9 +39,8 @@ commands: scripts/generate-manifest.js .manifests/node_modules '^yarn\.lock$' '^patches/' '^package\.json$' scripts/generate-manifest.js .manifests/js_transform '^\.manifests/node_modules' '^babel\.config\.js' '^relay\.config\.js' '^jest\.config\.js' scripts/generate-manifest.js .manifests/js_bundle '^\.manifests/js_transform' '^data/' '^index\.ios\.js' '^src/(?!.*(__mocks__|__fixtures__))' - ls -lR emission > .manifests/emission_pod_file_list - scripts/generate-manifest.js .manifests/cocoapods '^Podfile' '^Gemfile' '^\.manifests/emission_pod_file_list' - scripts/generate-manifest.js .manifests/native_code '^\.manifests/node_modules' '^Podfile' '^Gemfile' '^emission/' '^Artsy' '^patches/react-native' '^\.env\.example' + scripts/generate-manifest.js .manifests/cocoapods '^Podfile' '^Gemfile' + scripts/generate-manifest.js .manifests/native_code '^\.manifests/node_modules' '^Podfile' '^Gemfile' '^dist/' '^Artsy' '^patches/react-native' '^\.env\.example' scripts/generate-manifest.js .manifests/android_native '^\.manifests/node_modules' '^android/' '^patches/react-native' '^\.env\.example' setup-env-file: steps: @@ -104,23 +103,23 @@ commands: steps: - restore_cache: keys: - - v6-js_bundle-{{ checksum ".manifests/js_bundle" }} + - v7-js_bundle-{{ checksum ".manifests/js_bundle" }} - restore_cache: keys: - v6-metro-{{ checksum ".manifests/js_transform" }} - run: name: Bundle emission - command: ls emission/Pod/Assets/Emission.js || yarn bundle-for-native-ci:ios + command: ls dist/jsbundle.js || yarn bundle-for-native-ci:ios - save_cache: key: v6-metro-{{ checksum ".manifests/js_transform" }} paths: - .metro - save_cache: - key: v6-js_bundle-{{ checksum ".manifests/js_bundle" }} + key: v7-js_bundle-{{ checksum ".manifests/js_bundle" }} paths: - - emission/Pod/Assets/Emission.js - - emission/Pod/Assets/Emission.js.map - - emission/Pod/Assets/assets + - dist/jsbundle.js + - dist/jsbundle.js.map + - dist/assets install-gems: steps: - restore_cache: @@ -155,12 +154,15 @@ commands: steps: - restore_cache: keys: - - v6-app_build_ios-{{ checksum ".manifests/app_build" }} + - v7-app_build_ios-{{ checksum ".manifests/app_build" }} + - run: + name: Download fonts from s3 + command: ./scripts/download-assets - run: name: Build App command: ./scripts/ci-ios - save_cache: - key: v6-app_build_ios-{{ checksum ".manifests/app_build" }} + key: v7-app_build_ios-{{ checksum ".manifests/app_build" }} paths: - derived_data - node_modules/react-native-config @@ -225,7 +227,7 @@ jobs: BUNDLE_PATH: .vendor # path to install gems and use for caching macos: - xcode: 13.2.1 + xcode: 13.4.1 steps: - checkout @@ -269,7 +271,7 @@ jobs: BUNDLE_PATH: .vendor # path to install gems and use for caching macos: - xcode: 13.2.1 + xcode: 13.4.1 steps: - checkout @@ -285,7 +287,7 @@ jobs: BUNDLE_PATH: .vendor # path to install gems and use for caching macos: - xcode: 13.2.1 + xcode: 13.4.1 steps: - checkout @@ -350,7 +352,7 @@ jobs: - bundle-js - run: name: Generate app_build manifest - command: ./scripts/generate-manifest.js .manifests/app_build '^\./manifests/native_code' '^emission/Pod/Assets/' + command: ./scripts/generate-manifest.js .manifests/app_build '^\./manifests/native_code' '^dist/' - store_artifacts: path: .manifests - store_test_results: @@ -359,14 +361,14 @@ jobs: root: . paths: - .manifests - - emission/Pod/Assets + - dist build-test-app-ios: environment: BUNDLE_PATH: .vendor # path to install gems and use for caching macos: - xcode: 13.2.1 + xcode: 13.4.1 steps: - attach_workspace: @@ -464,7 +466,7 @@ jobs: environment: BUNDLE_PATH: .vendor # path to install gems and use for caching macos: - xcode: 13.2.1 + xcode: 13.4.1 steps: - checkout - install-gems @@ -511,7 +513,7 @@ jobs: environment: BUNDLE_PATH: .vendor # path to install gems and use for caching macos: - xcode: 13.2.1 + xcode: 13.4.1 steps: - checkout - install-gems diff --git a/.gitignore b/.gitignore index b500e7c8371..ea6f1cd47da 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ -# Xcode +# macos .DS_Store + +# Xcode build/ *.pbxuser !default.pbxuser @@ -17,15 +19,12 @@ DerivedData .idea/ *.xcscmblueprint .pt +.clang-format .build -tmtags -tmtagsHistory -config/releasenotes.txt -Podfile.local -ios/Artsy.xcodeproj/project.xcworkspace/xcshareddata/ -.vendor/ -compiler_commands.json .swiftpm +xcode_test_raw.log +xcode_build_raw.log +.recordingSnapshots # Artsy Development APN certificate net.artsy.artsy.dev.pem @@ -40,53 +39,41 @@ Preview.html fastlane/report.xml fastlane/Preview.html -.vscode/.browse.VC.db - - +# bundler .vendor -# regular Pods. No longer a submodule +# Cocoa Pods Pods # build artefacts derived_data -ios/Artsy/Networking/ARReactPackagerHost.m -# COPIED FROM EMISSION - -# Xcode -xcode_build_raw.log - -## Build generated -dist +## js bundle +dist/* # Custom - node_modules npm-debug.log .vscode/launchReactNative.js .vscode/.react/ .vscode/typings .vscode/tasks.json.old +.vscode/.browse.VC.db .apphub coverage package-lock.json yarn-error.log .awcache -# Use a custom, cached location for Jest to save transpiling -# on every PR +# jest .jest/cache # Danger artifacts tslint-errors.json -# TypeScript Logs +# typescript tsc_raw.log -# Emission bundle -emission/Pod/Assets/* - # query map data/complete.queryMap.json @@ -108,13 +95,7 @@ native-code-checksum.hash **/.env* !.env.example -# Ignore test artefacts -xcode_test_raw.log - -.recordingSnapshots - # Android/IntelliJ -# build/ .idea .gradle @@ -122,18 +103,16 @@ local.properties *.iml google-services.json -# BUCK -buck-out/ -\.buckd/ +# android *.keystore !debug.keystore android-secret.json - # Fonts android/app/src/main/assets/fonts/* ios/eigen/fonts/* - +# old native screen needs these there +ios/Artsy/View_Controllers/Live_Auctions/Resources/Artsy/fonts/* # Firebase files android/app/google-services.json @@ -143,7 +122,7 @@ eigen-firebase-app-distribution.json metaflags.json # Relay -src/__generated__/* +src/__generated__ # jest circleci reports reports @@ -152,6 +131,8 @@ reports Brewfile.lock.json +######################################################### # Keep this rule last. # Keep these, so we can keep the folders these appear in. !.gitkeep +######################################################### diff --git a/.secrets.baseline b/.secrets.baseline index bfb68644cfb..60a08f7c401 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -66,6 +66,10 @@ { "path": "detect_secrets.filters.allowlist.is_line_allowlisted" }, + { + "path": "detect_secrets.filters.common.is_baseline_file", + "filename": ".secrets.baseline" + }, { "path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies", "min_level": 2 @@ -100,12 +104,13 @@ { "path": "detect_secrets.filters.regex.should_exclude_file", "pattern": [ - "/.lock$/", - "/.png$/", - "/.webp$/", - "/.jpg$/", - "/.jar$/", - "/__generated__/" + "\\.lock$", + "\\.png$", + "\\.webp$", + "\\.jpg$", + "\\.jar$", + "__generated__", + "ios\\/.*\\.xcscheme$" ] } ], @@ -119,79 +124,6 @@ "line_number": 153 } ], - "ios/Artsy.xcodeproj/xcshareddata/xcschemes/Artsy (Release).xcscheme": [ - { - "type": "Hex High Entropy String", - "filename": "ios/Artsy.xcodeproj/xcshareddata/xcschemes/Artsy (Release).xcscheme", - "hashed_secret": "6760dd79e63f3070b115309c8e3f331873583739", - "is_verified": false, - "line_number": 17 - } - ], - "ios/Artsy.xcodeproj/xcshareddata/xcschemes/Artsy.xcscheme": [ - { - "type": "Hex High Entropy String", - "filename": "ios/Artsy.xcodeproj/xcshareddata/xcschemes/Artsy.xcscheme", - "hashed_secret": "6760dd79e63f3070b115309c8e3f331873583739", - "is_verified": false, - "line_number": 17 - }, - { - "type": "Hex High Entropy String", - "filename": "ios/Artsy.xcodeproj/xcshareddata/xcschemes/Artsy.xcscheme", - "hashed_secret": "413d9fce7ba73a33498cd56d00de37a94f9a5dcc", - "is_verified": false, - "line_number": 66 - } - ], - "ios/Artsy.xcodeproj/xcshareddata/xcschemes/ArtsyStickers.xcscheme": [ - { - "type": "Hex High Entropy String", - "filename": "ios/Artsy.xcodeproj/xcshareddata/xcschemes/ArtsyStickers.xcscheme", - "hashed_secret": "f2da6516b69b8481bd41d2f1999c27528476a884", - "is_verified": false, - "line_number": 18 - }, - { - "type": "Hex High Entropy String", - "filename": "ios/Artsy.xcodeproj/xcshareddata/xcschemes/ArtsyStickers.xcscheme", - "hashed_secret": "6760dd79e63f3070b115309c8e3f331873583739", - "is_verified": false, - "line_number": 32 - } - ], - "ios/Artsy.xcodeproj/xcshareddata/xcschemes/ArtsyWidgetExtension.xcscheme": [ - { - "type": "Hex High Entropy String", - "filename": "ios/Artsy.xcodeproj/xcshareddata/xcschemes/ArtsyWidgetExtension.xcscheme", - "hashed_secret": "2255720efaddbe53eb12ca90f0305e5366176dee", - "is_verified": false, - "line_number": 18 - }, - { - "type": "Hex High Entropy String", - "filename": "ios/Artsy.xcodeproj/xcshareddata/xcschemes/ArtsyWidgetExtension.xcscheme", - "hashed_secret": "6760dd79e63f3070b115309c8e3f331873583739", - "is_verified": false, - "line_number": 32 - } - ], - "ios/Artsy.xcodeproj/xcshareddata/xcschemes/BrazePushServiceExtension.xcscheme": [ - { - "type": "Hex High Entropy String", - "filename": "ios/Artsy.xcodeproj/xcshareddata/xcschemes/BrazePushServiceExtension.xcscheme", - "hashed_secret": "caba76e37ddbef7c0c23916896fe82170bc370c7", - "is_verified": false, - "line_number": 18 - }, - { - "type": "Hex High Entropy String", - "filename": "ios/Artsy.xcodeproj/xcshareddata/xcschemes/BrazePushServiceExtension.xcscheme", - "hashed_secret": "6760dd79e63f3070b115309c8e3f331873583739", - "is_verified": false, - "line_number": 32 - } - ], "ios/Artsy/Constants/ARAppConstants.m": [ { "type": "Secret Keyword", @@ -482,5 +414,5 @@ } ] }, - "generated_at": "2022-06-03T15:04:55Z" + "generated_at": "2022-06-13T16:45:26Z" } diff --git a/Gemfile.lock b/Gemfile.lock index fa9d8c8c7c2..4055033e68f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -352,4 +352,4 @@ DEPENDENCIES xcpretty BUNDLED WITH - 2.3.5 + 2.3.13 diff --git a/emission/Pod/Assets/.gitkeep b/dist/.gitkeep similarity index 100% rename from emission/Pod/Assets/.gitkeep rename to dist/.gitkeep diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 0a7a9f98a36..f378984859b 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -101,6 +101,6 @@ these screenshots are checked in to the source control. When you change e.g. the button, it calculates the diff between two screenshots and makes the test fail if the delta is above a certain threshold. -In order to update existing screenshots, run `./scripts/record-snapshots-enable`. This will do some small edits in the `Pods/`directory. After that you can run the tests again, using`cmd+u`. They will fail again but they will generate the new snapshots. Now run the second script `./scripts/record-snapshots-disable`, which will revert the changes. Now run the tests again using `cmd+u` and tests should pass. +In order to update existing screenshots, run `./scripts/record-snapshots-enable`. This will do some small edits in the `Pods/`directory. After that you can run the tests again, using `cmd+u`. They will fail again but they will generate the new snapshots. Now run the second script `./scripts/record-snapshots-disable`, which will revert the changes. Now run the tests again using `cmd+u` and tests should pass. If you are still having some tests failing, try commenting out the failing line, run the test, and comment in the line again and run again. If that still fails, then try replacing `haveValidSnapshot` with `recordSnapshot`, run test, go back to `haveValidSnapshot`, run test again. Hopefully that would fix all your failing tests. diff --git a/emission/Emission.podspec b/emission/Emission.podspec deleted file mode 100644 index 6fafd472ea6..00000000000 --- a/emission/Emission.podspec +++ /dev/null @@ -1,91 +0,0 @@ -require 'json' -require 'date' - -root = ENV['EMISSION_ROOT'] || File.join(__dir__, '../') -pkg_version = lambda do |dir_from_root = '', version = 'version'| - path = File.join(root, dir_from_root, 'package.json') - JSON.load(File.read(path))[version] -end - -emission_version = pkg_version.call -emission_native_version = pkg_version.call('', 'native-code-version') -react_native_version = pkg_version.call('node_modules/react-native') - -podspec = Pod::Spec.new do |s| - s.name = 'Emission' - s.version = emission_version - s.summary = 'React Native Components used by Eigen.' - s.homepage = 'https://github.com/artsy/emission' - s.license = 'MIT' - s.author = { 'Artsy Mobile' => 'mobile@artsy.net' } - s.source = { git: 'https://github.com/artsy/emission.git', tag: "v#{s.version}" } - s.platform = :ios, '12.1' - s.source_files = 'Pod/Classes/**/*.{h,m}' - s.preserve_paths = 'Pod/Classes/**/*.generated.objc' - s.resources = 'Pod/Assets/{Emission.js,assets,PreHeatedGraphQLCache}' - - # Required for email composer - s.framework = 'MessageUI' - - # Artsy UI dependencies - s.dependency 'Artsy+UIColors' - s.dependency 'Artsy+UIFonts', '>= 3.0.0' - s.dependency 'Extraction', '>= 1.2.1' - - # Used in City Guides - s.dependency 'Pulley' - - # To ensure a consistent image cache between app/lib - s.dependency 'SDWebImage', '5.11.1' - - # For custom animations in DeepZoomOverlay - s.dependency 'INTUAnimationEngine' - - # React, and the subspecs we have to use - s.dependency 'React-Core', react_native_version - s.dependency 'React-cxxreact', react_native_version - s.dependency 'React-RCTAnimation', react_native_version - s.dependency 'React-RCTImage', react_native_version - s.dependency 'React-RCTLinking', react_native_version - s.dependency 'React-RCTNetwork', react_native_version - s.dependency 'React-RCTText', react_native_version - s.dependency 'React-RCTActionSheet', react_native_version - - # React's Dependencies - react_podspecs = [ - '../node_modules/react-native/third-party-podspecs/boost.podspec', - '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec', - '../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec', - '../node_modules/react-native/third-party-podspecs/glog.podspec' - ] - - # Native dependencies of Emission, which come from node_modules - dep_podspecs = [ - '../node_modules/tipsi-stripe/tipsi-stripe.podspec', - '../node_modules/@react-native-mapbox-gl/maps/react-native-mapbox-gl.podspec', - '../node_modules/@sentry/react-native/RNSentry.podspec', - '../node_modules/react-native-svg/RNSVG.podspec', - '../node_modules/@react-native-community/cameraroll/react-native-cameraroll.podspec', - '../node_modules/@react-native-community/netinfo/react-native-netinfo.podspec', - '../node_modules/@react-native-community/geolocation/react-native-geolocation.podspec' - ] - - # Ties the exact versions so host apps don't need to guess the version - # or have a potential mismatch - podspecs = react_podspecs + dep_podspecs - podspecs.each do |podspec_path| - spec = Pod::Specification.from_file podspec_path - s.dependency spec.name, spec.version.to_s - end -end - -if ENV['INCLUDE_METADATA'] - # Attach the useful metadata to the podspec, which can be used in admin tools - podspec.attributes_hash['native_version'] = emission_native_version - podspec.attributes_hash['release_date'] = DateTime.now.strftime('%h %d, %Y') - podspec.attributes_hash['sha'] = `git rev-parse HEAD`.strip - podspec.attributes_hash['react_native_version'] = react_native_version - podspec.attributes_hash['app_registry'] = File.read('./src/app/AppRegistry.tsx').scan(/AppRegistry.registerComponent\(\"(.*)\"/).flatten -end - -podspec diff --git a/emission/Pod/Classes/Core/AREmissionFontsLoader.m b/emission/Pod/Classes/Core/AREmissionFontsLoader.m deleted file mode 100644 index f650c19dca5..00000000000 --- a/emission/Pod/Classes/Core/AREmissionFontsLoader.m +++ /dev/null @@ -1,38 +0,0 @@ -#import - -#if __has_include() -#import -#else -@import Artsy_UIFonts; -#endif - -@interface AREmissionFontsLoader : NSObject -@end - - -@implementation AREmissionFontsLoader - -// Currently Eigen also force loads these fonts on app launch, -// so not going to spend too much time on loading these lazily atm. -// -// For now we only need these 2 fonts. -// -+ (void)load; -{ - __unused UIFont *font = [UIFont serifBoldItalicFontWithSize:12]; - font = [UIFont serifBoldFontWithSize:12]; - font = [UIFont reactNativeSerifFontWithSize:12]; - font = [UIFont reactNativeSerifFontSemiboldWithSize:12]; - font = [UIFont reactNativeSerifFontItalicWithSize:12]; - font = [UIFont serifSemiBoldFontWithSize:12]; - font = [UIFont serifFontWithSize:12]; - font = [UIFont serifItalicFontWithSize:12]; - font = [UIFont sansSerifFontWithSize:12]; - font = [UIFont displaySansSerifFontWithSize:12]; - font = [UIFont displayItalicSansSerifFontWithSize:12]; - font = [UIFont displayMediumSansSerifFontWithSize:12]; - font = [UIFont displayMediumItalicSansSerifFontWithSize:12]; -// font = [UIFont smallCapsSerifFontWithSize:12]; -} - -@end diff --git a/emission/Pod/Classes/DottedLineComponent/ARDottedLineManager.h b/emission/Pod/Classes/DottedLineComponent/ARDottedLineManager.h deleted file mode 100644 index 102bd22aa2c..00000000000 --- a/emission/Pod/Classes/DottedLineComponent/ARDottedLineManager.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface ARDottedLineManager : RCTViewManager -@end diff --git a/emission/Pod/Classes/DottedLineComponent/ARDottedLineManager.m b/emission/Pod/Classes/DottedLineComponent/ARDottedLineManager.m deleted file mode 100644 index 1f4226da4a8..00000000000 --- a/emission/Pod/Classes/DottedLineComponent/ARDottedLineManager.m +++ /dev/null @@ -1,55 +0,0 @@ -#import "ARDottedLineManager.h" - - - -@interface ARDottedLine : UIView -@property (nonatomic, strong, readwrite) UIColor *color; -@end - - -@implementation ARDottedLine - -- (void)drawRect:(CGRect)rect -{ - [super drawRect:rect]; - - [UIColor.whiteColor setFill]; - [self.color setStroke]; - - CGContextFillRect(UIGraphicsGetCurrentContext(), rect); - - const CGFloat dotDiameter = rect.size.height / 2; - const CGFloat gapSize = dotDiameter * 4; - CGFloat pattern[2]; - pattern[0] = 0.0; - pattern[1] = gapSize; - - UIBezierPath *path = [UIBezierPath bezierPath]; - path.lineWidth = dotDiameter; - path.lineCapStyle = kCGLineCapRound; - [path moveToPoint:CGPointMake(0, dotDiameter)]; - [path addLineToPoint:CGPointMake(rect.size.width, dotDiameter)]; - [path setLineDash:pattern count:2 phase:2]; - - [path stroke]; -} - -@end - - -@implementation ARDottedLineManager -RCT_CUSTOM_VIEW_PROPERTY(color, NSNumber, ARDottedLine) -{ - view.color = [RCTConvert UIColor:json]; - [view setNeedsDisplay]; -} - -RCT_EXPORT_MODULE(); - -- (UIView *)view -{ - ARDottedLine *line = [ARDottedLine new]; - return line; -} - -@end diff --git a/emission/Pod/Classes/VideoComponent/ARVideoManager.h b/emission/Pod/Classes/VideoComponent/ARVideoManager.h deleted file mode 100644 index af92ba497a6..00000000000 --- a/emission/Pod/Classes/VideoComponent/ARVideoManager.h +++ /dev/null @@ -1,8 +0,0 @@ - -#import - -// A singleton that handles making/coordinating ARVideo instances -// with React Native - -@interface ARVideoManager : RCTViewManager -@end diff --git a/emission/Pod/Classes/VideoComponent/ARVideoManager.m b/emission/Pod/Classes/VideoComponent/ARVideoManager.m deleted file mode 100644 index af88ac670ae..00000000000 --- a/emission/Pod/Classes/VideoComponent/ARVideoManager.m +++ /dev/null @@ -1,155 +0,0 @@ -#import -#import "ARVideoManager.h" -#include - -@interface ARVideo : UIView -@property (nonatomic, strong, readwrite) AVPlayer *player; -@property (nonatomic, strong, readwrite) AVPlayerLayer *playerLayer; -@end - - -@implementation ARVideo - -- (void)setFrame:(CGRect)frame -{ - [super setFrame:frame]; - self.playerLayer.frame = self.bounds; -} - -// Loop - -- (void)playerDidReachEnd:(NSNotification *)notification -{ - AVPlayerItem *playerItem = [notification object]; - [playerItem seekToTime:kCMTimeZero]; - [self.player play]; -} - -// We want to know how large the video is to be able to set the player positioning ourselves -// because we want to have a left-aligned video, instead of the default center aligned fill. - -- (void)observeValueForKeyPath:(NSString *)path ofObject:(id)object change:(NSDictionary *)change context:(void *) context -{ - // Only do the positioning logic for aspect fills - if (self.playerLayer.videoGravity == AVLayerVideoGravityResizeAspectFill && [path isEqualToString:@"readyForDisplay"]) { - CGRect videoRect = self.playerLayer.videoRect; - - if (!CGRectIsEmpty(videoRect)) { - // Ok, now we've got enough info to handle the sizing - [self updatePlayerLayerFrame]; - - // Animate in the video - self.layer.opacity = 1; - } - } else { - [super observeValueForKeyPath:path ofObject:object change:change context:context]; - } -} - -- (void)updatePlayerLayerFrame -{ - if (!self.player.currentItem) { - return; - } - // Get the right size for the video - AVPlayerItem *item = self.player.currentItem; - AVPlayerItemTrack *track = [item tracks][0]; - CGSize naturalVideoSize = track.assetTrack.naturalSize; - - // Figure our how it would fit un-cropped in aspect fill - CGFloat aspectRatio = naturalVideoSize.width / naturalVideoSize.height; - if (isnan(aspectRatio)) { - // Sometimes, we divide by zero and get NaN, which will crash when we set the layer's frame. - // For example, if the current item's first track is nil. - return; - } - CGRect playerBounds = CGRectMake(0, 0, self.superview.bounds.size.height * aspectRatio, self.superview.bounds.size.height); - - [CATransaction begin]; - [CATransaction setDisableActions:YES]; - self.playerLayer.frame = playerBounds; - [CATransaction commit]; -} - -// We need to do some memory management to make sure we don't keep a connection to the AVPlayer - -- (void)dealloc -{ - [_playerLayer removeObserver:self forKeyPath:@"readyForDisplay"]; -} - -@end - - -@implementation ARVideoManager - -RCT_CUSTOM_VIEW_PROPERTY(source, NSDictionary, ARVideo) -{ - NSDictionary *source = [RCTConvert NSDictionary:json]; - BOOL isNetwork = [RCTConvert BOOL:source[@"isNetwork"]]; - BOOL isAsset = [RCTConvert BOOL:source[@"isAsset"]]; - NSString *uri = [RCTConvert NSString:source[@"uri"]]; - NSString *type = [RCTConvert NSString:source[@"type"]]; - NSString *resizeMode = [RCTConvert NSString:source[@"resizeMode"]]; - - NSString *videoGravity; - if ([resizeMode isEqualToString:@"stretch"]) { - videoGravity = AVLayerVideoGravityResize; - } else if ([resizeMode isEqualToString:@"contain"]) { - videoGravity = AVLayerVideoGravityResizeAspect; - } else if ([resizeMode isEqualToString:@"cover"]) { - videoGravity = AVLayerVideoGravityResizeAspectFill; - } else { - videoGravity = AVLayerVideoGravityResizeAspect; - } - - NSURL *url = isNetwork || isAsset - ? [NSURL URLWithString:uri] - : [[NSURL alloc] initFileURLWithPath:[[NSBundle mainBundle] pathForResource:uri ofType:type]]; - - view.player = [AVPlayer playerWithURL:url]; - view.playerLayer = [AVPlayerLayer playerLayerWithPlayer:view.player]; - view.playerLayer.frame = view.bounds; //CGRectInset(view.bounds, 20, 20); - view.playerLayer.videoGravity = videoGravity; - - // Always listen for the video being set, it's a bit overkill, but it simplifies the dealloc logic - [view.playerLayer addObserver:view forKeyPath:@"readyForDisplay" options:NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew context:NULL]; - - // Hide the video so that we don't get the default (center) gravity for a fill, before we get the callback via KVO above - if ([videoGravity isEqualToString:@"cover"] ) { - view.layer.opacity = 0; - } - - [view.layer addSublayer:view.playerLayer]; - - [view.player setMuted:true]; - [view.player play]; -} - -RCT_CUSTOM_VIEW_PROPERTY(size, NSDictionary, ARVideo) -{ - view.frame = [RCTConvert CGRect:json]; -} - -RCT_CUSTOM_VIEW_PROPERTY(loop, BOOL, ARVideo) -{ - BOOL loop = [RCTConvert BOOL:json]; - if (loop) { - view.player.actionAtItemEnd = AVPlayerActionAtItemEndNone; - [[NSNotificationCenter defaultCenter] addObserver:view - selector:@selector(playerDidReachEnd:) - name:AVPlayerItemDidPlayToEndTimeNotification - object:[view.player currentItem]]; - } -} - - -RCT_EXPORT_MODULE(ARVideo); - -- (UIView *)view -{ - ARVideo *video = [ARVideo new]; - return video; -} - -@end diff --git a/fastlane/Fastfile b/fastlane/Fastfile index b3ab77d5743..ec09608a051 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -335,9 +335,9 @@ lane :upload_sentry_artifacts do |options| bundle_path = '' outfile = '' if platform == "ios" - source_map_path = 'emission/Pod/Assets/Emission.js.map' - bundle_path = 'emission/Pod/Assets/Emission.js' - outfile = '~/Emission.js' + source_map_path = 'dist/jsbundle.js.map' + bundle_path = 'dist/jsbundle.js' + outfile = '~/jsbundle.js' else # the bundle name, path and source map come from the react-native bundle step when running yarn bundle:android source_map_path = 'android/app/src/main/assets/index.android.bundle.map' diff --git a/ios/Artsy.xcodeproj/project.pbxproj b/ios/Artsy.xcodeproj/project.pbxproj index 1a7172d5df4..fea2df32535 100644 --- a/ios/Artsy.xcodeproj/project.pbxproj +++ b/ios/Artsy.xcodeproj/project.pbxproj @@ -7,9 +7,42 @@ objects = { /* Begin PBXBuildFile section */ + 1A4B97BC283CDD5A00878EAE /* ARCocoaConstantsModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B9791283CDD5900878EAE /* ARCocoaConstantsModule.m */; }; + 1A4B97BD283CDD5A00878EAE /* AREventsModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B9793283CDD5900878EAE /* AREventsModule.m */; }; + 1A4B97BE283CDD5A00878EAE /* ARScrollViewHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B9795283CDD5900878EAE /* ARScrollViewHelpers.m */; }; + 1A4B97BF283CDD5A00878EAE /* RCTScrollView+Artsy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B9796283CDD5900878EAE /* RCTScrollView+Artsy.m */; }; + 1A4B97C0283CDD5A00878EAE /* AREmission.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B9798283CDD5900878EAE /* AREmission.m */; }; + 1A4B97C1283CDD5A00878EAE /* ARTemporaryAPIModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B979D283CDD5900878EAE /* ARTemporaryAPIModule.m */; }; + 1A4B97C2283CDD5A00878EAE /* ARMapComponentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B97A0283CDD5900878EAE /* ARMapComponentViewController.m */; }; + 1A4B97C3283CDD5A00878EAE /* ARMediaPreviewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B97A1283CDD5900878EAE /* ARMediaPreviewController.m */; }; + 1A4B97C4283CDD5A00878EAE /* ARCityComponentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B97A2283CDD5900878EAE /* ARCityComponentViewController.m */; }; + 1A4B97C5283CDD5A00878EAE /* ARCityPickerComponentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B97A7283CDD5900878EAE /* ARCityPickerComponentViewController.m */; }; + 1A4B97C6283CDD5A00878EAE /* ARComponentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B97A9283CDD5900878EAE /* ARComponentViewController.m */; }; + 1A4B97C7283CDD5A00878EAE /* ARMapContainerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B97AA283CDD5900878EAE /* ARMapContainerViewController.m */; }; + 1A4B97C8283CDD5A00878EAE /* ARPHPhotoPickerModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B97AF283CDD5900878EAE /* ARPHPhotoPickerModule.m */; }; + 1A4B97C9283CDD5A00878EAE /* ARNotificationsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B97B0283CDD5900878EAE /* ARNotificationsManager.m */; }; + 1A4B97CA283CDD5A00878EAE /* ARTakeCameraPhotoModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B97B1283CDD5900878EAE /* ARTakeCameraPhotoModule.m */; }; + 1A4B97CB283CDD5A00878EAE /* ARCity+GeospatialAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B97B5283CDD5900878EAE /* ARCity+GeospatialAdditions.m */; }; + 1A4B97CC283CDD5A00878EAE /* ARCity.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B97B6283CDD5900878EAE /* ARCity.m */; }; + 1A4B97CD283CDD5A00878EAE /* AROpaqueImageViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B97B9283CDD5900878EAE /* AROpaqueImageViewManager.m */; }; + 1A4B97CE283CDD5A00878EAE /* AROpaqueImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4B97BA283CDD5900878EAE /* AROpaqueImageView.m */; }; + 1A4B97D0283CFA1E00878EAE /* fonts in Resources */ = {isa = PBXBuildFile; fileRef = 1A4B97CF283CFA1E00878EAE /* fonts */; }; + 1A4E5119283F91BA0008EF35 /* Artsy+UILabels.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4E50FB283F91B90008EF35 /* Artsy+UILabels.m */; }; + 1A4E511A283F91BA0008EF35 /* UIView+ARDrawing.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4E50FC283F91B90008EF35 /* UIView+ARDrawing.m */; }; + 1A4E511B283F91BA0008EF35 /* ARSpinner.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4E5104283F91B90008EF35 /* ARSpinner.m */; }; + 1A4E511D283F91BA0008EF35 /* ARAnimationContinuation.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4E5108283F91B90008EF35 /* ARAnimationContinuation.m */; }; + 1A4E511E283F91BA0008EF35 /* UILabel+Typography.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4E510A283F91B90008EF35 /* UILabel+Typography.m */; }; + 1A4E511F283F91BA0008EF35 /* UIView+ARSpinner.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4E510B283F91B90008EF35 /* UIView+ARSpinner.m */; }; + 1A4E5121283F91BA0008EF35 /* UIColor+ArtsyColors.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4E510E283F91B90008EF35 /* UIColor+ArtsyColors.m */; }; + 1A4E5123283F91BA0008EF35 /* UIFont+ArtsyFonts.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4E5114283F91B90008EF35 /* UIFont+ArtsyFonts.m */; }; + 1A4E5124283F91BA0008EF35 /* ARButtonSubclasses.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4E5116283F91BA0008EF35 /* ARButtonSubclasses.m */; }; 1A550F0E282AE4D300126D22 /* ARAuctionWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A550F0D282AE4D200126D22 /* ARAuctionWebViewController.m */; }; + 4A9190A1CCE54CE09384C9FC /* Unica77LL-MediumItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = CC557644CEE44511A73431D7 /* Unica77LL-MediumItalic.otf */; }; 50E313674D9D51E2749A13E7 /* libPods-ArtsyTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E68A5AE2269760F44D9E0B7 /* libPods-ArtsyTests.a */; }; 91DE2877BFB369D1F40E8172 /* libPods-Artsy.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 41B4CDDC19345D9AFB1E708B /* libPods-Artsy.a */; }; + 9DE2CA6EF6024B2DAF877CB2 /* Unica77LL-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = CE0D8AAD95934C28AF35D2A3 /* Unica77LL-Regular.otf */; }; + B3EFFC7412D94886B32A2B10 /* Unica77LL-Italic.otf in Resources */ = {isa = PBXBuildFile; fileRef = 5BD7635D052B48579073DECC /* Unica77LL-Italic.otf */; }; + B7F9E6E6D6604CC691827F1D /* Unica77LL-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = DC9FFF92F0574260A5300F1B /* Unica77LL-Medium.otf */; }; CB43266627E8F39B00B29DD6 /* Stickers.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CB43266527E8F39B00B29DD6 /* Stickers.xcassets */; }; CB43266A27E8F39B00B29DD6 /* ArtsyStickers.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = CB43266327E8F39900B29DD6 /* ArtsyStickers.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; CB43267627E8F6F900B29DD6 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB43267527E8F6F900B29DD6 /* NotificationService.swift */; }; @@ -126,7 +159,6 @@ CB4328B427E8FEE500B29DD6 /* LiveAuctionSocketCommunicatorSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB43279127E8FEE400B29DD6 /* LiveAuctionSocketCommunicatorSpec.swift */; }; CB4328B527E8FEE500B29DD6 /* LiveAuctionStaticDataFetcherSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB43279227E8FEE400B29DD6 /* LiveAuctionStaticDataFetcherSpec.swift */; }; CB4328B627E8FEE500B29DD6 /* LiveAuctionStateReconcilerSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB43279327E8FEE400B29DD6 /* LiveAuctionStateReconcilerSpec.swift */; }; - CB4328B727E8FEE500B29DD6 /* ARSystemTimeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CB43279427E8FEE400B29DD6 /* ARSystemTimeTests.m */; }; CB4328B827E8FEE500B29DD6 /* ARUserManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CB43279627E8FEE400B29DD6 /* ARUserManagerTests.m */; }; CB4328B927E8FEE500B29DD6 /* ArtsyAPI+ErrorHandlers.m in Sources */ = {isa = PBXBuildFile; fileRef = CB43279727E8FEE400B29DD6 /* ArtsyAPI+ErrorHandlers.m */; }; CB4328BA27E8FEE500B29DD6 /* ArtsyAPI+GraphQLTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CB43279827E8FEE400B29DD6 /* ArtsyAPI+GraphQLTests.m */; }; @@ -304,7 +336,6 @@ CBE326E827E275A300395A93 /* ARLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3252827E275A100395A93 /* ARLogger.m */; }; CBE326E927E275A300395A93 /* ARLogFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3252927E275A100395A93 /* ARLogFormatter.m */; }; CBE326EA27E275A300395A93 /* ARTwoWayDictionaryTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3252B27E275A100395A93 /* ARTwoWayDictionaryTransformer.m */; }; - CBE326EB27E275A300395A93 /* ARSignUpActiveUserViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = CBE3252F27E275A100395A93 /* ARSignUpActiveUserViewController.xib */; }; CBE326EC27E275A300395A93 /* ARSCNWallNode.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3253327E275A100395A93 /* ARSCNWallNode.m */; }; CBE326ED27E275A300395A93 /* SCNArtworkNode.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3253427E275A100395A93 /* SCNArtworkNode.m */; }; CBE326EE27E275A300395A93 /* ARAugmentedFloorBasedVIRViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3253B27E275A100395A93 /* ARAugmentedFloorBasedVIRViewController.m */; }; @@ -323,14 +354,12 @@ CBE326FB27E275A300395A93 /* live_auctions_socket.json in Resources */ = {isa = PBXBuildFile; fileRef = CBE3254D27E275A100395A93 /* live_auctions_socket.json */; }; CBE326FC27E275A300395A93 /* AREchoContentsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3254F27E275A100395A93 /* AREchoContentsViewController.m */; }; CBE326FD27E275A300395A93 /* ARAdminSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3255027E275A100395A93 /* ARAdminSettingsViewController.m */; }; - CBE326FE27E275A300395A93 /* ARAdminNetworkModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3255327E275A100395A93 /* ARAdminNetworkModel.m */; }; CBE326FF27E275A300395A93 /* ARAdminTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3255427E275A100395A93 /* ARAdminTableViewController.m */; }; CBE3270027E275A300395A93 /* ARAdminTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3255827E275A100395A93 /* ARAdminTableViewCell.m */; }; CBE3270127E275A300395A93 /* ARTickedTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3255927E275A100395A93 /* ARTickedTableViewCell.m */; }; CBE3270227E275A300395A93 /* ARAnimatedTickView.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3255A27E275A100395A93 /* ARAnimatedTickView.m */; }; CBE3270427E275A300395A93 /* LiveAuctionCurrentLotCTAPositionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBE3256027E275A100395A93 /* LiveAuctionCurrentLotCTAPositionManager.swift */; }; CBE3270527E275A300395A93 /* LiveAuctionPlainLotCollectionViewLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBE3256127E275A100395A93 /* LiveAuctionPlainLotCollectionViewLayout.swift */; }; - CBE3270627E275A300395A93 /* AREigenMapContainerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3256427E275A100395A93 /* AREigenMapContainerViewController.m */; }; CBE3270727E275A300395A93 /* ARSerifNavigationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3256527E275A100395A93 /* ARSerifNavigationViewController.m */; }; CBE3270827E275A300395A93 /* StoryboardConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBE3256927E275A100395A93 /* StoryboardConstants.swift */; }; CBE3270927E275A300395A93 /* StoryboardImages.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBE3256A27E275A100395A93 /* StoryboardImages.swift */; }; @@ -450,7 +479,6 @@ CBE3278027E275A400395A93 /* ARNetworkConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3261927E275A200395A93 /* ARNetworkConstants.m */; }; CBE3278127E275A400395A93 /* ARRouter.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3261A27E275A200395A93 /* ARRouter.m */; }; CBE3278227E275A400395A93 /* ARRouter+GraphQL.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3261B27E275A200395A93 /* ARRouter+GraphQL.m */; }; - CBE3278327E275A400395A93 /* ARReactPackagerHost.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3261C27E275A200395A93 /* ARReactPackagerHost.m */; }; CBE3278427E275A400395A93 /* ARSystemTime.m in Sources */ = {isa = PBXBuildFile; fileRef = CBE3261F27E275A200395A93 /* ARSystemTime.m */; }; CBE3278527E275A400395A93 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = CBE3262127E275A200395A93 /* InfoPlist.strings */; }; CBE3278727E275A400395A93 /* Launch Screen.xib in Resources */ = {isa = PBXBuildFile; fileRef = CBE3262627E275A200395A93 /* Launch Screen.xib */; }; @@ -535,12 +563,70 @@ 13B07F961A680F5B00A75B9A /* Artsy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Artsy.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13F369B4E56A4D026D55DC53 /* Pods-eigen-eigenTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-eigen-eigenTests.release.xcconfig"; path = "Target Support Files/Pods-eigen-eigenTests/Pods-eigen-eigenTests.release.xcconfig"; sourceTree = ""; }; 17C42880D2ACAFFAD6731367 /* Pods-eigen-eigenTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-eigen-eigenTests.debug.xcconfig"; path = "Target Support Files/Pods-eigen-eigenTests/Pods-eigen-eigenTests.debug.xcconfig"; sourceTree = ""; }; + 1A4B9791283CDD5900878EAE /* ARCocoaConstantsModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARCocoaConstantsModule.m; sourceTree = ""; }; + 1A4B9792283CDD5900878EAE /* AREmission.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AREmission.h; sourceTree = ""; }; + 1A4B9793283CDD5900878EAE /* AREventsModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AREventsModule.m; sourceTree = ""; }; + 1A4B9794283CDD5900878EAE /* RCTScrollView+Artsy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RCTScrollView+Artsy.h"; sourceTree = ""; }; + 1A4B9795283CDD5900878EAE /* ARScrollViewHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARScrollViewHelpers.m; sourceTree = ""; }; + 1A4B9796283CDD5900878EAE /* RCTScrollView+Artsy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RCTScrollView+Artsy.m"; sourceTree = ""; }; + 1A4B9797283CDD5900878EAE /* AREventsModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AREventsModule.h; sourceTree = ""; }; + 1A4B9798283CDD5900878EAE /* AREmission.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AREmission.m; sourceTree = ""; }; + 1A4B9799283CDD5900878EAE /* ARCocoaConstantsModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARCocoaConstantsModule.h; sourceTree = ""; }; + 1A4B979A283CDD5900878EAE /* ARScrollViewHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARScrollViewHelpers.h; sourceTree = ""; }; + 1A4B979C283CDD5900878EAE /* ARTemporaryAPIModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTemporaryAPIModule.h; sourceTree = ""; }; + 1A4B979D283CDD5900878EAE /* ARTemporaryAPIModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTemporaryAPIModule.m; sourceTree = ""; }; + 1A4B979F283CDD5900878EAE /* ARCityPickerComponentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARCityPickerComponentViewController.h; sourceTree = ""; }; + 1A4B97A0283CDD5900878EAE /* ARMapComponentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARMapComponentViewController.m; sourceTree = ""; }; + 1A4B97A1283CDD5900878EAE /* ARMediaPreviewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARMediaPreviewController.m; sourceTree = ""; }; + 1A4B97A2283CDD5900878EAE /* ARCityComponentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARCityComponentViewController.m; sourceTree = ""; }; + 1A4B97A3283CDD5900878EAE /* ARComponentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARComponentViewController.h; sourceTree = ""; }; + 1A4B97A4283CDD5900878EAE /* ARMapContainerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMapContainerViewController.h; sourceTree = ""; }; + 1A4B97A5283CDD5900878EAE /* ARMediaPreviewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMediaPreviewController.h; sourceTree = ""; }; + 1A4B97A6283CDD5900878EAE /* ARMapComponentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMapComponentViewController.h; sourceTree = ""; }; + 1A4B97A7283CDD5900878EAE /* ARCityPickerComponentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARCityPickerComponentViewController.m; sourceTree = ""; }; + 1A4B97A8283CDD5900878EAE /* ARCityComponentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARCityComponentViewController.h; sourceTree = ""; }; + 1A4B97A9283CDD5900878EAE /* ARComponentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARComponentViewController.m; sourceTree = ""; }; + 1A4B97AA283CDD5900878EAE /* ARMapContainerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARMapContainerViewController.m; sourceTree = ""; }; + 1A4B97AC283CDD5900878EAE /* ARPHPhotoPickerModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARPHPhotoPickerModule.h; sourceTree = ""; }; + 1A4B97AD283CDD5900878EAE /* ARNotificationsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARNotificationsManager.h; sourceTree = ""; }; + 1A4B97AE283CDD5900878EAE /* ARTakeCameraPhotoModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTakeCameraPhotoModule.h; sourceTree = ""; }; + 1A4B97AF283CDD5900878EAE /* ARPHPhotoPickerModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARPHPhotoPickerModule.m; sourceTree = ""; }; + 1A4B97B0283CDD5900878EAE /* ARNotificationsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARNotificationsManager.m; sourceTree = ""; }; + 1A4B97B1283CDD5900878EAE /* ARTakeCameraPhotoModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTakeCameraPhotoModule.m; sourceTree = ""; }; + 1A4B97B3283CDD5900878EAE /* ARCity+GeospatialAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ARCity+GeospatialAdditions.h"; sourceTree = ""; }; + 1A4B97B4283CDD5900878EAE /* ARCity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARCity.h; sourceTree = ""; }; + 1A4B97B5283CDD5900878EAE /* ARCity+GeospatialAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ARCity+GeospatialAdditions.m"; sourceTree = ""; }; + 1A4B97B6283CDD5900878EAE /* ARCity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARCity.m; sourceTree = ""; }; + 1A4B97B8283CDD5900878EAE /* AROpaqueImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AROpaqueImageView.h; sourceTree = ""; }; + 1A4B97B9283CDD5900878EAE /* AROpaqueImageViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AROpaqueImageViewManager.m; sourceTree = ""; }; + 1A4B97BA283CDD5900878EAE /* AROpaqueImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AROpaqueImageView.m; sourceTree = ""; }; + 1A4B97BB283CDD5900878EAE /* AROpaqueImageViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AROpaqueImageViewManager.h; sourceTree = ""; }; + 1A4B97CF283CFA1E00878EAE /* fonts */ = {isa = PBXFileReference; lastKnownFileType = folder; path = fonts; sourceTree = ""; }; + 1A4E50FB283F91B90008EF35 /* Artsy+UILabels.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Artsy+UILabels.m"; sourceTree = ""; }; + 1A4E50FC283F91B90008EF35 /* UIView+ARDrawing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+ARDrawing.m"; sourceTree = ""; }; + 1A4E50FD283F91B90008EF35 /* Artsy+UILabels.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Artsy+UILabels.h"; sourceTree = ""; }; + 1A4E50FF283F91B90008EF35 /* UIView+ARDrawing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+ARDrawing.h"; sourceTree = ""; }; + 1A4E5102283F91B90008EF35 /* ARAnimationContinuation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARAnimationContinuation.h; sourceTree = ""; }; + 1A4E5103283F91B90008EF35 /* UILabel+Typography.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UILabel+Typography.h"; sourceTree = ""; }; + 1A4E5104283F91B90008EF35 /* ARSpinner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARSpinner.m; sourceTree = ""; }; + 1A4E5106283F91B90008EF35 /* UIView+ARSpinner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+ARSpinner.h"; sourceTree = ""; }; + 1A4E5108283F91B90008EF35 /* ARAnimationContinuation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARAnimationContinuation.m; sourceTree = ""; }; + 1A4E5109283F91B90008EF35 /* ARSpinner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARSpinner.h; sourceTree = ""; }; + 1A4E510A283F91B90008EF35 /* UILabel+Typography.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UILabel+Typography.m"; sourceTree = ""; }; + 1A4E510B283F91B90008EF35 /* UIView+ARSpinner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+ARSpinner.m"; sourceTree = ""; }; + 1A4E510E283F91B90008EF35 /* UIColor+ArtsyColors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+ArtsyColors.m"; sourceTree = ""; }; + 1A4E5110283F91B90008EF35 /* UIColor+ArtsyColors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+ArtsyColors.h"; sourceTree = ""; }; + 1A4E5113283F91B90008EF35 /* UIFont+ArtsyFonts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIFont+ArtsyFonts.h"; sourceTree = ""; }; + 1A4E5114283F91B90008EF35 /* UIFont+ArtsyFonts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIFont+ArtsyFonts.m"; sourceTree = ""; }; + 1A4E5116283F91BA0008EF35 /* ARButtonSubclasses.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARButtonSubclasses.m; sourceTree = ""; }; + 1A4E5117283F91BA0008EF35 /* ARButtonSubclasses.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARButtonSubclasses.h; sourceTree = ""; }; 1A550F0C282AE4D200126D22 /* ARAuctionWebViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARAuctionWebViewController.h; sourceTree = ""; }; 1A550F0D282AE4D200126D22 /* ARAuctionWebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARAuctionWebViewController.m; sourceTree = ""; }; 236DCB5FAF86376660CE95DA /* Pods-eigen.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-eigen.release.xcconfig"; path = "Target Support Files/Pods-eigen/Pods-eigen.release.xcconfig"; sourceTree = ""; }; 41B4CDDC19345D9AFB1E708B /* libPods-Artsy.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Artsy.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 46687F9E977C7CE0F1B12B05 /* Pods-ArtsyTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ArtsyTests.release.xcconfig"; path = "Target Support Files/Pods-ArtsyTests/Pods-ArtsyTests.release.xcconfig"; sourceTree = ""; }; 4E68A5AE2269760F44D9E0B7 /* libPods-ArtsyTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ArtsyTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5BD7635D052B48579073DECC /* Unica77LL-Italic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Unica77LL-Italic.otf"; path = "Artsy/fonts/Unica77LL-Italic.otf"; sourceTree = ""; }; 775AB16F96387B70AABE4731 /* Pods-Artsy.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Artsy.debug.xcconfig"; path = "Target Support Files/Pods-Artsy/Pods-Artsy.debug.xcconfig"; sourceTree = ""; }; 8DA7CA3A2D9A05D038AFAB1C /* Pods-ArtsyTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ArtsyTests.debug.xcconfig"; path = "Target Support Files/Pods-ArtsyTests/Pods-ArtsyTests.debug.xcconfig"; sourceTree = ""; }; 9B51BBF7C1BD09CD9EA76699 /* Pods-ArtsyTests.store.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ArtsyTests.store.xcconfig"; path = "Target Support Files/Pods-ArtsyTests/Pods-ArtsyTests.store.xcconfig"; sourceTree = ""; }; @@ -684,7 +770,6 @@ CB43279127E8FEE400B29DD6 /* LiveAuctionSocketCommunicatorSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LiveAuctionSocketCommunicatorSpec.swift; sourceTree = ""; }; CB43279227E8FEE400B29DD6 /* LiveAuctionStaticDataFetcherSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LiveAuctionStaticDataFetcherSpec.swift; sourceTree = ""; }; CB43279327E8FEE400B29DD6 /* LiveAuctionStateReconcilerSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LiveAuctionStateReconcilerSpec.swift; sourceTree = ""; }; - CB43279427E8FEE400B29DD6 /* ARSystemTimeTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARSystemTimeTests.m; sourceTree = ""; }; CB43279627E8FEE400B29DD6 /* ARUserManagerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARUserManagerTests.m; sourceTree = ""; }; CB43279727E8FEE400B29DD6 /* ArtsyAPI+ErrorHandlers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ArtsyAPI+ErrorHandlers.m"; sourceTree = ""; }; CB43279827E8FEE400B29DD6 /* ArtsyAPI+GraphQLTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ArtsyAPI+GraphQLTests.m"; sourceTree = ""; }; @@ -930,11 +1015,6 @@ CBE3248A27E275A100395A93 /* Interstellar+Artsy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Interstellar+Artsy.swift"; sourceTree = ""; }; CBE3248C27E275A100395A93 /* AFHTTPRequestOperation+JSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AFHTTPRequestOperation+JSON.m"; sourceTree = ""; }; CBE3248D27E275A100395A93 /* AFHTTPRequestOperation+JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AFHTTPRequestOperation+JSON.h"; sourceTree = ""; }; - CBE3248F27E275A100395A93 /* Unica77LL-Medium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Unica77LL-Medium.otf"; sourceTree = ""; }; - CBE3249027E275A100395A93 /* .gitkeep */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .gitkeep; sourceTree = ""; }; - CBE3249127E275A100395A93 /* Unica77LL-MediumItalic.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Unica77LL-MediumItalic.otf"; sourceTree = ""; }; - CBE3249227E275A100395A93 /* Unica77LL-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Unica77LL-Regular.otf"; sourceTree = ""; }; - CBE3249327E275A100395A93 /* Unica77LL-Italic.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Unica77LL-Italic.otf"; sourceTree = ""; }; CBE3249627E275A100395A93 /* ARAppDelegate+Analytics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ARAppDelegate+Analytics.m"; sourceTree = ""; }; CBE3249727E275A100395A93 /* ARAppActivityContinuationDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARAppActivityContinuationDelegate.m; sourceTree = ""; }; CBE3249827E275A100395A93 /* ARAppNotificationsDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARAppNotificationsDelegate.m; sourceTree = ""; }; @@ -1069,7 +1149,6 @@ CBE3252927E275A100395A93 /* ARLogFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARLogFormatter.m; sourceTree = ""; }; CBE3252A27E275A100395A93 /* ARHTTPRequestOperationLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARHTTPRequestOperationLogger.h; sourceTree = ""; }; CBE3252B27E275A100395A93 /* ARTwoWayDictionaryTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTwoWayDictionaryTransformer.m; sourceTree = ""; }; - CBE3252F27E275A100395A93 /* ARSignUpActiveUserViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ARSignUpActiveUserViewController.xib; sourceTree = ""; }; CBE3253027E275A100395A93 /* ARSerifNavigationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARSerifNavigationViewController.h; sourceTree = ""; }; CBE3253327E275A100395A93 /* ARSCNWallNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARSCNWallNode.m; sourceTree = ""; }; CBE3253427E275A100395A93 /* SCNArtworkNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCNArtworkNode.m; sourceTree = ""; }; @@ -1096,8 +1175,6 @@ CBE3254D27E275A100395A93 /* live_auctions_socket.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = live_auctions_socket.json; sourceTree = ""; }; CBE3254F27E275A100395A93 /* AREchoContentsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AREchoContentsViewController.m; sourceTree = ""; }; CBE3255027E275A100395A93 /* ARAdminSettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARAdminSettingsViewController.m; sourceTree = ""; }; - CBE3255227E275A100395A93 /* ARAdminNetworkModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARAdminNetworkModel.h; sourceTree = ""; }; - CBE3255327E275A100395A93 /* ARAdminNetworkModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARAdminNetworkModel.m; sourceTree = ""; }; CBE3255427E275A100395A93 /* ARAdminTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARAdminTableViewController.m; sourceTree = ""; }; CBE3255527E275A100395A93 /* ARAdminSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARAdminSettingsViewController.h; sourceTree = ""; }; CBE3255627E275A100395A93 /* AREchoContentsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AREchoContentsViewController.h; sourceTree = ""; }; @@ -1110,8 +1187,6 @@ CBE3255E27E275A100395A93 /* ARAdminTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARAdminTableViewController.h; sourceTree = ""; }; CBE3256027E275A100395A93 /* LiveAuctionCurrentLotCTAPositionManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LiveAuctionCurrentLotCTAPositionManager.swift; sourceTree = ""; }; CBE3256127E275A100395A93 /* LiveAuctionPlainLotCollectionViewLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LiveAuctionPlainLotCollectionViewLayout.swift; sourceTree = ""; }; - CBE3256327E275A100395A93 /* AREigenMapContainerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AREigenMapContainerViewController.h; sourceTree = ""; }; - CBE3256427E275A100395A93 /* AREigenMapContainerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AREigenMapContainerViewController.m; sourceTree = ""; }; CBE3256527E275A100395A93 /* ARSerifNavigationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARSerifNavigationViewController.m; sourceTree = ""; }; CBE3256927E275A100395A93 /* StoryboardConstants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardConstants.swift; sourceTree = ""; }; CBE3256A27E275A100395A93 /* StoryboardImages.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardImages.swift; sourceTree = ""; }; @@ -1161,7 +1236,6 @@ CBE3259E27E275A200395A93 /* ARTNativeScreenPresenterModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTNativeScreenPresenterModule.m; sourceTree = ""; }; CBE3259F27E275A200395A93 /* CityGuideView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CityGuideView.swift; sourceTree = ""; }; CBE325A027E275A200395A93 /* ARTLiveAuctionViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTLiveAuctionViewManager.h; sourceTree = ""; }; - CBE325A127E275A200395A93 /* Eigen.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = Eigen.playground; sourceTree = ""; }; CBE325A227E275A200395A93 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; CBE325A527E275A200395A93 /* MapAnnotation_Artsy@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MapAnnotation_Artsy@2x.png"; sourceTree = ""; }; CBE325A627E275A200395A93 /* Artsy-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Artsy-Bridging-Header.h"; sourceTree = ""; }; @@ -1271,12 +1345,10 @@ CBE3261427E275A200395A93 /* ArtsyAPI+RelatedModels.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ArtsyAPI+RelatedModels.m"; sourceTree = ""; }; CBE3261527E275A200395A93 /* ArtsyAPI+SystemTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ArtsyAPI+SystemTime.h"; sourceTree = ""; }; CBE3261627E275A200395A93 /* ArtsyAPI+Following.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ArtsyAPI+Following.h"; sourceTree = ""; }; - CBE3261727E275A200395A93 /* ARReactPackagerHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARReactPackagerHost.h; sourceTree = ""; }; CBE3261827E275A200395A93 /* static_sale_data.graphql */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = static_sale_data.graphql; sourceTree = ""; }; CBE3261927E275A200395A93 /* ARNetworkConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARNetworkConstants.m; sourceTree = ""; }; CBE3261A27E275A200395A93 /* ARRouter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARRouter.m; sourceTree = ""; }; CBE3261B27E275A200395A93 /* ARRouter+GraphQL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ARRouter+GraphQL.m"; sourceTree = ""; }; - CBE3261C27E275A200395A93 /* ARReactPackagerHost.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARReactPackagerHost.m; sourceTree = ""; }; CBE3261D27E275A200395A93 /* ARAuthProviders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARAuthProviders.h; sourceTree = ""; }; CBE3261E27E275A200395A93 /* ArtsyAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArtsyAPI.h; sourceTree = ""; }; CBE3261F27E275A200395A93 /* ARSystemTime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARSystemTime.m; sourceTree = ""; }; @@ -1344,6 +1416,9 @@ CBE3266B27E275A300395A93 /* LiveAuctionLot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveAuctionLot.h; sourceTree = ""; }; CBE3266D27E275A300395A93 /* ARHasImageBaseURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARHasImageBaseURL.h; sourceTree = ""; }; CBE3266E27E275A300395A93 /* ARPostAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARPostAttachment.h; sourceTree = ""; }; + CC557644CEE44511A73431D7 /* Unica77LL-MediumItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Unica77LL-MediumItalic.otf"; path = "Artsy/fonts/Unica77LL-MediumItalic.otf"; sourceTree = ""; }; + CE0D8AAD95934C28AF35D2A3 /* Unica77LL-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Unica77LL-Regular.otf"; path = "Artsy/fonts/Unica77LL-Regular.otf"; sourceTree = ""; }; + DC9FFF92F0574260A5300F1B /* Unica77LL-Medium.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Unica77LL-Medium.otf"; path = "Artsy/fonts/Unica77LL-Medium.otf"; sourceTree = ""; }; DDA9792067E817001B8803BA /* Pods-Artsy.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Artsy.release.xcconfig"; path = "Target Support Files/Pods-Artsy/Pods-Artsy.release.xcconfig"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; EF8AF6797C9A1A0E84BB9DDC /* libPods-Artsy-ArtsyTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Artsy-ArtsyTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1399,6 +1474,152 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 1A4B978F283CDD5900878EAE /* Emission */ = { + isa = PBXGroup; + children = ( + 1A4B9790283CDD5900878EAE /* Core */, + 1A4B979B283CDD5900878EAE /* TemporaryAPI */, + 1A4B979E283CDD5900878EAE /* ViewControllers */, + 1A4B97AB283CDD5900878EAE /* EigenCommunications */, + 1A4B97B2283CDD5900878EAE /* Data */, + 1A4B97B7283CDD5900878EAE /* OpaqueImageViewComponent */, + ); + path = Emission; + sourceTree = ""; + }; + 1A4B9790283CDD5900878EAE /* Core */ = { + isa = PBXGroup; + children = ( + 1A4B9791283CDD5900878EAE /* ARCocoaConstantsModule.m */, + 1A4B9792283CDD5900878EAE /* AREmission.h */, + 1A4B9798283CDD5900878EAE /* AREmission.m */, + 1A4B9793283CDD5900878EAE /* AREventsModule.m */, + 1A4B9794283CDD5900878EAE /* RCTScrollView+Artsy.h */, + 1A4B9795283CDD5900878EAE /* ARScrollViewHelpers.m */, + 1A4B9796283CDD5900878EAE /* RCTScrollView+Artsy.m */, + 1A4B9797283CDD5900878EAE /* AREventsModule.h */, + 1A4B9799283CDD5900878EAE /* ARCocoaConstantsModule.h */, + 1A4B979A283CDD5900878EAE /* ARScrollViewHelpers.h */, + ); + path = Core; + sourceTree = ""; + }; + 1A4B979B283CDD5900878EAE /* TemporaryAPI */ = { + isa = PBXGroup; + children = ( + 1A4B979C283CDD5900878EAE /* ARTemporaryAPIModule.h */, + 1A4B979D283CDD5900878EAE /* ARTemporaryAPIModule.m */, + ); + path = TemporaryAPI; + sourceTree = ""; + }; + 1A4B979E283CDD5900878EAE /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 1A4B979F283CDD5900878EAE /* ARCityPickerComponentViewController.h */, + 1A4B97A0283CDD5900878EAE /* ARMapComponentViewController.m */, + 1A4B97A1283CDD5900878EAE /* ARMediaPreviewController.m */, + 1A4B97A2283CDD5900878EAE /* ARCityComponentViewController.m */, + 1A4B97A4283CDD5900878EAE /* ARMapContainerViewController.h */, + 1A4B97AA283CDD5900878EAE /* ARMapContainerViewController.m */, + 1A4B97A5283CDD5900878EAE /* ARMediaPreviewController.h */, + 1A4B97A6283CDD5900878EAE /* ARMapComponentViewController.h */, + 1A4B97A7283CDD5900878EAE /* ARCityPickerComponentViewController.m */, + 1A4B97A8283CDD5900878EAE /* ARCityComponentViewController.h */, + 1A4B97A3283CDD5900878EAE /* ARComponentViewController.h */, + 1A4B97A9283CDD5900878EAE /* ARComponentViewController.m */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 1A4B97AB283CDD5900878EAE /* EigenCommunications */ = { + isa = PBXGroup; + children = ( + 1A4B97AC283CDD5900878EAE /* ARPHPhotoPickerModule.h */, + 1A4B97AD283CDD5900878EAE /* ARNotificationsManager.h */, + 1A4B97AE283CDD5900878EAE /* ARTakeCameraPhotoModule.h */, + 1A4B97AF283CDD5900878EAE /* ARPHPhotoPickerModule.m */, + 1A4B97B0283CDD5900878EAE /* ARNotificationsManager.m */, + 1A4B97B1283CDD5900878EAE /* ARTakeCameraPhotoModule.m */, + ); + path = EigenCommunications; + sourceTree = ""; + }; + 1A4B97B2283CDD5900878EAE /* Data */ = { + isa = PBXGroup; + children = ( + 1A4B97B3283CDD5900878EAE /* ARCity+GeospatialAdditions.h */, + 1A4B97B4283CDD5900878EAE /* ARCity.h */, + 1A4B97B5283CDD5900878EAE /* ARCity+GeospatialAdditions.m */, + 1A4B97B6283CDD5900878EAE /* ARCity.m */, + ); + path = Data; + sourceTree = ""; + }; + 1A4B97B7283CDD5900878EAE /* OpaqueImageViewComponent */ = { + isa = PBXGroup; + children = ( + 1A4B97B8283CDD5900878EAE /* AROpaqueImageView.h */, + 1A4B97B9283CDD5900878EAE /* AROpaqueImageViewManager.m */, + 1A4B97BA283CDD5900878EAE /* AROpaqueImageView.m */, + 1A4B97BB283CDD5900878EAE /* AROpaqueImageViewManager.h */, + ); + path = OpaqueImageViewComponent; + sourceTree = ""; + }; + 1A4E50F9283F91B90008EF35 /* ArtsyUILabels */ = { + isa = PBXGroup; + children = ( + 1A4E50FB283F91B90008EF35 /* Artsy+UILabels.m */, + 1A4E50FC283F91B90008EF35 /* UIView+ARDrawing.m */, + 1A4E50FD283F91B90008EF35 /* Artsy+UILabels.h */, + 1A4E50FF283F91B90008EF35 /* UIView+ARDrawing.h */, + ); + path = ArtsyUILabels; + sourceTree = ""; + }; + 1A4E5100283F91B90008EF35 /* Extraction */ = { + isa = PBXGroup; + children = ( + 1A4E5102283F91B90008EF35 /* ARAnimationContinuation.h */, + 1A4E5103283F91B90008EF35 /* UILabel+Typography.h */, + 1A4E5104283F91B90008EF35 /* ARSpinner.m */, + 1A4E5106283F91B90008EF35 /* UIView+ARSpinner.h */, + 1A4E5108283F91B90008EF35 /* ARAnimationContinuation.m */, + 1A4E5109283F91B90008EF35 /* ARSpinner.h */, + 1A4E510A283F91B90008EF35 /* UILabel+Typography.m */, + 1A4E510B283F91B90008EF35 /* UIView+ARSpinner.m */, + ); + path = Extraction; + sourceTree = ""; + }; + 1A4E510D283F91B90008EF35 /* ArtsyUIColors */ = { + isa = PBXGroup; + children = ( + 1A4E510E283F91B90008EF35 /* UIColor+ArtsyColors.m */, + 1A4E5110283F91B90008EF35 /* UIColor+ArtsyColors.h */, + ); + path = ArtsyUIColors; + sourceTree = ""; + }; + 1A4E5112283F91B90008EF35 /* ArtsyUIFonts */ = { + isa = PBXGroup; + children = ( + 1A4E5113283F91B90008EF35 /* UIFont+ArtsyFonts.h */, + 1A4E5114283F91B90008EF35 /* UIFont+ArtsyFonts.m */, + ); + path = ArtsyUIFonts; + sourceTree = ""; + }; + 1A4E5115283F91BA0008EF35 /* ArtsyUIButtons */ = { + isa = PBXGroup; + children = ( + 1A4E5116283F91BA0008EF35 /* ARButtonSubclasses.m */, + 1A4E5117283F91BA0008EF35 /* ARButtonSubclasses.h */, + ); + path = ArtsyUIButtons; + sourceTree = ""; + }; 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { isa = PBXGroup; children = ( @@ -1444,29 +1665,21 @@ path = Pods; sourceTree = ""; }; - 832341AE1AAA6A7D00B99B32 /* Libraries */ = { - isa = PBXGroup; - children = ( - ); - name = Libraries; - sourceTree = ""; - }; 83CBB9F61A601CBA00E9B192 = { isa = PBXGroup; children = ( CBE3210527D9615000395A93 /* Artsy */, CB43271D27E8FE5400B29DD6 /* ArtsyTests */, 676C72DD1D291306F09E9C48 /* Pods */, - 832341AE1AAA6A7D00B99B32 /* Libraries */, CB43266427E8F39900B29DD6 /* ArtsyStickers */, CB43267427E8F6F900B29DD6 /* BrazePushServiceExtension */, CB43268727E8FA6900B29DD6 /* ArtsyWidget */, 2D16E6871FA4F8E400B85C8A /* Frameworks */, 83CBBA001A601CBA00E9B192 /* Products */, ); - indentWidth = 2; + indentWidth = 4; sourceTree = ""; - tabWidth = 2; + tabWidth = 4; usesTabs = 0; }; 83CBBA001A601CBA00E9B192 /* Products */ = { @@ -1831,7 +2044,6 @@ isa = PBXGroup; children = ( CB43279027E8FEE400B29DD6 /* Live_Auctions */, - CB43279427E8FEE400B29DD6 /* ARSystemTimeTests.m */, CB43279527E8FEE400B29DD6 /* API_Modules */, CB43279B27E8FEE400B29DD6 /* LiveAuctionLotViewModelSpecs.swift */, CB43279C27E8FEE400B29DD6 /* ARRouterTests.m */, @@ -2315,13 +2527,18 @@ CBE3210527D9615000395A93 /* Artsy */ = { isa = PBXGroup; children = ( + 1A4E5115283F91BA0008EF35 /* ArtsyUIButtons */, + 1A4E510D283F91B90008EF35 /* ArtsyUIColors */, + 1A4E5112283F91B90008EF35 /* ArtsyUIFonts */, + 1A4E50F9283F91B90008EF35 /* ArtsyUILabels */, + 1A4E5100283F91B90008EF35 /* Extraction */, + 1A4B978F283CDD5900878EAE /* Emission */, CBE3249427E275A100395A93 /* App */, CBE3262027E275A200395A93 /* App_Resources */, CBE3245F27E275A100395A93 /* Categories */, CBE3245A27E275A100395A93 /* Constants */, - CBE325A127E275A200395A93 /* Eigen.playground */, - CBE3248E27E275A100395A93 /* fonts */, CBE325A227E275A200395A93 /* Images.xcassets */, + 1A4B97CF283CFA1E00878EAE /* fonts */, CBE3262B27E275A300395A93 /* Models */, CBE3259527E275A200395A93 /* NativeModules */, CBE324B827E275A100395A93 /* Navigation_Transitions */, @@ -2442,18 +2659,6 @@ path = AFNetworking; sourceTree = ""; }; - CBE3248E27E275A100395A93 /* fonts */ = { - isa = PBXGroup; - children = ( - CBE3248F27E275A100395A93 /* Unica77LL-Medium.otf */, - CBE3249027E275A100395A93 /* .gitkeep */, - CBE3249127E275A100395A93 /* Unica77LL-MediumItalic.otf */, - CBE3249227E275A100395A93 /* Unica77LL-Regular.otf */, - CBE3249327E275A100395A93 /* Unica77LL-Italic.otf */, - ); - path = fonts; - sourceTree = ""; - }; CBE3249427E275A100395A93 /* App */ = { isa = PBXGroup; children = ( @@ -2518,14 +2723,12 @@ CBE324F827E275A100395A93 /* Auction */, CBE324FE27E275A100395A93 /* Core */, CBE3250227E275A100395A93 /* Util */, - CBE3252C27E275A100395A93 /* Login_and_Onboarding */, CBE3253027E275A100395A93 /* ARSerifNavigationViewController.h */, CBE3253127E275A100395A93 /* ARVIR */, CBE3254D27E275A100395A93 /* live_auctions_socket.json */, CBE3254E27E275A100395A93 /* Admin */, CBE3256027E275A100395A93 /* LiveAuctionCurrentLotCTAPositionManager.swift */, CBE3256127E275A100395A93 /* LiveAuctionPlainLotCollectionViewLayout.swift */, - CBE3256227E275A100395A93 /* Map */, CBE3256527E275A100395A93 /* ARSerifNavigationViewController.m */, ); path = View_Controllers; @@ -2602,6 +2805,10 @@ children = ( CBE324DA27E275A100395A93 /* LiveAuctionsAssets.xcassets */, CBE324DB27E275A100395A93 /* LiveAuctions.storyboard */, + 5BD7635D052B48579073DECC /* Unica77LL-Italic.otf */, + DC9FFF92F0574260A5300F1B /* Unica77LL-Medium.otf */, + CC557644CEE44511A73431D7 /* Unica77LL-MediumItalic.otf */, + CE0D8AAD95934C28AF35D2A3 /* Unica77LL-Regular.otf */, ); path = Resources; sourceTree = ""; @@ -2724,30 +2931,6 @@ path = Logging; sourceTree = ""; }; - CBE3252C27E275A100395A93 /* Login_and_Onboarding */ = { - isa = PBXGroup; - children = ( - CBE3252D27E275A100395A93 /* Onboarding_stages */, - ); - path = Login_and_Onboarding; - sourceTree = ""; - }; - CBE3252D27E275A100395A93 /* Onboarding_stages */ = { - isa = PBXGroup; - children = ( - CBE3252E27E275A100395A93 /* 2_-_Calls_to_Action */, - ); - path = Onboarding_stages; - sourceTree = ""; - }; - CBE3252E27E275A100395A93 /* 2_-_Calls_to_Action */ = { - isa = PBXGroup; - children = ( - CBE3252F27E275A100395A93 /* ARSignUpActiveUserViewController.xib */, - ); - path = "2_-_Calls_to_Action"; - sourceTree = ""; - }; CBE3253127E275A100395A93 /* ARVIR */ = { isa = PBXGroup; children = ( @@ -2822,7 +3005,6 @@ children = ( CBE3254F27E275A100395A93 /* AREchoContentsViewController.m */, CBE3255027E275A100395A93 /* ARAdminSettingsViewController.m */, - CBE3255127E275A100395A93 /* Networking */, CBE3255427E275A100395A93 /* ARAdminTableViewController.m */, CBE3255527E275A100395A93 /* ARAdminSettingsViewController.h */, CBE3255627E275A100395A93 /* AREchoContentsViewController.h */, @@ -2832,15 +3014,6 @@ path = Admin; sourceTree = ""; }; - CBE3255127E275A100395A93 /* Networking */ = { - isa = PBXGroup; - children = ( - CBE3255227E275A100395A93 /* ARAdminNetworkModel.h */, - CBE3255327E275A100395A93 /* ARAdminNetworkModel.m */, - ); - path = Networking; - sourceTree = ""; - }; CBE3255727E275A100395A93 /* Views */ = { isa = PBXGroup; children = ( @@ -2854,15 +3027,6 @@ path = Views; sourceTree = ""; }; - CBE3256227E275A100395A93 /* Map */ = { - isa = PBXGroup; - children = ( - CBE3256327E275A100395A93 /* AREigenMapContainerViewController.h */, - CBE3256427E275A100395A93 /* AREigenMapContainerViewController.m */, - ); - path = Map; - sourceTree = ""; - }; CBE3256727E275A100395A93 /* Tooling */ = { isa = PBXGroup; children = ( @@ -2942,8 +3106,8 @@ children = ( CBE3258627E275A100395A93 /* Buttons */, CBE3258C27E275A100395A93 /* ARTextView.h */, - CBE3258D27E275A100395A93 /* StyledSubclasses.h */, CBE3258E27E275A100395A93 /* ARTextView.m */, + CBE3258D27E275A100395A93 /* StyledSubclasses.h */, ); path = Styled_Subclasses; sourceTree = ""; @@ -2951,10 +3115,10 @@ CBE3258627E275A100395A93 /* Buttons */ = { isa = PBXGroup; children = ( + CBE3258A27E275A100395A93 /* ARBidButton.h */, CBE3258727E275A100395A93 /* ARBidButton.m */, CBE3258827E275A100395A93 /* ARNvagiationButton+Swift.swift */, CBE3258927E275A100395A93 /* ARNavigationButton.h */, - CBE3258A27E275A100395A93 /* ARBidButton.h */, CBE3258B27E275A100395A93 /* ARNavigationButton.m */, ); path = Buttons; @@ -3099,12 +3263,10 @@ CBE325F927E275A200395A93 /* ARAuthProviders.m */, CBE325FA27E275A200395A93 /* ArtsyAPI.m */, CBE325FB27E275A200395A93 /* API_Modules */, - CBE3261727E275A200395A93 /* ARReactPackagerHost.h */, CBE3261827E275A200395A93 /* static_sale_data.graphql */, CBE3261927E275A200395A93 /* ARNetworkConstants.m */, CBE3261A27E275A200395A93 /* ARRouter.m */, CBE3261B27E275A200395A93 /* ARRouter+GraphQL.m */, - CBE3261C27E275A200395A93 /* ARReactPackagerHost.m */, CBE3261D27E275A200395A93 /* ARAuthProviders.h */, CBE3261E27E275A200395A93 /* ArtsyAPI.h */, CBE3261F27E275A200395A93 /* ARSystemTime.m */, @@ -3530,6 +3692,7 @@ CBE3274327E275A400395A93 /* full_logo_white_small@2x.png in Resources */, CBE326F127E275A300395A93 /* ARVIRModalClose.png in Resources */, CBE3272C27E275A400395A93 /* ViewInRoom_Base@2x.png in Resources */, + 1A4B97D0283CFA1E00878EAE /* fonts in Resources */, CBE3274127E275A400395A93 /* followButton@2x.png in Resources */, CBE326F827E275A300395A93 /* ar_vir_opening_frame.jpg in Resources */, CBE326D127E275A300395A93 /* live_auctions_static.json in Resources */, @@ -3545,7 +3708,6 @@ CBE3272E27E275A400395A93 /* ViewInRoom_BaseNoBench@2x.png in Resources */, CBE3273727E275A400395A93 /* navigation_more_arrow_vertical@2x.png in Resources */, CBE3275327E275A400395A93 /* CircleCheckGreen@2x.png in Resources */, - CBE326EB27E275A300395A93 /* ARSignUpActiveUserViewController.xib in Resources */, CBE3275727E275A400395A93 /* paddle@3x.png in Resources */, CBE3274E27E275A400395A93 /* CloseButtonLarge@2x.png in Resources */, CBE3278527E275A400395A93 /* InfoPlist.strings in Resources */, @@ -3579,6 +3741,10 @@ CBE3275027E275A400395A93 /* Artsy_Logo.png in Resources */, CBE3276327E275A400395A93 /* BackArrow_Highlighted@2x.png in Resources */, CBE326F227E275A300395A93 /* ARVIRTick.png in Resources */, + B3EFFC7412D94886B32A2B10 /* Unica77LL-Italic.otf in Resources */, + B7F9E6E6D6604CC691827F1D /* Unica77LL-Medium.otf in Resources */, + 4A9190A1CCE54CE09384C9FC /* Unica77LL-MediumItalic.otf in Resources */, + 9DE2CA6EF6024B2DAF877CB2 /* Unica77LL-Regular.otf in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3745,6 +3911,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1A4B97C7283CDD5A00878EAE /* ARMapContainerViewController.m in Sources */, CBE3279227E275A400395A93 /* User.m in Sources */, CBE3211D27D9615000395A93 /* ARTCityGuideViewManager.m in Sources */, CBE3277927E275A400395A93 /* ArtsyAPI+Notifications.m in Sources */, @@ -3765,7 +3932,6 @@ CBE326B827E275A300395A93 /* LiveAuctionSaleViewController.swift in Sources */, CBE326CA27E275A300395A93 /* SaleOnHoldOverlayView.swift in Sources */, CBE3267127E275A300395A93 /* UITableViewController+Animations.swift in Sources */, - CBE3270627E275A300395A93 /* AREigenMapContainerViewController.m in Sources */, CBE3279B27E275A400395A93 /* LiveBidder.m in Sources */, CBE3278827E275A400395A93 /* Artwork.m in Sources */, CBE3268827E275A300395A93 /* Interstellar+Artsy.swift in Sources */, @@ -3773,12 +3939,17 @@ CBE326AE27E275A300395A93 /* LiveAuctionLotListViewController.swift in Sources */, CBE3270727E275A300395A93 /* ARSerifNavigationViewController.m in Sources */, CBE326FA27E275A300395A93 /* ARInformationView.m in Sources */, + 1A4B97C5283CDD5A00878EAE /* ARCityPickerComponentViewController.m in Sources */, CBE3271F27E275A300395A93 /* Stringify.swift in Sources */, CBE326DA27E275A300395A93 /* ARMessageItemProvider.m in Sources */, CBE3278F27E275A400395A93 /* Image.m in Sources */, + 1A4B97C6283CDD5A00878EAE /* ARComponentViewController.m in Sources */, + 1A4B97CB283CDD5A00878EAE /* ARCity+GeospatialAdditions.m in Sources */, CBE326D527E275A300395A93 /* RefinementOptionsViewController+Private.swift in Sources */, CBE326BD27E275A300395A93 /* LiveAuctionBidHistoryViewController.swift in Sources */, + 1A4B97CE283CDD5A00878EAE /* AROpaqueImageView.m in Sources */, CBE3267627E275A300395A93 /* NSAttributedString+Additions.swift in Sources */, + 1A4E5124283F91BA0008EF35 /* ARButtonSubclasses.m in Sources */, CBE326ED27E275A300395A93 /* SCNArtworkNode.m in Sources */, CBE3211C27D9615000395A93 /* OldAdminView.swift in Sources */, CBE3278927E275A400395A93 /* PartnerShow.m in Sources */, @@ -3787,6 +3958,7 @@ CBE326AC27E275A300395A93 /* LiveAuctionSalesPerson.swift in Sources */, CBE326AF27E275A300395A93 /* LiveAuctionLoadingView.swift in Sources */, CBE326E127E275A300395A93 /* ARFileUtils.m in Sources */, + 1A4B97C8283CDD5A00878EAE /* ARPHPhotoPickerModule.m in Sources */, CBE3269727E275A300395A93 /* ARApplicationShortcutItemDelegate.m in Sources */, CBE326E627E275A300395A93 /* UIApplicationStateEnum.m in Sources */, CBE3270E27E275A300395A93 /* AuctionTitleView.swift in Sources */, @@ -3794,10 +3966,12 @@ CBE3278C27E275A400395A93 /* Artist.m in Sources */, CBE3277627E275A400395A93 /* ArtsyAPI+Following.m in Sources */, CBE326C927E275A300395A93 /* LiveAuctionLotCollectionViewLayoutAttributes.swift in Sources */, + 1A4B97BD283CDD5A00878EAE /* AREventsModule.m in Sources */, CBE3268427E275A300395A93 /* UIView+OldSchoolSnapshots.m in Sources */, CBE3270227E275A300395A93 /* ARAnimatedTickView.m in Sources */, CBE3272527E275A400395A93 /* ARTNativeScreenPresenterModule.m in Sources */, CBE326D927E275A300395A93 /* ARScrollNavigationChief.m in Sources */, + 1A4E511B283F91BA0008EF35 /* ARSpinner.m in Sources */, CBE3277E27E275A400395A93 /* ArtsyAPI+RelatedModels.m in Sources */, CBE3278427E275A400395A93 /* ARSystemTime.m in Sources */, CBE326CF27E275A300395A93 /* LiveAuctionPlaceMaxBidViewController.swift in Sources */, @@ -3807,6 +3981,7 @@ CBE3269D27E275A300395A93 /* ARAppDelegate+Emission.m in Sources */, CBE326A227E275A300395A93 /* ARNavigationTransitionController.m in Sources */, CBE326B127E275A300395A93 /* LiveAuctionViewController.swift in Sources */, + 1A4B97C0283CDD5A00878EAE /* AREmission.m in Sources */, CBE3267C27E275A300395A93 /* UIImage+ImageFromColor.m in Sources */, CBE3266F27E275A300395A93 /* ARAppConstants.m in Sources */, CBE326B427E275A300395A93 /* LiveAuctionStaticDataFetcher+Stubs.swift in Sources */, @@ -3814,7 +3989,10 @@ CBE3277327E275A400395A93 /* ArtsyAPI+Pages.m in Sources */, CBE326FD27E275A300395A93 /* ARAdminSettingsViewController.m in Sources */, CBE326C827E275A300395A93 /* LiveAuctionBiddingViewModel.swift in Sources */, + 1A4B97C9283CDD5A00878EAE /* ARNotificationsManager.m in Sources */, + 1A4E5121283F91BA0008EF35 /* UIColor+ArtsyColors.m in Sources */, CBE3267027E275A300395A93 /* ARDefaults.m in Sources */, + 1A4B97CA283CDD5A00878EAE /* ARTakeCameraPhotoModule.m in Sources */, CBE3268227E275A300395A93 /* NSDate+DateRange.m in Sources */, CBE326B927E275A300395A93 /* LiveAuctionStateManager.swift in Sources */, CBE326A927E275A300395A93 /* LiveAuctionViewModel.swift in Sources */, @@ -3826,11 +4004,14 @@ CBE326CD27E275A300395A93 /* LiveAuctionLotImageCollectionViewCell.swift in Sources */, CBE326D327E275A300395A93 /* AuctionInformationViewController.swift in Sources */, CBE326C727E275A300395A93 /* SimpleProgressView.swift in Sources */, + 1A4E511A283F91BA0008EF35 /* UIView+ARDrawing.m in Sources */, CBE3271427E275A300395A93 /* ARCustomEigenLabels.m in Sources */, CBE326C427E275A300395A93 /* LiveAuctionFancyLotCollectionViewLayout.swift in Sources */, CBE3276D27E275A400395A93 /* MTLModel+JSON.m in Sources */, CBE3270027E275A300395A93 /* ARAdminTableViewCell.m in Sources */, CBE326CC27E275A300395A93 /* SaleStatusView.swift in Sources */, + 1A4E511D283F91BA0008EF35 /* ARAnimationContinuation.m in Sources */, + 1A4B97C3283CDD5A00878EAE /* ARMediaPreviewController.m in Sources */, CBE326B027E275A300395A93 /* LiveAuctionStaticDataFetcher.swift in Sources */, CBE3267727E275A300395A93 /* UIImageView+AsyncImageLoading.m in Sources */, CBE3271D27E275A300395A93 /* ARNotificationView.m in Sources */, @@ -3840,7 +4021,6 @@ CBE326F927E275A300395A93 /* ARAugmentedRealityConfig.m in Sources */, CBE3279527E275A400395A93 /* Follow.m in Sources */, CBE3267527E275A300395A93 /* UIView+HitTestExpansion.m in Sources */, - CBE3278327E275A400395A93 /* ARReactPackagerHost.m in Sources */, CBE326CB27E275A300395A93 /* LiveAuctionToolbarView.swift in Sources */, CBE3270B27E275A300395A93 /* ARWebViewCacheHost.m in Sources */, CBE3279E27E275A400395A93 /* SaleArtwork.m in Sources */, @@ -3859,6 +4039,7 @@ CBE3271827E275A300395A93 /* ARBidButton.m in Sources */, CBE3267B27E275A300395A93 /* UIViewController+ARUserActivity.m in Sources */, CBE326BF27E275A300395A93 /* LiveAuctionLotListStickyCellCollectionViewLayout.swift in Sources */, + 1A4B97BF283CDD5A00878EAE /* RCTScrollView+Artsy.m in Sources */, CBE326A127E275A300395A93 /* ARDefaultNavigationTransition.m in Sources */, CBE3279D27E275A400395A93 /* BuyersPremium.m in Sources */, CBE3270D27E275A300395A93 /* SaleViewModel.swift in Sources */, @@ -3867,9 +4048,9 @@ CBE3269B27E275A300395A93 /* ARAppDelegate+Echo.m in Sources */, CBE3212027D9615000395A93 /* ARTOldAdminViewManager.m in Sources */, CBE3279F27E275A400395A93 /* Bid.m in Sources */, + 1A4B97BC283CDD5A00878EAE /* ARCocoaConstantsModule.m in Sources */, CBE3277127E275A400395A93 /* ArtsyAPI.m in Sources */, CBE3267227E275A300395A93 /* NSString+StringBetweenStrings.m in Sources */, - CBE326FE27E275A300395A93 /* ARAdminNetworkModel.m in Sources */, CBE326A427E275A300395A93 /* ARNavigationButtonsViewController.m in Sources */, CBE326D427E275A300395A93 /* RefinementOptionsViewController.swift in Sources */, CBE3267E27E275A300395A93 /* NSArray+Additions.m in Sources */, @@ -3881,6 +4062,8 @@ CBE3279027E275A400395A93 /* Gene.m in Sources */, CBE3276F27E275A400395A93 /* LiveAuctionSocketCommunicator.swift in Sources */, CBE3270F27E275A300395A93 /* SaleAuctionStatus.swift in Sources */, + 1A4B97CD283CDD5A00878EAE /* AROpaqueImageViewManager.m in Sources */, + 1A4B97C4283CDD5A00878EAE /* ARCityComponentViewController.m in Sources */, CBE3269E27E275A300395A93 /* AROptions.m in Sources */, CBE3211E27D9615000395A93 /* ARTLiveAuctionViewManager.m in Sources */, CBE326B327E275A300395A93 /* LotListCollectionViewCell.swift in Sources */, @@ -3888,7 +4071,9 @@ CBE326DF27E275A300395A93 /* ARStandardDateFormatter.m in Sources */, CBE3279927E275A400395A93 /* LiveSale.m in Sources */, CBE326A327E275A300395A93 /* ARNavigationTransition.m in Sources */, + 1A4B97CC283CDD5A00878EAE /* ARCity.m in Sources */, CBE3267D27E275A300395A93 /* UIViewController+Popovers.m in Sources */, + 1A4E5123283F91BA0008EF35 /* UIFont+ArtsyFonts.m in Sources */, CBE3277227E275A400395A93 /* ArtsyAPI+HEAD.m in Sources */, CBE326AD27E275A300395A93 /* LiveAuctionLotViewController.swift in Sources */, CBE326C227E275A300395A93 /* LiveAuctionLotCollectionViewDataSource.swift in Sources */, @@ -3900,6 +4085,7 @@ CBE3277727E275A400395A93 /* ArtsyAPI+SystemTime.m in Sources */, CBE3268527E275A300395A93 /* UIViewController+FullScreenLoading.m in Sources */, CBE326EF27E275A300395A93 /* ARAugmentedVIRSetupViewController.m in Sources */, + 1A4E511E283F91BA0008EF35 /* UILabel+Typography.m in Sources */, CBE3267F27E275A300395A93 /* UIViewController+Traits.swift in Sources */, CBE3270C27E275A300395A93 /* ARCountdownView.m in Sources */, CBE326A527E275A300395A93 /* ARExternalWebBrowserViewController.m in Sources */, @@ -3930,6 +4116,7 @@ CBE3277427E275A400395A93 /* ArtsyAPI+ErrorHandlers.m in Sources */, CBE326DB27E275A300395A93 /* ARSharingController.m in Sources */, CBE326C127E275A300395A93 /* AuctionLotMetadataStackScrollView.swift in Sources */, + 1A4E511F283F91BA0008EF35 /* UIView+ARSpinner.m in Sources */, CBE3268627E275A300395A93 /* PanDirectionGestureRecognizer.swift in Sources */, CBE3269227E275A300395A93 /* ARAppNotificationsDelegate.m in Sources */, CBE3271E27E275A300395A93 /* AuctionCircularButtons.swift in Sources */, @@ -3938,6 +4125,7 @@ CBE3269427E275A300395A93 /* ARAnalyticsConstants.m in Sources */, CBE3270927E275A300395A93 /* StoryboardImages.swift in Sources */, CBE326E027E275A300395A93 /* ARBackButton.m in Sources */, + 1A4B97C2283CDD5A00878EAE /* ARMapComponentViewController.m in Sources */, CBE3268727E275A300395A93 /* ORStackView+ArtsyViews.m in Sources */, CBE3269C27E275A300395A93 /* ARTArtsyNativeModule.m in Sources */, CBE3271327E275A300395A93 /* ARReusableLoadingView.m in Sources */, @@ -3946,11 +4134,14 @@ CBE326A827E275A300395A93 /* LiveAuctionSaleLotsDataSource.swift in Sources */, CBE3270A27E275A300395A93 /* ARDispatchManager.m in Sources */, CBE326AA27E275A300395A93 /* LiveAuctionEventViewModel.swift in Sources */, + 1A4B97BE283CDD5A00878EAE /* ARScrollViewHelpers.m in Sources */, CBE326B227E275A300395A93 /* LiveAuctionLotSetViewController.swift in Sources */, + 1A4B97C1283CDD5A00878EAE /* ARTemporaryAPIModule.m in Sources */, CBE3269527E275A300395A93 /* ARModalViewController.m in Sources */, CBE326D627E275A300395A93 /* AuctionSaleNetworkModel.swift in Sources */, CBE3278227E275A400395A93 /* ARRouter+GraphQL.m in Sources */, CBE326D227E275A300395A93 /* AuctionBiddersNetworkModel.swift in Sources */, + 1A4E5119283F91BA0008EF35 /* Artsy+UILabels.m in Sources */, CBE3267927E275A300395A93 /* NSDate+Util.m in Sources */, CBE326E227E275A300395A93 /* ARNavigationController.m in Sources */, CBE3271527E275A300395A93 /* ARSeparatorViews.m in Sources */, @@ -4086,7 +4277,6 @@ CB43295327E8FEE600B29DD6 /* NSDate+RangeTests.m in Sources */, CB43286F27E8FEE500B29DD6 /* AuctionLotMetadataStackScrollViewTests.swift in Sources */, CB43295627E8FEE600B29DD6 /* SaleArtwork+Extensions.m in Sources */, - CB4328B727E8FEE500B29DD6 /* ARSystemTimeTests.m in Sources */, CB43295C27E90BD000B29DD6 /* Schedule.swift in Sources */, CB43287327E8FEE500B29DD6 /* ARValueTransformerTests.m in Sources */, CB4328BB27E8FEE500B29DD6 /* ArtsyAPI+PrivateTests.m in Sources */, @@ -4500,7 +4690,7 @@ INFOPLIST_FILE = BrazePushServiceExtension/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = BrazePushServiceExtension; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Artsy. All rights reserved."; - IPHONEOS_DEPLOYMENT_TARGET = 15.2; + IPHONEOS_DEPLOYMENT_TARGET = 15.5; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -4541,7 +4731,7 @@ INFOPLIST_FILE = BrazePushServiceExtension/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = BrazePushServiceExtension; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Artsy. All rights reserved."; - IPHONEOS_DEPLOYMENT_TARGET = 15.2; + IPHONEOS_DEPLOYMENT_TARGET = 15.5; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/ios/Artsy.xcodeproj/xcshareddata/xcschemes/Artsy.xcscheme b/ios/Artsy.xcodeproj/xcshareddata/xcschemes/Artsy.xcscheme index 3e3a64e9b08..0402d3cd522 100644 --- a/ios/Artsy.xcodeproj/xcshareddata/xcschemes/Artsy.xcscheme +++ b/ios/Artsy.xcodeproj/xcshareddata/xcschemes/Artsy.xcscheme @@ -1,28 +1,10 @@ + version = "1.3"> - - - - - - - - - - -#import +#import "AREmission.h" #import static NSString *SailthruLinkDomain = @"link.artsy.net"; diff --git a/ios/Artsy/App/ARAppDelegate+Analytics.m b/ios/Artsy/App/ARAppDelegate+Analytics.m index a720c042473..1febd315304 100644 --- a/ios/Artsy/App/ARAppDelegate+Analytics.m +++ b/ios/Artsy/App/ARAppDelegate+Analytics.m @@ -2,7 +2,7 @@ #import "ARAppDelegate+Analytics.h" #import "ARAnalyticsConstants.h" -#import +#import "AREmission.h" // Note the Eigen Schema: // https://docs.google.com/spreadsheets/u/1/d/1bLbeOgVFaWzLSjxLOBDNOKs757-zBGoLSM1lIz3OPiI/edit#gid=497747862 diff --git a/ios/Artsy/App/ARAppDelegate+Emission.h b/ios/Artsy/App/ARAppDelegate+Emission.h index 85b702bc872..02af1e94308 100644 --- a/ios/Artsy/App/ARAppDelegate+Emission.h +++ b/ios/Artsy/App/ARAppDelegate+Emission.h @@ -1,6 +1,6 @@ #import "ARAppDelegate.h" -#import +#import "AREmission.h" @interface ARAppDelegate (Emission) -- (AREmission *)setupEmission; +- (AREmission *)setupSharedEmission; @end diff --git a/ios/Artsy/App/ARAppDelegate+Emission.m b/ios/Artsy/App/ARAppDelegate+Emission.m index df4d1aab517..3bbfa3418e7 100644 --- a/ios/Artsy/App/ARAppDelegate+Emission.m +++ b/ios/Artsy/App/ARAppDelegate+Emission.m @@ -15,25 +15,21 @@ #import "ARAugmentedVIRSetupViewController.h" #import "ARAugmentedRealityConfig.h" #import "ARAugmentedFloorBasedVIRViewController.h" -#import "ARInternalMobileWebViewController.h" #import "ARDefaults.h" #import "ARNavigationController.h" #import "ARAppStatus.h" #import "ARRouter.h" -#import "ARReactPackagerHost.h" #import "AROptions.h" #import -#import -#import -#import -#import +#import "AREmission.h" +#import "ARTemporaryAPIModule.h" +#import "AREventsModule.h" #import #import #import #import -#import "ARAdminNetworkModel.h" #import "Artsy-Swift.h" @import Darwin.POSIX.sys.utsname; @@ -41,57 +37,7 @@ @implementation ARAppDelegate (Emission) -- (AREmission *)setupEmission; -{ - BOOL isDebugMode; -#if DEBUG - isDebugMode = YES; -#else - isDebugMode = NO; -#endif - if (isDebugMode) { - NSString *bundleUrlString = [NSString stringWithFormat:@"http://%@:8081/index.ios.bundle?platform=ios&dev=true", [ARReactPackagerHost hostname]]; - NSURL *packagerURL = [NSURL URLWithString:bundleUrlString]; - return [self setupSharedEmissionWithPackagerURL:packagerURL]; - } else { - // The normal flow for users - return [self setupSharedEmissionWithPackagerURL:nil]; - } -} - -/* -deviceId taken from https://github.com/react-native-community/react-native-device-info/blob/d08f7f6db0407de5dc5252ebf2aa2ec58bd78dfc/ios/RNDeviceInfo/RNDeviceInfo.m -The MIT License (MIT) -Copyright (c) 2015 Rebecca Hughes -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ -- (NSString *)deviceId; -{ - struct utsname systemInfo; - uname(&systemInfo); - NSString *deviceId = [NSString stringWithCString:systemInfo.machine - encoding:NSUTF8StringEncoding]; - if ([deviceId isEqualToString:@"i386"] || [deviceId isEqualToString:@"x86_64"]) { - deviceId = [NSString stringWithFormat:@"%s", getenv("SIMULATOR_MODEL_IDENTIFIER")]; - } - return deviceId; -} - -- (AREmission *)setupSharedEmissionWithPackagerURL:(NSURL *)packagerURL; +- (AREmission *)setupSharedEmission { NSString *userID = [[[ARUserManager sharedManager] currentUser] userID]; NSString *userEmail = [[[ARUserManager sharedManager] currentUser] email]; @@ -106,24 +52,17 @@ - (AREmission *)setupSharedEmissionWithPackagerURL:(NSURL *)packagerURL; NSInteger launchCount = [[NSUserDefaults standardUserDefaults] integerForKey:ARAnalyticsAppUsageCountProperty]; AREmission *emission = [[AREmission alloc] initWithState:@{ - [ARStateKey userID] : (userID ?: [NSNull null]), - [ARStateKey userEmail] : (userEmail ?: [NSNull null]), - [ARStateKey authenticationToken] : (authenticationToken ?: [NSNull null]), - [ARStateKey launchCount] : @(launchCount), - [ARStateKey userAgent] : ARRouter.userAgent, - [ARStateKey deviceId] : self.deviceId, - } packagerURL:packagerURL]; + [ARStateKey userID] : (userID ?: [NSNull null]), + [ARStateKey userEmail] : (userEmail ?: [NSNull null]), + [ARStateKey authenticationToken] : (authenticationToken ?: [NSNull null]), + [ARStateKey launchCount] : @(launchCount), + [ARStateKey userAgent] : ARRouter.userAgent, + }]; [emission.notificationsManagerModule afterBootstrap:^{ [ARRouter setup]; }]; - // Disable default React Native dev menu shake motion handler - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - RCTSwapInstanceMethods([UIWindow class], @selector(RCT_motionEnded:withEvent:), @selector(motionEnded:withEvent:)); - }); - [AREmission setSharedInstance:emission]; #pragma mark - Native Module: Push Notification Permissions @@ -169,7 +108,7 @@ - (AREmission *)setupSharedEmissionWithPackagerURL:(NSURL *)packagerURL; } }; - return emission; + return emission; } @end diff --git a/ios/Artsy/App/ARAppDelegate.h b/ios/Artsy/App/ARAppDelegate.h index 36ba322be5d..04d139794f7 100644 --- a/ios/Artsy/App/ARAppDelegate.h +++ b/ios/Artsy/App/ARAppDelegate.h @@ -1,16 +1,16 @@ #import +#import #import @class ARWindow, ArtsyEcho; -// This class, and infact the complete JSDecoupledAppDelegate class, is not used during testing. +// This class, and in fact the complete JSDecoupledAppDelegate class, is not used during testing. // The test app delegate class is ARTestHelper and is responsible for seting up the test env. // // When testing the various decoupled app delegate classes, simply use the shared app delegate // (`[JSDecoupledAppDelegate sharedAppDelegate]`) to perform your tests on. - -@interface ARAppDelegate : UIResponder +@interface ARAppDelegate : UIResponder + (ARAppDelegate *)sharedInstance; @@ -25,10 +25,7 @@ @end -/// Here because it's intrinsically related to using the ARAppDelegate shared instance. -@interface ARWindow : UIWindow -/// Used to refer to the last touch coordinates for iPad popovers from martsy views. +@interface ARWindow : UIWindow // look in HACKS.md. We use this for a patch to react-native-image-crop-picker for now. @property (nonatomic, assign) CGPoint lastTouchPoint; - @end diff --git a/ios/Artsy/App/ARAppDelegate.m b/ios/Artsy/App/ARAppDelegate.m index bde143a3b9e..ce7045d92a6 100644 --- a/ios/Artsy/App/ARAppDelegate.m +++ b/ios/Artsy/App/ARAppDelegate.m @@ -1,6 +1,5 @@ #import #import -#import #import #import #import @@ -35,17 +34,26 @@ #import "ARDispatchManager.h" #import "ARLogger.h" +#import "AREmission.h" +#import "AREventsModule.h" +#import "ARTemporaryAPIModule.h" +#import "ARTakeCameraPhotoModule.h" +#import "ARPHPhotoPickerModule.h" +#import "ARNotificationsManager.h" +#import "ARCocoaConstantsModule.h" + #import "UIDevice-Hardware.h" #import "ArtsyEcho.h" #import -#import #import #import +#import +#import #import -#import -#import +#import "AREmission.h" +#import "ARNotificationsManager.h" #if defined(FB_SONARKIT_ENABLED) && __has_include() #import @@ -55,14 +63,15 @@ #import #import + static void InitializeFlipper(UIApplication *application) { - FlipperClient *client = [FlipperClient sharedClient]; - SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; - [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; - [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; - [client addPlugin:[FlipperKitReactPlugin new]]; - [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; - [client start]; + FlipperClient *client = [FlipperClient sharedClient]; + SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; + [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; + [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; + [client addPlugin:[FlipperKitReactPlugin new]]; + [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; + [client start]; } #endif @@ -84,10 +93,6 @@ + (void)load _sharedInstance = [[self alloc] init]; [JSDecoupledAppDelegate sharedAppDelegate].appStateDelegate = _sharedInstance; [JSDecoupledAppDelegate sharedAppDelegate].appDefaultOrientationDelegate = (id)_sharedInstance; - - // TODO Until we drop iOS 8 support, we can’t really conform to the `JSApplicationURLResourceOpeningDelegate` - // protocol, as it means we would have to implement `application:openURL:options:` which seems tricky if we still - // have to implement `application:openURL:sourceApplication:annotation:` as well. [JSDecoupledAppDelegate sharedAppDelegate].URLResourceOpeningDelegate = (id)_sharedInstance; } @@ -119,10 +124,10 @@ - (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions: - (void)applicationDidBecomeActive:(UIApplication *)application { - [self setupForAppLaunch]; + [self setupForAppLaunch:nil]; } -- (void)setupForAppLaunch +- (void)setupForAppLaunch:(NSDictionary *)launchOptions { // In case everything's already set up if (self.window) { @@ -134,45 +139,48 @@ - (void)setupForAppLaunch [JSDecoupledAppDelegate sharedAppDelegate].remoteNotificationsDelegate = [[ARAppNotificationsDelegate alloc] init]; - [self setupAdminTools]; - [self countNumberOfRuns]; _landingURLRepresentation = self.landingURLRepresentation ?: @"https://artsy.net"; [[ARLogger sharedLogger] startLogging]; - AREmission *emission = [self setupEmission]; + AREmission *emission = [self setupSharedEmission]; - RCTRootView *rootView = [[RCTRootView alloc] - initWithBridge:emission.bridge - moduleName:@"eigen" - initialProperties:nil]; + RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; + [emission setBridge:bridge]; + RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge + moduleName:@"eigen" + initialProperties:nil]; - self.window = [[ARWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - UIViewController *rootViewController = [UIViewController new]; - rootViewController.view = rootView; - self.window.rootViewController = rootViewController; - [self.window makeKeyAndVisible]; + if (@available(iOS 13.0, *)) { + rootView.backgroundColor = [UIColor systemBackgroundColor]; + } else { + rootView.backgroundColor = [UIColor whiteColor]; + } - if (@available(iOS 13.0, *)) { - // prevent dark mode - self.window.overrideUserInterfaceStyle = UIUserInterfaceStyleLight; - } + self.window = [[ARWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + UIViewController *rootViewController = [UIViewController new]; + rootViewController.view = rootView; + self.window.rootViewController = rootViewController; + [self.window makeKeyAndVisible]; + if (@available(iOS 13.0, *)) { + // prevent dark mode + self.window.overrideUserInterfaceStyle = UIUserInterfaceStyleLight; + } [ARWebViewCacheHost startup]; [self registerNewSessionOpened]; } -/// This is called when the app is almost done launching - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { #if defined(FB_SONARKIT_ENABLED) && __has_include() InitializeFlipper(application); #endif - [self setupForAppLaunch]; + [self setupForAppLaunch:launchOptions]; [self setupAnalytics:application withLaunchOptions:launchOptions]; @@ -195,9 +203,9 @@ - (void)setupAnalytics:(UIApplication *)application withLaunchOptions:(NSDiction NSMutableDictionary *appboyOptions = [NSMutableDictionary dictionary]; appboyOptions[ABKEndpointKey] = brazeSDKEndPoint; [Appboy startWithApiKey:brazeAppKey - inApplication:application - withLaunchOptions:launchOptions - withAppboyOptions:appboyOptions]; + inApplication:application + withLaunchOptions:launchOptions + withAppboyOptions:appboyOptions]; NSString *segmentWriteKey = [ReactNativeConfig envFor:@"SEGMENT_STAGING_WRITE_KEY_IOS"]; if (![ARAppStatus isDev]) { @@ -217,11 +225,10 @@ - (void)setupAnalytics:(UIApplication *)application withLaunchOptions:(NSDiction - (void)registerNewSessionOpened { // TODO: Customise APPBOY Sessions - //A session is started when you call [[Appboy sharedInstance] startWithApiKey:inApplication:withLaunchOptions:withAppboyOptions] + // A session is started when you call [[Appboy sharedInstance] startWithApiKey:inApplication:withLaunchOptions:withAppboyOptions] } -/// This happens every time we come _back_ to the app from the background - +// This happens every time we come _back_ to the app from the background - (void)applicationWillEnterForeground:(UIApplication *)application { [self registerNewSessionOpened]; @@ -245,37 +252,12 @@ - (ARAppNotificationsDelegate *)remoteNotificationsDelegate; - (void)forceCacheCustomFonts { - __unused UIFont *font = [UIFont serifBoldItalicFontWithSize:12]; - font = [UIFont serifBoldFontWithSize:12]; - font = [UIFont serifSemiBoldFontWithSize:12]; + __unused UIFont *font = [UIFont serifSemiBoldFontWithSize:12]; font = [UIFont serifFontWithSize:12]; font = [UIFont serifItalicFontWithSize:12]; font = [UIFont sansSerifFontWithSize:12]; - font = [UIFont smallCapsSerifFontWithSize:12]; -} - -- (void)setupAdminTools -{ - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(rageShakeNotificationRecieved) name:DHCSHakeNotificationName object:nil]; - - [ORKeyboardReactingApplication registerForCallbackOnKeyDown:ORTildeKey:^{ - [self rageShakeNotificationRecieved]; - }]; -} - -// For pre-iOS 10 -- (BOOL)application:(UIApplication *)application - openURL:(NSURL *)url - sourceApplication:(NSString *)sourceApplication - annotation:(id)annotation -{ - return [self application:application openURL:url options: @{ - UIApplicationOpenURLOptionsSourceApplicationKey: sourceApplication ?: @"", - UIApplicationOpenURLOptionsAnnotationKey: annotation ?: @"" - }]; } -// For iOS 10 - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options { NSString *sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey]; @@ -341,22 +323,6 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction return YES; } -- (void)rageShakeNotificationRecieved -{ - if (![[AREmission sharedInstance] reactStateBoolForKey:[ARReactStateKey userIsDev]]) { - return; - } - - if (![UIDevice isPad]) { - // For some reason the supported orientation isn’t respected when this is pushed on top - // of a landscape VIR view. - // - // Since this is a debug/admin only issue, it’s safe to use private API here. - [[UIDevice currentDevice] setValue:@(UIInterfaceOrientationPortrait) forKey:@"orientation"]; - } - [[AREmission sharedInstance] navigate:@"/admin2"]; -} - - (void)countNumberOfRuns { NSInteger numberOfRuns = [[NSUserDefaults standardUserDefaults] integerForKey:ARAnalyticsAppUsageCountProperty] + 1; @@ -365,6 +331,27 @@ - (void)countNumberOfRuns [[NSUserDefaults standardUserDefaults] synchronize]; } +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ +#if DEBUG + return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; +#else + return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif +} + +- (NSArray> *)extraModulesForBridge:(RCTBridge *)bridge +{ + return @[ + [[AREmission sharedInstance] eventsModule], + [[AREmission sharedInstance] APIModule], + [ARTakeCameraPhotoModule new], + [ARPHPhotoPickerModule new], + [[AREmission sharedInstance] notificationsManagerModule], + [ARCocoaConstantsModule new], + ]; +} + @end diff --git a/ios/Artsy/App/ARAppNotificationsDelegate.m b/ios/Artsy/App/ARAppNotificationsDelegate.m index d34b510ada2..c5b2d9efbeb 100644 --- a/ios/Artsy/App/ARAppNotificationsDelegate.m +++ b/ios/Artsy/App/ARAppNotificationsDelegate.m @@ -17,8 +17,8 @@ #import "AROptions.h" #import "ARDispatchManager.h" -#import -#import +#import "AREmission.h" +#import "ARNotificationsManager.h" #import #import "Appboy-iOS-SDK/AppboyKit.h" diff --git a/ios/Artsy/App/ARApplicationShortcutItemDelegate.m b/ios/Artsy/App/ARApplicationShortcutItemDelegate.m index f9c0ae742dc..2f081dc36cd 100644 --- a/ios/Artsy/App/ARApplicationShortcutItemDelegate.m +++ b/ios/Artsy/App/ARApplicationShortcutItemDelegate.m @@ -3,7 +3,7 @@ #import "ARAppConstants.h" #import "ARNavigationController.h" #import "User.h" -#import +#import "AREmission.h" @implementation ARApplicationShortcutItemDelegate diff --git a/ios/Artsy/App/ARFonts.h b/ios/Artsy/App/ARFonts.h index 1e5d247a97d..6023f816f55 100644 --- a/ios/Artsy/App/ARFonts.h +++ b/ios/Artsy/App/ARFonts.h @@ -1,11 +1,5 @@ #import -#import +#import "UIColor+ArtsyColors.h" -#if __has_include() -#import -#endif - -#if __has_include() -#import -#endif +#import "UIFont+ArtsyFonts.h" diff --git a/ios/Artsy/App/ARModalViewController.m b/ios/Artsy/App/ARModalViewController.m index aade99f5911..90ed7acab67 100644 --- a/ios/Artsy/App/ARModalViewController.m +++ b/ios/Artsy/App/ARModalViewController.m @@ -1,7 +1,7 @@ #import "ARModalViewController.h" #import #import -#import +#import "AREmission.h" @implementation ARModalViewController diff --git a/ios/Artsy/App/ARTArtsyNativeModule.m b/ios/Artsy/App/ARTArtsyNativeModule.m index a0f1fc6193b..d8b313f79ef 100644 --- a/ios/Artsy/App/ARTArtsyNativeModule.m +++ b/ios/Artsy/App/ARTArtsyNativeModule.m @@ -1,6 +1,6 @@ #import "ARTArtsyNativeModule.h" #import "ARAppStatus.h" -#import +#import "AREmission.h" #import "ARRouter.h" #import "ARFileUtils.h" #import "User.h" diff --git a/ios/Artsy/App/main.m b/ios/Artsy/App/main.m index 597ece58a0b..18319999d55 100644 --- a/ios/Artsy/App/main.m +++ b/ios/Artsy/App/main.m @@ -1,18 +1,15 @@ -#import "ARAppDelegate.h" -#import +#import + int main(int argc, char *argv[]) { - @autoreleasepool - { + @autoreleasepool { NSString *appDelegate = @"JSDecoupledAppDelegate"; #ifdef DEBUG if (NSClassFromString(@"XCTestCase")) { appDelegate = @"ARTestHelper"; } #endif - return UIApplicationMain(argc, argv, @"ORKeyboardReactingApplication", appDelegate); + return UIApplicationMain(argc, argv, @"UIApplication", appDelegate); } } - - diff --git a/ios/Artsy/App_Resources/Artsy-Info.plist b/ios/Artsy/App_Resources/Artsy-Info.plist index 44e9b674ee0..caf5c28715a 100644 --- a/ios/Artsy/App_Resources/Artsy-Info.plist +++ b/ios/Artsy/App_Resources/Artsy-Info.plist @@ -136,11 +136,10 @@ Photos will be used to gauge the quality of the work you are submitting. UIAppFonts - AGaramondPro-BoldItalic.otf - AGaramondPro-Bold.otf - AGaramondPro-Italic.otf - AGaramondPro-Regular.otf - AGaramondPro-Semibold.otf + Unica77LL-Italic.otf + Unica77LL-Medium.otf + Unica77LL-MediumItalic.otf + Unica77LL-Regular.otf UIApplicationShortcutItems @@ -219,5 +218,7 @@ + UIViewControllerBasedStatusBarAppearance + diff --git a/ios/Artsy/ArtsyUIButtons/ARButtonSubclasses.h b/ios/Artsy/ArtsyUIButtons/ARButtonSubclasses.h new file mode 100644 index 00000000000..a00d4c206c9 --- /dev/null +++ b/ios/Artsy/ArtsyUIButtons/ARButtonSubclasses.h @@ -0,0 +1,37 @@ +#import + + +@interface ARButton : UIButton +@property (nonatomic, readwrite) BOOL shouldDimWhenDisabled; +@property (nonatomic, readwrite) BOOL shouldAnimateStateChange; +- (void)setup; +- (void)setEnabled:(BOOL)enabled animated:(BOOL)animated; +@end + + +// ARFlatButton is effectively an abstract class. It provides no colors for text, background or border. +// The only time you might want to instantiate and customize a one-off ARFlatButton is when none of +// the generic subclasses is suitable. + +@interface ARFlatButton : ARButton +- (void)setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state; +- (void)setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state animated:(BOOL)animated; + +- (void)setBorderColor:(UIColor *)borderColor forState:(UIControlState)state; +- (void)setBorderColor:(UIColor *)borderColor forState:(UIControlState)state animated:(BOOL)animated; + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated; +- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated; +@end + +@interface ARMenuButton : ARFlatButton +@end + +@interface ARClearFlatButton : ARFlatButton +@end + +@interface ARWhiteFlatButton : ARFlatButton +@end + +@interface ARBlackFlatButton : ARFlatButton +@end diff --git a/ios/Artsy/ArtsyUIButtons/ARButtonSubclasses.m b/ios/Artsy/ArtsyUIButtons/ARButtonSubclasses.m new file mode 100644 index 00000000000..aa49c601e43 --- /dev/null +++ b/ios/Artsy/ArtsyUIButtons/ARButtonSubclasses.m @@ -0,0 +1,318 @@ +#import "ARButtonSubclasses.h" + +#import "UIColor+ArtsyColors.h" + +#if __has_include() +#import +#endif + +#if __has_include() +#import +#endif + +#import "UIFont+ArtsyFonts.h" + +const CGFloat ARButtonAnimationDuration = 0.15; + +@implementation ARButton + +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (!self) { return nil; } + + [self setup]; + + return self; +} + +- (void)awakeFromNib +{ + [super awakeFromNib]; + [self setup]; +} + +- (void)setEnabled:(BOOL)enabled +{ + [self setEnabled:enabled animated:self.shouldAnimateStateChange]; +} + +- (void)setEnabled:(BOOL)enabled animated:(BOOL)animated +{ + [super setEnabled:enabled]; + if (!self.shouldDimWhenDisabled) { return; } + CGFloat alpha = enabled ? 1 : 0.1; + [UIView animateIf:animated duration:ARButtonAnimationDuration :^{ + self.alpha = alpha; + }]; +} + +- (void)setup +{ + self.shouldDimWhenDisabled = YES; + self.shouldAnimateStateChange = YES; +} + +@end + + +@interface ARFlatButton () +@property (nonatomic, strong) NSMutableDictionary *backgroundColors; +@property (nonatomic, strong) NSMutableDictionary *borderColors; +@end + +@implementation ARFlatButton + +- (id)init +{ + return [self initWithFrame:CGRectZero]; +} + +- (void)setup +{ + [super setup]; + self.backgroundColors = [NSMutableDictionary dictionary]; + self.borderColors = [NSMutableDictionary dictionary]; + + self.titleLabel.font = [UIFont sansSerifFontWithSize:12]; + [self addConstraint:[NSLayoutConstraint constraintWithItem:self.titleLabel attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterX multiplier:1 constant:0]]; + [self addConstraint:[NSLayoutConstraint constraintWithItem:self.titleLabel attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]]; + + CALayer *layer = [self layer]; + [layer setMasksToBounds: YES]; + [layer setCornerRadius: 2.0]; + [layer setBorderWidth: 1.0]; +} + +- (void)setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state +{ + [self setBackgroundColor:backgroundColor forState:state animated:self.shouldAnimateStateChange]; +} + +- (void)setBorderColor:(UIColor *)borderColor forState:(UIControlState)state +{ + [self setBorderColor:borderColor forState:state animated:self.shouldAnimateStateChange]; + +} + +- (void)setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state animated:(BOOL)animated +{ + [self.backgroundColors setObject:backgroundColor forKey:@(state)]; + if (state == self.state) { + [self changeColorsForStateChangeAnimated:animated]; + } +} + +- (void)setBorderColor:(UIColor *)borderColor forState:(UIControlState)state animated:(BOOL)animated +{ + [self.borderColors setObject:borderColor forKey:@(state)]; + if (state == self.state) { + [self changeColorsForStateChangeAnimated:animated]; + } +} + +- (void)setSelected:(BOOL)selected +{ + [self setSelected:selected animated:self.shouldAnimateStateChange]; +} + +- (void)setHighlighted:(BOOL)highlighted +{ + [self setHighlighted:highlighted animated:self.shouldAnimateStateChange]; +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated +{ + [super setSelected:selected]; + [self changeColorsForStateChangeAnimated:(BOOL)animated]; +} + +- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated +{ + [super setHighlighted:highlighted]; + [self changeColorsForStateChangeAnimated:animated]; +} + +- (void)setEnabled:(BOOL)enabled animated:(BOOL)animated +{ + [super setEnabled:enabled animated:animated]; + [self changeColorsForStateChangeAnimated:animated]; +} + +- (void)changeColorsForStateChangeAnimated:(BOOL)animated +{ + [self changeBackgroundColorForStateChangeAnimated:animated]; + [self changeBorderColorForStateChangeAnimated:animated]; +} + +- (void)changeBackgroundColorForStateChangeAnimated:(BOOL)animated{ + [self changeBackgroundColorForStateChangeAnimated:animated layer:self.layer]; +} + +- (void)changeBorderColorForStateChangeAnimated:(BOOL)animated{ + [self changeBorderColorForStateChangeAnimated:animated layer:self.layer]; +} + +- (void)changeBackgroundColorForStateChangeAnimated:(BOOL)animated layer:(CALayer *)layer +{ + if (!layer.backgroundColor) { + layer.backgroundColor = [UIColor clearColor].CGColor; + } + + UIColor *newBackgroundColor = [self.backgroundColors objectForKey:@(self.state)] ?: [self.backgroundColors objectForKey:@(UIControlStateNormal)]; + if (newBackgroundColor && newBackgroundColor.CGColor != layer.backgroundColor) { + if (animated) { + [self animateLayer:layer fromColor:layer.backgroundColor toColor:newBackgroundColor.CGColor forKey:@"backgroundColor"]; + } + layer.backgroundColor = newBackgroundColor.CGColor; + }; +} + +- (void)changeBorderColorForStateChangeAnimated:(BOOL)animated layer:(CALayer *)layer +{ + if (!layer.borderColor) { + layer.borderColor = [UIColor clearColor].CGColor; + } + + UIColor *newBorderColor = [self.borderColors objectForKey:@(self.state)] ?: [self.borderColors objectForKey:@(UIControlStateNormal)]; + if (newBorderColor && newBorderColor.CGColor != layer.borderColor) { + if (animated) { + [self animateLayer:layer fromColor:layer.borderColor toColor:newBorderColor.CGColor forKey:@"borderColor"]; + + } + layer.borderColor = newBorderColor.CGColor; + }; +} + +- (void)animateLayer:(CALayer *)layer fromColor:(CGColorRef)fromColor toColor:(CGColorRef)toColor forKey:(NSString *)key +{ + CABasicAnimation *fade = [CABasicAnimation animation]; + fade.fromValue = (__bridge id)(fromColor); + fade.toValue = (__bridge id)(toColor); + fade.duration = ARButtonAnimationDuration; + [layer addAnimation:fade forKey:key]; +} + +@end + +@interface ARMenuButton() +@property(nonatomic, strong, readonly) CALayer *backgroundLayer; +@end + +@implementation ARMenuButton + +- (void)setup +{ + [super setup]; + self.layer.backgroundColor = [UIColor clearColor].CGColor; + + _backgroundLayer = [CALayer layer]; + _backgroundLayer.masksToBounds = YES; + _backgroundLayer.bounds = self.layer.bounds; + + [self setBorderColor:[UIColor whiteColor] forState:UIControlStateNormal animated:NO]; + [self setBackgroundColor:[UIColor blackColor] forState:UIControlStateNormal animated:NO]; + [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + + [self.layer insertSublayer:_backgroundLayer atIndex:0]; +} + +- (void)layoutSubviews +{ + [super layoutSubviews]; + + CGFloat borderWidth = self.layer.borderWidth; + CGFloat width = CGRectGetWidth(self.layer.bounds); + CGFloat height = CGRectGetHeight(self.layer.bounds); + CGFloat smallestDimension = MIN(width, height); + self.layer.cornerRadius = smallestDimension / 2.0; + + CGRect insetRect = CGRectInset(self.layer.bounds, borderWidth, borderWidth); + self.backgroundLayer.frame = insetRect; + self.backgroundLayer.cornerRadius = self.layer.cornerRadius - borderWidth; + + [self bringSubviewToFront:self.imageView]; + [self bringSubviewToFront:self.titleLabel]; +} + +- (void)changeBackgroundColorForStateChangeAnimated:(BOOL)animated{ + [self changeBackgroundColorForStateChangeAnimated:animated layer:self.backgroundLayer]; +} + + +- (CGSize)intrinsicContentSize +{ + return (CGSize){ 40, 40 }; +} + +@end + +@implementation ARClearFlatButton + +- (void)setup +{ + [super setup]; + + self.layer.borderWidth = 2; + + [self setBackgroundColor:[UIColor clearColor] forState:UIControlStateNormal animated:NO]; + [self setBorderColor:[UIColor whiteColor] forState:UIControlStateNormal animated:NO]; + [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + + [self setBackgroundColor:[UIColor artsyPurpleRegular] forState:UIControlStateHighlighted animated:NO]; + [self setBorderColor:[UIColor artsyPurpleRegular] forState:UIControlStateHighlighted animated:NO]; +} + +- (CGSize)intrinsicContentSize +{ + return (CGSize){ 280, 44 }; +} + +@end + + +@implementation ARWhiteFlatButton + +- (void)setup +{ + [super setup]; + + [self setBackgroundColor:[UIColor whiteColor] forState:UIControlStateNormal animated:NO]; + [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; + + [self setBackgroundColor:[UIColor blackColor] forState:UIControlStateHighlighted animated:NO]; + [self setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; + + self.layer.borderWidth = 0; +} + +- (CGSize)intrinsicContentSize +{ + return (CGSize){ 280, 44 }; +} + +@end + + + +@implementation ARBlackFlatButton + +- (void)setup +{ + [super setup]; + + self.titleLabel.font = [UIFont sansSerifFontWithSize:15]; + self.layer.borderWidth = 0; + + [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + + [self setBackgroundColor:[UIColor blackColor] forState:UIControlStateNormal animated:NO]; + [self setBackgroundColor:[UIColor artsyPurpleRegular] forState:UIControlStateHighlighted animated:NO]; +} + +- (CGSize)intrinsicContentSize +{ + return (CGSize){ 280, 46 }; +} + +@end diff --git a/ios/Artsy/ArtsyUIColors/UIColor+ArtsyColors.h b/ios/Artsy/ArtsyUIColors/UIColor+ArtsyColors.h new file mode 100644 index 00000000000..ce09f2c132e --- /dev/null +++ b/ios/Artsy/ArtsyUIColors/UIColor+ArtsyColors.h @@ -0,0 +1,46 @@ +#import + + +@interface UIColor (ArtsyColors) + +/// +///
(#f8f8f8) ++ (UIColor *)artsyGrayLight; + +/// +///
(#e5e5e5) ++ (UIColor *)artsyGrayRegular; + +/// +///
(#cccccc) ++ (UIColor *)artsyGrayMedium; + +/// +///
(#666666) ++ (UIColor *)artsyGraySemibold; + +/// +///
(#333333) ++ (UIColor *)artsyGrayBold; + +/// +///
(#e2d2ff) ++ (UIColor *)artsyPurpleLight; + +/// +///
(#6e1fff) ++ (UIColor *)artsyPurpleRegular; + +/// +///
(#f7625a) ++ (UIColor *)artsyRedRegular; + +/// +///
(#fdefd1) ++ (UIColor *)artsyYellowRegular; + +/// +///
(#0eda83) ++ (UIColor *)artsyGreenRegular; + +@end diff --git a/ios/Artsy/ArtsyUIColors/UIColor+ArtsyColors.m b/ios/Artsy/ArtsyUIColors/UIColor+ArtsyColors.m new file mode 100644 index 00000000000..b690b009cc8 --- /dev/null +++ b/ios/Artsy/ArtsyUIColors/UIColor+ArtsyColors.m @@ -0,0 +1,74 @@ +#import "UIColor+ArtsyColors.h" + +// See: https://github.com/artsy/elan + +@implementation UIColor (ArtsyColors) + ++ (UIColor *)ar_colorWithHex:(UInt32)hex +{ + return [self ar_colorWithHex:hex andAlpha:1]; +} + ++ (UIColor *)ar_colorWithHex:(UInt32)hex andAlpha:(CGFloat)alpha +{ + int r = (hex >> 16) & 0xFF; + int g = (hex >> 8) & 0xFF; + int b = (hex) & 0xFF; + + return [UIColor colorWithRed:r / 255.0f + green:g / 255.0f + blue:b / 255.0f + alpha:alpha]; +} + ++ (UIColor *)artsyGrayLight +{ + return [UIColor ar_colorWithHex:0xf8f8f8]; +} + ++ (UIColor *)artsyGrayRegular +{ + return [UIColor ar_colorWithHex:0xe5e5e5]; +} + ++ (UIColor *)artsyGrayMedium +{ + return [UIColor ar_colorWithHex:0xcccccc]; +} + ++ (UIColor *)artsyGraySemibold +{ + return [UIColor ar_colorWithHex:0x666666]; +} + ++ (UIColor *)artsyGrayBold +{ + return [UIColor ar_colorWithHex:0x333333]; +} + ++ (UIColor *)artsyPurpleLight +{ + return [UIColor ar_colorWithHex:0xe2d2ff]; +} + ++ (UIColor *)artsyPurpleRegular +{ + return [UIColor ar_colorWithHex:0x6e1fff]; +} + ++ (UIColor *)artsyRedRegular +{ + return [UIColor ar_colorWithHex:0xf7625a]; +} + ++ (UIColor *)artsyYellowRegular +{ + return [UIColor ar_colorWithHex:0xfdefd1]; +} + ++ (UIColor *)artsyGreenRegular +{ + return [UIColor ar_colorWithHex:0x0eda83]; +} + +@end diff --git a/ios/Artsy/ArtsyUIFonts/UIFont+ArtsyFonts.h b/ios/Artsy/ArtsyUIFonts/UIFont+ArtsyFonts.h new file mode 100644 index 00000000000..bad5f729785 --- /dev/null +++ b/ios/Artsy/ArtsyUIFonts/UIFont+ArtsyFonts.h @@ -0,0 +1,15 @@ +#import + +@interface UIFont (ArtsyFonts) + ++ (UIFont *)serifFontWithSize:(CGFloat)size; + ++ (UIFont *)serifSemiBoldFontWithSize:(CGFloat)size; + ++ (UIFont *)serifItalicFontWithSize:(CGFloat)size; + ++ (UIFont *)sansSerifFontWithSize:(CGFloat)size; + ++ (UIFont *)displayMediumSansSerifFontWithSize:(CGFloat)size; + +@end diff --git a/ios/Artsy/ArtsyUIFonts/UIFont+ArtsyFonts.m b/ios/Artsy/ArtsyUIFonts/UIFont+ArtsyFonts.m new file mode 100644 index 00000000000..d288c7e90de --- /dev/null +++ b/ios/Artsy/ArtsyUIFonts/UIFont+ArtsyFonts.m @@ -0,0 +1,114 @@ +// NOTE: This file should be a copy and paste of +// https://github.com/artsy/Artsy-OSSUIFonts/blob/master/Pod/Classes/UIFont+ArtsyFonts.m +// but with useClosedFonts = YES; + +#import "UIFont+ArtsyFonts.h" +#import + +// Based on https://github.com/CocoaPods-Fonts/OpenSans/blob/874e65bc21abe54284e195484d2259b2fe858680/UIFont%2BOpenSans.m + +// This is changed by the pre-install hook + +static BOOL useClosedFonts = YES; + +@interface ARFontLoader: NSObject + ++ (void)loadFontWithFileName:(NSString *)fontFileName extension:(NSString *)extension; + +@end + +@implementation ARFontLoader + ++ (void)loadFontWithFileName:(NSString *)fontFileName extension:(NSString *)extension { + NSBundle *bundle = [NSBundle bundleForClass:self]; + NSURL *fontURL = [bundle URLForResource:fontFileName withExtension:extension]; + NSData *fontData = [NSData dataWithContentsOfURL:fontURL]; + + CGDataProviderRef provider = CGDataProviderCreateWithCFData((CFDataRef)fontData); + CGFontRef font = CGFontCreateWithDataProvider(provider); + + if (font) { + CFErrorRef errorRef = NULL; + if (CTFontManagerRegisterGraphicsFont(font, &errorRef) == NO) { + NSError *error = (__bridge NSError *)errorRef; + if (error.code == kCTFontManagerErrorAlreadyRegistered) { + // nop - the font must have been registered by someone else already. + } else { + @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:error.localizedDescription userInfo:@{ NSUnderlyingErrorKey: error }]; + } + } + + CFRelease(font); + } + if (provider) { + CFRelease(provider); + } +} + +@end + +@implementation UIFont (ArtsyFonts) + ++ (instancetype)ar_LoadAndReturnFont:(NSString *)fontName extension:(NSString *)extension size:(CGFloat)fontSize onceToken:(dispatch_once_t *)onceToken { + // Overload to default to fontName for fontFileName + return [self ar_LoadAndReturnFont:fontName extension:extension size:fontSize onceToken:onceToken fontFileName:fontName]; +} + ++ (instancetype)ar_LoadAndReturnFont:(NSString *)fontName extension:(NSString *)extension size:(CGFloat)fontSize onceToken:(dispatch_once_t *)onceToken fontFileName:(NSString *)fontFileName { + + dispatch_once(onceToken, ^{ + [ARFontLoader loadFontWithFileName:fontFileName extension:extension]; + }); + + return [self fontWithName:fontName size:fontSize]; +} + ++ (UIFont *)serifSemiBoldFontWithSize:(CGFloat)size +{ + static dispatch_once_t onceToken; + if (!useClosedFonts) { + return [UIFont fontWithName:@"Helvetica" size:size]; + } + return [self ar_LoadAndReturnFont:@"Unica77LL-Medium" extension:@"otf" size:size onceToken:&onceToken fontFileName:@"Unica77LL-Medium"]; +} + ++ (UIFont *)serifFontWithSize:(CGFloat)size +{ + static dispatch_once_t onceToken; + if (!useClosedFonts) { + return [UIFont fontWithName:@"Helvetica" size:size]; + } + return [self ar_LoadAndReturnFont:@"Unica77LL-Regular" extension:@"otf" size:size onceToken:&onceToken fontFileName:@"Unica77LL-Regular"]; +} + ++ (UIFont *)serifItalicFontWithSize:(CGFloat)size +{ + static dispatch_once_t onceToken; + if (!useClosedFonts) { + return [UIFont fontWithName:@"Helvetica" size:size]; + } + return [self ar_LoadAndReturnFont:@"Unica77LL-Italic" extension:@"otf" size:size onceToken:&onceToken fontFileName:@"Unica77LL-Italic"]; +} + ++ (UIFont *)sansSerifFontWithSize:(CGFloat)size +{ + static dispatch_once_t onceToken; + if (!useClosedFonts) { + return [UIFont fontWithName:@"Helvetica" size:size]; + } + + return [self ar_LoadAndReturnFont:@"Unica77LL-Medium" extension:@"otf" size:size onceToken:&onceToken fontFileName:@"Unica77LL-Medium"]; +} + +/// Unica Medium ++ (UIFont *)displayMediumSansSerifFontWithSize:(CGFloat)size +{ + static dispatch_once_t onceToken; + if (!useClosedFonts) { + return [UIFont fontWithName:@"Helvetica" size:size]; + } + + return [self ar_LoadAndReturnFont:@"Unica77LL-Medium" extension:@"otf" size:size onceToken:&onceToken fontFileName:@"Unica77LL-Medium"]; +} + +@end diff --git a/ios/Artsy/ArtsyUILabels/Artsy+UILabels.h b/ios/Artsy/ArtsyUILabels/Artsy+UILabels.h new file mode 100644 index 00000000000..dca3ae77e1e --- /dev/null +++ b/ios/Artsy/ArtsyUILabels/Artsy+UILabels.h @@ -0,0 +1,21 @@ +#import + +@interface ARLabel : UILabel +@end + +@interface ARSerifLabel : ARLabel +@end + + +@interface ARSansSerifLabel : ARLabel +@end + +@interface ARItalicsSerifLabel : ARLabel +@end + + +/// Will convert the text into an attributed string with the correct line height. +@interface ARSerifLineHeightLabel : ARSerifLabel +- (instancetype)initWithLineSpacing:(CGFloat)lineHeight; +@property (nonatomic, assign) CGFloat lineHeight; +@end diff --git a/ios/Artsy/ArtsyUILabels/Artsy+UILabels.m b/ios/Artsy/ArtsyUILabels/Artsy+UILabels.m new file mode 100644 index 00000000000..42060f4fc0e --- /dev/null +++ b/ios/Artsy/ArtsyUILabels/Artsy+UILabels.m @@ -0,0 +1,104 @@ +#import "Artsy+UILabels.h" +#import "UIView+ARDrawing.h" +#import "UIColor+ArtsyColors.h" +#import "UIFont+ArtsyFonts.h" + + +@implementation ARLabel + +- (id)init +{ + return [self initWithFrame:CGRectZero]; +} + +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (!self) return nil; + + [self setup]; + + return self; +} + +- (void)awakeFromNib +{ + [self setup]; +} + +- (void)setup +{ + self.numberOfLines = 0; + self.backgroundColor = [UIColor whiteColor]; + self.opaque = YES; +} + +@end + + +@implementation ARSerifLabel + +- (void)setup +{ + [super setup]; + self.font = [UIFont serifFontWithSize:self.font.pointSize]; +} + +@end + +@implementation ARItalicsSerifLabel + +- (void)setup +{ + [super setup]; + self.font = [UIFont serifItalicFontWithSize:self.font.pointSize]; +} + +@end + +@implementation ARSansSerifLabel + +- (void)setup +{ + [super setup]; + self.font = [UIFont sansSerifFontWithSize:self.font.pointSize]; +} + +- (void)setText:(NSString *)text +{ + [super setText:text.uppercaseString]; +} + +@end + + +@interface ARSerifLineHeightLabel() + +@end + +@implementation ARSerifLineHeightLabel + +- (instancetype)initWithLineSpacing:(CGFloat)lineHeight +{ + self = [super init]; + if (!self) { return nil; } + + _lineHeight = lineHeight; + + return self; +} + +- (void)setText:(NSString *)text +{ + NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:text]; + NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; + [paragraphStyle setLineSpacing:self.lineHeight]; + [paragraphStyle setAlignment:self.textAlignment]; + + [attr addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [text length])]; + + self.numberOfLines = 0; + self.attributedText = attr; +} + +@end diff --git a/ios/Artsy/ArtsyUILabels/UIView+ARDrawing.h b/ios/Artsy/ArtsyUILabels/UIView+ARDrawing.h new file mode 100644 index 00000000000..7bd79b51252 --- /dev/null +++ b/ios/Artsy/ArtsyUILabels/UIView+ARDrawing.h @@ -0,0 +1,9 @@ +#import + +@interface UIView (ARDrawing) + +// DOTTED BORDERS +// Specifying a border color +- (void)drawBottomDottedBorderWithColor:(UIColor *)color; + +@end diff --git a/ios/Artsy/ArtsyUILabels/UIView+ARDrawing.m b/ios/Artsy/ArtsyUILabels/UIView+ARDrawing.m new file mode 100644 index 00000000000..efa4a96405e --- /dev/null +++ b/ios/Artsy/ArtsyUILabels/UIView+ARDrawing.m @@ -0,0 +1,61 @@ +#import "UIView+ARDrawing.h" +#import "UIColor+ArtsyColors.h" + +@implementation UIView (ARDrawing) + ++ (UIColor *)defaultBorderColor +{ + return [UIColor artsyGrayLight]; +} + +// Dotted border methods + +- (void)drawBottomDottedBorderWithColor:(UIColor *)color +{ + [self drawBottomBorderWithColor:color dotted:YES]; +} + + +// Methods for general border-drawing + +- (void)drawTopBorderWithColor:(UIColor *)color dotted:(BOOL)dotted +{ + [self drawBorderWithColor:color yLocation:0 key:@"TopMarginLayer" dotted:dotted]; +} + +- (void)drawBottomBorderWithColor:(UIColor *)color dotted:(BOOL)dotted +{ + [self drawBorderWithColor:color yLocation:CGRectGetHeight(self.frame) key:@"BottomMarginLayer" dotted:dotted]; +} + +- (void)drawBorderWithColor:(UIColor *)color yLocation:(CGFloat)yLocation key:(NSString *)key dotted:(BOOL)dotted +{ + CALayer* layer = [self.layer valueForKey:key]; + if (layer) [layer removeFromSuperlayer]; + + CALayer *newLayer = [self layerForMarginAtY:yLocation withColor:color dotted:dotted]; + [self.layer addSublayer:newLayer]; + [self.layer setValue:newLayer forKey:key]; +} + +- (CALayer *)layerForMarginAtY:(CGFloat)y withColor:(UIColor *)color dotted:(BOOL)dotted +{ + CAShapeLayer *shapeLayer = [CAShapeLayer layer]; + [shapeLayer setStrokeColor:[color CGColor]]; + [shapeLayer setLineWidth:1]; + [shapeLayer setLineJoin:kCALineJoinRound]; + + if (dotted) [shapeLayer setLineDashPattern: @[ @1, @1 ]]; + [shapeLayer setAnchorPoint:CGPointZero]; + + CGMutablePathRef path = CGPathCreateMutable(); + CGPathMoveToPoint(path, NULL, 0, y); + CGPathAddLineToPoint(path, NULL, self.frame.size.width, y); + + [shapeLayer setPath:path]; + CGPathRelease(path); + + return shapeLayer; +} + +@end diff --git a/ios/Artsy/Constants/ARDefaults.h b/ios/Artsy/Constants/ARDefaults.h index 082ddad673e..b63bb9c89df 100644 --- a/ios/Artsy/Constants/ARDefaults.h +++ b/ios/Artsy/Constants/ARDefaults.h @@ -17,11 +17,6 @@ extern NSString *const ARPushNotificationsSettingsPromptSeen; extern NSString *const ARPushNotificationFollowArtist; extern NSString *const ARPushNotificationsDialogueLastSeenDate; -#pragma mark - -#pragma mark admin features - -extern NSString *const AREmissionHeadVersionDefault; - #pragma mark - #pragma mark user permissions diff --git a/ios/Artsy/Constants/ARDefaults.m b/ios/Artsy/Constants/ARDefaults.m index 71b2d42b699..79efecb6cc1 100644 --- a/ios/Artsy/Constants/ARDefaults.m +++ b/ios/Artsy/Constants/ARDefaults.m @@ -18,8 +18,6 @@ NSString *const ARPushNotificationFollowArtist = @"eigen-push-followed-artist"; NSString *const ARPushNotificationsDialogueLastSeenDate = @"eigen-push-seen-dialogue-date"; -NSString *const AREmissionHeadVersionDefault = @"emission-head-version"; - NSString *const ARAugmentedRealityHasSeenSetup = @"ARAugmentedRealityHasSeenSetup"; NSString *const ARAugmentedRealityHasTriedToSetup = @"ARAugmentedRealityHasTriedToSetup"; NSString *const ARAugmentedRealityCameraAccessGiven = @"ARAugmentedRealityCameraAccessGiven"; diff --git a/ios/Artsy/Eigen.playground/Contents.swift b/ios/Artsy/Eigen.playground/Contents.swift deleted file mode 100644 index 3ad5c616726..00000000000 --- a/ios/Artsy/Eigen.playground/Contents.swift +++ /dev/null @@ -1,3 +0,0 @@ -import Foundation - -let a = 1 + 1 diff --git a/ios/Artsy/Eigen.playground/contents.xcplayground b/ios/Artsy/Eigen.playground/contents.xcplayground deleted file mode 100644 index 1a1c1e21486..00000000000 --- a/ios/Artsy/Eigen.playground/contents.xcplayground +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/ios/Artsy/Eigen.playground/timeline.xctimeline b/ios/Artsy/Eigen.playground/timeline.xctimeline deleted file mode 100644 index a1db01e7b8e..00000000000 --- a/ios/Artsy/Eigen.playground/timeline.xctimeline +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/emission/Pod/Classes/Core/ARCocoaConstantsModule.h b/ios/Artsy/Emission/Core/ARCocoaConstantsModule.h similarity index 100% rename from emission/Pod/Classes/Core/ARCocoaConstantsModule.h rename to ios/Artsy/Emission/Core/ARCocoaConstantsModule.h diff --git a/emission/Pod/Classes/Core/ARCocoaConstantsModule.m b/ios/Artsy/Emission/Core/ARCocoaConstantsModule.m similarity index 100% rename from emission/Pod/Classes/Core/ARCocoaConstantsModule.m rename to ios/Artsy/Emission/Core/ARCocoaConstantsModule.m diff --git a/emission/Pod/Classes/Core/AREmission.h b/ios/Artsy/Emission/Core/AREmission.h similarity index 77% rename from emission/Pod/Classes/Core/AREmission.h rename to ios/Artsy/Emission/Core/AREmission.h index 924715247a5..cf4136fc0f8 100644 --- a/emission/Pod/Classes/Core/AREmission.h +++ b/ios/Artsy/Emission/Core/AREmission.h @@ -3,7 +3,8 @@ #import #import "ARNotificationsManager.h" -@class AREventsModule, ARTemporaryAPIModule, ARTakeCameraPhotoModule, ARPHPhotoPickerModule, RCTBridge; +@class AREventsModule, ARTemporaryAPIModule, RCTBridge; + NS_ASSUME_NONNULL_BEGIN @@ -11,21 +12,21 @@ extern NSString *const AREnvProduction; extern NSString *const AREnvStaging; extern NSString *const AREnvTest; + @interface AREmission : NSObject @property (nonatomic, strong, readonly) RCTBridge *bridge; @property (nonatomic, strong, readonly) AREventsModule *eventsModule; @property (nonatomic, strong, readonly) ARTemporaryAPIModule *APIModule; -@property (nonatomic, strong, readonly) ARTakeCameraPhotoModule *cameraModule; -@property (nonatomic, strong, readonly) ARPHPhotoPickerModule *phPhotoPickerModule; @property (nonatomic, strong, readonly) ARNotificationsManager *notificationsManagerModule; + (instancetype)sharedInstance; + (void)setSharedInstance:(AREmission *)instance; + (void)teardownSharedInstance; -- (instancetype)initWithState:(NSDictionary *)state packagerURL:(nullable NSURL *)packagerURL NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithState:(NSDictionary *)state NS_DESIGNATED_INITIALIZER; +- (void)setBridge:(RCTBridge *)bridge; - (void)updateState:(NSDictionary *)state; - (void)sendEvent:(NSString *)name traits:(NSDictionary *)traits; - (void)sendScreenEvent:(NSString *)screenName traits:(NSDictionary *)traits; diff --git a/emission/Pod/Classes/Core/AREmission.m b/ios/Artsy/Emission/Core/AREmission.m similarity index 72% rename from emission/Pod/Classes/Core/AREmission.m rename to ios/Artsy/Emission/Core/AREmission.m index ceab5dfe739..98532f4fa65 100644 --- a/emission/Pod/Classes/Core/AREmission.m +++ b/ios/Artsy/Emission/Core/AREmission.m @@ -1,8 +1,6 @@ #import "AREmission.h" #import "AREventsModule.h" #import "ARTemporaryAPIModule.h" -#import "ARTakeCameraPhotoModule.h" -#import "ARPHPhotoPickerModule.h" #import "ARNotificationsManager.h" #import "ARCocoaConstantsModule.h" @@ -27,33 +25,17 @@ + (instancetype)sharedInstance; return _sharedInstance; } -- (instancetype)initWithState:(NSDictionary *)state packagerURL:(nullable NSURL *)packagerURL +- (instancetype)initWithState:(NSDictionary *)state { - NSParameterAssert(state); + NSParameterAssert(state); - if ((self = [super init])) { - // When adding a new native module, remember to add it - // to the array of modules below. - _eventsModule = [AREventsModule new]; - _APIModule = [ARTemporaryAPIModule new]; - _cameraModule = [ARTakeCameraPhotoModule new]; - _phPhotoPickerModule = [ARPHPhotoPickerModule new]; - _notificationsManagerModule = [[ARNotificationsManager alloc] initWithState:state]; - - NSArray *modules = @[ - _APIModule, - _eventsModule, - _cameraModule, - _phPhotoPickerModule, - _notificationsManagerModule, - [ARCocoaConstantsModule new], - ]; + if ((self = [super init])) { + _eventsModule = [AREventsModule new]; + _APIModule = [ARTemporaryAPIModule new]; + _notificationsManagerModule = [[ARNotificationsManager alloc] initWithState:state]; + } - _bridge = [[RCTBridge alloc] initWithBundleURL:(packagerURL ?: self.releaseBundleURL) - moduleProvider:^{ return modules; } - launchOptions:nil]; - } - return self; + return self; } - (void)reset @@ -75,6 +57,11 @@ - (void)navigate:(NSString *)route withProps:(NSDictionary *)props [[self notificationsManagerModule] requestNavigation:route withProps:props]; } +- (void)setBridge:(RCTBridge *)bridge +{ + _bridge = bridge; +} + - (void)updateState:(NSDictionary *)state { [self.notificationsManagerModule updateState:state]; @@ -126,11 +113,6 @@ - (BOOL)reactStateBoolForKey:(NSString *)stateKey return [result boolValue]; } -- (NSURL *)releaseBundleURL; -{ - return [[NSBundle bundleForClass:self.class] URLForResource:@"Emission" withExtension:@"js"]; -} - - (NSURL *)liveAuctionsURL { return [NSURL URLWithString:[self reactStateStringForKey:[ARReactStateKey predictionURL]]]; diff --git a/emission/Pod/Classes/Core/AREventsModule.h b/ios/Artsy/Emission/Core/AREventsModule.h similarity index 100% rename from emission/Pod/Classes/Core/AREventsModule.h rename to ios/Artsy/Emission/Core/AREventsModule.h diff --git a/emission/Pod/Classes/Core/AREventsModule.m b/ios/Artsy/Emission/Core/AREventsModule.m similarity index 100% rename from emission/Pod/Classes/Core/AREventsModule.m rename to ios/Artsy/Emission/Core/AREventsModule.m diff --git a/emission/Pod/Classes/Core/ARScrollViewHelpers.h b/ios/Artsy/Emission/Core/ARScrollViewHelpers.h similarity index 100% rename from emission/Pod/Classes/Core/ARScrollViewHelpers.h rename to ios/Artsy/Emission/Core/ARScrollViewHelpers.h diff --git a/emission/Pod/Classes/Core/ARScrollViewHelpers.m b/ios/Artsy/Emission/Core/ARScrollViewHelpers.m similarity index 99% rename from emission/Pod/Classes/Core/ARScrollViewHelpers.m rename to ios/Artsy/Emission/Core/ARScrollViewHelpers.m index 002f1804caf..360da0b035b 100644 --- a/emission/Pod/Classes/Core/ARScrollViewHelpers.m +++ b/ios/Artsy/Emission/Core/ARScrollViewHelpers.m @@ -1,4 +1,3 @@ - #import "ARScrollViewHelpers.h" #import #import "AREmission.h" diff --git a/emission/Pod/Classes/Core/RCTScrollView+Artsy.h b/ios/Artsy/Emission/Core/RCTScrollView+Artsy.h similarity index 100% rename from emission/Pod/Classes/Core/RCTScrollView+Artsy.h rename to ios/Artsy/Emission/Core/RCTScrollView+Artsy.h diff --git a/emission/Pod/Classes/Core/RCTScrollView+Artsy.m b/ios/Artsy/Emission/Core/RCTScrollView+Artsy.m similarity index 100% rename from emission/Pod/Classes/Core/RCTScrollView+Artsy.m rename to ios/Artsy/Emission/Core/RCTScrollView+Artsy.m diff --git a/emission/Pod/Classes/Data/ARCity+GeospatialAdditions.h b/ios/Artsy/Emission/Data/ARCity+GeospatialAdditions.h similarity index 100% rename from emission/Pod/Classes/Data/ARCity+GeospatialAdditions.h rename to ios/Artsy/Emission/Data/ARCity+GeospatialAdditions.h diff --git a/emission/Pod/Classes/Data/ARCity+GeospatialAdditions.m b/ios/Artsy/Emission/Data/ARCity+GeospatialAdditions.m similarity index 100% rename from emission/Pod/Classes/Data/ARCity+GeospatialAdditions.m rename to ios/Artsy/Emission/Data/ARCity+GeospatialAdditions.m diff --git a/emission/Pod/Classes/Data/ARCity.h b/ios/Artsy/Emission/Data/ARCity.h similarity index 100% rename from emission/Pod/Classes/Data/ARCity.h rename to ios/Artsy/Emission/Data/ARCity.h diff --git a/emission/Pod/Classes/Data/ARCity.m b/ios/Artsy/Emission/Data/ARCity.m similarity index 100% rename from emission/Pod/Classes/Data/ARCity.m rename to ios/Artsy/Emission/Data/ARCity.m diff --git a/emission/Pod/Classes/EigenCommunications/ARNotificationsManager.h b/ios/Artsy/Emission/EigenCommunications/ARNotificationsManager.h similarity index 98% rename from emission/Pod/Classes/EigenCommunications/ARNotificationsManager.h rename to ios/Artsy/Emission/EigenCommunications/ARNotificationsManager.h index 436ec94abe7..7c1d65fce80 100644 --- a/emission/Pod/Classes/EigenCommunications/ARNotificationsManager.h +++ b/ios/Artsy/Emission/EigenCommunications/ARNotificationsManager.h @@ -9,7 +9,6 @@ + (NSString *)launchCount; + (NSString *)userEmail; + (NSString *)userAgent; -+ (NSString *)deviceId; @end // these state values are sent to obj-c from react diff --git a/emission/Pod/Classes/EigenCommunications/ARNotificationsManager.m b/ios/Artsy/Emission/EigenCommunications/ARNotificationsManager.m similarity index 99% rename from emission/Pod/Classes/EigenCommunications/ARNotificationsManager.m rename to ios/Artsy/Emission/EigenCommunications/ARNotificationsManager.m index b44b0004a3e..0100593c211 100644 --- a/emission/Pod/Classes/EigenCommunications/ARNotificationsManager.m +++ b/ios/Artsy/Emission/EigenCommunications/ARNotificationsManager.m @@ -18,7 +18,6 @@ + (NSString *)userEmail { return @"userEmail"; } + (NSString *)userAgent { return @"userAgent"; } + (NSString *)env { return @"env"; } -+ (NSString *)deviceId { return @"deviceId"; } @end @implementation ARReactStateKey diff --git a/emission/Pod/Classes/EigenCommunications/ARPHPhotoPickerModule.h b/ios/Artsy/Emission/EigenCommunications/ARPHPhotoPickerModule.h similarity index 100% rename from emission/Pod/Classes/EigenCommunications/ARPHPhotoPickerModule.h rename to ios/Artsy/Emission/EigenCommunications/ARPHPhotoPickerModule.h diff --git a/emission/Pod/Classes/EigenCommunications/ARPHPhotoPickerModule.m b/ios/Artsy/Emission/EigenCommunications/ARPHPhotoPickerModule.m similarity index 100% rename from emission/Pod/Classes/EigenCommunications/ARPHPhotoPickerModule.m rename to ios/Artsy/Emission/EigenCommunications/ARPHPhotoPickerModule.m diff --git a/emission/Pod/Classes/EigenCommunications/ARTakeCameraPhotoModule.h b/ios/Artsy/Emission/EigenCommunications/ARTakeCameraPhotoModule.h similarity index 100% rename from emission/Pod/Classes/EigenCommunications/ARTakeCameraPhotoModule.h rename to ios/Artsy/Emission/EigenCommunications/ARTakeCameraPhotoModule.h diff --git a/emission/Pod/Classes/EigenCommunications/ARTakeCameraPhotoModule.m b/ios/Artsy/Emission/EigenCommunications/ARTakeCameraPhotoModule.m similarity index 99% rename from emission/Pod/Classes/EigenCommunications/ARTakeCameraPhotoModule.m rename to ios/Artsy/Emission/EigenCommunications/ARTakeCameraPhotoModule.m index f7dd2a00532..f4cf1b87914 100644 --- a/emission/Pod/Classes/EigenCommunications/ARTakeCameraPhotoModule.m +++ b/ios/Artsy/Emission/EigenCommunications/ARTakeCameraPhotoModule.m @@ -48,7 +48,7 @@ + (BOOL)requiresMainQueueSetup; return NO; } -+ (void)load; ++ (void)load { // Normally done with the RCT_EXPORT_MODULE macro, but that overrides `load`, which we need too. RCT_EXTERN void RCTRegisterModule(Class); diff --git a/emission/Pod/Classes/OpaqueImageViewComponent/AROpaqueImageView.h b/ios/Artsy/Emission/OpaqueImageViewComponent/AROpaqueImageView.h similarity index 100% rename from emission/Pod/Classes/OpaqueImageViewComponent/AROpaqueImageView.h rename to ios/Artsy/Emission/OpaqueImageViewComponent/AROpaqueImageView.h diff --git a/emission/Pod/Classes/OpaqueImageViewComponent/AROpaqueImageView.m b/ios/Artsy/Emission/OpaqueImageViewComponent/AROpaqueImageView.m similarity index 100% rename from emission/Pod/Classes/OpaqueImageViewComponent/AROpaqueImageView.m rename to ios/Artsy/Emission/OpaqueImageViewComponent/AROpaqueImageView.m diff --git a/emission/Pod/Classes/OpaqueImageViewComponent/AROpaqueImageViewManager.h b/ios/Artsy/Emission/OpaqueImageViewComponent/AROpaqueImageViewManager.h similarity index 100% rename from emission/Pod/Classes/OpaqueImageViewComponent/AROpaqueImageViewManager.h rename to ios/Artsy/Emission/OpaqueImageViewComponent/AROpaqueImageViewManager.h diff --git a/emission/Pod/Classes/OpaqueImageViewComponent/AROpaqueImageViewManager.m b/ios/Artsy/Emission/OpaqueImageViewComponent/AROpaqueImageViewManager.m similarity index 100% rename from emission/Pod/Classes/OpaqueImageViewComponent/AROpaqueImageViewManager.m rename to ios/Artsy/Emission/OpaqueImageViewComponent/AROpaqueImageViewManager.m diff --git a/emission/Pod/Classes/TemporaryAPI/ARTemporaryAPIModule.h b/ios/Artsy/Emission/TemporaryAPI/ARTemporaryAPIModule.h similarity index 81% rename from emission/Pod/Classes/TemporaryAPI/ARTemporaryAPIModule.h rename to ios/Artsy/Emission/TemporaryAPI/ARTemporaryAPIModule.h index 1a97085128d..c33bdfbc806 100644 --- a/emission/Pod/Classes/TemporaryAPI/ARTemporaryAPIModule.h +++ b/ios/Artsy/Emission/TemporaryAPI/ARTemporaryAPIModule.h @@ -1,14 +1,14 @@ #import #import + typedef void(^ARNotificationReadStatusAssigner)(RCTResponseSenderBlock block); typedef void(^ARNotificationPermissionsPrompter)(); -typedef void(^ARAugmentedRealityVIRPresenter)(NSString *imgUrl, CGFloat widthIn, CGFloat heightIn, NSString *artworkSlug, NSString *artworkId); - typedef void(^ARRelativeURLResolver)(NSString *path, RCTPromiseResolveBlock resolve, RCTPromiseRejectBlock reject); + /// While metaphysics is read-only, we need to rely on Eigen's /// v1 API access to get/set these bits of information. @@ -23,8 +23,6 @@ typedef void(^ARRelativeURLResolver)(NSString *path, RCTPromiseResolveBlock reso @property (nonatomic, copy, readwrite) ARNotificationReadStatusAssigner notificationReadStatusAssigner; -@property (nonatomic, copy, readwrite) ARAugmentedRealityVIRPresenter augmentedRealityVIRPresenter; - @property (nonatomic, copy, readwrite) ARRelativeURLResolver urlResolver; @end diff --git a/emission/Pod/Classes/TemporaryAPI/ARTemporaryAPIModule.m b/ios/Artsy/Emission/TemporaryAPI/ARTemporaryAPIModule.m similarity index 98% rename from emission/Pod/Classes/TemporaryAPI/ARTemporaryAPIModule.m rename to ios/Artsy/Emission/TemporaryAPI/ARTemporaryAPIModule.m index 9d49f15b006..1b5a4f17ec4 100644 --- a/emission/Pod/Classes/TemporaryAPI/ARTemporaryAPIModule.m +++ b/ios/Artsy/Emission/TemporaryAPI/ARTemporaryAPIModule.m @@ -1,6 +1,6 @@ #import "ARTemporaryAPIModule.h" #import -#import +#import "AREmission.h" @implementation ARTemporaryAPIModule diff --git a/emission/Pod/Classes/ViewControllers/ARCityComponentViewController.h b/ios/Artsy/Emission/ViewControllers/ARCityComponentViewController.h similarity index 100% rename from emission/Pod/Classes/ViewControllers/ARCityComponentViewController.h rename to ios/Artsy/Emission/ViewControllers/ARCityComponentViewController.h diff --git a/emission/Pod/Classes/ViewControllers/ARCityComponentViewController.m b/ios/Artsy/Emission/ViewControllers/ARCityComponentViewController.m similarity index 100% rename from emission/Pod/Classes/ViewControllers/ARCityComponentViewController.m rename to ios/Artsy/Emission/ViewControllers/ARCityComponentViewController.m diff --git a/emission/Pod/Classes/ViewControllers/ARCityPickerComponentViewController.h b/ios/Artsy/Emission/ViewControllers/ARCityPickerComponentViewController.h similarity index 100% rename from emission/Pod/Classes/ViewControllers/ARCityPickerComponentViewController.h rename to ios/Artsy/Emission/ViewControllers/ARCityPickerComponentViewController.h diff --git a/emission/Pod/Classes/ViewControllers/ARCityPickerComponentViewController.m b/ios/Artsy/Emission/ViewControllers/ARCityPickerComponentViewController.m similarity index 100% rename from emission/Pod/Classes/ViewControllers/ARCityPickerComponentViewController.m rename to ios/Artsy/Emission/ViewControllers/ARCityPickerComponentViewController.m diff --git a/emission/Pod/Classes/ViewControllers/ARComponentViewController.h b/ios/Artsy/Emission/ViewControllers/ARComponentViewController.h similarity index 100% rename from emission/Pod/Classes/ViewControllers/ARComponentViewController.h rename to ios/Artsy/Emission/ViewControllers/ARComponentViewController.h diff --git a/emission/Pod/Classes/ViewControllers/ARComponentViewController.m b/ios/Artsy/Emission/ViewControllers/ARComponentViewController.m similarity index 100% rename from emission/Pod/Classes/ViewControllers/ARComponentViewController.m rename to ios/Artsy/Emission/ViewControllers/ARComponentViewController.m diff --git a/emission/Pod/Classes/ViewControllers/ARMapComponentViewController.h b/ios/Artsy/Emission/ViewControllers/ARMapComponentViewController.h similarity index 89% rename from emission/Pod/Classes/ViewControllers/ARMapComponentViewController.h rename to ios/Artsy/Emission/ViewControllers/ARMapComponentViewController.h index 270de6de65a..56404216b12 100644 --- a/emission/Pod/Classes/ViewControllers/ARMapComponentViewController.h +++ b/ios/Artsy/Emission/ViewControllers/ARMapComponentViewController.h @@ -1,4 +1,4 @@ -#import +#import "ARComponentViewController.h" NS_ASSUME_NONNULL_BEGIN diff --git a/emission/Pod/Classes/ViewControllers/ARMapComponentViewController.m b/ios/Artsy/Emission/ViewControllers/ARMapComponentViewController.m similarity index 100% rename from emission/Pod/Classes/ViewControllers/ARMapComponentViewController.m rename to ios/Artsy/Emission/ViewControllers/ARMapComponentViewController.m diff --git a/emission/Pod/Classes/ViewControllers/ARMapContainerViewController.h b/ios/Artsy/Emission/ViewControllers/ARMapContainerViewController.h similarity index 52% rename from emission/Pod/Classes/ViewControllers/ARMapContainerViewController.h rename to ios/Artsy/Emission/ViewControllers/ARMapContainerViewController.h index 0a2a7b753aa..ddcda83388a 100644 --- a/emission/Pod/Classes/ViewControllers/ARMapContainerViewController.h +++ b/ios/Artsy/Emission/ViewControllers/ARMapContainerViewController.h @@ -1,9 +1,11 @@ #import "ARComponentViewController.h" +#import "ARMenuAwareViewController.h" + NS_ASSUME_NONNULL_BEGIN /// Hosts a Map showing local shows and fairs -@interface ARMapContainerViewController : UIViewController +@interface ARMapContainerViewController : UIViewController @end NS_ASSUME_NONNULL_END diff --git a/emission/Pod/Classes/ViewControllers/ARMapContainerViewController.m b/ios/Artsy/Emission/ViewControllers/ARMapContainerViewController.m similarity index 100% rename from emission/Pod/Classes/ViewControllers/ARMapContainerViewController.m rename to ios/Artsy/Emission/ViewControllers/ARMapContainerViewController.m diff --git a/emission/Pod/Classes/ViewControllers/ARMediaPreviewController.h b/ios/Artsy/Emission/ViewControllers/ARMediaPreviewController.h similarity index 100% rename from emission/Pod/Classes/ViewControllers/ARMediaPreviewController.h rename to ios/Artsy/Emission/ViewControllers/ARMediaPreviewController.h diff --git a/emission/Pod/Classes/ViewControllers/ARMediaPreviewController.m b/ios/Artsy/Emission/ViewControllers/ARMediaPreviewController.m similarity index 98% rename from emission/Pod/Classes/ViewControllers/ARMediaPreviewController.m rename to ios/Artsy/Emission/ViewControllers/ARMediaPreviewController.m index 01ddac8da2f..ebaa795fe1b 100644 --- a/emission/Pod/Classes/ViewControllers/ARMediaPreviewController.m +++ b/ios/Artsy/Emission/ViewControllers/ARMediaPreviewController.m @@ -1,10 +1,7 @@ #import "ARMediaPreviewController.h" -#if __has_include() -#import -#else -@import Artsy_UIColors; -#endif +#import "UIColor+ArtsyColors.h" + @import CoreServices; @import QuickLook; diff --git a/ios/Artsy/Extraction/ARAnimationContinuation.h b/ios/Artsy/Extraction/ARAnimationContinuation.h new file mode 100644 index 00000000000..317e95816a0 --- /dev/null +++ b/ios/Artsy/Extraction/ARAnimationContinuation.h @@ -0,0 +1,12 @@ +#import + +@class CALayer; + +/** + * Adding this to a layer will make sure that animations continue when the app is brought back to the foreground. + */ +@interface ARAnimationContinuation : NSObject ++ (void)addToLayer:(CALayer *)layer; ++ (void)removeFromLayer:(CALayer *)layer; +@end + diff --git a/ios/Artsy/Extraction/ARAnimationContinuation.m b/ios/Artsy/Extraction/ARAnimationContinuation.m new file mode 100644 index 00000000000..d1d97447192 --- /dev/null +++ b/ios/Artsy/Extraction/ARAnimationContinuation.m @@ -0,0 +1,88 @@ +#import "ARAnimationContinuation.h" + +#import +#import + +static NSString * const LayerKey = @"ARAnimationContinuation"; + +@interface ARAnimationContinuation () +@property (nonatomic, weak, readwrite) CALayer *layer; +@property (nonatomic, copy, readwrite) NSDictionary *animations; +@end + +@implementation ARAnimationContinuation + ++ (void)addToLayer:(CALayer *)layer; +{ + if ([layer valueForKey:LayerKey] == nil) { + [layer setValue:[[self alloc] initWithLayer:layer] forKey:LayerKey]; + } +} + ++ (void)removeFromLayer:(CALayer *)layer; +{ + [layer setValue:nil forKey:LayerKey]; +} + +- (void)dealloc; +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (instancetype)initWithLayer:(CALayer *)layer; +{ + if ((self = [super init])) { + _layer = layer; + _animations = @{}; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(pauseAnimations) + name:UIApplicationDidEnterBackgroundNotification + object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(resumeAnimations) + name:UIApplicationWillEnterForegroundNotification + object:nil]; + } + return self; +} + +#pragma mark - Pause/Resume + +// As per https://developer.apple.com/library/ios/qa/qa1673/_index.html + +-(void)pauseAnimations; +{ + CALayer *layer = self.layer; + + NSArray *keys = layer.animationKeys; + NSMutableDictionary *animations = [[NSMutableDictionary alloc] initWithCapacity:keys.count]; + for (NSString *key in keys) { + animations[key] = [layer animationForKey:key]; + } + self.animations = animations; + [layer removeAllAnimations]; + + CFTimeInterval pausedTime = [layer convertTime:CACurrentMediaTime() fromLayer:nil]; + layer.speed = 0.0; + layer.timeOffset = pausedTime; +} + +-(void)resumeAnimations; +{ + CALayer *layer = self.layer; + + for (NSString *key in self.animations) { + [layer addAnimation:self.animations[key] forKey:key]; + } + + CFTimeInterval pausedTime = [layer timeOffset]; + layer.speed = 1.0; + layer.timeOffset = 0.0; + layer.beginTime = 0.0; + CFTimeInterval timeSincePause = [layer convertTime:CACurrentMediaTime() fromLayer:nil] - pausedTime; + layer.beginTime = timeSincePause; +} + +@end + diff --git a/ios/Artsy/Extraction/ARSpinner.h b/ios/Artsy/Extraction/ARSpinner.h new file mode 100644 index 00000000000..f9c5ab05009 --- /dev/null +++ b/ios/Artsy/Extraction/ARSpinner.h @@ -0,0 +1,17 @@ +#import + + +@interface ARSpinner : UIView + +- (void)fadeInAnimated:(BOOL)animated; +- (void)fadeOutAnimated:(BOOL)animated; + +- (void)fadeInAnimated:(BOOL)animated completion:(void (^)(BOOL finished))completion; +- (void)fadeOutAnimated:(BOOL)animated completion:(void (^)(BOOL finished))completion; + +- (void)startAnimating; +- (void)stopAnimating; + +@property (nonatomic, strong) UIColor *spinnerColor; + +@end diff --git a/ios/Artsy/Extraction/ARSpinner.m b/ios/Artsy/Extraction/ARSpinner.m new file mode 100644 index 00000000000..af5a94ffb8a --- /dev/null +++ b/ios/Artsy/Extraction/ARSpinner.m @@ -0,0 +1,119 @@ +#import "ARSpinner.h" +#import "UIView+ARSpinner.h" + +#if __has_include() +#import +#else +@import UIView_BooleanAnimations; +#endif + +@interface ARSpinner () +@property (nonatomic, strong) UIView *spinnerView; +@property (nonatomic, assign) BOOL deferredAnimation; +@end + + +@implementation ARSpinner + +- (id)initWithFrame:(CGRect)frame +{ + if (self = [super initWithFrame:frame]) { + [self setupBar]; + } + return self; +} + +- (id)initWithCoder:(NSCoder *)aDecoder +{ + if (self = [super initWithCoder:aDecoder]) { + [self setupBar]; + } + return self; +} + +- (void)setupBar +{ + _spinnerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 20, 5)]; + _spinnerView.backgroundColor = [UIColor blackColor]; + [self layoutSubviews]; + [self addSubview:_spinnerView]; +} + +- (void)layoutSubviews +{ + [super layoutSubviews]; + _spinnerView.center = CGPointMake(CGRectGetWidth(self.bounds) / 2, CGRectGetHeight(self.bounds) / 2); +} + +- (void)fadeInAnimated:(BOOL)animated +{ + [self fadeInAnimated:animated completion:nil]; +} + +- (void)fadeOutAnimated:(BOOL)animated +{ + [self fadeOutAnimated:animated completion:nil]; +} + +- (void)fadeInAnimated:(BOOL)animated completion:(void (^)(BOOL finished))completion +{ + self.alpha = 0; + [self startAnimating]; + + [UIView animateIf:animated duration:0.3:^{ + self.alpha = 1; + } completion:completion]; +} + +- (void)fadeOutAnimated:(BOOL)animated completion:(void (^)(BOOL finished))completion +{ + self.alpha = 1; + [self stopAnimating]; + + [UIView animateIf:animated duration:0.3:^{ + self.alpha = 0; + } completion:completion]; +} + +- (void)startAnimating +{ + [self animate]; +} + +// Added because sometimes the spinner's animation block gets called +// before it's been added to the super view +// in which case we want to animate again +- (void)didMoveToSuperview +{ + [super didMoveToSuperview]; + if (self.superview && self.deferredAnimation) { + self.deferredAnimation = NO; + [self ar_startSpinningIndefinitely]; + } +} + +- (void)animate +{ + if (self.superview) { + [self ar_startSpinningIndefinitely]; + } else { + self.deferredAnimation = YES; + } +} + +- (void)stopAnimating +{ + [self ar_stopSpinningInstantly:NO]; +} + +- (UIColor *)spinnerColor +{ + return self.spinnerView.backgroundColor; +} + +- (void)setSpinnerColor:(UIColor *)spinnerColor +{ + self.spinnerView.backgroundColor = spinnerColor; +} + +@end diff --git a/ios/Artsy/Extraction/UILabel+Typography.h b/ios/Artsy/Extraction/UILabel+Typography.h new file mode 100644 index 00000000000..48ac4941155 --- /dev/null +++ b/ios/Artsy/Extraction/UILabel+Typography.h @@ -0,0 +1,11 @@ +#import + +@interface UILabel (Typography) + +// Like marmite and peanut-butter, some things are nice on their own, but they just don't mix. +// For the moment, you can have one or the other. + +- (void)setText:(NSString *)text withLineHeight:(CGFloat)lineHeight; +- (void)setText:(NSString *)text withLetterSpacing:(CGFloat)letterSpacing; + +@end diff --git a/ios/Artsy/Extraction/UILabel+Typography.m b/ios/Artsy/Extraction/UILabel+Typography.m new file mode 100644 index 00000000000..0ca3ba0c44f --- /dev/null +++ b/ios/Artsy/Extraction/UILabel+Typography.m @@ -0,0 +1,30 @@ +#import "UILabel+Typography.h" + +@implementation UILabel (Typography) + +- (void)setText:(NSString *)text withLineHeight:(CGFloat)lineHeight +{ + if (!text) { + return; + } + NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:text]; + NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; + [paragraphStyle setLineSpacing:lineHeight]; + [paragraphStyle setAlignment:self.textAlignment]; + + [attr addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [text length])]; + self.attributedText = attr; +} + +- (void)setText:(NSString *)text withLetterSpacing:(CGFloat)letterSpacing +{ + if (!text) { + return; + } + NSMutableAttributedString *attributedText = nil; + attributedText = [[NSMutableAttributedString alloc] initWithString:text]; + [attributedText addAttribute:NSKernAttributeName value:@(letterSpacing) range:NSMakeRange(0, text.length)]; + self.attributedText = attributedText; +} + +@end diff --git a/ios/Artsy/Extraction/UIView+ARSpinner.h b/ios/Artsy/Extraction/UIView+ARSpinner.h new file mode 100644 index 00000000000..989de5e91de --- /dev/null +++ b/ios/Artsy/Extraction/UIView+ARSpinner.h @@ -0,0 +1,12 @@ +#import + +@interface UIView (ARSpinner) + +/// Keeps a view spinning for a _very_ long time. +- (void)ar_startSpinningIndefinitely; + +/// Stop a spin, with an optional finishing spin +- (void)ar_stopSpinningInstantly:(BOOL)instant; + +@end + diff --git a/ios/Artsy/Extraction/UIView+ARSpinner.m b/ios/Artsy/Extraction/UIView+ARSpinner.m new file mode 100644 index 00000000000..599eb866231 --- /dev/null +++ b/ios/Artsy/Extraction/UIView+ARSpinner.m @@ -0,0 +1,39 @@ +#import "UIView+ARSpinner.h" +#import "ARAnimationContinuation.h" + +static CGFloat RotationDuration = 0.45; +static NSString * const AnimationKey = @"ARSpinner"; + +@implementation UIView (ARSpinner) + +- (void)ar_startSpinningIndefinitely +{ + [self ar_startSpinning:LONG_MAX removedOnCompletion:NO]; +} + +- (void)ar_startSpinning:(NSInteger)times + removedOnCompletion:(BOOL)removedOnCompletion +{ + CATransform3D rotationTransform = CATransform3DMakeRotation(-1.01f * M_PI, 0, 0, 1.0); + + CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform"]; + rotationAnimation.toValue = [NSValue valueWithCATransform3D:rotationTransform]; + rotationAnimation.duration = RotationDuration; + rotationAnimation.cumulative = YES; + rotationAnimation.repeatCount = times; + rotationAnimation.removedOnCompletion = removedOnCompletion; + + [self.layer addAnimation:rotationAnimation forKey:AnimationKey]; + [ARAnimationContinuation addToLayer:self.layer]; +} + +- (void)ar_stopSpinningInstantly:(BOOL)instant +{ + [self.layer removeAnimationForKey:AnimationKey]; + if (!instant) { + [self ar_startSpinning:1 removedOnCompletion:YES]; + } + [ARAnimationContinuation removeFromLayer:self.layer]; +} + +@end diff --git a/ios/Artsy/Models/API_Models/Auctions/SaleArtwork.m b/ios/Artsy/Models/API_Models/Auctions/SaleArtwork.m index 32bba1cbb76..39f5ee7d73c 100644 --- a/ios/Artsy/Models/API_Models/Auctions/SaleArtwork.m +++ b/ios/Artsy/Models/API_Models/Auctions/SaleArtwork.m @@ -8,7 +8,7 @@ #import "ARLogger.h" // For a number formatter -#import +#import "Artsy+UILabels.h" static NSMutableDictionary *formattersPerCurrency; diff --git a/ios/Artsy/NativeModules/ARTNativeScreenPresenterModule.m b/ios/Artsy/NativeModules/ARTNativeScreenPresenterModule.m index 121cb916061..1d319299d75 100644 --- a/ios/Artsy/NativeModules/ARTNativeScreenPresenterModule.m +++ b/ios/Artsy/NativeModules/ARTNativeScreenPresenterModule.m @@ -11,7 +11,7 @@ #import #import "ARDispatchManager.h" -#import +#import "ARMediaPreviewController.h" #import #import diff --git a/ios/Artsy/NativeModules/CityGuideView.swift b/ios/Artsy/NativeModules/CityGuideView.swift index 554dd8d31ff..fe7749f8b01 100644 --- a/ios/Artsy/NativeModules/CityGuideView.swift +++ b/ios/Artsy/NativeModules/CityGuideView.swift @@ -1,7 +1,7 @@ import UIKit class CityGuideView: UIView { - weak var mapContainerViewController: AREigenMapContainerViewController? + weak var mapContainerViewController: ARMapContainerViewController? override func layoutSubviews() { super.layoutSubviews() @@ -20,7 +20,7 @@ class CityGuideView: UIView { return } - let vc = AREigenMapContainerViewController() + let vc = ARMapContainerViewController() parentVC.addChild(vc) addSubview(vc.view) vc.view.frame = bounds diff --git a/ios/Artsy/NativeModules/OldAdminView.swift b/ios/Artsy/NativeModules/OldAdminView.swift index 547b4a5aaff..c8b749b9014 100644 --- a/ios/Artsy/NativeModules/OldAdminView.swift +++ b/ios/Artsy/NativeModules/OldAdminView.swift @@ -21,7 +21,7 @@ class OldAdminView: UIView { } let vc = ARAdminSettingsViewController(style: .grouped)! - vc.view.backgroundColor = UIColor.purple + vc.view.backgroundColor = UIColor.artsyPurpleRegular() parentVC.addChild(vc) addSubview(vc.view) vc.view.frame = bounds diff --git a/ios/Artsy/Networking/API_Modules/ARKeychainable.m b/ios/Artsy/Networking/API_Modules/ARKeychainable.m index d3371a6ff32..a2311233182 100644 --- a/ios/Artsy/Networking/API_Modules/ARKeychainable.m +++ b/ios/Artsy/Networking/API_Modules/ARKeychainable.m @@ -2,7 +2,7 @@ #import "ARDefaults.h" #import "AROptions.h" #import "ARKeychainable.h" -#import +#import "AREmission.h" @implementation ARKeychain diff --git a/ios/Artsy/Networking/API_Modules/ARUserManager.m b/ios/Artsy/Networking/API_Modules/ARUserManager.m index bc4bc328967..d8e66e7ff96 100644 --- a/ios/Artsy/Networking/API_Modules/ARUserManager.m +++ b/ios/Artsy/Networking/API_Modules/ARUserManager.m @@ -23,7 +23,7 @@ #import "ARDispatchManager.h" #import "ARTNativeScreenPresenterModule.h" -#import +#import "AREmission.h" #import "RNCAsyncStorage.h" diff --git a/ios/Artsy/Networking/ARAuthProviders.m b/ios/Artsy/Networking/ARAuthProviders.m index 9cfd5f99805..bbe14263226 100644 --- a/ios/Artsy/Networking/ARAuthProviders.m +++ b/ios/Artsy/Networking/ARAuthProviders.m @@ -2,12 +2,10 @@ #import "ARNetworkConstants.h" #import "ARLogger.h" -#import -#import #import #import -#import +#import "AREmission.h" #import "ARAnalyticsConstants.h" #import diff --git a/ios/Artsy/Networking/ARNetworkConstants.h b/ios/Artsy/Networking/ARNetworkConstants.h index 20537dfa1b6..0c754ca5974 100644 --- a/ios/Artsy/Networking/ARNetworkConstants.h +++ b/ios/Artsy/Networking/ARNetworkConstants.h @@ -9,15 +9,11 @@ extern NSString *const ARAuthHeader; extern NSString *const ARXappHeader; extern NSString *const ARXappURL; -extern NSString *const ARForgotPasswordURL; - -extern NSString *const ARMyInfoURL; extern NSString *const ARAddArtworkToFavoritesURLFormat; extern NSString *const ARFavoritesURL; extern NSString *const ARMyBiddersURL; extern NSString *const ARSaleURLFormat; -extern NSString *const ARLiveSaleStateFormat; extern NSString *const ARFollowArtistURL; extern NSString *const ARFollowArtistsURL; @@ -26,7 +22,6 @@ extern NSString *const ARUnfollowArtistURLFormat; extern NSString *const ARFollowProfileURL; extern NSString *const ARUnfollowProfileURLFormat; extern NSString *const ARFollowProfilesURL; -extern NSString *const ARFollowingProfileURLFormat; extern NSString *const ARRelatedArtistsURL; extern NSString *const ARRelatedGeneURLFormat; @@ -40,13 +35,10 @@ extern NSString *const ARUnfollowGeneURLFormat; extern NSString *const ARProfileInformationURLFormat; extern NSString *const ARNewArtistSearchURL; -extern NSString *const ARNewGeneSearchURL; extern NSString *const ARNewDeviceURL; extern NSString *const ARDeleteDeviceURL; extern NSString *const ARSystemTimeURL; -extern NSString *const ARSuggestedHomepageArtworks; - extern NSString *const ARPageURLFormat; diff --git a/ios/Artsy/Networking/ARNetworkConstants.m b/ios/Artsy/Networking/ARNetworkConstants.m index 1427280f0d0..ec46ff2c66f 100644 --- a/ios/Artsy/Networking/ARNetworkConstants.m +++ b/ios/Artsy/Networking/ARNetworkConstants.m @@ -12,15 +12,10 @@ NSString *const ARXappURL = @"/api/v1/xapp_token"; -NSString *const ARForgotPasswordURL = @"/api/v1/users/send_reset_password_instructions"; - -NSString *const ARMyInfoURL = @"/api/v1/me"; - NSString *const ARAddArtworkToFavoritesURLFormat = @"/api/v1/collection/saved-artwork/artwork/%@"; NSString *const ARFavoritesURL = @"/api/v1/collection/saved-artwork/artworks"; NSString *const ARMyBiddersURL = @"/api/v1/me/bidders"; NSString *const ARSaleURLFormat = @"/api/v1/sale/%@"; -NSString *const ARLiveSaleStateFormat = @"%@/state/%@"; NSString *const ARRelatedArtistsURL = @"/api/v1/me/suggested/artists"; NSString *const ARRelatedGeneURLFormat = @"/api/v1/gene/%@/similar"; @@ -35,14 +30,12 @@ NSString *const ARFollowGenesURL = @"/api/v1/me/follow/genes"; NSString *const ARFollowProfileURL = @"/api/v1/me/follow/profile"; -NSString *const ARFollowingProfileURLFormat = @"/api/v1/me/follow/profile/%@"; NSString *const ARUnfollowProfileURLFormat = @"/api/v1/me/follow/profile/%@"; NSString *const ARFollowProfilesURL = @"/api/v1/me/follow/profiles"; NSString *const ARProfileInformationURLFormat = @"/api/v1/profile/%@"; NSString *const ARNewArtistSearchURL = @"/api/v1/match/artists"; -NSString *const ARNewGeneSearchURL = @"/api/v1/match/genes"; NSString *const ARNotificationsURL = @"/api/v1/me/notifications"; diff --git a/ios/Artsy/Networking/ARReactPackagerHost.h b/ios/Artsy/Networking/ARReactPackagerHost.h deleted file mode 100644 index 4be37be68d7..00000000000 --- a/ios/Artsy/Networking/ARReactPackagerHost.h +++ /dev/null @@ -1,9 +0,0 @@ -// the .m for this file is generated in a 'pre-action' in the Artsy build scheme -// which executes the file /scripts/set_packager_host.sh -#import - -@interface ARReactPackagerHost : NSObject - -+ (NSString*)hostname; - -@end diff --git a/ios/Artsy/Networking/ARRouter.h b/ios/Artsy/Networking/ARRouter.h index ac9fe24b51d..a0d8a10c6e4 100644 --- a/ios/Artsy/Networking/ARRouter.h +++ b/ios/Artsy/Networking/ARRouter.h @@ -36,10 +36,6 @@ #pragma mark - User -+ (NSURLRequest *)newMeHEADRequest; -+ (NSURLRequest *)newUserInfoRequest; -+ (NSURLRequest *)newUserEditRequestWithParams:(NSDictionary *)params; -+ (NSURLRequest *)newCheckFollowingProfileHeadRequest:(NSString *)profileID; + (NSURLRequest *)newMyFollowProfileRequest:(NSString *)profileID; + (NSURLRequest *)newMyUnfollowProfileRequest:(NSString *)profileID; + (NSURLRequest *)newFollowingProfilesRequestWithFair:(Fair *)fair; @@ -81,7 +77,6 @@ #pragma mark - Search (Onboarding) + (NSURLRequest *)newArtistSearchRequestWithQuery:(NSString *)query excluding:(NSArray *)artistsToExclude; -+ (NSURLRequest *)newGeneSearchRequestWithQuery:(NSString *)query excluding:(NSArray *)genesToExclude; #pragma mark - Fairs @@ -89,8 +84,6 @@ #pragma mark - Auctions -+ (NSURLRequest *)liveSaleStateRequest:(NSString *)saleID host:(NSString *)host; - // Send in role as nil for when a user is logged out + (NSURLRequest *)liveSaleStaticDataRequest:(NSString *)saleID role:(NSString *)role; @@ -105,7 +98,6 @@ #pragma mark - Misc Site -+ (NSURLRequest *)newForgotPasswordRequestWithEmail:(NSString *)email; + (NSURLRequest *)newSetDeviceAPNTokenRequest:(NSString *)token forDevice:(NSString *)device; + (NSURLRequest *)newDeleteDeviceRequest:(NSString *)token; + (NSURLRequest *)newSystemTimeRequest; @@ -115,8 +107,4 @@ + (NSURLRequest *)newRequestForPageContent:(NSString *)slug; -#pragma mark - Misc - -+ (NSURLRequest *)newHEADRequestForPath:(NSString *)path; - @end diff --git a/ios/Artsy/Networking/ARRouter.m b/ios/Artsy/Networking/ARRouter.m index 78d91acc647..d90a3b25fc9 100644 --- a/ios/Artsy/Networking/ARRouter.m +++ b/ios/Artsy/Networking/ARRouter.m @@ -27,7 +27,7 @@ #import #import -#import +#import "AREmission.h" static AFHTTPSessionManager *staticHTTPClient = nil; static NSSet *artsyHosts = nil; @@ -286,27 +286,6 @@ + (NSURLRequest *)newXAppTokenRequest #pragma mark User -+ (NSURLRequest *)newUserInfoRequest -{ - return [self requestWithMethod:@"GET" path:ARMyInfoURL parameters:nil]; -} - -+ (NSURLRequest *)newMeHEADRequest -{ - return [self requestWithMethod:@"HEAD" path:ARMyInfoURL parameters:nil]; -} - -+ (NSURLRequest *)newUserEditRequestWithParams:(NSDictionary *)params -{ - return [self requestWithMethod:@"PUT" path:ARMyInfoURL parameters:params]; -} - -+ (NSURLRequest *)newCheckFollowingProfileHeadRequest:(NSString *)profileID -{ - NSString *path = NSStringWithFormat(ARFollowingProfileURLFormat, profileID); - return [self requestWithMethod:@"GET" path:path parameters:nil]; -} - + (NSURLRequest *)newMyFollowProfileRequest:(NSString *)profileID { return [self requestWithMethod:@"POST" path:ARFollowProfileURL parameters:@{ @"profile_id" : profileID }]; @@ -499,16 +478,6 @@ + (NSURLRequest *)newArtistSearchRequestWithQuery:(NSString *)query excluding:(N return [self requestWithMethod:@"GET" path:ARNewArtistSearchURL parameters:params]; } -+ (NSURLRequest *)newGeneSearchRequestWithQuery:(NSString *)query excluding:(NSArray *)genesToExclude -{ - NSArray *geneIDsToExclude = [genesToExclude valueForKey:@"uuid"]; - - NSDictionary *params = @{ @"term" : query, - @"exclude_ids" : geneIDsToExclude }; - - return [self requestWithMethod:@"GET" path:ARNewGeneSearchURL parameters:params]; -} - #pragma mark - #pragma mark Fairs @@ -537,11 +506,6 @@ + (NSURLRequest *)markNotificationsAsReadRequest #pragma mark - #pragma mark Misc Site -+ (NSURLRequest *)newForgotPasswordRequestWithEmail:(NSString *)email -{ - NSDictionary *params = @{ @"email" : email }; - return [self requestWithMethod:@"POST" path:ARForgotPasswordURL parameters:params]; -} + (NSURLRequest *)newSetDeviceAPNTokenRequest:(NSString *)token forDevice:(NSString *)device { @@ -561,13 +525,6 @@ + (NSURLRequest *)newDeleteDeviceRequest:(NSString *)token return [self requestWithMethod:@"DELETE" path:[NSString stringWithFormat:ARDeleteDeviceURL, token]]; } -+ (NSURLRequest *)liveSaleStateRequest:(NSString *)saleID host:(NSString *)host -{ - // Note that we're relying on the host to specify the domain for the request. - NSString *url = [NSString stringWithFormat:ARLiveSaleStateFormat, host, saleID]; - return [self requestWithMethod:@"GET" URLString:url parameters:nil]; -} - + (NSURLRequest *)graphQLRequestForQuery:(NSString *)query { return [self graphQLRequestForQuery:query variables:nil]; @@ -646,10 +603,4 @@ + (NSURLRequest *)newRequestForPageContent:(NSString *)slug return [self requestWithMethod:@"GET" path:url parameters:nil]; } -+ (NSURLRequest *)newHEADRequestForPath:(NSString *)path -{ - NSString *fullPath = [[NSURL URLWithString:path relativeToURL:[ARRouter baseWebURL]] absoluteString]; - return [self requestWithMethod:@"HEAD" URLString:fullPath parameters:nil]; -} - @end diff --git a/ios/Artsy/Networking/ARSystemTime.h b/ios/Artsy/Networking/ARSystemTime.h index 6dc0ffb6eea..aa41dee852d 100644 --- a/ios/Artsy/Networking/ARSystemTime.h +++ b/ios/Artsy/Networking/ARSystemTime.h @@ -3,23 +3,6 @@ @interface ARSystemTime : NSObject -/** - * Retrieve server-side date and time and store for future time adjustments. - */ -+ (void)sync; - -/** - * Reset server-side date and time, require a new sync. - */ -+ (void)reset; - -/** - * Returns YES if the server-side date and time have been retrieved. - * - * @return Whether the server-side date and time have been retrieved. - */ -+ (BOOL)inSync; - /** * Current server-side date and time based on a previously retrieved interval. * diff --git a/ios/Artsy/Networking/ARSystemTime.m b/ios/Artsy/Networking/ARSystemTime.m index 15aed19de8f..ebb8b7ecbf8 100644 --- a/ios/Artsy/Networking/ARSystemTime.m +++ b/ios/Artsy/Networking/ARSystemTime.m @@ -9,19 +9,6 @@ @implementation ARSystemTime static NSTimeInterval ARSystemTimeInterval = NSTimeIntervalSince1970; -+ (void)sync -{ - [ArtsyAPI getSystemTime:^(SystemTime *systemTime) { - @synchronized(self) { - ARSystemTimeInterval = [[NSDate date] timeIntervalSinceDate:systemTime.date]; - ARActionLog(@"Synchronized clock with server, local time is %.2f second(s) %@", ABS(ARSystemTimeInterval), ARSystemTimeInterval > 0 ? @"ahead" : @"behind"); - } - } failure:^(NSError *error) { - ARErrorLog(@"Error retrieving system time, %@", error.localizedDescription); - [self performSelector:_cmd withObject:nil afterDelay:3]; - }]; -} - + (BOOL)inSync { return ARSystemTimeInterval != NSTimeIntervalSince1970; @@ -36,12 +23,4 @@ + (NSDate *)date } } -+ (void)reset -{ - @synchronized(self) - { - ARSystemTimeInterval = NSTimeIntervalSince1970; - } -} - @end diff --git a/ios/Artsy/Networking/ArtsyAPI.m b/ios/Artsy/Networking/ArtsyAPI.m index 35f3a645d14..54c12fb24bc 100644 --- a/ios/Artsy/Networking/ArtsyAPI.m +++ b/ios/Artsy/Networking/ArtsyAPI.m @@ -16,7 +16,7 @@ #import #import -#import +#import "AREmission.h" NetworkFailureBlock passOnNetworkError(void (^failure)(NSError *)) { diff --git a/ios/Artsy/Networking/Live_Auctions/LiveAuctionSocketCommunicator.swift b/ios/Artsy/Networking/Live_Auctions/LiveAuctionSocketCommunicator.swift index ccc36c9f00a..75c19556a28 100644 --- a/ios/Artsy/Networking/Live_Auctions/LiveAuctionSocketCommunicator.swift +++ b/ios/Artsy/Networking/Live_Auctions/LiveAuctionSocketCommunicator.swift @@ -2,7 +2,7 @@ import Foundation import Interstellar import Starscream -protocol SocketType: class { +protocol SocketType: AnyObject { var onText: ((String) -> Void)? { get set } var onConnect: (() -> Void)? { get set } var onDisconnect: ((Error?) -> Void)? { get set } diff --git a/ios/Artsy/Resources/Artsy-Bridging-Header.h b/ios/Artsy/Resources/Artsy-Bridging-Header.h index f68d51c0d28..e1ad594adc9 100644 --- a/ios/Artsy/Resources/Artsy-Bridging-Header.h +++ b/ios/Artsy/Resources/Artsy-Bridging-Header.h @@ -72,7 +72,7 @@ #import "ARAppConstants.h" #import "ARAnalyticsConstants.h" -#import +#import "UIView+ARSpinner.h" #import "ARStandardDateFormatter.h" #import "AROfflineView.h" @@ -86,12 +86,12 @@ // All these were previously Pod dynamic frameworks and now static libraries #import "ARFonts.h" -#import -#import -#import -#import +#import "Artsy+UILabels.h" +#import "UIView+ARDrawing.h" +#import "ARButtonSubclasses.h" +#import "UIColor+ArtsyColors.h" #import -#import +#import "ARSpinner.h" #import #import #import @@ -103,13 +103,13 @@ #import #import #import "UIDevice-Hardware.h" -#import -#import +#import "AREmission.h" +#import "ARComponentViewController.h" #import "ARTNativeScreenPresenterModule.h" // CityGuide -#import "AREigenMapContainerViewController.h" +#import "ARMapContainerViewController.h" // Admin #import "ARAdminSettingsViewController.h" diff --git a/ios/Artsy/Tooling/Generated/StoryboardConstants.swift b/ios/Artsy/Tooling/Generated/StoryboardConstants.swift index d3f8679e5cf..bb68ac139ce 100644 --- a/ios/Artsy/Tooling/Generated/StoryboardConstants.swift +++ b/ios/Artsy/Tooling/Generated/StoryboardConstants.swift @@ -26,14 +26,6 @@ extension StoryboardSceneType where Self: RawRepresentable, Self.RawValue == Str } } -protocol StoryboardSegueType: RawRepresentable { } - -extension UIViewController { - func performSegue(_ segue: S, sender: AnyObject? = nil) where S.RawValue == String { - self.performSegue(withIdentifier: segue.rawValue, sender: sender) - } -} - struct StoryboardScene { enum LiveAuctions: String, StoryboardSceneType { static let storyboardName = "LiveAuctions" @@ -44,6 +36,3 @@ struct StoryboardScene { } } } - -struct StoryboardSegue { -} diff --git a/ios/Artsy/View_Controllers/ARSerifNavigationViewController.m b/ios/Artsy/View_Controllers/ARSerifNavigationViewController.m index 961c478e237..ebd73514245 100644 --- a/ios/Artsy/View_Controllers/ARSerifNavigationViewController.m +++ b/ios/Artsy/View_Controllers/ARSerifNavigationViewController.m @@ -3,8 +3,8 @@ #import "Artsy-Swift.h" #import "UIDevice-Hardware.h" #import "UIImage+ImageFromColor.h" -#import -#import +#import "ARButtonSubclasses.h" +#import "Artsy+UILabels.h" #import #import diff --git a/ios/Artsy/View_Controllers/ARVIR/VCs/ARAugmentedFloorBasedVIRViewController.m b/ios/Artsy/View_Controllers/ARVIR/VCs/ARAugmentedFloorBasedVIRViewController.m index a539758c858..961c6d6c865 100644 --- a/ios/Artsy/View_Controllers/ARVIR/VCs/ARAugmentedFloorBasedVIRViewController.m +++ b/ios/Artsy/View_Controllers/ARVIR/VCs/ARAugmentedFloorBasedVIRViewController.m @@ -9,12 +9,12 @@ #import "ARFonts.h" #import "ARAppConstants.h" #import "ARDefaults.h" -#import -#import +#import "ARButtonSubclasses.h" +#import "AREmission.h" #import #import -#import -#import +#import "ARSpinner.h" +#import "UIView+ARSpinner.h" #import "ARAugmentedRealityConfig.h" #import "ARAnalyticsConstants.h" diff --git a/ios/Artsy/View_Controllers/ARVIR/VCs/ARAugmentedVIRSetupViewController.m b/ios/Artsy/View_Controllers/ARVIR/VCs/ARAugmentedVIRSetupViewController.m index c01a8831721..3490ae9a485 100644 --- a/ios/Artsy/View_Controllers/ARVIR/VCs/ARAugmentedVIRSetupViewController.m +++ b/ios/Artsy/View_Controllers/ARVIR/VCs/ARAugmentedVIRSetupViewController.m @@ -1,12 +1,12 @@ @import AVKit; @import ARKit; -#import -#import -#import +#import "ARButtonSubclasses.h" +#import "Artsy+UILabels.h" +#import "UIFont+ArtsyFonts.h" #import #import -#import +#import "AREmission.h" #import "ARAppConstants.h" #import "ARDefaults.h" diff --git a/ios/Artsy/View_Controllers/ARVIR/Views/ARInformationView.m b/ios/Artsy/View_Controllers/ARVIR/Views/ARInformationView.m index 69cee549e11..6e1a044d7c6 100644 --- a/ios/Artsy/View_Controllers/ARVIR/Views/ARInformationView.m +++ b/ios/Artsy/View_Controllers/ARVIR/Views/ARInformationView.m @@ -3,7 +3,7 @@ #import "ARAppConstants.h" #import -#import +#import "UIFont+ArtsyFonts.h" #import #import diff --git a/ios/Artsy/View_Controllers/Admin/ARAdminSettingsViewController.m b/ios/Artsy/View_Controllers/Admin/ARAdminSettingsViewController.m index 7a5bf32c465..3e03833be5e 100644 --- a/ios/Artsy/View_Controllers/Admin/ARAdminSettingsViewController.m +++ b/ios/Artsy/View_Controllers/Admin/ARAdminSettingsViewController.m @@ -15,10 +15,9 @@ #import "Artsy-Swift.h" #import "UIDevice-Hardware.h" -#import "ARAdminNetworkModel.h" #import "ARAppNotificationsDelegate.h" #import -#import +#import "AREmission.h" #import #import #import @@ -38,26 +37,7 @@ - (void)viewDidLoad ARTableViewData *tableViewData = [[ARTableViewData alloc] init]; - NSString *name = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"]; - NSString *build = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]; - NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; - NSString *gitCommitShortHash = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"GITCommitShortHash"]; - NSString *userEmail = [[[ARUserManager sharedManager] currentUser] email]; - - ARSectionData *userSectionData = [[ARSectionData alloc] init]; - userSectionData.headerTitle = [NSString stringWithFormat:@"%@ v%@, build %@ (%@), %@", name, version, build, gitCommitShortHash, userEmail]; - - [userSectionData addCellDataFromArray:@[ - [self generateRestart], - ]]; - [tableViewData addSectionData:userSectionData]; - ARSectionData *launcherSections = [[ARSectionData alloc] initWithCellDataArray:@[ - [self generateFair2], - [self generateArtistSeries], - [self generateFeaturePage], - [self generateShowAllLiveAuctions], - [self showConsignmentsFlow], [self generateEchoContents], ]]; @@ -73,9 +53,6 @@ - (void)viewDidLoad toggleSections.headerTitle = @"Options"; [tableViewData addSectionData:toggleSections]; - ARSectionData *developerSection = [self createDeveloperSection]; - [tableViewData addSectionData:developerSection]; - self.tableViewData = tableViewData; } @@ -85,35 +62,6 @@ - (UIStatusBarStyle)preferredStatusBarStyle return UIStatusBarStyleLightContent; } - -- (ARCellData *)generateFeaturePage -{ - return [self tappableCellDataWithTitle:@"→ Feature Page" selection:^{ - [[AREmission sharedInstance] navigate:@"/feature/milan-gallery-community"]; - }]; -} - -- (ARCellData *)generateArtistSeries -{ - return [self tappableCellDataWithTitle:@"→ Artist Series" selection:^{ - [[AREmission sharedInstance] navigate:@"/artist-series/alex-katz-ada"]; - }]; -} - -- (ARCellData *)generateFair2 -{ - return [self tappableCellDataWithTitle:@"→ Fair" selection:^{ - [[AREmission sharedInstance] navigate:@"/fair/frieze-new-york-2019"]; - }]; -} - -- (ARCellData *)generateRestart -{ - return [self tappableCellDataWithTitle:@"Restart" selection:^{ - exit(0); - }]; -} - - (ARCellData *)generateRemoteDebug { RCTDevSettings *devSettings = [[[AREmission sharedInstance] bridge] devSettings]; @@ -149,23 +97,6 @@ - (ARCellData *)generateShowReactNativeDevMenu }]; } -- (ARCellData *)generateShowAllLiveAuctions -{ - return [self tappableCellDataWithTitle:@"→ All Live Auctions" selection:^{ - - NSURL *url = [NSURL URLWithString:@"https://live-staging.artsy.net"]; - ARInternalMobileWebViewController *webVC = [[ARInternalMobileWebViewController alloc] initWithURL:url]; - [self.navigationController pushViewController:webVC animated:YES]; - }]; -} - -- (ARCellData *)showConsignmentsFlow -{ - return [self tappableCellDataWithTitle:@"→ Consignments Flow" selection:^{ - [[AREmission sharedInstance] navigate:@"/consign/submission"]; - }]; -} - - (ARCellData *)generateOnScreenMartsy { NSString *message = [AROptions boolForOption:AROptionsShowMartsyOnScreen] ? @"Hide" : @"Show"; @@ -232,14 +163,6 @@ - (ARSectionData *)createLabsSection return labsSectionData; } -- (ARSectionData *)createDeveloperSection -{ - ARSectionData *labsSectionData = [[ARSectionData alloc] init]; - labsSectionData.headerTitle = @"Developer"; - - return labsSectionData; -} - - (BOOL)shouldAutorotate { return NO; diff --git a/ios/Artsy/View_Controllers/Admin/AREchoContentsViewController.m b/ios/Artsy/View_Controllers/Admin/AREchoContentsViewController.m index 5f8b6616b8b..742391b07b1 100644 --- a/ios/Artsy/View_Controllers/Admin/AREchoContentsViewController.m +++ b/ios/Artsy/View_Controllers/Admin/AREchoContentsViewController.m @@ -19,8 +19,8 @@ @interface AREchoContentsViewController () @property (nonatomic, strong) ArtsyEcho *echo; @property (nonatomic, strong) NSArrayOf(Message *) *messages; // Cache messages to ensure deterministic ordering -@property (nonatomic, strong) NSArrayOf(NSString *) * routeKeys; -@property (nonatomic, strong) NSArrayOf(NSString *) * featureKeys; +@property (nonatomic, strong) NSArrayOf(NSString *) *routeKeys; +@property (nonatomic, strong) NSArrayOf(NSString *) *featureKeys; @end diff --git a/ios/Artsy/View_Controllers/Admin/Networking/ARAdminNetworkModel.h b/ios/Artsy/View_Controllers/Admin/Networking/ARAdminNetworkModel.h deleted file mode 100644 index 4470cc7dc7a..00000000000 --- a/ios/Artsy/View_Controllers/Admin/Networking/ARAdminNetworkModel.h +++ /dev/null @@ -1,25 +0,0 @@ -#import - -@interface Metadata: NSObject - -@property (nonatomic) NSString * _Nullable title; // PR description -@property (nonatomic) NSString * _Nullable sha; // Full SHA of commit used -@property (nonatomic) NSString * _Nullable date; // ISO8601 string of date for JS upload -@property (nonatomic) NSNumber * _Nullable number; // PR number of last merged commit - -- (instancetype _Nonnull )initFromJSONDict:(NSDictionary * _Nonnull)dict; - -@end - - -@interface ARAdminNetworkModel : NSObject - -+ (NSURL *_Nonnull)fileURLForLatestCommitJavaScript; -+ (NSURL *_Nonnull)fileURLForLatestCommitMetadata; - -// First passes some metadata back, before downloading the larger JS for emission from main -- (void)downloadJavaScriptForMainCommit:(void (^ _Nonnull)(NSString * _Nullable title, NSString * _Nullable subtitle))metadata completion:(void (^_Nonnull)(NSURL * _Nullable downloadedFileURL, NSError * _Nullable error))completionHandler; - -- (void)downloadMetadataForMainCommit:(void (^_Nonnull)(NSError * _Nullable error, Metadata * _Nullable metadata))completionHandler; - -@end diff --git a/ios/Artsy/View_Controllers/Admin/Networking/ARAdminNetworkModel.m b/ios/Artsy/View_Controllers/Admin/Networking/ARAdminNetworkModel.m deleted file mode 100644 index f4f3f19f9c6..00000000000 --- a/ios/Artsy/View_Controllers/Admin/Networking/ARAdminNetworkModel.m +++ /dev/null @@ -1,81 +0,0 @@ -#import "ARAdminNetworkModel.h" - -@implementation Metadata - -- (instancetype)initFromJSONDict:(NSDictionary *)dict -{ - self = [super init]; - self.number = dict[@"number"]; - self.date = dict[@"date"]; - self.title = dict[@"title"]; - self.sha = dict[@"shaa"]; - return self; -} - -@end - -@implementation ARAdminNetworkModel - -+ (NSURL *_Nonnull)fileURLForLatestCommitJavaScript -{ - return [[[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] firstObject] URLByAppendingPathComponent:@"Emission-master.js"]; -} - -+ (NSURL *_Nonnull)fileURLForLatestCommitMetadata -{ - return [[[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] firstObject] URLByAppendingPathComponent:@"master-metadata.json"]; -} - -- (void)downloadMetadataForMainCommit:(void (^_Nonnull)(NSError * _Nullable error, Metadata * _Nullable metadata))completionHandler -{ - NSURL *url = [NSURL URLWithString:@"https://s3.amazonaws.com/artsy-emission-js/master-metadata.json"]; - NSURLSessionDataTask *task = [[NSURLSession sharedSession] dataTaskWithURL:url completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { - - if (error) { completionHandler(error, nil); return; } - - NSError *jsonError = nil; - - NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&jsonError]; - Metadata *metadata = [[Metadata alloc] initFromJSONDict:json]; - if (error) { completionHandler(jsonError, nil); return; } - - NSURL *fileURL = [self.class fileURLForLatestCommitMetadata]; - [data writeToURL:fileURL atomically:YES]; - - completionHandler(nil, metadata); - }]; - - [task resume]; -} - -- (void)downloadJavaScriptForMainCommit:(void (^ _Nonnull)(NSString * _Nullable title, NSString * _Nullable subtitle))metadataCallback completion:(void (^_Nonnull)(NSURL * _Nullable downloadedFileURL, NSError * _Nullable error))completionHandler; -{ - // Get the metadata first, then grab the master commit if we get metadata correctly - [self downloadMetadataForMainCommit:^(NSError * _Nullable error, Metadata *metadata) { - if (error) { completionHandler(nil, error); return; } - - NSString *title = @"Downloading JS"; - NSString *subtitle = [NSString stringWithFormat:@"Last PR: #%@ - %@", [metadata number], [metadata title]]; - - dispatch_async(dispatch_get_main_queue(), ^{ - metadataCallback(title, subtitle); - }); - - NSURL *url = [NSURL URLWithString:@"https://s3.amazonaws.com/artsy-emission-js/Emission-master.js"]; - NSURLSessionDataTask *task = [[NSURLSession sharedSession] dataTaskWithURL:url completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { - - if (error) { completionHandler(nil, error); return; } - - NSURL *fileURL = [self.class fileURLForLatestCommitJavaScript]; - [data writeToURL:fileURL atomically:YES]; - - dispatch_async(dispatch_get_main_queue(), ^{ - completionHandler(fileURL, nil); - }); - }]; - - [task resume]; - }]; -} - -@end diff --git a/ios/Artsy/View_Controllers/Auction/RefinementOptionsViewController.swift b/ios/Artsy/View_Controllers/Auction/RefinementOptionsViewController.swift index 3552c4a4adb..b8b9f0c36eb 100644 --- a/ios/Artsy/View_Controllers/Auction/RefinementOptionsViewController.swift +++ b/ios/Artsy/View_Controllers/Auction/RefinementOptionsViewController.swift @@ -1,6 +1,7 @@ import UIKit -protocol RefinementOptionsViewControllerDelegate: class { + +protocol RefinementOptionsViewControllerDelegate: AnyObject { associatedtype R: RefinableType func userDidCancel(_ controller: RefinementOptionsViewController) diff --git a/ios/Artsy/View_Controllers/Core/ARViewInRoomViewController.m b/ios/Artsy/View_Controllers/Core/ARViewInRoomViewController.m index 3293ca1db54..eaf2c9752e6 100644 --- a/ios/Artsy/View_Controllers/Core/ARViewInRoomViewController.m +++ b/ios/Artsy/View_Controllers/Core/ARViewInRoomViewController.m @@ -1,6 +1,6 @@ #import "ARViewInRoomViewController.h" -#import +#import "AREmission.h" #import "ARAnalyticsConstants.h" #import "Artwork.h" diff --git a/ios/Artsy/View_Controllers/Live_Auctions/LiveAuctionLotListViewController.swift b/ios/Artsy/View_Controllers/Live_Auctions/LiveAuctionLotListViewController.swift index b44a4d9b6cf..639fd5c8d62 100644 --- a/ios/Artsy/View_Controllers/Live_Auctions/LiveAuctionLotListViewController.swift +++ b/ios/Artsy/View_Controllers/Live_Auctions/LiveAuctionLotListViewController.swift @@ -2,7 +2,7 @@ import UIKit import Interstellar -protocol LiveAuctionLotListViewControllerDelegate: class { +protocol LiveAuctionLotListViewControllerDelegate: AnyObject { func didSelectLotAtIndex(_ index: Int, forLotListViewController lotListViewController: LiveAuctionLotListViewController) } diff --git a/ios/Artsy/View_Controllers/Live_Auctions/LiveAuctionSaleLotsDataSource.swift b/ios/Artsy/View_Controllers/Live_Auctions/LiveAuctionSaleLotsDataSource.swift index 6c39cd1287f..d12d1dce87c 100644 --- a/ios/Artsy/View_Controllers/Live_Auctions/LiveAuctionSaleLotsDataSource.swift +++ b/ios/Artsy/View_Controllers/Live_Auctions/LiveAuctionSaleLotsDataSource.swift @@ -1,6 +1,6 @@ import UIKit -protocol LiveAuctionSaleLotsDataSourceScrollableDelgate: class { +protocol LiveAuctionSaleLotsDataSourceScrollableDelgate: AnyObject { func registerForScrollingState(_ viewController: LiveAuctionLotViewController) } diff --git a/ios/Artsy/View_Controllers/Live_Auctions/LiveAuctionSalesPerson.swift b/ios/Artsy/View_Controllers/Live_Auctions/LiveAuctionSalesPerson.swift index dfe1006437a..325d893fff9 100644 --- a/ios/Artsy/View_Controllers/Live_Auctions/LiveAuctionSalesPerson.swift +++ b/ios/Artsy/View_Controllers/Live_Auctions/LiveAuctionSalesPerson.swift @@ -4,7 +4,7 @@ import Interstellar /// Something to pretend to either be a network model or whatever /// for now it can just parse the embedded json, and move it to obj-c when we're doing real networking -protocol LiveAuctionsSalesPersonType: class { +protocol LiveAuctionsSalesPersonType: AnyObject { var currentLotSignal: Observable { get } var initialStateLoadedSignal: Observable { get } diff --git a/emission/Pod/Classes/.gitkeep b/ios/Artsy/View_Controllers/Live_Auctions/Resources/Artsy/fonts/.gitkeep similarity index 100% rename from emission/Pod/Classes/.gitkeep rename to ios/Artsy/View_Controllers/Live_Auctions/Resources/Artsy/fonts/.gitkeep diff --git a/ios/Artsy/View_Controllers/Live_Auctions/Resources/LiveAuctions.storyboard b/ios/Artsy/View_Controllers/Live_Auctions/Resources/LiveAuctions.storyboard index 75e5e9d1d8b..a1f350f6e59 100644 --- a/ios/Artsy/View_Controllers/Live_Auctions/Resources/LiveAuctions.storyboard +++ b/ios/Artsy/View_Controllers/Live_Auctions/Resources/LiveAuctions.storyboard @@ -1,9 +1,9 @@ - + - + @@ -227,9 +227,9 @@ - + diff --git a/ios/Artsy/View_Controllers/Live_Auctions/ViewModels/LiveAuctionLotViewModel.swift b/ios/Artsy/View_Controllers/Live_Auctions/ViewModels/LiveAuctionLotViewModel.swift index 42af749de7e..ba91fc94d35 100644 --- a/ios/Artsy/View_Controllers/Live_Auctions/ViewModels/LiveAuctionLotViewModel.swift +++ b/ios/Artsy/View_Controllers/Live_Auctions/ViewModels/LiveAuctionLotViewModel.swift @@ -20,7 +20,7 @@ func == (lhs: LotState, rhs: LotState) -> Bool { typealias CurrentBid = (bid: String, reserve: String?) -protocol LiveAuctionLotViewModelType: class { +protocol LiveAuctionLotViewModelType: AnyObject { var numberOfDerivedEvents: Int { get } func derivedEventAtPresentationIndex(_ index: Int) -> LiveAuctionEventViewModel diff --git a/ios/Artsy/View_Controllers/Live_Auctions/ViewModels/LiveAuctionViewModel.swift b/ios/Artsy/View_Controllers/Live_Auctions/ViewModels/LiveAuctionViewModel.swift index d461ceb052c..e44b4208195 100644 --- a/ios/Artsy/View_Controllers/Live_Auctions/ViewModels/LiveAuctionViewModel.swift +++ b/ios/Artsy/View_Controllers/Live_Auctions/ViewModels/LiveAuctionViewModel.swift @@ -3,7 +3,7 @@ import Interstellar /// Represents the whole auction, all the live biz, timings, watchers -protocol LiveAuctionViewModelType: class { +protocol LiveAuctionViewModelType: AnyObject { var startDate: Date { get } var lotCount: Int { get } diff --git a/ios/Artsy/View_Controllers/Live_Auctions/Views/LiveAuctionLotCollectionViewLayoutType.swift b/ios/Artsy/View_Controllers/Live_Auctions/Views/LiveAuctionLotCollectionViewLayoutType.swift index abe659d6f17..68eafc56e17 100644 --- a/ios/Artsy/View_Controllers/Live_Auctions/Views/LiveAuctionLotCollectionViewLayoutType.swift +++ b/ios/Artsy/View_Controllers/Live_Auctions/Views/LiveAuctionLotCollectionViewLayoutType.swift @@ -2,12 +2,12 @@ import UIKit typealias RelativeIndex = Int -protocol LiveAuctionLotCollectionViewDelegateLayout: class { +protocol LiveAuctionLotCollectionViewDelegateLayout: AnyObject { func aspectRatioForIndex(_ index: RelativeIndex) -> CGFloat func thumbnailURLForIndex(_ index: RelativeIndex) -> URL? } -protocol LiveAuctionLotCollectionViewLayoutType: class { +protocol LiveAuctionLotCollectionViewLayoutType: AnyObject { var delegate: LiveAuctionLotCollectionViewDelegateLayout { get } var repulsionConstant: CGFloat { get set } diff --git a/ios/Artsy/View_Controllers/Login_and_Onboarding/Onboarding_stages/2_-_Calls_to_Action/ARSignUpActiveUserViewController.xib b/ios/Artsy/View_Controllers/Login_and_Onboarding/Onboarding_stages/2_-_Calls_to_Action/ARSignUpActiveUserViewController.xib deleted file mode 100644 index 54cbcaec7ff..00000000000 --- a/ios/Artsy/View_Controllers/Login_and_Onboarding/Onboarding_stages/2_-_Calls_to_Action/ARSignUpActiveUserViewController.xib +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/Artsy/View_Controllers/Map/AREigenMapContainerViewController.h b/ios/Artsy/View_Controllers/Map/AREigenMapContainerViewController.h deleted file mode 100644 index 821fa58e53f..00000000000 --- a/ios/Artsy/View_Controllers/Map/AREigenMapContainerViewController.h +++ /dev/null @@ -1,10 +0,0 @@ -#import -#import "ARMenuAwareViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface AREigenMapContainerViewController : ARMapContainerViewController - -@end - -NS_ASSUME_NONNULL_END diff --git a/ios/Artsy/View_Controllers/Map/AREigenMapContainerViewController.m b/ios/Artsy/View_Controllers/Map/AREigenMapContainerViewController.m deleted file mode 100644 index 5c5f4bfdb97..00000000000 --- a/ios/Artsy/View_Controllers/Map/AREigenMapContainerViewController.m +++ /dev/null @@ -1,14 +0,0 @@ -#import "AREigenMapContainerViewController.h" - -@interface AREigenMapContainerViewController () - -@end - -@implementation AREigenMapContainerViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. -} - -@end diff --git a/ios/Artsy/View_Controllers/Util/ARFileUtils.h b/ios/Artsy/View_Controllers/Util/ARFileUtils.h index de5c028dc99..763a9fbf914 100644 --- a/ios/Artsy/View_Controllers/Util/ARFileUtils.h +++ b/ios/Artsy/View_Controllers/Util/ARFileUtils.h @@ -6,22 +6,11 @@ @interface ARFileUtils : NSObject /// user documents - -+ (NSString *)userDocumentsFolder; - + (NSString *)userDocumentsPathWithFile:(NSString *)filename; -+ (NSString *)userDocumentsPathWithFolder:(NSString *)folderName filename:(NSString *)filename; - /// caches - -+ (NSString *)cachesFolder; - + (NSString *)cachesPathWithFolder:(NSString *)folderName filename:(NSString *)filename; -/// App documents -+ (NSString *)appDocumentsPathWithFolder:(NSString *)folderName filename:(NSString *)filename; - /// App support + (NSString *)appSupportFolder; + (NSString *)appSupportPathWithFolder:(NSString *)folderName filename:(NSString *)filename; diff --git a/ios/Artsy/View_Controllers/Util/ARFileUtils.m b/ios/Artsy/View_Controllers/Util/ARFileUtils.m index 1bfd309d771..9d66961f18b 100644 --- a/ios/Artsy/View_Controllers/Util/ARFileUtils.m +++ b/ios/Artsy/View_Controllers/Util/ARFileUtils.m @@ -17,40 +17,17 @@ + (void)initialize _appSupportDirectory = [[fm URLsForDirectory:NSApplicationSupportDirectory inDomains:NSUserDomainMask][0] relativePath]; } -+ (NSString *)userDocumentsFolder -{ - if (![User currentUser]) return nil; - return [_userDocumentsDirectory stringByAppendingPathComponent:[User currentUser].userID]; -} - + (NSString *)userDocumentsPathWithFile:(NSString *)filename { if (![User currentUser]) return nil; return [self pathWithFolder:_userDocumentsDirectory folderName:[User currentUser].userID filename:filename]; } -+ (NSString *)userDocumentsPathWithFolder:(NSString *)folderName filename:(NSString *)filename -{ - if (![User currentUser]) return nil; - folderName = [[User currentUser].userID stringByAppendingPathComponent:folderName]; - return [self pathWithFolder:_userDocumentsDirectory folderName:folderName filename:filename]; -} - -+ (NSString *)cachesFolder -{ - return _cachesDirectory; -} - + (NSString *)cachesPathWithFolder:(NSString *)folderName filename:(NSString *)filename { return [self pathWithFolder:_cachesDirectory folderName:folderName filename:filename]; } -+ (NSString *)appDocumentsPathWithFolder:(NSString *)folderName filename:(NSString *)filename -{ - return [self pathWithFolder:_userDocumentsDirectory folderName:folderName filename:filename]; -} - + (NSString *)appSupportFolder; { return [self pathWithFolder:_appSupportDirectory folderName:[[NSBundle mainBundle] bundleIdentifier] filename:nil]; diff --git a/ios/Artsy/View_Controllers/Util/ARNavigationController.m b/ios/Artsy/View_Controllers/Util/ARNavigationController.m index a66295ac2ab..b8239b3ed7e 100644 --- a/ios/Artsy/View_Controllers/Util/ARNavigationController.m +++ b/ios/Artsy/View_Controllers/Util/ARNavigationController.m @@ -19,12 +19,12 @@ #import "ARMacros.h" #import "UIDevice-Hardware.h" -#import +#import "ARButtonSubclasses.h" #import #import #import #import -#import +#import "ARComponentViewController.h" static void *ARNavigationControllerButtonStateContext = &ARNavigationControllerButtonStateContext; static void *ARNavigationControllerScrollingChiefContext = &ARNavigationControllerScrollingChiefContext; diff --git a/ios/Artsy/View_Controllers/Util/Errors/ARNetworkErrorManager.m b/ios/Artsy/View_Controllers/Util/Errors/ARNetworkErrorManager.m index 5ac383fc92f..ba8ab42e6d5 100644 --- a/ios/Artsy/View_Controllers/Util/Errors/ARNetworkErrorManager.m +++ b/ios/Artsy/View_Controllers/Util/Errors/ARNetworkErrorManager.m @@ -2,7 +2,6 @@ #import "ARCustomEigenLabels.h" #import "ARTNativeScreenPresenterModule.h" -#import #import #import diff --git a/ios/Artsy/View_Controllers/Util/Sharing/ARSharingController.m b/ios/Artsy/View_Controllers/Util/Sharing/ARSharingController.m index 06067221896..c01b964b66a 100644 --- a/ios/Artsy/View_Controllers/Util/Sharing/ARSharingController.m +++ b/ios/Artsy/View_Controllers/Util/Sharing/ARSharingController.m @@ -1,6 +1,6 @@ #import "ARSharingController.h" -#import +#import "AREmission.h" #import "ARAnalyticsConstants.h" #import "Artist.h" diff --git a/ios/Artsy/View_Controllers/Web_Browsing/ARAuctionWebViewController.m b/ios/Artsy/View_Controllers/Web_Browsing/ARAuctionWebViewController.m index 0d77eb029af..1b699107aa3 100644 --- a/ios/Artsy/View_Controllers/Web_Browsing/ARAuctionWebViewController.m +++ b/ios/Artsy/View_Controllers/Web_Browsing/ARAuctionWebViewController.m @@ -1,7 +1,7 @@ #import "ARLogger.h" #import "ARAuctionWebViewController.h" #import "ARAppConstants.h" -#import +#import "AREmission.h" #import #import "User.h" #import "Artwork.h" @@ -73,7 +73,7 @@ - (WKNavigationActionPolicy)shouldLoadNavigationAction:(WKNavigationAction *)nav return [super shouldLoadNavigationAction:navigationAction]; } -- (void)bidHasBeenConfirmed; +- (void)bidHasBeenConfirmed { NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; @@ -89,7 +89,7 @@ - (void)bidHasBeenConfirmed; [[AREmission sharedInstance] navigate:[NSString stringWithFormat:@"/artwork/%@", self.artworkID]]; } -- (void)artworkBidUpdated:(NSNotification *)notification; +- (void)artworkBidUpdated:(NSNotification *)notification { NSDictionary *info = notification.userInfo; if ([info[ARAuctionIDKey] isEqualToString:self.auctionID] && (self.artworkID == nil || [info[ARAuctionArtworkIDKey] isEqualToString:self.artworkID])) { @@ -99,7 +99,7 @@ - (void)artworkBidUpdated:(NSNotification *)notification; } } -- (void)registrationHasBeenConfirmed; +- (void)registrationHasBeenConfirmed { NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; diff --git a/ios/Artsy/View_Controllers/Web_Browsing/ARExternalWebBrowserViewController.m b/ios/Artsy/View_Controllers/Web_Browsing/ARExternalWebBrowserViewController.m index db45590ea7d..da8ca510693 100644 --- a/ios/Artsy/View_Controllers/Web_Browsing/ARExternalWebBrowserViewController.m +++ b/ios/Artsy/View_Controllers/Web_Browsing/ARExternalWebBrowserViewController.m @@ -9,7 +9,6 @@ #import "UIDevice-Hardware.h" #import -#import #import #import "ARDispatchManager.h" #import "ARTNativeScreenPresenterModule.h" @@ -17,7 +16,7 @@ #import "ARAppDelegate.h" #import -#import +#import "AREmission.h" @interface ARExternalWebBrowserViewController () @property (nonatomic, readonly, strong) UIGestureRecognizer *gesture; @@ -176,23 +175,6 @@ - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigati - (WKNavigationActionPolicy)shouldLoadNavigationAction:(WKNavigationAction *)navigationAction; { - // TODO: this is broken by the new force app shell anyway so I'm just commenting it out for now - // This method was used to intercept navigation requests and, in cases where we can show a native view, it would show that view by pushing - // it onto the current nav stack. - // Now that our code to decide whether to show a native view lives in TypeScript, we can't do that here. - // In the future we should either migrate to a react-native web view and figure it out there, or do some best-effort - // synchronous logic here. e.g. by handling well-known cases like Artwork, artist, etc. -// if (navigationAction.navigationType == WKNavigationTypeLinkActivated) { -// NSURL *URL = navigationAction.request.URL; -// ARSwitchBoard *switchboard = ARSwitchBoard.sharedInstance; -// if ([switchboard canRouteURL:URL]) { -// UIViewController *controller = [switchboard loadURL:URL]; -// if (controller) { -// [switchboard presentViewController:controller]; -// } -// return WKNavigationActionPolicyCancel; -// } -// } return WKNavigationActionPolicyAllow; } diff --git a/ios/Artsy/View_Controllers/Web_Browsing/ARInternalMobileWebViewController.m b/ios/Artsy/View_Controllers/Web_Browsing/ARInternalMobileWebViewController.m index 6314b0de47a..89757320fd1 100644 --- a/ios/Artsy/View_Controllers/Web_Browsing/ARInternalMobileWebViewController.m +++ b/ios/Artsy/View_Controllers/Web_Browsing/ARInternalMobileWebViewController.m @@ -6,7 +6,7 @@ #import "ARInternalShareValidator.h" #import "ARAppDelegate.h" #import "AROptions.h" -#import +#import "AREmission.h" static void *ARProgressContext = &ARProgressContext; diff --git a/ios/Artsy/Views/AuctionColors.swift b/ios/Artsy/Views/AuctionColors.swift index 50ee6ce3138..2020fe2cda0 100644 --- a/ios/Artsy/Views/AuctionColors.swift +++ b/ios/Artsy/Views/AuctionColors.swift @@ -1,9 +1,10 @@ import Foundation +import UIKit // TODO: Depending on how widespread these become (talk to Katarina) we may move them into our colors pod. extension UIColor { static func auctionGreen() -> UIColor { - return UIColor(hex: 0x16d047) + return UIColor(hex: 0x16d047) // using EDColor } static func auctionRed() -> UIColor { diff --git a/ios/Artsy/Views/Styled_Subclasses/Buttons/ARBidButton.h b/ios/Artsy/Views/Styled_Subclasses/Buttons/ARBidButton.h index 82d1ccf95aa..3a1d76f0365 100644 --- a/ios/Artsy/Views/Styled_Subclasses/Buttons/ARBidButton.h +++ b/ios/Artsy/Views/Styled_Subclasses/Buttons/ARBidButton.h @@ -1,16 +1,7 @@ -#import +#import "ARButtonSubclasses.h" #import "SaleArtwork.h" -extern NSString *const ARBidButtonRegisterStateTitle; -extern NSString *const ARBidButtonRegisteredStateTitle; -extern NSString *const ARBidBUttonBidStateTitle; -extern NSString *const ARBidButtonBiddingOpenStateTitle; -extern NSString *const ARBidButtonBiddingClosedStateTitle; -extern NSString *const ARBidButtonRegistionPendingStateTitle; -extern NSString *const ARBidButtonRegistionClosedStateTitle; - - typedef enum : NSUInteger { ARBidButtonIntentRegister, ARBidButtonIntentBid, diff --git a/ios/Artsy/Views/Styled_Subclasses/Buttons/ARBidButton.m b/ios/Artsy/Views/Styled_Subclasses/Buttons/ARBidButton.m index c4ba069b279..def4684697a 100644 --- a/ios/Artsy/Views/Styled_Subclasses/Buttons/ARBidButton.m +++ b/ios/Artsy/Views/Styled_Subclasses/Buttons/ARBidButton.m @@ -4,13 +4,13 @@ #import -NSString *const ARBidButtonRegisterStateTitle = @"REGISTER TO BID"; -NSString *const ARBidButtonRegisteredStateTitle = @"YOU ARE REGISTERED TO BID"; -NSString *const ARBidBUttonBidStateTitle = @"BID"; +NSString *const ARBidButtonRegisterStateTitle = @"Register to bid"; +NSString *const ARBidButtonRegisteredStateTitle = @"You are registered to bid"; +NSString *const ARBidBUttonBidStateTitle = @"Bid"; NSString *const ARBidButtonBiddingOpenStateTitle = ARBidBUttonBidStateTitle; -NSString *const ARBidButtonBiddingClosedStateTitle = @"BIDDING CLOSED"; -NSString *const ARBidButtonRegistionPendingStateTitle = @"REGISTRATION PENDING"; -NSString *const ARBidButtonRegistionClosedStateTitle = @"REGISTRATION CLOSED"; +NSString *const ARBidButtonBiddingClosedStateTitle = @"Bidding closed"; +NSString *const ARBidButtonRegistionPendingStateTitle = @"Registration pending"; +NSString *const ARBidButtonRegistionClosedStateTitle = @"Registration closed"; @implementation ARBidButton diff --git a/ios/Artsy/Views/Styled_Subclasses/StyledSubclasses.h b/ios/Artsy/Views/Styled_Subclasses/StyledSubclasses.h index 1e3a6e1fd3c..6fefc3c4d0c 100644 --- a/ios/Artsy/Views/Styled_Subclasses/StyledSubclasses.h +++ b/ios/Artsy/Views/Styled_Subclasses/StyledSubclasses.h @@ -1,4 +1,4 @@ -#import -#import +#import "Artsy+UILabels.h" +#import "ARButtonSubclasses.h" #import "ARSeparatorViews.h" #import "ARCustomEigenLabels.h" diff --git a/ios/Artsy/Views/Utilities/ARCustomEigenLabels.h b/ios/Artsy/Views/Utilities/ARCustomEigenLabels.h index 79dcec1eb48..783166e12ab 100644 --- a/ios/Artsy/Views/Utilities/ARCustomEigenLabels.h +++ b/ios/Artsy/Views/Utilities/ARCustomEigenLabels.h @@ -1,4 +1,4 @@ -#import +#import "Artsy+UILabels.h" NS_ASSUME_NONNULL_BEGIN diff --git a/ios/Artsy/Views/Utilities/AROfflineView.m b/ios/Artsy/Views/Utilities/AROfflineView.m index bcef8da33cd..778c6cd3ec7 100644 --- a/ios/Artsy/Views/Utilities/AROfflineView.m +++ b/ios/Artsy/Views/Utilities/AROfflineView.m @@ -4,7 +4,7 @@ #import "ORStackView+ArtsyViews.h" #import -#import +#import "ARButtonSubclasses.h" #import #import diff --git a/ios/Artsy/Views/Utilities/ARSeparatorViews.m b/ios/Artsy/Views/Utilities/ARSeparatorViews.m index 57ad7d81110..645ca463b05 100644 --- a/ios/Artsy/Views/Utilities/ARSeparatorViews.m +++ b/ios/Artsy/Views/Utilities/ARSeparatorViews.m @@ -1,7 +1,7 @@ #import "ARSeparatorViews.h" #import "ARFonts.h" -#import +#import "UIView+ARDrawing.h" #import @implementation ARSeparatorView diff --git a/ios/ArtsyTests/App_Tests/ARAppActivityContinuationDelegateTests.m b/ios/ArtsyTests/App_Tests/ARAppActivityContinuationDelegateTests.m index bf8e4822b92..7371e8f954b 100644 --- a/ios/ArtsyTests/App_Tests/ARAppActivityContinuationDelegateTests.m +++ b/ios/ArtsyTests/App_Tests/ARAppActivityContinuationDelegateTests.m @@ -3,7 +3,7 @@ #import "ARAppDelegate+Analytics.h" #import -#import +#import "AREmission.h" SpecBegin(ARAppActivityContinuationDelegate); diff --git a/ios/ArtsyTests/App_Tests/ARAppNotificationsDelegateTests.m b/ios/ArtsyTests/App_Tests/ARAppNotificationsDelegateTests.m index 9c7a3c2d15e..356e8a3cac3 100644 --- a/ios/ArtsyTests/App_Tests/ARAppNotificationsDelegateTests.m +++ b/ios/ArtsyTests/App_Tests/ARAppNotificationsDelegateTests.m @@ -3,7 +3,7 @@ #import "ARNotificationView.h" #import "ARSerifNavigationViewController.h" #import "UIApplicationStateEnum.h" -#import +#import "AREmission.h" #import static NSDictionary * diff --git a/ios/ArtsyTests/Extensions/ARTestImageCachingFunctions.swift b/ios/ArtsyTests/Extensions/ARTestImageCachingFunctions.swift index da8fc1a0dbb..4dcd389597f 100644 --- a/ios/ArtsyTests/Extensions/ARTestImageCachingFunctions.swift +++ b/ios/ArtsyTests/Extensions/ARTestImageCachingFunctions.swift @@ -1,6 +1,6 @@ import UIKit -func cacheColoredImageForURL(_ url: URL?, color: UIColor = UIColor.debugColourPurple()) { +func cacheColoredImageForURL(_ url: URL?, color: UIColor = UIColor.artsyPurpleRegular()) { precondition(url != nil) let image = UIImage(from: color, with: CGSize(width: 500, height: 500)) diff --git a/ios/ArtsyTests/Networking_Tests/API_Modules/ArtsyAPI+PrivateTests.m b/ios/ArtsyTests/Networking_Tests/API_Modules/ArtsyAPI+PrivateTests.m index 9479e7c6400..adc19db08a9 100644 --- a/ios/ArtsyTests/Networking_Tests/API_Modules/ArtsyAPI+PrivateTests.m +++ b/ios/ArtsyTests/Networking_Tests/API_Modules/ArtsyAPI+PrivateTests.m @@ -4,7 +4,7 @@ #import "MutableNSURLResponse.h" #import "AFHTTPRequestOperation+JSON.h" -#import +#import "AREmission.h" @interface ArtsyAPI (TestsPrivate) + (ArtsyAPI *)sharedAPI; diff --git a/ios/ArtsyTests/Networking_Tests/ARSystemTimeTests.m b/ios/ArtsyTests/Networking_Tests/ARSystemTimeTests.m deleted file mode 100644 index f58d9c712cb..00000000000 --- a/ios/ArtsyTests/Networking_Tests/ARSystemTimeTests.m +++ /dev/null @@ -1,66 +0,0 @@ -#import "ArtsyAPI.h" -#import "ARSystemTime.h" -#import "ARNetworkConstants.h" - -SpecBegin(ARSystemTimeTests); - -beforeEach(^{ - [ARSystemTime reset]; - [OHHTTPStubs stubJSONResponseAtPath:ARSystemTimeURL withResponse:@{ - @"time": @"2422-03-24T13:29:34Z", - @"day": @(24), - @"wday": @(4), - @"month": @(3), - @"year": @(2422), - @"hour": @(13), - @"min": @(29), - @"sec": @(34), - @"dst": @(NO), - @"unix": @(1395926974), - @"utc_offset": @(0), - @"zone": @"UTC", - @"iso8601": @"2422-03-24T13:29:34Z" - }]; -}); - -afterEach(^{ - [OHHTTPStubs removeAllStubs]; - [ARSystemTime reset]; -}); - -describe(@"not in sync", ^{ - it(@"returns NO", ^{ - expect(ARSystemTime.inSync).to.beFalsy(); - }); - - it(@"returns current date/time", ^{ - NSInteger currentYear = [[NSCalendar currentCalendar] components:NSCalendarUnitYear fromDate:[NSDate date]].year; - expect([[NSCalendar currentCalendar] components:NSCalendarUnitYear fromDate:[ARSystemTime date]].year).to.equal(currentYear); - }); -}); - -describe(@"in sync", ^{ - beforeEach(^{ - [ARSystemTime sync]; - }); - - it(@"returns YES", ^{ - expect(ARSystemTime.inSync).will.beTruthy(); - }); - - it(@"returns a date time in the future", ^{ - // the delta between now and 2422 will put [ARSystemTime date] into the future - NSInteger currentYear = [[NSCalendar currentCalendar] components:NSCalendarUnitYear fromDate:[NSDate date]].year; - expect([[NSCalendar currentCalendar] components:NSCalendarUnitYear fromDate:[ARSystemTime date]].year).will.beGreaterThan(currentYear); - }); - - it(@"returns a new date every time", ^{ - [ARSystemTime sync]; - NSDate *now = [ARSystemTime date]; - // eventually the new time will be ahead of the previous one - expect(now).will.beLessThan([ARSystemTime date]); - }); -}); - - -SpecEnd; diff --git a/ios/ArtsyTests/ReferenceImages/ARCustomEigenLabelsSpec/ARWarningView_looks_correct@3x.png b/ios/ArtsyTests/ReferenceImages/ARCustomEigenLabelsSpec/ARWarningView_looks_correct@3x.png index 2f2e308a0f3..0d110d913b0 100644 Binary files a/ios/ArtsyTests/ReferenceImages/ARCustomEigenLabelsSpec/ARWarningView_looks_correct@3x.png and b/ios/ArtsyTests/ReferenceImages/ARCustomEigenLabelsSpec/ARWarningView_looks_correct@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/ARNavigationButton_default_border_really_long_title_and_subtitle@3x.png b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/ARNavigationButton_default_border_really_long_title_and_subtitle@3x.png index 3ba4a00beac..8ce2bb36aad 100644 Binary files a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/ARNavigationButton_default_border_really_long_title_and_subtitle@3x.png and b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/ARNavigationButton_default_border_really_long_title_and_subtitle@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/ARSerifNavigationButton_really_long_title_and_subtitle@3x.png b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/ARSerifNavigationButton_really_long_title_and_subtitle@3x.png index 139a2aee2ee..68f9118a849 100644 Binary files a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/ARSerifNavigationButton_really_long_title_and_subtitle@3x.png and b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/ARSerifNavigationButton_really_long_title_and_subtitle@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitle@3x.png b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitle@3x.png index cd4de0e8aa4..fd4382d1546 100644 Binary files a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitle@3x.png and b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitle@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAnd5pxBorder@3x.png b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAnd5pxBorder@3x.png index c4520c186e9..6f93c85131a 100644 Binary files a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAnd5pxBorder@3x.png and b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAnd5pxBorder@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAndNoBorder@3x.png b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAndNoBorder@3x.png index d702d63b702..e10e954b2bd 100644 Binary files a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAndNoBorder@3x.png and b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAndNoBorder@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAndSubtitle@3x.png b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAndSubtitle@3x.png index 99f7f238c7e..82ba6998afc 100644 Binary files a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAndSubtitle@3x.png and b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAndSubtitle@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAndSubtitleAnd5pxBorder@3x.png b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAndSubtitleAnd5pxBorder@3x.png index a543b42a2e4..f7829a1d893 100644 Binary files a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAndSubtitleAnd5pxBorder@3x.png and b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAndSubtitleAnd5pxBorder@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAndSubtitleAndNoBorder@3x.png b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAndSubtitleAndNoBorder@3x.png index 105f27cff14..984e3f4afee 100644 Binary files a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAndSubtitleAndNoBorder@3x.png and b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/navigationButtonWithTitleAndSubtitleAndNoBorder@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/serifNavigationButtonWithTitle@3x.png b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/serifNavigationButtonWithTitle@3x.png index cef0e0e545c..11ddf0bdbd7 100644 Binary files a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/serifNavigationButtonWithTitle@3x.png and b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/serifNavigationButtonWithTitle@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/serifNavigationButtonWithTitleAndSubtitle@3x.png b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/serifNavigationButtonWithTitleAndSubtitle@3x.png index 3f5de16e2e7..3c4eed891a9 100644 Binary files a/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/serifNavigationButtonWithTitleAndSubtitle@3x.png and b/ios/ArtsyTests/ReferenceImages/ARNavigationButtonSpecSpec/serifNavigationButtonWithTitleAndSubtitle@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/ARSerifNavigationViewControllerSpec/_handles_the_back_button_correctly@3x.png b/ios/ArtsyTests/ReferenceImages/ARSerifNavigationViewControllerSpec/_handles_the_back_button_correctly@3x.png index a7c2bdb12f6..c8354523f8a 100644 Binary files a/ios/ArtsyTests/ReferenceImages/ARSerifNavigationViewControllerSpec/_handles_the_back_button_correctly@3x.png and b/ios/ArtsyTests/ReferenceImages/ARSerifNavigationViewControllerSpec/_handles_the_back_button_correctly@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/ARTextViewSpec/with_HTML_looks_right_with_multiple_paragraphs@3x.png b/ios/ArtsyTests/ReferenceImages/ARTextViewSpec/with_HTML_looks_right_with_multiple_paragraphs@3x.png index 9df1b724c73..df8c79447ff 100644 Binary files a/ios/ArtsyTests/ReferenceImages/ARTextViewSpec/with_HTML_looks_right_with_multiple_paragraphs@3x.png and b/ios/ArtsyTests/ReferenceImages/ARTextViewSpec/with_HTML_looks_right_with_multiple_paragraphs@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/AuctionInformationViewControllerTests/a_closed_sale__shows_the_sale_is_closed@3x.png b/ios/ArtsyTests/ReferenceImages/AuctionInformationViewControllerTests/a_closed_sale__shows_the_sale_is_closed@3x.png index 12733d43d44..c3d0ee23531 100644 Binary files a/ios/ArtsyTests/ReferenceImages/AuctionInformationViewControllerTests/a_closed_sale__shows_the_sale_is_closed@3x.png and b/ios/ArtsyTests/ReferenceImages/AuctionInformationViewControllerTests/a_closed_sale__shows_the_sale_is_closed@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/AuctionLotMetadataStackScrollViewTests/looks_as_expected_when_small@3x.png b/ios/ArtsyTests/ReferenceImages/AuctionLotMetadataStackScrollViewTests/looks_as_expected_when_small@3x.png index 96e4dec52a0..872a90786f0 100644 Binary files a/ios/ArtsyTests/ReferenceImages/AuctionLotMetadataStackScrollViewTests/looks_as_expected_when_small@3x.png and b/ios/ArtsyTests/ReferenceImages/AuctionLotMetadataStackScrollViewTests/looks_as_expected_when_small@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/AuctionLotMetadataStackScrollViewTests/looks_right_when_expanded@3x.png b/ios/ArtsyTests/ReferenceImages/AuctionLotMetadataStackScrollViewTests/looks_right_when_expanded@3x.png index e2870cbb795..ab94b7697c9 100644 Binary files a/ios/ArtsyTests/ReferenceImages/AuctionLotMetadataStackScrollViewTests/looks_right_when_expanded@3x.png and b/ios/ArtsyTests/ReferenceImages/AuctionLotMetadataStackScrollViewTests/looks_right_when_expanded@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/handles_getting_outbid_with_lot_state_changes_before_animation_completes@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/handles_getting_outbid_with_lot_state_changes_before_animation_completes@3x.png index 88a6e484811..7c405e4b853 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/handles_getting_outbid_with_lot_state_changes_before_animation_completes@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/handles_getting_outbid_with_lot_state_changes_before_animation_completes@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_biddable@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_biddable@3x.png index 6e7c5d4e7ef..1dd861a2daa 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_biddable@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_biddable@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_closed@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_closed@3x.png index 88a6e484811..7c405e4b853 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_closed@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_closed@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_failed@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_failed@3x.png index da673a41d49..f674e771fc4 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_failed@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_failed@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_highest_bidder__and_can_re_bid@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_highest_bidder__and_can_re_bid@3x.png index 51cb2bf7a3e..cbab0c43d35 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_highest_bidder__and_can_re_bid@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_highest_bidder__and_can_re_bid@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_max_bidder@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_max_bidder@3x.png index a15568bb81f..165497441d4 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_max_bidder@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_max_bidder@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_not_max_bidder@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_not_max_bidder@3x.png index bc170fbb2f8..49a4bdef156 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_not_max_bidder@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_not_max_bidder@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_passed@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_passed@3x.png index fd39b49bf96..c0afae9a24c 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_passed@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_passed@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_registration_closed@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_registration_closed@3x.png index 49f2628aebd..5e6142995be 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_registration_closed@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_registration_closed@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_registration_pending@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_registration_pending@3x.png index 1e3d4b860d1..5f4a25602a1 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_registration_pending@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_registration_pending@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_registration_required@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_registration_required@3x.png index cd0aa4ec19a..6e16de55105 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_registration_required@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_registration_required@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_sold@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_sold@3x.png index 88a6e484811..7c405e4b853 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_sold@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_sold@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_upcoming@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_upcoming@3x.png index 0f735c90c7c..e7b5af5e8c2 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_upcoming@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_upcoming@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_waiting@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_waiting@3x.png index a456716b117..a7e086ab7e0 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_waiting@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_waiting@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_waiting_on_auctioneer_confirmation@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_waiting_on_auctioneer_confirmation@3x.png index e4d71dfaf28..9934e8df357 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_waiting_on_auctioneer_confirmation@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionBidButtonTests/has_valid_snapshot_waiting_on_auctioneer_confirmation@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/looks_good_compact@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/looks_good_compact@3x.png index 7962038d211..65628a71c44 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/looks_good_compact@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/looks_good_compact@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_by_default@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_by_default@3x.png index 13c5a6f523c..c55fa1dc047 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_by_default@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_by_default@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_when_scrolled_back_a_bit@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_when_scrolled_back_a_bit@3x.png index 0582a111a8f..f61b89a3230 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_when_scrolled_back_a_bit@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_when_scrolled_back_a_bit@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_when_scrolled_back_a_lot@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_when_scrolled_back_a_lot@3x.png index 7d3d38fb6b7..4f461187a36 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_when_scrolled_back_a_lot@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_when_scrolled_back_a_lot@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_when_scrolled_forward_a_bit@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_when_scrolled_forward_a_bit@3x.png index c7d2605cd61..6ab4c377f8a 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_when_scrolled_forward_a_bit@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_when_scrolled_forward_a_bit@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_when_scrolled_forward_a_lot@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_when_scrolled_forward_a_lot@3x.png index 319f1bd8c47..5ff69465b25 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_when_scrolled_forward_a_lot@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionFancyLotCollectionViewLayoutTests/normal_size__looks_good_when_scrolled_forward_a_lot@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLoadingViewSpec/looks_good_by_default@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLoadingViewSpec/looks_good_by_default@3x.png index c5a9af7f188..5e937ac8ba4 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLoadingViewSpec/looks_good_by_default@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLoadingViewSpec/looks_good_by_default@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotListViewControllerTests/looks_good_by_default@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotListViewControllerTests/looks_good_by_default@3x.png index f2aeeaed285..919cebc9164 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotListViewControllerTests/looks_good_by_default@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotListViewControllerTests/looks_good_by_default@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotListViewControllerTests/shows_the_selected_lot@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotListViewControllerTests/shows_the_selected_lot@3x.png index f2aeeaed285..919cebc9164 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotListViewControllerTests/shows_the_selected_lot@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotListViewControllerTests/shows_the_selected_lot@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotSetViewControllerTests/compact_horizontal_size_class__live_auctions_lot_set__looks_good_by_default@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotSetViewControllerTests/compact_horizontal_size_class__live_auctions_lot_set__looks_good_by_default@3x.png index 0fad7e26c21..098f8b417e5 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotSetViewControllerTests/compact_horizontal_size_class__live_auctions_lot_set__looks_good_by_default@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotSetViewControllerTests/compact_horizontal_size_class__live_auctions_lot_set__looks_good_by_default@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotSetViewControllerTests/really_compact_horizontal_size_class__live_auctions_lot_set__looks_good_by_default@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotSetViewControllerTests/really_compact_horizontal_size_class__live_auctions_lot_set__looks_good_by_default@3x.png index 713c28a1394..e1d78ec2f9b 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotSetViewControllerTests/really_compact_horizontal_size_class__live_auctions_lot_set__looks_good_by_default@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotSetViewControllerTests/really_compact_horizontal_size_class__live_auctions_lot_set__looks_good_by_default@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotSetViewControllerTests/regular_horizontal_size_class___live_auctions_lot_set__looks_good_by_default@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotSetViewControllerTests/regular_horizontal_size_class___live_auctions_lot_set__looks_good_by_default@3x.png index 73742794646..ea27a9ee806 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotSetViewControllerTests/regular_horizontal_size_class___live_auctions_lot_set__looks_good_by_default@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotSetViewControllerTests/regular_horizontal_size_class___live_auctions_lot_set__looks_good_by_default@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__doesnt_show_a_live_auction_call_to_action_when_auction_is_closed@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__doesnt_show_a_live_auction_call_to_action_when_auction_is_closed@3x.png index 5a99d2c43a9..e01a7e9ffef 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__doesnt_show_a_live_auction_call_to_action_when_auction_is_closed@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__doesnt_show_a_live_auction_call_to_action_when_auction_is_closed@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__handles_updates_to_number_of_bids@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__handles_updates_to_number_of_bids@3x.png index 9b7a5d929a9..632f7c395a9 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__handles_updates_to_number_of_bids@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__handles_updates_to_number_of_bids@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_live_lots@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_live_lots@3x.png index 71a65fcf472..c8e9e0b8a69 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_live_lots@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_live_lots@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_lots_with_a__not_yet_met__reserve@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_lots_with_a__not_yet_met__reserve@3x.png index ab7d8023a2c..e4bdb873709 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_lots_with_a__not_yet_met__reserve@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_lots_with_a__not_yet_met__reserve@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_lots_with_a_met_reserve@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_lots_with_a_met_reserve@3x.png index 299a4cea7cd..bf2200170ce 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_lots_with_a_met_reserve@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_lots_with_a_met_reserve@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_out_of_order_lots@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_out_of_order_lots@3x.png index 9b7a5d929a9..632f7c395a9 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_out_of_order_lots@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_out_of_order_lots@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_passed_lots@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_passed_lots@3x.png index 62085bfcd76..2d0cfab09ee 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_passed_lots@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_passed_lots@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_sold_lots@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_sold_lots@3x.png index 5a99d2c43a9..e01a7e9ffef 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_sold_lots@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_sold_lots@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_upcoming_lots@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_upcoming_lots@3x.png index 8a6fba17508..bdf9b3edf62 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_upcoming_lots@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_upcoming_lots@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_upcoming_lots_that_the_user_is_winning@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_upcoming_lots_that_the_user_is_winning@3x.png index 174466916d8..dc31e8da59a 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_upcoming_lots_that_the_user_is_winning@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_upcoming_lots_that_the_user_is_winning@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_won_lots@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_won_lots@3x.png index 8976d96cebf..be4e73eac86 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_won_lots@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_for_won_lots@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_when_its_lot_becomes_the_current_lot@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_when_its_lot_becomes_the_current_lot@3x.png index 71a65fcf472..c8e9e0b8a69 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_when_its_lot_becomes_the_current_lot@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionLotViewControllerTests/snapshots__looks_good_when_its_lot_becomes_the_current_lot@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/handles_splitting_in_an_iPad@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/handles_splitting_in_an_iPad@3x.png index 95b09ff1f88..7e5ffb36562 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/handles_splitting_in_an_iPad@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/handles_splitting_in_an_iPad@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/looks_good_by_default@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/looks_good_by_default@3x.png index fe4f3aadbe1..18f42b986ce 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/looks_good_by_default@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/looks_good_by_default@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_a_removes_disconnected_screen_when_socket_reconnects@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_a_removes_disconnected_screen_when_socket_reconnects@3x.png index fe4f3aadbe1..5e1857d0482 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_a_removes_disconnected_screen_when_socket_reconnects@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_a_removes_disconnected_screen_when_socket_reconnects@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_a_socket_disconnect_screen_when_socket_fails@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_a_socket_disconnect_screen_when_socket_fails@3x.png index 40f99984544..b1aafcd883a 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_a_socket_disconnect_screen_when_socket_fails@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_a_socket_disconnect_screen_when_socket_fails@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_an_error_screen_when_static_data_fails@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_an_error_screen_when_static_data_fails@3x.png index 46ea06b8d3d..d702b5b7a71 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_an_error_screen_when_static_data_fails@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_an_error_screen_when_static_data_fails@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_an_operator_disconnect_screen_when_operator_disconnects@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_an_operator_disconnect_screen_when_operator_disconnects@3x.png index 40f99984544..b1aafcd883a 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_an_operator_disconnect_screen_when_operator_disconnects@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_an_operator_disconnect_screen_when_operator_disconnects@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_an_operator_disconnected_screen_when_operator_reconnects@3x.png b/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_an_operator_disconnected_screen_when_operator_reconnects@3x.png index fe4f3aadbe1..5e1857d0482 100644 Binary files a/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_an_operator_disconnected_screen_when_operator_reconnects@3x.png and b/ios/ArtsyTests/ReferenceImages/LiveAuctionViewControllerTests/shows_an_operator_disconnected_screen_when_operator_reconnects@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/SaleOnHoldOverlayViewTests/looks_right_by_default_on_iPad@3x.png b/ios/ArtsyTests/ReferenceImages/SaleOnHoldOverlayViewTests/looks_right_by_default_on_iPad@3x.png index 40fc62a7282..3b8360746e7 100644 Binary files a/ios/ArtsyTests/ReferenceImages/SaleOnHoldOverlayViewTests/looks_right_by_default_on_iPad@3x.png and b/ios/ArtsyTests/ReferenceImages/SaleOnHoldOverlayViewTests/looks_right_by_default_on_iPad@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/SaleOnHoldOverlayViewTests/looks_right_by_default_on_iPhone@3x.png b/ios/ArtsyTests/ReferenceImages/SaleOnHoldOverlayViewTests/looks_right_by_default_on_iPhone@3x.png index afe8b5cbeb3..0f7cc24d9db 100644 Binary files a/ios/ArtsyTests/ReferenceImages/SaleOnHoldOverlayViewTests/looks_right_by_default_on_iPhone@3x.png and b/ios/ArtsyTests/ReferenceImages/SaleOnHoldOverlayViewTests/looks_right_by_default_on_iPhone@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/SaleOnHoldOverlayViewTests/looks_right_with_a_custom_message_on_iPad@3x.png b/ios/ArtsyTests/ReferenceImages/SaleOnHoldOverlayViewTests/looks_right_with_a_custom_message_on_iPad@3x.png index b01836f0db5..548cc4cda6f 100644 Binary files a/ios/ArtsyTests/ReferenceImages/SaleOnHoldOverlayViewTests/looks_right_with_a_custom_message_on_iPad@3x.png and b/ios/ArtsyTests/ReferenceImages/SaleOnHoldOverlayViewTests/looks_right_with_a_custom_message_on_iPad@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/SaleOnHoldOverlayViewTests/looks_right_with_a_custom_message_on_iPhone@3x.png b/ios/ArtsyTests/ReferenceImages/SaleOnHoldOverlayViewTests/looks_right_with_a_custom_message_on_iPhone@3x.png index 1e3bd1da40b..75d0dd4c558 100644 Binary files a/ios/ArtsyTests/ReferenceImages/SaleOnHoldOverlayViewTests/looks_right_with_a_custom_message_on_iPhone@3x.png and b/ios/ArtsyTests/ReferenceImages/SaleOnHoldOverlayViewTests/looks_right_with_a_custom_message_on_iPhone@3x.png differ diff --git a/ios/ArtsyTests/ReferenceImages/TextStackTests/looks_like_the_API_spec@3x.png b/ios/ArtsyTests/ReferenceImages/TextStackTests/looks_like_the_API_spec@3x.png index 4a734b3851e..149efcd305b 100644 Binary files a/ios/ArtsyTests/ReferenceImages/TextStackTests/looks_like_the_API_spec@3x.png and b/ios/ArtsyTests/ReferenceImages/TextStackTests/looks_like_the_API_spec@3x.png differ diff --git a/ios/ArtsyTests/Supporting_Files/ARTestHelper.h b/ios/ArtsyTests/Supporting_Files/ARTestHelper.h index 107dbc1f89b..36174881dab 100644 --- a/ios/ArtsyTests/Supporting_Files/ARTestHelper.h +++ b/ios/ArtsyTests/Supporting_Files/ARTestHelper.h @@ -4,8 +4,3 @@ @interface ARTestHelper : NSObject @property (strong, nonatomic) UIWindow *window; @end - - -@interface ARTestViewHostingWindow : UIWindow -+ (void)hostView:(UIView *)view; -@end diff --git a/ios/ArtsyTests/Supporting_Files/ARTestHelper.m b/ios/ArtsyTests/Supporting_Files/ARTestHelper.m index 0fe679c9dba..1be5b33d8b6 100644 --- a/ios/ArtsyTests/Supporting_Files/ARTestHelper.m +++ b/ios/ArtsyTests/Supporting_Files/ARTestHelper.m @@ -7,7 +7,7 @@ #import #import #import "ARFonts.h" -#import +#import "AREmission.h" @implementation ARTestHelper @@ -16,8 +16,8 @@ - (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions: { NSOperatingSystemVersion version = [NSProcessInfo processInfo].operatingSystemVersion; - NSAssert(version.majorVersion == 15 && version.minorVersion == 2, - @"The tests should be run on iOS 15.2, not %ld.%ld", version.majorVersion, version.minorVersion); + NSAssert(version.majorVersion == 15 && version.minorVersion == 5, + @"The tests should be run on iOS 15.5, not %ld.%ld", version.majorVersion, version.minorVersion); CGSize nativeResolution = [UIScreen mainScreen].nativeBounds.size; NSAssert([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone && CGSizeEqualToSize(nativeResolution, CGSizeMake(1170, 2532)), @@ -35,20 +35,17 @@ - (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions: // Occasionally we get font issues in snapshots, this _potentially_ // could be a fix for this. - __unused UIFont *font = [UIFont serifBoldItalicFontWithSize:12]; - font = [UIFont serifBoldFontWithSize:12]; - font = [UIFont serifSemiBoldFontWithSize:12]; + __unused UIFont *font = [UIFont serifSemiBoldFontWithSize:12]; font = [UIFont serifFontWithSize:12]; font = [UIFont serifItalicFontWithSize:12]; font = [UIFont sansSerifFontWithSize:12]; - font = [UIFont smallCapsSerifFontWithSize:12]; // Ensure that the image cache is just set up for testing SDImageCache *imageCache = [[SDImageCache alloc] initWithNamespace:@"Testing" diskCacheDirectory:NSTemporaryDirectory()]; [[SDWebImageManager sharedManager] setValue:imageCache forKey:@"_imageCache"]; // You might need to run `yarn bundle:ios` or `yarn bundle-for-native-ci:ios` to generate the jsbundle needed for emission - AREmission *emission = [[AREmission alloc] initWithState:@{} packagerURL:nil]; + AREmission *emission = [[AREmission alloc] initWithState:@{}]; [AREmission setSharedInstance:emission]; [AREmission.sharedInstance.notificationsManagerModule updateReactState:@{ @"gravityURL": @"https://stagingapi.artsy.net", @@ -69,66 +66,3 @@ - (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions: } @end - -#pragma mark - ARTestViewHostingWindow - -#import -#import -#import -#import - - -@implementation ARTestViewHostingWindow - -static UIWindow *_hostingWindow = nil; - -+ (void)hostView:(UIView *)view; -{ - NSAssert([NSThread isMainThread], @"Should be ran on the main thread."); - - UIView *previousSuperview = view.superview; - UIWindow *previousKeyWindow = [[UIApplication sharedApplication] keyWindow]; - - UIViewController *viewController = [UIViewController new]; - viewController.view.frame = [[UIScreen mainScreen] bounds]; - viewController.view.backgroundColor = [UIColor redColor]; - [viewController.view addSubview:view]; - - _hostingWindow = [self new]; - _hostingWindow.rootViewController = viewController; - [_hostingWindow makeKeyAndVisible]; - - [self loadReveal]; - - [ORKeyboardReactingApplication registerForCallbackOnKeyDown:ORSpaceKey:^{ - NSAssert([[[UIApplication sharedApplication] keyWindow] isKindOfClass:[ARTestViewHostingWindow class]], - @"Current key window is not a ARTestViewHostingWindow"); - _hostingWindow = nil; - }]; - - while (_hostingWindow != nil) { - CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.25, false); - } - - [view removeFromSuperview]; - [previousSuperview addSubview:view]; - [previousKeyWindow makeKeyAndVisible]; -} - -+ (void)loadReveal; -{ - if (objc_getClass("IBARevealServer") == nil) { - const char *revealPath = "/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib"; - if (access(revealPath, R_OK) != 0) { - NSLog(@"[!] Unable to find the Reveal.app library at: %s", revealPath); - return; - } - if (dlopen(revealPath, RTLD_NOW) == NULL) { - NSLog(@"[!] Unable to load the Reveal.app library at: %s", revealPath); - return; - } - } - [[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil]; -} - -@end diff --git a/ios/ArtsyTests/Supporting_Files/Artsy-Tests-Bridging-Header.h b/ios/ArtsyTests/Supporting_Files/Artsy-Tests-Bridging-Header.h index 51b9da306c7..5624e037efc 100644 --- a/ios/ArtsyTests/Supporting_Files/Artsy-Tests-Bridging-Header.h +++ b/ios/ArtsyTests/Supporting_Files/Artsy-Tests-Bridging-Header.h @@ -14,4 +14,3 @@ #import #import #import -#import diff --git a/ios/ArtsyTests/Supporting_Files/Artsy_Tests-Prefix.pch b/ios/ArtsyTests/Supporting_Files/Artsy_Tests-Prefix.pch index 1e89c3cd1c8..b73300b0630 100644 --- a/ios/ArtsyTests/Supporting_Files/Artsy_Tests-Prefix.pch +++ b/ios/ArtsyTests/Supporting_Files/Artsy_Tests-Prefix.pch @@ -22,9 +22,6 @@ #import #import - // Needed to "see" Swift files in the unit test target. -// #import "Artsy-Swift.h" - #import "ArtsyAPI.h" #import "ArtsyAPI+CurrentUserFunctions.h" #import "ArtsyAPI+DeviceTokens.h" diff --git a/ios/ArtsyTests/View_Controller_Tests/Components/ARSerifNavigationViewControllerSpec.m b/ios/ArtsyTests/View_Controller_Tests/Components/ARSerifNavigationViewControllerSpec.m index 2615359dc79..caba32e9826 100644 --- a/ios/ArtsyTests/View_Controller_Tests/Components/ARSerifNavigationViewControllerSpec.m +++ b/ios/ArtsyTests/View_Controller_Tests/Components/ARSerifNavigationViewControllerSpec.m @@ -1,6 +1,5 @@ #import "ARSerifNavigationViewController.h" -#import -#import +#import "UIColor+ArtsyColors.h" @interface ARSerifNavigationViewController () @@ -71,7 +70,7 @@ @interface ARSerifTestNavigationController: UIViewController insideVC.title = @"Title"; UIViewController *secondVC = [[UIViewController alloc] init]; - secondVC.view.backgroundColor = [UIColor debugColourBlue]; + secondVC.view.backgroundColor = [UIColor blueColor]; secondVC.title = @"Title3"; subject = [[ARSerifNavigationViewController alloc] initWithRootViewController:insideVC]; diff --git a/ios/ArtsyTests/View_Controller_Tests/Live_Auction/LiveAuctionViewControllerTests.swift b/ios/ArtsyTests/View_Controller_Tests/Live_Auction/LiveAuctionViewControllerTests.swift index c1b0426f34a..26dbd0b88f6 100644 --- a/ios/ArtsyTests/View_Controller_Tests/Live_Auction/LiveAuctionViewControllerTests.swift +++ b/ios/ArtsyTests/View_Controller_Tests/Live_Auction/LiveAuctionViewControllerTests.swift @@ -78,6 +78,8 @@ class LiveAuctionViewControllerTests: QuickSpec { } it("shows a socket disconnect screen when socket fails") { + setNimbleTolerance(0.3) // looser tolerance, because of https://artsy.slack.com/archives/C02NAJ2CGLW/p1655913103639929 + setupViewControllerForPhone(true) fakeSalesPerson.socketConnectionSignal.update(false) @@ -96,6 +98,8 @@ class LiveAuctionViewControllerTests: QuickSpec { } it("shows an operator disconnect screen when operator disconnects") { + setNimbleTolerance(0.3) // looser tolerance, because of https://artsy.slack.com/archives/C02NAJ2CGLW/p1655913103639929 + setupViewControllerForPhone(true) fakeSalesPerson.operatorConnectedSignal.update(false) diff --git a/ios/ArtsyTests/View_Controller_Tests/Util/ARFileUtilsTests.m b/ios/ArtsyTests/View_Controller_Tests/Util/ARFileUtilsTests.m index 92dfbeec6e0..feffb6ebb12 100644 --- a/ios/ArtsyTests/View_Controller_Tests/Util/ARFileUtilsTests.m +++ b/ios/ArtsyTests/View_Controller_Tests/Util/ARFileUtilsTests.m @@ -4,33 +4,13 @@ SpecBegin(ARFileUtilsTests); -describe(@"caches", ^{ - it(@"cachesFolder", ^{ - expect([[ARFileUtils cachesFolder] hasSuffix:@"/Caches"]).to.beTruthy(); - }); - - it(@"cachesFolder creates a folder", ^{ - NSString *uuid = [[NSUUID UUID] UUIDString]; - NSString *uuidPath = [ARFileUtils cachesPathWithFolder:uuid filename:@"test.filename"]; - NSString *uuidFolder = NSStringWithFormat(@"%@/%@", [ARFileUtils cachesFolder], uuid); - // path has been created - expect([[NSFileManager defaultManager] fileExistsAtPath:uuidFolder]).to.beTruthy(); - // file doesn't exist - expect([[NSFileManager defaultManager] fileExistsAtPath:uuidPath]).to.beFalsy(); - [[NSFileManager defaultManager] removeItemAtPath:uuidFolder error:nil]; - }); -}); - - describe(@"logged out user documents folder", ^{ beforeEach(^{ [ARUserManager clearUserData]; }); it(@"userDocumentsFolder", ^{ - expect([ARFileUtils userDocumentsFolder]).to.beNil(); expect([ARFileUtils userDocumentsPathWithFile:@"folder"]).to.beNil(); - expect([ARFileUtils userDocumentsPathWithFolder:@"folder" filename:@"filename"]).to.beNil(); }); }); @@ -40,25 +20,11 @@ XCTAssert([User currentUser] != nil, @"Current user is nil even after stubbing. "); }); - afterEach(^{ - [[NSFileManager defaultManager] removeItemAtPath:[ARFileUtils userDocumentsFolder] error:nil]; - }); - - it(@"userDocumentsFolder", ^{ - expect([[ARFileUtils userDocumentsFolder] hasSuffix:NSStringWithFormat(@"/Documents/%@", [User currentUser].userID)]).to.beTruthy(); - }); - it(@"userDocumentsFilename", ^{ NSString *uuid = [[NSUUID UUID] UUIDString]; NSString *uuidFilePath = [ARFileUtils userDocumentsPathWithFile:uuid]; expect([uuidFilePath hasSuffix:NSStringWithFormat(@"/Documents/%@/%@", [User currentUser].userID, uuid)]).to.beTruthy(); }); - - it(@"userDocumentsFolderFilename", ^{ - NSString *uuid = [[NSUUID UUID] UUIDString]; - NSString *uuidPath = [ARFileUtils userDocumentsPathWithFolder:uuid filename:@"filename"]; - expect([uuidPath hasSuffix:NSStringWithFormat(@"/Documents/%@/%@/filename", [User currentUser].userID, uuid)]).to.beTruthy(); - }); }); pending(@"application support", ^{ diff --git a/ios/ArtsyTests/View_Controller_Tests/Web_Browsing/ARExternalWebBrowserViewControllerTests.m b/ios/ArtsyTests/View_Controller_Tests/Web_Browsing/ARExternalWebBrowserViewControllerTests.m index 407e5266421..d25471d35e8 100644 --- a/ios/ArtsyTests/View_Controller_Tests/Web_Browsing/ARExternalWebBrowserViewControllerTests.m +++ b/ios/ArtsyTests/View_Controller_Tests/Web_Browsing/ARExternalWebBrowserViewControllerTests.m @@ -55,23 +55,4 @@ expect([vc shouldLoadNavigationResponse: (id)mock]).to.equal(WKNavigationResponsePolicyAllow); }); -// TODO: figure out how to test that it calls openURLInExternalService now that it's a local method -//it(@"handles showing an alert punting a user to safari if we can't show something in a webview", ^{ -// OCMockObject *mock = [OCMockObject niceMockForClass:WKNavigationResponse.class]; -// -// NSURL *urlToRoute = [NSURL URLWithString:@"https://url.com/thing.pdf"]; -// NSHTTPURLResponse *fakedResponse = [[NSHTTPURLResponse alloc] initWithURL:urlToRoute statusCode:200 HTTPVersion:@"HTTP/1.1" headerFields:@{}]; -// [[[mock stub] andReturn: fakedResponse] response]; -// -// [[[mock stub] andReturnValue:@NO] canShowMIMEType]; -// -// id switchboardMock = [OCMockObject partialMockForObject:ARSwitchBoard.sharedInstance]; -// // Validate that we call ARSwitchBoard's load extenal URL -// [[switchboardMock expect] openURLInExternalService:[OCMArg checkWithBlock:^BOOL(id obj) { -// return [obj isEqual:urlToRoute]; -// }]]; -//}); - - - SpecEnd; diff --git a/ios/ArtsyTests/View_Controller_Tests/Web_Browsing/ARInternalMobileWebViewControllerTests.m b/ios/ArtsyTests/View_Controller_Tests/Web_Browsing/ARInternalMobileWebViewControllerTests.m index 4d30026fe4f..540ae8d54e2 100644 --- a/ios/ArtsyTests/View_Controller_Tests/Web_Browsing/ARInternalMobileWebViewControllerTests.m +++ b/ios/ArtsyTests/View_Controller_Tests/Web_Browsing/ARInternalMobileWebViewControllerTests.m @@ -4,7 +4,7 @@ #import "ARUserManager.h" #import "ARNetworkConstants.h" #import "ARInternalShareValidator.h" -#import +#import "AREmission.h" static WKNavigationAction *StubNavActionForRequest(NSURLRequest *request, WKNavigationType type) diff --git a/ios/Podfile b/ios/Podfile index 46eedb0c709..224c48e5123 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -11,8 +11,7 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ platform :ios, '12.1' - -$ReactNativeMapboxGLIOSVersion = '~> 6.4' +inhibit_all_warnings! # ignore all warnings from all pods def check_for_existing_netrc_file if !ENV['MAPBOX_DOWNLOAD_TOKEN'] @@ -40,8 +39,8 @@ end check_for_existing_netrc_file add_mapbox_creds -# ignore all warnings from all pods -inhibit_all_warnings! + +$ReactNativeMapboxGLIOSVersion = '~> 6.4' pre_install do |installer| $RNMBGL.pre_install(installer) @@ -66,6 +65,7 @@ target 'Artsy' do pod 'AFOAuth1Client', git: 'https://github.com/artsy/AFOAuth1Client.git', tag: '0.4.0-subspec-fix' pod 'AFNetworkActivityLogger' pod 'SDWebImage', '5.11.1' + pod 'INTUAnimationEngine' # Core pod 'ARGenericTableViewController', git: 'https://github.com/artsy/ARGenericTableViewController.git' @@ -73,11 +73,9 @@ target 'Artsy' do pod 'FLKAutoLayout', git: 'https://github.com/artsy/FLKAutoLayout.git', branch: 'v1' pod 'FXBlurView', '1.6.4' pod 'ISO8601DateFormatter', git: 'https://github.com/artsy/iso-8601-date-formatter' - pod 'JLRoutes', git: 'https://github.com/artsy/JLRoutes.git' pod 'JSDecoupledAppDelegate' pod 'Mantle', '1.5.6' pod 'MMMarkdown', '0.4' - pod 'NPKeyboardLayoutGuide' pod 'UICKeyChainStore' pod 'MARKRangeSlider' pod 'EDColor', '1.0.1' @@ -91,15 +89,6 @@ target 'Artsy' do pod 'MultiDelegate' pod 'ObjectiveSugar' - # Artsy Spec repo stuff - pod 'Artsy+UIFonts', '3.3.4' - pod 'Artsy-UIButtons' - pod 'Artsy+UIColors' - pod 'Artsy+UILabels' - pod 'Extraction' - - pod 'Emission', path: '../emission', :inhibit_warnings => false - # For Stripe integration with Emission. Using a fork for this issue: https://github.com/tipsi/tipsi-stripe/issues/408 pod 'Pulley', git: 'https://github.com/artsy/Pulley.git', branch: 'master' @@ -116,10 +105,6 @@ target 'Artsy' do pod 'Segment-Appboy' pod 'Segment-Adjust' - # Developer Pods - pod 'DHCShakeNotifier', '0.2.0' - pod 'ORKeyboardReactingApplication', '0.5.3' - # Swift pods 🎉 pod 'Then', '2.3.0' pod 'Interstellar/Core', git: 'https://github.com/artsy/Interstellar.git', branch: 'observable-unsubscribe' diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 3eba5f7572f..c1e8e68d14d 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -23,38 +23,30 @@ PODS: - AFNetworking/NSURLSession (~> 2.5) - AFNetworking/Serialization (~> 2.5) - Analytics (4.1.6) - - AppAuth (1.4.0): - - AppAuth/Core (= 1.4.0) - - AppAuth/ExternalUserAgent (= 1.4.0) - - AppAuth/Core (1.4.0) - - AppAuth/ExternalUserAgent (1.4.0) - - Appboy-iOS-SDK (4.4.3): - - Appboy-iOS-SDK/UI (= 4.4.3) - - Appboy-iOS-SDK/ContentCards (4.4.3): + - AppAuth (1.5.0): + - AppAuth/Core (= 1.5.0) + - AppAuth/ExternalUserAgent (= 1.5.0) + - AppAuth/Core (1.5.0) + - AppAuth/ExternalUserAgent (1.5.0): + - AppAuth/Core + - Appboy-iOS-SDK (4.4.4): + - Appboy-iOS-SDK/UI (= 4.4.4) + - Appboy-iOS-SDK/ContentCards (4.4.4): - Appboy-iOS-SDK/Core - SDWebImage (< 6, >= 5.8.2) - - Appboy-iOS-SDK/Core (4.4.3) - - Appboy-iOS-SDK/InAppMessage (4.4.3): + - Appboy-iOS-SDK/Core (4.4.4) + - Appboy-iOS-SDK/InAppMessage (4.4.4): - Appboy-iOS-SDK/Core - SDWebImage (< 6, >= 5.8.2) - - Appboy-iOS-SDK/NewsFeed (4.4.3): + - Appboy-iOS-SDK/NewsFeed (4.4.4): - Appboy-iOS-SDK/Core - SDWebImage (< 6, >= 5.8.2) - - Appboy-iOS-SDK/UI (4.4.3): + - Appboy-iOS-SDK/UI (4.4.4): - Appboy-iOS-SDK/ContentCards - Appboy-iOS-SDK/Core - Appboy-iOS-SDK/InAppMessage - Appboy-iOS-SDK/NewsFeed - ARGenericTableViewController (1.0.2) - - "Artsy+UIColors (3.1.0)" - - "Artsy+UIFonts (3.3.4)" - - "Artsy+UILabels (2.2.0)": - - "Artsy+UIColors (~> 3.0)" - - "Artsy+UIFonts" - - Artsy-UIButtons (2.3.3): - - "Artsy+UIColors (~> 3.0)" - - "Artsy+UIFonts" - - "UIView+BooleanAnimations" - boost (1.76.0) - boost-for-react-native (1.63.0) - BVLinearGradient (2.5.6): @@ -63,63 +55,13 @@ PODS: - CocoaLumberjack (3.7.2): - CocoaLumberjack/Core (= 3.7.2) - CocoaLumberjack/Core (3.7.2) - - DHCShakeNotifier (0.2.0) - DoubleConversion (1.1.6) - EDColor (1.0.1) - - Emission (1.21.52): - - "Artsy+UIColors" - - "Artsy+UIFonts (>= 3.0.0)" - - boost (= 1.76.0) - - DoubleConversion (= 1.1.6) - - Extraction (>= 1.2.1) - - glog (= 0.3.5) - - INTUAnimationEngine - - Pulley - - RCT-Folly (= 2021.06.28.00-v2) - - React-Core (= 0.66.4) - - React-cxxreact (= 0.66.4) - - react-native-cameraroll (= 1.3.0) - - react-native-geolocation (= 2.0.2) - - react-native-mapbox-gl (= 8.5.0) - - react-native-netinfo (= 6.0.1) - - React-RCTActionSheet (= 0.66.4) - - React-RCTAnimation (= 0.66.4) - - React-RCTImage (= 0.66.4) - - React-RCTLinking (= 0.66.4) - - React-RCTNetwork (= 0.66.4) - - React-RCTText (= 0.66.4) - - RNSentry (= 3.2.13) - - RNSVG (= 9.13.3) - - SDWebImage (= 5.11.1) - - tipsi-stripe (= 7.5.0) - Expecta (1.0.6) - "Expecta+Snapshots (3.1.1)": - Expecta (~> 1.0) - FBSnapshotTestCase/Core (~> 2.0) - Specta (~> 1.0) - - Extraction (1.2.6): - - Extraction/ARAnimationContinuation (= 1.2.6) - - Extraction/ARLoadFailureView (= 1.2.6) - - Extraction/ARSpinner (= 1.2.6) - - Extraction/ARSwitchView (= 1.2.6) - - "Extraction/UILabel+Typography (= 1.2.6)" - - "Extraction/UIView+ARSpinner (= 1.2.6)" - - Extraction/ARAnimationContinuation (1.2.6) - - Extraction/ARLoadFailureView (1.2.6): - - Artsy-UIButtons - - "Extraction/UILabel+Typography" - - ORStackView (< 3) - - Extraction/ARSpinner (1.2.6): - - "Extraction/UIView+ARSpinner" - - "UIView+BooleanAnimations" - - Extraction/ARSwitchView (1.2.6): - - "Artsy+UIColors" - - "Artsy+UIFonts (>= 1.1.0)" - - FLKAutoLayout - - "UIView+BooleanAnimations" - - "Extraction/UILabel+Typography (1.2.6)" - - "Extraction/UIView+ARSpinner (1.2.6)": - - Extraction/ARAnimationContinuation - FBLazyVector (0.66.4) - FBReactNativeSpec (0.66.4): - RCT-Folly (= 2021.06.28.00-v2) @@ -233,9 +175,9 @@ PODS: - OCMock - FXBlurView (1.6.4) - glog (0.3.5) - - GoogleDataTransport (9.1.2): - - GoogleUtilities/Environment (~> 7.2) - - nanopb (~> 2.30908.0) + - GoogleDataTransport (9.1.4): + - GoogleUtilities/Environment (~> 7.7) + - nanopb (< 2.30910.0, >= 2.30908.0) - PromisesObjC (< 3.0, >= 1.2) - GoogleSignIn (5.0.2): - AppAuth (~> 1.2) @@ -265,7 +207,6 @@ PODS: - INTUAnimationEngine/SpringSolver (= 1.4.2) - INTUAnimationEngine/SpringSolver (1.4.2) - ISO8601DateFormatter (0.7.1) - - JLRoutes (2.0.0) - JSDecoupledAppDelegate (1.2.0) - JWTDecode (2.0.0) - libevent (2.1.12) @@ -298,12 +239,10 @@ PODS: - Nimble-Snapshots/Core (6.3.0): - FBSnapshotTestCase (~> 2.0) - Nimble (~> 7.0) - - NPKeyboardLayoutGuide (1.0.0) - ObjectiveSugar (1.1.0) - OCMock (2.2.4) - OHHTTPStubs (3.1.2) - OpenSSL-Universal (1.1.180) - - ORKeyboardReactingApplication (0.5.3) - ORStackView (2.0.3): - FLKAutoLayout - PromisesObjC (2.1.0) @@ -558,6 +497,8 @@ PODS: - React-Core - react-native-safe-area-context (3.4.0): - React-Core + - react-native-shake (5.1.1): + - React - react-native-slider (4.2.1): - React-Core - react-native-view-shot (3.1.2): @@ -699,7 +640,7 @@ PODS: - SDWebImage (5.11.1): - SDWebImage/Core (= 5.11.1) - SDWebImage/Core (5.11.1) - - SDWebImageWebPCoder (0.8.4): + - SDWebImageWebPCoder (0.8.5): - libwebp (~> 1.0) - SDWebImage/Core (~> 5.10) - Segment-Adjust (3.1.4): @@ -741,20 +682,13 @@ DEPENDENCIES: - AFNetworking/Serialization (= 2.7.0) - AFOAuth1Client (from `https://github.com/artsy/AFOAuth1Client.git`, tag `0.4.0-subspec-fix`) - ARGenericTableViewController (from `https://github.com/artsy/ARGenericTableViewController.git`) - - "Artsy+UIColors" - - "Artsy+UIFonts (= 3.3.4)" - - "Artsy+UILabels" - - Artsy-UIButtons - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - BVLinearGradient (from `../node_modules/react-native-linear-gradient`) - CocoaLumberjack (= 3.7.2) - - DHCShakeNotifier (= 0.2.0) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - EDColor (= 1.0.1) - - Emission (from `../emission`) - Expecta (= 1.0.6) - "Expecta+Snapshots (= 3.1.1)" - - Extraction - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) - FBSDKCoreKit (= 9.3.0) @@ -788,8 +722,8 @@ DEPENDENCIES: - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - GoogleSignIn (= 5.0.2) - Interstellar/Core (from `https://github.com/artsy/Interstellar.git`, branch `observable-unsubscribe`) + - INTUAnimationEngine - ISO8601DateFormatter (from `https://github.com/artsy/iso-8601-date-formatter`) - - JLRoutes (from `https://github.com/artsy/JLRoutes.git`) - JSDecoupledAppDelegate - JWTDecode (= 2.0.0) - Mantle (= 1.5.6) @@ -798,11 +732,9 @@ DEPENDENCIES: - MultiDelegate - Nimble (= 7.3.4) - Nimble-Snapshots (= 6.3.0) - - NPKeyboardLayoutGuide - ObjectiveSugar - OCMock - OHHTTPStubs (= 3.1.2) - - ORKeyboardReactingApplication (= 0.5.3) - ORStackView (= 2.0.3) - Pulley (from `https://github.com/artsy/Pulley.git`, branch `master`) - Quick (= 2.0.0) @@ -832,6 +764,7 @@ DEPENDENCIES: - "react-native-mapbox-gl (from `../node_modules/@react-native-mapbox-gl/maps`)" - "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)" - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) + - react-native-shake (from `../node_modules/react-native-shake`) - "react-native-slider (from `../node_modules/@react-native-community/slider`)" - react-native-view-shot (from `../node_modules/react-native-view-shot`) - "react-native-viewpager (from `../node_modules/@react-native-community/viewpager`)" @@ -887,11 +820,6 @@ DEPENDENCIES: SPEC REPOS: https://github.com/artsy/Specs.git: - Aerodramus - - "Artsy+UIColors" - - "Artsy+UIFonts" - - "Artsy+UILabels" - - Artsy-UIButtons - - Extraction trunk: - Adjust - AFNetworkActivityLogger @@ -902,7 +830,6 @@ SPEC REPOS: - boost-for-react-native - CocoaAsyncSocket - CocoaLumberjack - - DHCShakeNotifier - EDColor - Expecta - "Expecta+Snapshots" @@ -945,12 +872,10 @@ SPEC REPOS: - nanopb - Nimble - Nimble-Snapshots - - NPKeyboardLayoutGuide - ObjectiveSugar - OCMock - OHHTTPStubs - OpenSSL-Universal - - ORKeyboardReactingApplication - ORStackView - PromisesObjC - Quick @@ -982,8 +907,6 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-linear-gradient" DoubleConversion: :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" - Emission: - :path: "../emission" FBLazyVector: :path: "../node_modules/react-native/Libraries/FBLazyVector" FBReactNativeSpec: @@ -998,8 +921,6 @@ EXTERNAL SOURCES: :git: https://github.com/artsy/Interstellar.git ISO8601DateFormatter: :git: https://github.com/artsy/iso-8601-date-formatter - JLRoutes: - :git: https://github.com/artsy/JLRoutes.git Pulley: :branch: master :git: https://github.com/artsy/Pulley.git @@ -1051,6 +972,8 @@ EXTERNAL SOURCES: :path: "../node_modules/@react-native-community/netinfo" react-native-safe-area-context: :path: "../node_modules/react-native-safe-area-context" + react-native-shake: + :path: "../node_modules/react-native-shake" react-native-slider: :path: "../node_modules/@react-native-community/slider" react-native-view-shot: @@ -1150,9 +1073,6 @@ CHECKOUT OPTIONS: ISO8601DateFormatter: :commit: 1a48b819c85903ded669e74e476aceffebf311fc :git: https://github.com/artsy/iso-8601-date-formatter - JLRoutes: - :commit: 5a6df1a795766a4d3e586508e86ec9271d3ef3d9 - :git: https://github.com/artsy/JLRoutes.git Pulley: :commit: f677b18b332ea3798dc379879dbc0d038efd3ccc :git: https://github.com/artsy/Pulley.git @@ -1164,25 +1084,18 @@ SPEC CHECKSUMS: AFNetworking: 8dd5f9b9691e09186393069a12cc3b5ed7c8b511 AFOAuth1Client: 155a6237e57987cac18dac2ccd17cea5d324ad1a Analytics: eefe524436f904b8bb3f8c8c3425280e43b34efc - AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7 - Appboy-iOS-SDK: a634f5160d4d8a1f08b8817165733af7336fa255 + AppAuth: 80317d99ac7ff2801a2f18ff86b48cd315ed465d + Appboy-iOS-SDK: b05b957ab645d0a9a43d3f35195ad69202b89edc ARGenericTableViewController: 61a0897ba66c35111b5d1cc3b44884282bd3c1a5 - "Artsy+UIColors": 31c03c4146f5e6618a9b950f37dfe02dd9ac09a6 - "Artsy+UIFonts": 19efbc985ba95156d75a860633df5538c8045b80 - "Artsy+UILabels": 7cb6e290a4f70dddba037b7dbeb21e90b49d7275 - Artsy-UIButtons: 3c396f0fad352a7b0332100e0ffcb0ca577e0082 boost: a7c83b31436843459a1961bfd74b96033dc77234 boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 CocoaLumberjack: b7e05132ff94f6ae4dfa9d5bce9141893a21d9da - DHCShakeNotifier: 64048427ecaa763f2472d0032f58bf7a10074eee DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 EDColor: 91d127cd67d7c1d3862846fb11ef4b3851151bfa - Emission: 088d3673dbe47d492d6613bae28994f263ed0018 Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5 "Expecta+Snapshots": dcff217eef506dabd6dfdc7864ea2da321fafbb8 - Extraction: 2be993a17f8f8c4fac988ebecaed93a409181faf FBLazyVector: e5569e42a1c79ca00521846c223173a57aca1fe1 FBReactNativeSpec: fe08c1cd7e2e205718d77ad14b34957cce949b58 FBSDKCoreKit: 0d1ae58388a458b8222f72025804cdc84eb5d0c3 @@ -1207,7 +1120,7 @@ SPEC CHECKSUMS: Forgeries: 64ced144ea8341d89a7eec9d1d7986f0f1366250 FXBlurView: db786c2561cb49a09ae98407f52460096ab8a44f glog: 5337263514dd6f09803962437687240c5dc39aa4 - GoogleDataTransport: 629c20a4d363167143f30ea78320d5a7eb8bd940 + GoogleDataTransport: 5fffe35792f8b96ec8d6775f5eccd83c998d5a3b GoogleSignIn: 7137d297ddc022a7e0aa4619c86d72c909fa7213 GoogleUtilities: e0913149f6b0625b553d70dae12b49fc62914fd1 GTMAppAuth: ad5c2b70b9a8689e1a04033c9369c4915bfcbe89 @@ -1215,7 +1128,6 @@ SPEC CHECKSUMS: Interstellar: ab67502af03105f92100a043e178d188a1a437c9 INTUAnimationEngine: 3a7d63738cd51af573d16848a771feedea7cc9f2 ISO8601DateFormatter: 8311a2d4e265b269b2fed7ab4db685dcb0a7ccb2 - JLRoutes: 63d64c28b26bcdeb5f5b29e436f75b8358e8d6d1 JSDecoupledAppDelegate: 5905e144cbe6e0c889248eebbee6784510f315e1 JWTDecode: 178e47e5d28d3abcff778bacced8342858cd6cb5 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 @@ -1229,12 +1141,10 @@ SPEC CHECKSUMS: nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96 Nimble: 051e3d8912d40138fa5591c78594f95fb172af37 Nimble-Snapshots: f5459b5b091678dc942d03ec4741cacb58ba4a52 - NPKeyboardLayoutGuide: fea27700582570c8825a97b5cb96579a57bf0b73 ObjectiveSugar: a6a25f23d657c19df0a0b972466d5b5ca9f5295c OCMock: a6a7dc0e3997fb9f35d99f72528698ebf60d64f2 OHHTTPStubs: c93230597bc5c8b74bcfdb403cc8773515b8b08c OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b - ORKeyboardReactingApplication: 05af5ead40af968d5423d54b6a0dc050858b0e82 ORStackView: b9507271cb41fb9e0b3eecc6414d831201e7cf7c PromisesObjC: 99b6f43f9e1044bd87a95a60beff28c2c44ddb72 Pulley: edc993fb57f7eb20541c8453d0fce10559f21dac @@ -1263,6 +1173,7 @@ SPEC CHECKSUMS: react-native-mapbox-gl: 0308cba1da4edbc1aa0e82a7584ba50e52725996 react-native-netinfo: 7cb7877ff31ebeb3d03ce0b4fbb616f121ddd859 react-native-safe-area-context: f4f7cc09d81ae2d39dfd13e764d718969af07080 + react-native-shake: 67d43d6af4abfc299400b17fea7d2ec0754c72ac react-native-slider: 241935e3ea8e47599c317f512f96ee8de607d4cb react-native-view-shot: 4475fde003fe8a210053d1f98fb9e06c1d834e1c react-native-viewpager: ea945e2881ce9a4a8bcdc84de4ec65ff23c90f6e @@ -1303,7 +1214,7 @@ SPEC CHECKSUMS: RNShare: b955e66f1af2849711f13c193debda72b94f8aa0 RNSVG: f6177f8d7c095fada7cfee2e4bb7388ba426064c SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d - SDWebImageWebPCoder: f93010f3f6c031e2f8fb3081ca4ee6966c539815 + SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d Segment-Adjust: 1a12861ab2e9372fc70af949057490858666cd37 Segment-Appboy: 3ccf7ffd34701e11029e1d013e57eae0756a8eb1 Sentry: 2f7e91f247cfb05b05bd01e0b5d0692557a7687b @@ -1320,6 +1231,6 @@ SPEC CHECKSUMS: Yoga: e7dc4e71caba6472ff48ad7d234389b91dadc280 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 8ec2cd3dbd1ae9a20b1b689e81f3a8dd0952f735 +PODFILE CHECKSUM: 9c7a1d00258eb418360e675a76b648ed0eaf5cfd COCOAPODS: 1.11.3 diff --git a/package.json b/package.json index c0c86515d35..084c440fdea 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ }, "main": "index.ios.js", "scripts": { - "bundle-for-native-ci:ios": "node --expose-gc --max_old_space_size=8192 ./node_modules/react-native/local-cli/cli.js bundle --platform=ios --dev=false --entry-file=index.tests.ios.js --bundle-output emission/Pod/Assets/Emission.js --sourcemap-output emission/Pod/Assets/Emission.js.map --assets-dest emission/Pod/Assets", - "bundle:ios": "react-native bundle --platform=ios --dev=false --entry-file=index.ios.js --bundle-output emission/Pod/Assets/Emission.js --sourcemap-output emission/Pod/Assets/Emission.js.map --assets-dest emission/Pod/Assets", + "bundle-for-native-ci:ios": "node --expose-gc --max_old_space_size=8192 ./node_modules/react-native/local-cli/cli.js bundle --platform=ios --dev=false --entry-file=index.tests.ios.js --bundle-output dist/jsbundle.js --sourcemap-output dist/jsbundle.js.map --assets-dest dist", + "bundle:ios": "react-native bundle --platform=ios --dev=false --entry-file=index.ios.js --bundle-output dist/jsbundle.js --sourcemap-output dist/jsbundle.js.map --assets-dest dist", "bundle:android": "NODE_OPTIONS=--max_old_space_size=8192 react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --sourcemap-output android/app/src/main/assets/index.android.bundle.map --assets-dest android/app/src/main/res", "check-flags": "./scripts/check-flags/check-flags.js", "ci:lint": "yarn lint --format json --out tslint-errors.json ", @@ -46,6 +46,7 @@ "setup:artsy:update!": "scripts/update-env-for-artsy", "prestart": "./scripts/set-storybook-environment.js", "start": "concurrently --kill-others -n metro,relay 'yarn react-native start' 'yarn relay --watch'", + "start:reset-cache": "concurrently --kill-others -n metro,relay 'yarn react-native start --reset-cache' 'yarn relay --watch'", "sync-cities": "curl https://raw.githubusercontent.com/artsy/metaphysics/main/src/schema/city/cityDataSortedByDisplayPreference.json -o data/cityDataSortedByDisplayPreference.json", "sync-schema": "curl https://raw.githubusercontent.com/artsy/metaphysics/main/_schemaV2.graphql -o data/schema.graphql; yarn prettier --write --parser graphql data/schema.graphql", "sync-schema:localhost": "cd ../metaphysics && yarn dump-schema v2 ../eigen/data/", @@ -170,6 +171,7 @@ "react-native-safe-area-context": "3.4.0", "react-native-screens": "3.4.0", "react-native-scrollable-tab-view": "ptomasroos/react-native-scrollable-tab-view#a7f46de184123be9703c57b0a7618ae0557c8a87", + "react-native-shake": "5.1.1", "react-native-share": "7.3.6", "react-native-svg": "9.13.3", "react-native-view-shot": "3.1.2", diff --git a/scripts/ci-test-ios b/scripts/ci-test-ios index 228b3e2c19e..15dee285960 100755 --- a/scripts/ci-test-ios +++ b/scripts/ci-test-ios @@ -5,7 +5,7 @@ set -euxo pipefail source ./scripts/source-for-bash-env if [ "${LOCAL_BRANCH}" != "beta-ios" ] && [ "${LOCAL_BRANCH}" != "app_store_submission" ]; then - echo "If tests fail because of snapshots, look in the `getting_started.md` in the `Update snapshots` section." + echo "If tests fail because of snapshots, look in the \`getting_started.md\` in the \`Update snapshots\` section." ./scripts/test-ios else echo "Skipping test run on beta deploy." diff --git a/scripts/download-fonts b/scripts/download-fonts index 0034483c90d..83aa0e70fb5 100755 --- a/scripts/download-fonts +++ b/scripts/download-fonts @@ -14,6 +14,8 @@ cp ./fonts/android/* android/app/src/main/assets/fonts # iOS cp ./fonts/ios/* ios/Artsy/fonts +cp ./fonts/ios/* ios/Artsy/View_Controllers/Live_Auctions/Resources/Artsy/fonts + # Cleanup rm -rf ./fonts.tar.gz diff --git a/scripts/flip-table b/scripts/flip-table index ed95e0e3b71..a637c45bba6 100755 --- a/scripts/flip-table +++ b/scripts/flip-table @@ -36,8 +36,7 @@ rm -rf .jest rm -rf "$TMPDIR"/metro* .metro echo 'Clear build artefacts (╯ರ ~ ರ)╯︵ ┻━┻' -rm -rf emission/Pod/Assets/Emission* -rm -rf emission/Pod/Assets/assets +rm -rf dist echo 'Reinstall dependencies ┬─┬ノ( º _ ºノ)' yarn install:all diff --git a/scripts/get-certs-ios b/scripts/get-certs-ios index 63f42ac5cbd..c3292eec640 100755 --- a/scripts/get-certs-ios +++ b/scripts/get-certs-ios @@ -2,5 +2,5 @@ set -euxo pipefail -echo "Don't log in with it@artsymail.com, use your account on our Artsy team." +echo "Don't log in with \`it@artsymail.com\`, use your account on our Artsy team." bundle exec match appstore diff --git a/scripts/post-pod-install.rb b/scripts/post-pod-install.rb index 7fc7a3f325e..a1e8634d26c 100755 --- a/scripts/post-pod-install.rb +++ b/scripts/post-pod-install.rb @@ -15,18 +15,3 @@ def remove_mapbox_creds end remove_mapbox_creds - - -def fix_fonts_in_uifonts_pod - # inspired by https://github.com/artsy/Artsy-OSSUIFonts/blob/master/Pod/Scripts/ArtsySetup.rb while we still use that pod - - system("./scripts/download-fonts") - - font_file = "ios/Pods/Artsy+UIFonts/Pod/Classes/UIFont+ArtsyFonts.m" - system("chmod +w #{font_file}") - contents = File.read(font_file) - changed = contents.gsub(/static BOOL useClosedFonts = false;/, "static BOOL useClosedFonts = true;") - File.write(font_file, changed) -end - -fix_fonts_in_uifonts_pod diff --git a/scripts/record-snapshots-disable b/scripts/record-snapshots-disable index 00935c08ac1..6a4721483c1 100755 --- a/scripts/record-snapshots-disable +++ b/scripts/record-snapshots-disable @@ -2,12 +2,12 @@ set -euxo pipefail -SWIFT_FILE=Pods/Nimble-Snapshots/HaveValidSnapshot.swift +SWIFT_FILE=ios/Pods/Nimble-Snapshots/HaveValidSnapshot.swift -OBJ_H_FILE=Pods/Expecta+Snapshots/EXPMatchers+FBSnapshotTest.h -OBJ_M_FILE=Pods/Expecta+Snapshots/EXPMatchers+FBSnapshotTest.m +OBJ_H_FILE=ios/Pods/Expecta+Snapshots/EXPMatchers+FBSnapshotTest.h +OBJ_M_FILE=ios/Pods/Expecta+Snapshots/EXPMatchers+FBSnapshotTest.m -OUR_FILE=Artsy_Tests/Extensions/ARExpectaExtensions.m +OUR_FILE=ios/ArtsyTests/Extensions/ARExpectaExtensions.m TEMP_FILE=.recordingSnapshots diff --git a/scripts/record-snapshots-enable b/scripts/record-snapshots-enable index 3815b74543a..5db11bb5cf3 100755 --- a/scripts/record-snapshots-enable +++ b/scripts/record-snapshots-enable @@ -2,12 +2,12 @@ set -euxo pipefail -SWIFT_FILE=Pods/Nimble-Snapshots/HaveValidSnapshot.swift +SWIFT_FILE=ios/Pods/Nimble-Snapshots/HaveValidSnapshot.swift -OBJ_H_FILE=Pods/Expecta+Snapshots/EXPMatchers+FBSnapshotTest.h -OBJ_M_FILE=Pods/Expecta+Snapshots/EXPMatchers+FBSnapshotTest.m +OBJ_H_FILE=ios/Pods/Expecta+Snapshots/EXPMatchers+FBSnapshotTest.h +OBJ_M_FILE=ios/Pods/Expecta+Snapshots/EXPMatchers+FBSnapshotTest.m -OUR_FILE=Artsy_Tests/Extensions/ARExpectaExtensions.m +OUR_FILE=ios/ArtsyTests/Extensions/ARExpectaExtensions.m TEMP_FILE=.recordingSnapshots diff --git a/scripts/secrets-add-all b/scripts/secrets-add-all index aa62bc0fed6..f5acf6da3dc 100755 --- a/scripts/secrets-add-all +++ b/scripts/secrets-add-all @@ -6,10 +6,11 @@ set -euxo pipefail git ls-files \ | tr '\n' '\0' \ | xargs -0 detect-secrets scan \ - --exclude-files /\.lock$/ `# ignore lock files, they are large and full of hashes` \ - --exclude-files /\.png$/ `# ignore image files` \ - --exclude-files /\.webp$/ `# ignore image files` \ - --exclude-files /\.jpg$/ `# ignore image files` \ - --exclude-files /\.jar$/ `# ignore jar files` \ - --exclude-files /__generated__/ `# ignore relay generated files` \ + --exclude-files "\.lock$" `# ignore lock files, they are large and full of hashes` \ + --exclude-files "\.png$" `# ignore image files` \ + --exclude-files "\.webp$" `# ignore image files` \ + --exclude-files "\.jpg$" `# ignore image files` \ + --exclude-files "\.jar$" `# ignore jar files` \ + --exclude-files "__generated__" `# ignore relay generated files` \ + --exclude-files "ios\/.*\.xcscheme$" `# ignore Xcode scheme files` \ --baseline .secrets.baseline diff --git a/scripts/secrets-add-staged b/scripts/secrets-add-staged index f97003400a5..a581b945e1a 100755 --- a/scripts/secrets-add-staged +++ b/scripts/secrets-add-staged @@ -6,10 +6,11 @@ set -euxo pipefail git diff --staged --name-only \ | tr '\n' '\0' \ | xargs -0 detect-secrets scan \ - --exclude-files /\.lock$/ `# ignore lock files, they are large and full of hashes` \ - --exclude-files /\.png$/ `# ignore image files` \ - --exclude-files /\.webp$/ `# ignore image files` \ - --exclude-files /\.jpg$/ `# ignore image files` \ - --exclude-files /\.jar$/ `# ignore jar files` \ - --exclude-files /__generated__/ `# ignore relay generated files` \ + --exclude-files "\.lock$" `# ignore lock files, they are large and full of hashes` \ + --exclude-files "\.png$" `# ignore image files` \ + --exclude-files "\.webp$" `# ignore image files` \ + --exclude-files "\.jpg$" `# ignore image files` \ + --exclude-files "\.jar$" `# ignore jar files` \ + --exclude-files "__generated__" `# ignore relay generated files` \ + --exclude-files "ios\/.*\.xcscheme$" `# ignore Xcode scheme files` \ --baseline .secrets.baseline diff --git a/scripts/set_packager_host.sh b/scripts/set_packager_host.sh deleted file mode 100755 index 0eb131f69a7..00000000000 --- a/scripts/set_packager_host.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash - - -# e.g. Davids-MacBook.local -host=$(hostname) - -function can-reach-host () { - ping -c1 -t1 $host -} - -# sometimes hostnames are not resolvable. -if ! can-reach-host -then - # so try local wifi IP instead - host=$(ipconfig getifaddr en0) - - # if you're not connected via wifi, and you're feeling retro, - # then you might be connected via ethernet? - if ! can-reach-host - then - host=$(ipconfig getifaddr en1) - - # otherwise you're probably not connected to the internet 🤷‍♀️ - if ! can-reach-host - then - host=localhost - fi - fi -fi - - -OUTPUT=$(cat << EOF -// this file is generated automatically in a build phase -#import "ARReactPackagerHost.h" -#import - -@implementation ARReactPackagerHost - -+ (NSString *)hostname -{ -#if defined(DEBUG) - return @"$host"; -#else - return @"localhost"; -#endif -} - -@end -EOF) - -echo "$OUTPUT" > $PROJECT_DIR/Artsy/Networking/ARReactPackagerHost.m \ No newline at end of file diff --git a/scripts/source-for-bash-env b/scripts/source-for-bash-env index 427e6123777..6b37010c436 100755 --- a/scripts/source-for-bash-env +++ b/scripts/source-for-bash-env @@ -10,7 +10,7 @@ export LOCAL_BRANCH export WORKSPACE="ios/Artsy.xcworkspace" export SCHEME="Artsy" export DEVICE_HOST_PLAT="iOS Simulator" -export DEVICE_HOST_OS="15.2" +export DEVICE_HOST_OS="15.5" export DEVICE_HOST_NAME="iPhone 13 Pro" export DERIVED_DATA_PATH="derived_data" -export CONFIGURATION="Release" \ No newline at end of file +export CONFIGURATION="Release" diff --git a/src/app/App.tsx b/src/app/App.tsx index 8b703b43c62..37a03668a09 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -9,14 +9,16 @@ import { import { useDeepLinks } from "app/utils/useDeepLinks" import { useStripeConfig } from "app/utils/useStripeConfig" import React, { useEffect } from "react" -import { Platform, UIManager, View } from "react-native" +import { NativeModules, Platform, UIManager, View } from "react-native" import RNBootSplash from "react-native-bootsplash" +import RNShake from "react-native-shake" import { AppProviders } from "./AppProviders" import { useWebViewCookies } from "./Components/ArtsyWebView" import { FPSCounter } from "./Components/FPSCounter" import { useErrorReporting } from "./errorReporting/hooks" import { ArtsyNativeModule } from "./NativeModules/ArtsyNativeModule" import { ModalStack } from "./navigation/ModalStack" +import { navigate } from "./navigation/navigate" import { usePurgeCacheOnAppUpdate } from "./relay/usePurgeCacheOnAppUpdate" import { BottomTabsNavigator } from "./Scenes/BottomTabs/BottomTabsNavigator" import { ForceUpdate } from "./Scenes/ForceUpdate/ForceUpdate" @@ -32,6 +34,9 @@ import { usePreferredThemeTracking } from "./utils/usePreferredThemeTracking" import { useScreenReaderTracking } from "./utils/useScreenReaderTracking" import useSyncNativeAuthState from "./utils/useSyncAuthState" +// don't open dev menu with shake. we use it for out own admin menu. +NativeModules.DevSettings.setIsShakeToShowDevMenuEnabled(false) + addTrackingProvider(SEGMENT_TRACKING_PROVIDER, SegmentTrackingProvider) addTrackingProvider("console", ConsoleTrackingProvider) @@ -39,7 +44,26 @@ if (UIManager.setLayoutAnimationEnabledExperimental) { UIManager.setLayoutAnimationEnabledExperimental(true) } +const useRageShakeAdminMenu = () => { + const userIsDev = GlobalStore.useAppState((s) => s.artsyPrefs.userIsDev.value) + + useEffect(() => { + const subscription = RNShake.addListener(() => { + if (!userIsDev) { + return + } + + navigate("/admin2") + }) + + return () => { + subscription.remove() + } + }, [userIsDev]) +} + const Main: React.FC = () => { + useRageShakeAdminMenu() useDebugging() useEffect(() => { GoogleSignin.configure({ diff --git a/src/app/Components/ConnectivityBanner.tsx b/src/app/Components/ConnectivityBanner.tsx index 90de834fea3..2ccdc269a49 100644 --- a/src/app/Components/ConnectivityBanner.tsx +++ b/src/app/Components/ConnectivityBanner.tsx @@ -13,7 +13,7 @@ const Container = styled.View` const ConnectivityMessage = styled.Text` color: ${themeGet("colors.yellow100")}; text-align: center; - font-family: "ReactNativeAGaramondPro-Regular"; + font-family: "Unica77LL-Regular"; font-size: 16; padding-top: 5; ` diff --git a/src/app/Containers/Inquiry.tsx b/src/app/Containers/Inquiry.tsx index 40faf49dd6e..869569a524e 100644 --- a/src/app/Containers/Inquiry.tsx +++ b/src/app/Containers/Inquiry.tsx @@ -60,7 +60,7 @@ const Content = styled.View` const InquiryTextInput = styled.TextInput` font-size: 16; margin-top: 20; - font-family: "ReactNativeAGaramondPro-Regular"; + font-family: "Unica77LL-Regular"; ` const ResponseRate = styled(SmallHeadline)` color: ${themeGet("colors.yellow100")}; diff --git a/src/app/Scenes/Inbox/Components/Typography/index.tsx b/src/app/Scenes/Inbox/Components/Typography/index.tsx index 147ed5c46cb..68a823a621b 100644 --- a/src/app/Scenes/Inbox/Components/Typography/index.tsx +++ b/src/app/Scenes/Inbox/Components/Typography/index.tsx @@ -135,11 +135,11 @@ const styles = StyleSheet.create({ }, subtitleRequired: { - fontFamily: "ReactNativeAGaramondPro-Italic", + fontFamily: "Unica77LL-Italic", }, fromSignatureDefault: { - fontFamily: "ReactNativeAGaramondPro-Regular", + fontFamily: "Unica77LL-Regular", }, metadataDefault: { @@ -154,6 +154,6 @@ const styles = StyleSheet.create({ }, bodyRequired: { - fontFamily: "ReactNativeAGaramondPro-Regular", + fontFamily: "Unica77LL-Regular", }, }) diff --git a/src/app/Scenes/Sales/Components/SectionHeader.tsx b/src/app/Scenes/Sales/Components/SectionHeader.tsx index 7f5a2639e07..f34012e33b7 100644 --- a/src/app/Scenes/Sales/Components/SectionHeader.tsx +++ b/src/app/Scenes/Sales/Components/SectionHeader.tsx @@ -11,7 +11,7 @@ const Header = styled.View` ` const Title = styled.Text` - font-family: "ReactNativeAGaramondPro-Regular"; + font-family: "Unica77LL-Regular"; font-size: 30px; text-align: left; ` diff --git a/src/app/store/GlobalStore.tsx b/src/app/store/GlobalStore.tsx index 7ec0afef849..569514e3e22 100644 --- a/src/app/store/GlobalStore.tsx +++ b/src/app/store/GlobalStore.tsx @@ -233,7 +233,6 @@ export function getCurrentEmissionState() { const data: GlobalStoreModel["native"]["sessionState"] = { authenticationToken: state?.auth.userAccessToken || "", - deviceId: `${Platform.OS} ${getModel()}`, launchCount: ArtsyNativeModule.launchCount, userAgent, userID: state?.auth.userID!, diff --git a/src/app/store/NativeModel.ts b/src/app/store/NativeModel.ts index 2cbacb75f27..ee3df9c1574 100644 --- a/src/app/store/NativeModel.ts +++ b/src/app/store/NativeModel.ts @@ -41,7 +41,6 @@ export interface NativeState { authenticationToken: string launchCount: number userAgent: string - deviceId: string } export interface NativeModel { diff --git a/src/app/store/migration.tests.ts b/src/app/store/migration.tests.ts index d81e2ad9068..bd14eb92587 100644 --- a/src/app/store/migration.tests.ts +++ b/src/app/store/migration.tests.ts @@ -163,7 +163,6 @@ describe("artsy app store migrations", () => { userAgent: "Jest Unit Tests", authenticationToken: null as any, launchCount: 1, - deviceId: "testDevice", userID: null as any, userEmail: null as any, } @@ -693,3 +692,23 @@ describe("App version Versions.AddDirtyFormValuesToSubmissionState", () => { }) }) }) + +describe("App version Versions.RemoveDeviceId", () => { + const migrationToTest = Versions.RemoveDeviceId + + it("removes deviceId", () => { + const previousState = migrate({ + state: { version: 0 }, + toVersion: migrationToTest - 1, + }) as any + + const migratedState = migrate({ + state: previousState, + toVersion: migrationToTest, + }) as any + + // this test is kinda unnecessary, since `native` is not really possible to test without actually testing the native code. + // but i guess good to just make sure of the undefined, in case we ever break this somehow. + expect(migratedState.native.deviceId).toBe(undefined) + }) +}) diff --git a/src/app/store/migration.ts b/src/app/store/migration.ts index a947c3a64e6..5d7e57ce6d0 100644 --- a/src/app/store/migration.ts +++ b/src/app/store/migration.ts @@ -38,9 +38,10 @@ export const Versions = { RequestedPriceEstimates: 26, AddZipCodeAndCountryCodeInSubmissionArtworkDetails: 27, AddDirtyFormValuesToSubmissionState: 28, + RemoveDeviceId: 29, } -export const CURRENT_APP_VERSION = Versions.AddDirtyFormValuesToSubmissionState +export const CURRENT_APP_VERSION = Versions.RemoveDeviceId export type Migrations = Record any> export const artsyAppMigrations: Migrations = { @@ -232,6 +233,9 @@ export const artsyAppMigrations: Migrations = { }, } }, + [Versions.RemoveDeviceId]: (state) => { + delete state.native.deviceId + }, } export function migrate({ diff --git a/src/app/utils/AdminMenu.tsx b/src/app/utils/AdminMenu.tsx index 3bd647607fe..230d5f0575b 100644 --- a/src/app/utils/AdminMenu.tsx +++ b/src/app/utils/AdminMenu.tsx @@ -56,6 +56,7 @@ export const AdminMenu: React.FC<{ onClose(): void }> = ({ onClose = dismissModa const server = GlobalStore.useAppState((s) => s.artsyPrefs.environment.strings.webURL).slice( "https://".length ) + const userEmail = GlobalStore.useAppState((s) => s.auth.userEmail) useEffect( React.useCallback(() => { @@ -97,6 +98,9 @@ export const AdminMenu: React.FC<{ onClose(): void }> = ({ onClose = dismissModa eigen v{getVersion()}, build {getBuildNumber()} ({ArtsyNativeModule.gitCommitShortHash}) + + {userEmail} + {Platform.OS === "ios" && ( { - AppState.removeEventListener("change", _handleAppStateChange) + sub.remove() } }, [appState.current, onForeground, onBackground]) diff --git a/src/app/utils/volleyClient.ts b/src/app/utils/volleyClient.ts index a3e7ac18934..391ca748de7 100644 --- a/src/app/utils/volleyClient.ts +++ b/src/app/utils/volleyClient.ts @@ -1,6 +1,8 @@ import NetInfo from "@react-native-community/netinfo" -import { getCurrentEmissionState, unsafe__getEnvironment } from "app/store/GlobalStore" +import { unsafe__getEnvironment } from "app/store/GlobalStore" import { throttle } from "lodash" +import { Platform } from "react-native" +import { getModel } from "react-native-device-info" import { logDatadog } from "./loggers" const URLS = { @@ -111,7 +113,7 @@ class VolleyClient { } function getDeviceTag() { - const deviceId = getCurrentEmissionState().deviceId + const deviceId = `${Platform.OS} ${getModel()}` return `device:${deviceId}` } diff --git a/src/palette/Theme.tsx b/src/palette/Theme.tsx index 6dff98ce5c9..b018b047e51 100644 --- a/src/palette/Theme.tsx +++ b/src/palette/Theme.tsx @@ -158,14 +158,14 @@ const THEMES = { }, serif: { regular: { - normal: "ReactNativeAGaramondPro-Regular", - italic: "ReactNativeAGaramondPro-Italic", + normal: "Unica77LL-Regular", + italic: "Unica77LL-Italic", }, medium: { normal: null, italic: null }, - semibold: { normal: "ReactNativeAGaramondPro-Semibold", italic: null }, + semibold: { normal: "Unica77LL-Medium", italic: null }, }, }, - fonts: { sans: "Unica77LL-Regular", serif: "ReactNativeAGaramondPro-Regular" }, + fonts: { sans: "Unica77LL-Regular", serif: "Unica77LL-Regular" }, space: fixSpaceUnitsV2(THEME_V2.space), }, v3: { diff --git a/src/palette/elements/Text/index.tsx b/src/palette/elements/Text/index.tsx index 0187df01638..4baa223d57b 100644 --- a/src/palette/elements/Text/index.tsx +++ b/src/palette/elements/Text/index.tsx @@ -15,8 +15,6 @@ export { SansV1, SansV1Props, SansV1Props as SansProps } import { Serif as SerifV1, SerifProps as SerifV1Props } from "./Serif" export { SerifV1, SerifV1Props, SerifV1Props as SerifProps } -// TODO-PALETTE-V3 remove all `garamond` references from the app - // V1 handler /** diff --git a/src/setupJest.ts b/src/setupJest.ts index f5014a35374..a940762ec74 100644 --- a/src/setupJest.ts +++ b/src/setupJest.ts @@ -389,7 +389,6 @@ function getNativeModules(): OurNativeModules { userAgent: "Jest Unit Tests", authenticationToken: "authenticationToken", launchCount: 1, - deviceId: "testDevice", userID: "userID", userEmail: "user@example.com", }, @@ -470,7 +469,6 @@ jest.mock("app/NativeModules/LegacyNativeModules", () => ({ userAgent: "Jest Unit Tests", authenticationToken: "authenticationToken", launchCount: 1, - deviceId: "testDevice", userID: "userID", userEmail: "user@example.com", }, diff --git a/tsconfig.json b/tsconfig.json index 60ae51f1963..5264095ea23 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -31,7 +31,7 @@ "babel.config.js", "metro.config.js", "jest.config.js", - "emission/Pod/Assets", + "dist", "build", "index.ios.js", "index.android.js", diff --git a/yarn.lock b/yarn.lock index f50f32798f6..a8566005022 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11650,6 +11650,11 @@ react-native-scrollable-tab-view@ptomasroos/react-native-scrollable-tab-view#a7f prop-types "^15.6.0" react-timer-mixin "^0.13.3" +react-native-shake@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/react-native-shake/-/react-native-shake-5.1.1.tgz#733657764b0395b26f26576bba51e2dcbcecfe89" + integrity sha512-h6O8LnFd3LkvoYx7O0afM6rO9fDKomZ1EyomGgKRDyFhinxYIU7Z4uPYtwA4Z1Cd3frEEKTLNKHI1Eu0MOI3Yw== + react-native-share@7.3.6: version "7.3.6" resolved "https://registry.yarnpkg.com/react-native-share/-/react-native-share-7.3.6.tgz#cab3e4e485cecee662ae5dd8a757fc6ec7c5140a"