diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index fd78aa7..d5f0e32 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -20,44 +20,19 @@ steps: - label: "🔬 Build and Test" key: "test" command: | - build_and_test_pod + install_gems + bundle exec fastlane ios test plugins: *common_plugins artifact_paths: - .build/logs/*.log - .build/derived-data/Logs/**/*.xcactivitylog - ################# - # Validate Podspec - ################# - - label: "🔬 Validate Podspec" - key: "validate" - command: | - # validate_podspec - echo '+++ ⚠️ validate_podspec was bypassed ⚠️' - # post a message in the logs - cat .buildkite/validate_podspec_annotation.md - # and also as an annotation - cat .buildkite/validate_podspec_annotation.md | buildkite-agent annotate --style 'warning' - plugins: *common_plugins - ################# # Lint ################# - label: "🧹 Lint" key: "lint" command: | - lint_pod - plugins: *common_plugins - - ################# - # Publish the Podspec (if we're building a tag) - ################# - - label: "⬆️ Publish Podspec" - key: "publish" - command: .buildkite/publish-pod.sh + install_gems + bundle exec rubocop plugins: *common_plugins - depends_on: - - "test" - - "validate" - - "lint" - if: build.tag != null diff --git a/.buildkite/publish-pod.sh b/.buildkite/publish-pod.sh deleted file mode 100644 index c25d1e5..0000000 --- a/.buildkite/publish-pod.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -eu - -PODSPEC_PATH="MediaEditor.podspec" -SPECS_REPO="git@github.com:wordpress-mobile/cocoapods-specs.git" -SLACK_WEBHOOK=$PODS_SLACK_WEBHOOK - -echo "--- :rubygems: Setting up Gems" -install_gems - -echo "--- :cocoapods: Publishing Pod to CocoaPods CDN" -publish_pod $PODSPEC_PATH - -echo "--- :cocoapods: Publishing Pod to WP Specs Repo" -publish_private_pod $PODSPEC_PATH $SPECS_REPO "$SPEC_REPO_PUBLIC_DEPLOY_KEY" - -echo "--- :slack: Notifying Slack" -slack_notify_pod_published $PODSPEC_PATH $SLACK_WEBHOOK diff --git a/.buildkite/validate_podspec_annotation.md b/.buildkite/validate_podspec_annotation.md deleted file mode 100644 index 8789ec4..0000000 --- a/.buildkite/validate_podspec_annotation.md +++ /dev/null @@ -1,10 +0,0 @@ -**`validate_podspec` was bypassed!** - -As of Xcode 14.3, libraries with deployment target below iOS 11 (iOS 12 in Xcode 15) fail to build out of the box. -The reason is a missing file, `/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a`, more info [here](https://stackoverflow.com/questions/75574268/missing-file-libarclite-iphoneos-a-xcode-14-3). - -Client apps can work around this with a post install hook that updates the dependency deployment target, but libraries do not have this option. - -Our old Alamofire dependency targets iOS 8.0, making the validation build fail. - -In the interest of using up to date CI (i.e. not waste time downloading old images) we bypass validation until either we are able to drop or upgraed Alamofire, or find a workaround. diff --git a/.gitignore b/.gitignore index 4a8761f..180506e 100644 --- a/.gitignore +++ b/.gitignore @@ -47,17 +47,6 @@ Package.resolved .build/ -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ -# -# Add this line if you want to avoid checking in source code from the Xcode workspace -# *.xcworkspace - # Carthage # # Add this line if you want to avoid checking in source code from Carthage dependencies. diff --git a/.rubocop.yml b/.rubocop.yml index 761948b..4c9a1fc 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,8 +4,3 @@ AllCops: - DerivedData/**/* - vendor/**/* NewCops: enable - -# Allow the Podspec filename to match the project -Naming/FileName: - Exclude: - - 'MediaEditor.podspec' diff --git a/CHANGELOG.md b/CHANGELOG.md index 763cb9e..6b5ad77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,7 +46,7 @@ _None._ ### Internal Changes -_None._ +- Remove CocoaPods support. [#51] ## 1.2.2 diff --git a/Gemfile b/Gemfile index 1cd19a8..4ad1812 100644 --- a/Gemfile +++ b/Gemfile @@ -2,6 +2,5 @@ source 'https://rubygems.org' -gem 'cocoapods', '~> 1.16' gem 'fastlane', '~> 2.236' gem 'rubocop', '~> 1.88' diff --git a/Gemfile.lock b/Gemfile.lock index f04f484..3c09db1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,23 +3,8 @@ GEM specs: CFPropertyList (3.0.8) abbrev (0.1.2) - activesupport (7.2.3.1) - base64 - benchmark (>= 0.3) - bigdecimal - concurrent-ruby (~> 1.0, >= 1.3.1) - connection_pool (>= 2.2.5) - drb - i18n (>= 1.6, < 2) - logger (>= 1.4.2) - minitest (>= 5.1, < 6) - securerandom (>= 0.3) - tzinfo (~> 2.0, >= 2.0.5) addressable (2.9.0) public_suffix (>= 2.0.2, < 8.0) - algoliasearch (1.27.5) - httpclient (~> 2.8, >= 2.8.3) - json (>= 1.5.1) artifactory (3.0.17) ast (2.4.3) atomos (0.1.3) @@ -47,61 +32,17 @@ GEM benchmark (0.5.0) bigdecimal (4.1.2) claide (1.1.0) - cocoapods (1.16.2) - addressable (~> 2.8) - claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.16.2) - cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 2.1, < 3.0) - cocoapods-plugins (>= 1.0.0, < 2.0) - cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.6.0, < 2.0) - cocoapods-try (>= 1.1.0, < 2.0) - colored2 (~> 3.1) - escape (~> 0.0.4) - fourflusher (>= 2.3.0, < 3.0) - gh_inspector (~> 1.0) - molinillo (~> 0.8.0) - nap (~> 1.0) - ruby-macho (>= 2.3.0, < 3.0) - xcodeproj (>= 1.27.0, < 2.0) - cocoapods-core (1.16.2) - activesupport (>= 5.0, < 8) - addressable (~> 2.8) - algoliasearch (~> 1.0) - concurrent-ruby (~> 1.1) - fuzzy_match (~> 2.0.4) - nap (~> 1.0) - netrc (~> 0.11) - public_suffix (~> 4.0) - typhoeus (~> 1.0) - cocoapods-deintegrate (1.0.5) - cocoapods-downloader (2.1) - cocoapods-plugins (1.0.0) - nap - cocoapods-search (1.0.1) - cocoapods-trunk (1.6.0) - nap (>= 0.8, < 2.0) - netrc (~> 0.11) - cocoapods-try (1.2.0) colored (1.2) colored2 (3.1.2) commander (4.6.0) highline (~> 2.0.0) - concurrent-ruby (1.3.7) - connection_pool (3.0.2) csv (3.3.5) declarative (0.0.20) digest-crc (0.7.0) rake (>= 12.0.0, < 14.0.0) domain_name (0.6.20240107) dotenv (2.8.1) - drb (2.2.3) emoji_regex (3.2.3) - escape (0.0.4) - ethon (0.18.0) - ffi (>= 1.15.0) - logger excon (0.112.0) faraday (1.10.6) faraday-em_http (~> 1.0) @@ -184,9 +125,6 @@ GEM xcpretty (~> 0.4.1) xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) fastlane-sirp (1.1.0) - ffi (1.17.4) - fourflusher (2.3.1) - fuzzy_match (2.0.4) gh_inspector (1.1.3) google-apis-androidpublisher_v3 (0.103.0) google-apis-core (>= 0.15.0, < 2.a) @@ -234,8 +172,6 @@ GEM domain_name (~> 0.5) httpclient (2.9.0) mutex_m - i18n (1.15.2) - concurrent-ruby (~> 1.0) jmespath (1.6.2) json (2.20.0) jwt (3.2.0) @@ -245,15 +181,11 @@ GEM logger (1.7.0) mini_magick (4.13.2) mini_mime (1.1.5) - minitest (5.27.0) - molinillo (0.8.0) multi_json (1.21.1) multipart-post (2.4.1) mutex_m (0.3.0) nanaimo (0.4.0) - nap (1.1.0) naturally (2.3.0) - netrc (0.11.0) nkf (0.3.0) optparse (0.8.1) os (1.1.4) @@ -291,11 +223,9 @@ GEM rubocop-ast (1.49.1) parser (>= 3.3.7.2) prism (~> 1.7) - ruby-macho (2.5.1) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) rubyzip (2.4.1) - securerandom (0.4.1) security (0.1.5) signet (0.22.0) addressable (~> 2.8) @@ -312,10 +242,6 @@ GEM tty-screen (0.8.2) tty-spinner (0.9.3) tty-cursor (~> 0.7) - typhoeus (1.6.0) - ethon (>= 0.18.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) uber (0.1.0) unicode-display_width (2.6.0) word_wrap (1.0.0) @@ -335,9 +261,8 @@ PLATFORMS ruby DEPENDENCIES - cocoapods (~> 1.16) fastlane (~> 2.236) rubocop (~> 1.88) BUNDLED WITH - 2.3.22 + 2.6.8 diff --git a/MediaEditor.podspec b/MediaEditor.podspec deleted file mode 100644 index a179c37..0000000 --- a/MediaEditor.podspec +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -Pod::Spec.new do |s| - s.name = 'MediaEditor' - s.version = '1.2.2' - - s.summary = 'An extensible Media Editor for iOS.' - s.description = <<~DESC - An extensible Media Editor for iOS that allows editing single or multiple images. - DESC - - s.homepage = 'https://github.com/wordpress-mobile/MediaEditor-iOS' - s.license = { type: 'GPLv2', file: 'LICENSE' } - s.author = { 'The WordPress Mobile Team' => 'mobile@wordpress.org' } - - s.platform = :ios, '12.0' - s.swift_version = '5.0' - - s.source = { git: 'https://github.com/wordpress-mobile/MediaEditor-iOS.git', tag: s.version.to_s } - s.module_name = 'MediaEditor' - s.source_files = 'Sources/**/*.{h,m,swift}' - s.resources = 'Sources/**/*.{storyboard}' - s.resource_bundles = { - 'MediaEditor' => 'Sources/**/*.{xcassets}' - } - - s.dependency 'CropViewController', '~> 2.5.3' -end diff --git a/README.md b/README.md index 502aa0e..0937688 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MediaEditor -[![CircleCI](https://circleci.com/gh/wordpress-mobile/MediaEditor-iOS.svg?style=svg)](https://circleci.com/gh/wordpress-mobile/MediaEditor-iOS) [![Version](https://img.shields.io/cocoapods/v/MediaEditor.svg?style=flat)](http://cocoadocs.org/docsets/MediaEditor) [![License](https://img.shields.io/cocoapods/l/MediaEditor.svg?style=flat)](http://cocoadocs.org/docsets/MediaEditor) [![Platform](https://img.shields.io/cocoapods/p/MediaEditor.svg?style=flat)](http://cocoadocs.org/docsets/MediaEditor) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![CircleCI](https://circleci.com/gh/wordpress-mobile/MediaEditor-iOS.svg?style=svg)](https://circleci.com/gh/wordpress-mobile/MediaEditor-iOS) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) MediaEditor is an extendable library for iOS that allows you to quickly and easily add image editing features to your app. You can edit single or multiple images, from the device's library or any other source. It has been designed to feel natural and part of the OS. @@ -54,17 +54,32 @@ Check the Example app for even more ways to use the MediaEditor: # Requirements -* iOS 11.0+ +* iOS 15.0+ * Swift 5 # Installation -### Cocoapods +### Swift Package Manager -Add the following to your Podfile: +Add `MediaEditor` as a package dependency: -```ruby -pod 'MediaEditor' +```swift +dependencies: [ + .package(url: "https://github.com/wordpress-mobile/MediaEditor-iOS.git", from: "1.3.0") +] +``` + +Then add `MediaEditor` to your target dependencies: + +```swift +targets: [ + .target( + name: "YourTarget", + dependencies: [ + .product(name: "MediaEditor", package: "MediaEditor-iOS") + ] + ) +] ``` ### Manual Installation diff --git a/Sources/Extensions/Bundle+mediaEditor.swift b/Sources/Extensions/Bundle+mediaEditor.swift index 0b4d1bd..569bda0 100644 --- a/Sources/Extensions/Bundle+mediaEditor.swift +++ b/Sources/Extensions/Bundle+mediaEditor.swift @@ -5,14 +5,7 @@ extension Bundle { #if SWIFT_PACKAGE return Bundle.module #else - let defaultBundle = Bundle(for: MediaEditor.self) - // If installed with CocoaPods, resources will be in MediaEditor.bundle - if let bundleURL = defaultBundle.resourceURL, - let resourceBundle = Bundle(url: bundleURL.appendingPathComponent("MediaEditor.bundle")) { - return resourceBundle - } - // Otherwise, the default bundle is used for resources - return defaultBundle + return Bundle(for: MediaEditor.self) #endif }