Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Giphy code #14302

Merged
merged 6 commits into from
Jun 12, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
12 changes: 6 additions & 6 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ 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'

## while PR is in review:
# pod 'WordPressShared', :git => 'https://github.com/wordpress-mobile/WordPress-iOS-Shared.git', :branch => ''
pod 'WordPressShared', :git => 'https://github.com/wordpress-mobile/WordPress-iOS-Shared.git', :branch => 'issue/remove_giphy_tracks'
# pod 'WordPressShared', :git => 'https://github.com/wordpress-mobile/WordPress-iOS-Shared.git', :commit => 'efe5a065f3ace331353595ef85eef502baa23497'
end

Expand All @@ -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 => 'issue/update_shared_pod'
#pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :commit => ''
#pod 'WordPressKit', :path => '../WordPressKit-iOS'
end
Expand Down Expand Up @@ -184,9 +184,9 @@ 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', :branch => 'issue/update_shared_pod'
# pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :commit => ''
# pod 'WordPressAuthenticator', :path => '../WordPressAuthenticator-iOS'

Expand Down
47 changes: 31 additions & 16 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 (from `https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git`, branch `issue/update_shared_pod`)
- WordPressKit (from `https://github.com/wordpress-mobile/WordPressKit-iOS.git`, branch `issue/update_shared_pod`)
- WordPressMocks (~> 0.0.8)
- WordPressShared (~> 1.8.16)
- WordPressShared (from `https://github.com/wordpress-mobile/WordPress-iOS-Shared.git`, branch `issue/remove_giphy_tracks`)
- WordPressUI (~> 1.7.0)
- WPMediaPicker (~> 1.7.0)
- Yoga (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/3d10d026ea0175ba6ffc94345546704056662365/react-native-gutenberg-bridge/third-party-podspecs/Yoga.podspec.json`)
Expand Down Expand Up @@ -532,10 +532,7 @@ SPEC REPOS:
- UIDeviceIdentifier
- WordPress-Aztec-iOS
- WordPress-Editor-iOS
- WordPressAuthenticator
- WordPressKit
- WordPressMocks
- WordPressShared
- WordPressUI
- WPMediaPicker
- wpxmlrpc
Expand Down Expand Up @@ -618,6 +615,15 @@ EXTERNAL SOURCES:
RNTAztecView:
:commit: 3d10d026ea0175ba6ffc94345546704056662365
:git: http://github.com/wordpress-mobile/gutenberg-mobile/
WordPressAuthenticator:
:branch: issue/update_shared_pod
:git: https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git
WordPressKit:
:branch: issue/update_shared_pod
:git: https://github.com/wordpress-mobile/WordPressKit-iOS.git
WordPressShared:
:branch: issue/remove_giphy_tracks
:git: https://github.com/wordpress-mobile/WordPress-iOS-Shared.git
Yoga:
:podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/3d10d026ea0175ba6ffc94345546704056662365/react-native-gutenberg-bridge/third-party-podspecs/Yoga.podspec.json

Expand All @@ -631,6 +637,15 @@ CHECKOUT OPTIONS:
RNTAztecView:
:commit: 3d10d026ea0175ba6ffc94345546704056662365
:git: http://github.com/wordpress-mobile/gutenberg-mobile/
WordPressAuthenticator:
:commit: e50154d9d1e84e7168777925c118400d17dd9040
:git: https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git
WordPressKit:
:commit: 6ac31e3d3533baaec9ff1dbf5a240ca76c1dfd23
:git: https://github.com/wordpress-mobile/WordPressKit-iOS.git
WordPressShared:
:commit: d67ca763c83e561f7058db626c0d99779c1f18fc
:git: https://github.com/wordpress-mobile/WordPress-iOS-Shared.git

SPEC CHECKSUMS:
1PasswordExtension: f97cc80ae58053c331b2b6dc8843ba7103b33794
Expand Down Expand Up @@ -703,10 +718,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 +735,6 @@ SPEC CHECKSUMS:
ZendeskSupportSDK: a87ab1e4badace92c75eb11dc77ede1e995b2adc
ZIPFoundation: 249fa8890597086cd536bb2df5c9804d84e122b0

PODFILE CHECKSUM: 4971991bc25c9b578af1ba513466e8e5ec25408c
PODFILE CHECKSUM: 8f76ed4065d534296035210422deb491b228bc72

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