Skip to content

Commit

Permalink
Merge pull request #14302 from wordpress-mobile/issue/13803-remove_gi…
Browse files Browse the repository at this point in the history
…phy_code

Remove Giphy code
  • Loading branch information
ScoutHarris authored Jun 12, 2020
2 parents c1851f5 + 8bbd606 commit dcfb9c0
Show file tree
Hide file tree
Showing 30 changed files with 24 additions and 877 deletions.
2 changes: 1 addition & 1 deletion .configure
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"project_name": "WordPress-iOS",
"branch": "master",
"pinned_hash": "c99db21d6160bee2218e2fd3a18f5de9b2a92eb3",
"pinned_hash": "43e751540dcdcc86bde9db7b0d08a4acdbc1472c",
"files_to_copy": [
{
"file": "iOS/WPiOS/wpcom_app_credentials",
Expand Down
Binary file modified .configure-files/wpcom_alpha_app_credentials.enc
Binary file not shown.
Binary file modified .configure-files/wpcom_app_credentials.enc
Binary file not shown.
Binary file modified .configure-files/wpcom_internal_app_credentials.enc
Binary file not shown.
8 changes: 4 additions & 4 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ workspace 'WordPress.xcworkspace'
##
def wordpress_shared
## for production:
pod 'WordPressShared', '~> 1.8.16'
pod 'WordPressShared', '~> 1.9.0-beta.1'

## for development:
# pod 'WordPressShared', :path => '../WordPress-iOS-Shared'
Expand Down Expand Up @@ -43,9 +43,9 @@ def wordpress_ui
end

def wordpress_kit
pod 'WordPressKit', '~> 4.9.0'
pod 'WordPressKit', '~> 5.0.0-beta.1'
#pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :tag => ''
#pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :branch => 'feature/homepage-settings'
#pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :branch => ''
#pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :commit => ''
#pod 'WordPressKit', :path => '../WordPressKit-iOS'
end
Expand Down Expand Up @@ -184,7 +184,7 @@ target 'WordPress' do

pod 'Gridicons', '~> 1.0.1'

pod 'WordPressAuthenticator', '~> 1.18.0-beta.8'
pod 'WordPressAuthenticator', '~> 1.18.0-beta.9'
# While in PR
# pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :branch => ''
# pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :commit => ''
Expand Down
26 changes: 13 additions & 13 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ PODS:
- WordPress-Aztec-iOS (1.19.2)
- WordPress-Editor-iOS (1.19.2):
- WordPress-Aztec-iOS (= 1.19.2)
- WordPressAuthenticator (1.18.0-beta.8):
- WordPressAuthenticator (1.18.0-beta.9):
- 1PasswordExtension (= 1.8.6)
- Alamofire (= 4.8)
- CocoaLumberjack (~> 3.5)
Expand All @@ -389,18 +389,18 @@ PODS:
- lottie-ios (= 3.1.6)
- "NSURL+IDN (= 0.4)"
- SVProgressHUD (= 2.2.5)
- WordPressKit (~> 4.9.0)
- WordPressShared (~> 1.8.16)
- WordPressKit (~> 5.0.0-beta.1)
- WordPressShared (~> 1.9.0-beta.1)
- WordPressUI (~> 1.7.0)
- WordPressKit (4.9.0):
- WordPressKit (5.0.0-beta.1):
- Alamofire (~> 4.8.0)
- CocoaLumberjack (~> 3.4)
- NSObject-SafeExpectations (= 0.0.4)
- UIDeviceIdentifier (~> 1)
- WordPressShared (~> 1.8.16)
- WordPressShared (~> 1.9.0-beta.1)
- wpxmlrpc (= 0.8.5)
- WordPressMocks (0.0.8)
- WordPressShared (1.8.16):
- WordPressShared (1.9.0-beta.1):
- CocoaLumberjack (~> 3.4)
- FormatterKit/TimeIntervalFormatter (= 1.8.2)
- WordPressUI (1.7.0)
Expand Down Expand Up @@ -483,10 +483,10 @@ DEPENDENCIES:
- Starscream (= 3.0.6)
- SVProgressHUD (= 2.2.5)
- WordPress-Editor-iOS (~> 1.19.2)
- WordPressAuthenticator (~> 1.18.0-beta.8)
- WordPressKit (~> 4.9.0)
- WordPressAuthenticator (~> 1.18.0-beta.9)
- WordPressKit (~> 5.0.0-beta.1)
- WordPressMocks (~> 0.0.8)
- WordPressShared (~> 1.8.16)
- WordPressShared (~> 1.9.0-beta.1)
- WordPressUI (~> 1.7.0)
- WPMediaPicker (~> 1.7.0)
- Yoga (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.30.0/react-native-gutenberg-bridge/third-party-podspecs/Yoga.podspec.json`)
Expand Down Expand Up @@ -703,10 +703,10 @@ SPEC CHECKSUMS:
UIDeviceIdentifier: 44f805037d21b94394821828f4fcaba34b38c2d0
WordPress-Aztec-iOS: d01bf0c5e150ae6a046f06ba63b7cc2762061c0b
WordPress-Editor-iOS: 5b726489e5ae07b7281a2862d69aba2d5c83f140
WordPressAuthenticator: aa122f955529beecdb49bf7932ed9431c2ea5c97
WordPressKit: 2e707edd1b28e8dd0f74a40469ca6e7be7b20a70
WordPressAuthenticator: 8567813769caf5e570d3370c907422a17c174c2b
WordPressKit: 48ef1d76727cde146db44097cfb89852b171aa72
WordPressMocks: b4064b99a073117bbc304abe82df78f2fbe60992
WordPressShared: 1bc316ed162f42af4e0fa2869437e9e28b532b01
WordPressShared: bc1a056b5d4da040e3addf4f510c0de67651ab1b
WordPressUI: 1cf47a3b78154faf69caa18569ee7ece1e510fa0
WPMediaPicker: 754bc043ea42abc2eae8a07e5680c777c112666a
wpxmlrpc: 6a9bdd6ab9d1b159b384b0df0f3f39de9af4fecf
Expand All @@ -720,6 +720,6 @@ SPEC CHECKSUMS:
ZendeskSupportSDK: a87ab1e4badace92c75eb11dc77ede1e995b2adc
ZIPFoundation: 249fa8890597086cd536bb2df5c9804d84e122b0

PODFILE CHECKSUM: 408866eedca9df799cf2bd29fe537a9e3c5bbd8a
PODFILE CHECKSUM: f0b1fb4b6308ca3d34ea36afd78ce9e587f5e747

COCOAPODS: 1.8.4
3 changes: 0 additions & 3 deletions WordPress/Classes/Services/MediaImportService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ open class MediaImportService: LocalCoreDataService {
exporter.videoOptions = self.exporterVideoOptions
exporter.urlOptions = self.exporterURLOptions
return exporter
case let giphyMedia as GiphyMedia:
let exporter = MediaExternalExporter(externalAsset: giphyMedia)
return exporter
case let stockPhotosMedia as StockPhotosMedia:
let exporter = MediaExternalExporter(externalAsset: stockPhotosMedia)
return exporter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,6 @@ + (TracksEventPair *)eventPairForStat:(WPAnalyticsStat)stat
case WPAnalyticsStatDomainCreditRedemptionTapped:
eventName = @"domain_credit_redemption_tapped";
break;
case WPAnalyticsStatEditorAddedPhotoViaGiphy:
eventName = @"editor_photo_added";
eventProperties = @{ @"via" : @"giphy" };
break;
case WPAnalyticsStatEditorAddedPhotoViaLocalLibrary:
eventName = @"editor_photo_added";
eventProperties = @{ @"via" : @"local_library" };
Expand Down Expand Up @@ -708,15 +704,6 @@ + (TracksEventPair *)eventPairForStat:(WPAnalyticsStat)stat
case WPAnalyticsStatEnhancedSiteCreationErrorShown:
eventName = @"enhanced_site_creation_error_shown";
break;
case WPAnalyticsStatGiphyAccessed:
eventName = @"giphy_accessed";
break;
case WPAnalyticsStatGiphySearched:
eventName = @"giphy_searched";
break;
case WPAnalyticsStatGiphyUploaded:
eventName = @"giphy_uploaded";
break;
case WPAnalyticsStatGravatarCropped:
eventName = @"me_gravatar_cropped";
break;
Expand Down Expand Up @@ -880,10 +867,6 @@ + (TracksEventPair *)eventPairForStat:(WPAnalyticsStat)stat
eventName = @"media_library_photo_added";
eventProperties = @{ @"via" : @"device_library" };
break;
case WPAnalyticsStatMediaLibraryAddedPhotoViaGiphy:
eventName = @"media_library_photo_added";
eventProperties = @{ @"via" : @"giphy" };
break;
case WPAnalyticsStatMediaLibraryAddedPhotoViaOtherApps:
eventName = @"media_library_photo_added";
eventProperties = @{ @"via" : @"other_library" };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ enum MediaUploadOrigin {
// Media Library
case (.mediaLibrary(let source), .image) where source == .deviceLibrary:
return .mediaLibraryAddedPhotoViaDeviceLibrary
case (.mediaLibrary(let source), .image) where source == .giphy:
return .mediaLibraryAddedPhotoViaGiphy
case (.mediaLibrary(let source), .image) where source == .otherApps:
return .mediaLibraryAddedPhotoViaOtherApps
case (.mediaLibrary(let source), .image) where source == .stockPhotos:
Expand All @@ -149,8 +147,6 @@ enum MediaUploadOrigin {
case (.mediaLibrary(let source), .video) where source == .camera:
return .mediaLibraryAddedVideoViaCamera
// Editor
case (.editor(let source), .image) where source == .giphy :
return .editorAddedPhotoViaGiphy
case (.editor(let source), .image) where source == .deviceLibrary:
return .editorAddedPhotoViaLocalLibrary
case (.editor(let source), .image) where source == .wpMediaLibrary:
Expand Down Expand Up @@ -181,7 +177,6 @@ enum MediaSource {
case wpMediaLibrary
case stockPhotos
case camera
case giphy
case mediaEditor
case tenor
}
Original file line number Diff line number Diff line change
Expand Up @@ -2392,10 +2392,10 @@ extension AztecPostViewController {
attachment?.uploadID = media.uploadID
}

/// Sets the badge title of `attachment` to "GIF" if either the media is being imported from Giphy,
/// Sets the badge title of `attachment` to "GIF" if either the media is being imported from Tenor,
/// or if it's a PHAsset with an animated playback style.
private func setGifBadgeIfNecessary(for attachment: MediaAttachment, asset: ExportableAsset, source: MediaSource) {
var isGif = [.giphy, .tenor].contains(source)
var isGif = source == .tenor

if let asset = asset as? PHAsset,
asset.playbackStyle == .imageAnimated {
Expand Down Expand Up @@ -3307,14 +3307,6 @@ extension AztecPostViewController: StockPhotosPickerDelegate {
}
}

extension AztecPostViewController: GiphyPickerDelegate {
func giphyPicker(_ picker: GiphyPicker, didFinishPicking assets: [GiphyMedia]) {
assets.forEach {
insert(exportableAsset: $0, source: .giphy)
}
}
}

extension AztecPostViewController: TenorPickerDelegate {
func tenorPicker(_ picker: TenorPicker, didFinishPicking assets: [TenorMedia]) {
assets.forEach {
Expand Down
60 changes: 0 additions & 60 deletions WordPress/Classes/ViewRelated/Media/Giphy/GiphyDataLoader.swift

This file was deleted.

Loading

0 comments on commit dcfb9c0

Please sign in to comment.