Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
69 changes: 15 additions & 54 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ env:

jobs:
test:
name: Test on iOS
name: Test on iOS
runs-on: macos-latest

strategy:
matrix:
destination:
- "OS=18.0,name=iPhone 15"
- "OS=17.4,name=iPhone 14"
- "OS=16.4,name=iPhone 12"
- "OS=18.5,name=iPhone 16 Pro"
- "OS=18.5,name=iPhone 16"
- "OS=18.5,name=iPhone SE (3rd generation)"

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.4'
xcode-version: '16.0'

- name: Install xcpretty
run: gem install xcpretty
Expand All @@ -40,57 +40,18 @@ jobs:
- name: Show available simulators
run: xcrun simctl list devices available

- name: Build and Test Framework (Debug)
- name: Build Swift Package for iOS
run: |
set -o pipefail
xcodebuild -workspace "iOS Example/iOS Example.xcworkspace" \
-scheme "FDTake" \
-destination "${{ matrix.destination }}" \
-configuration Debug \
ONLY_ACTIVE_ARCH=NO \
ENABLE_TESTABILITY=YES \
test | xcpretty

- name: Build and Test Framework (Release)
run: |
set -o pipefail
xcodebuild -workspace "iOS Example/iOS Example.xcworkspace" \
-scheme "FDTake" \
-destination "${{ matrix.destination }}" \
-configuration Release \
ONLY_ACTIVE_ARCH=NO \
ENABLE_TESTABILITY=YES \
test | xcpretty
xcodebuild build \
-scheme FDTake \
-destination "${{ matrix.destination }}" | xcpretty

- name: Build Example App
- name: Test iOS Example App
run: |
set -o pipefail
xcodebuild -workspace "iOS Example/iOS Example.xcworkspace" \
xcodebuild build \
-project "iOS Example/iOS Example.xcodeproj" \
-scheme "iOS Example" \
-destination "${{ matrix.destination }}" \
-configuration Debug \
ONLY_ACTIVE_ARCH=NO \
build | xcpretty
-destination "${{ matrix.destination }}" | xcpretty

cocoapods:
name: CocoaPods Validation
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true

- name: Install CocoaPods
run: gem install cocoapods

- name: Lint Podspec
run: pod lib lint --allow-warnings

- name: Check CocoaPods Quality
run: ruby Tests/CheckCocoaPodsQualityIndexes.rb FDTake
15 changes: 0 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,6 @@ playground.xcworkspace
.build/
.swiftpm

# 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/

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ All notable changes to this project will be documented in this file.
- Updated build environment from Xcode 11.2 to Xcode 15.4
- Updated iOS testing targets from iOS 13.2.2 to iOS 17.5, 16.4, and 14.5
- Updated Swift Package Manager tools version from 5.1 to 5.7
- **BREAKING:** Removed CocoaPods and Carthage support - use Swift Package Manager instead
- **BREAKING:** Removed Xcode workspace - use the project file directly
- Fixed MobileCoreServices import issue by migrating to UniformTypeIdentifiers framework
- Updated CI to use Xcode project instead of workspace

#### KNOWN ISSUES

Expand Down
8 changes: 0 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,11 @@ When you commit a change, please add a note to [CHANGELOG.md](CHANGELOG.md).
## Release Process

1. Confirm the build is [passing in GitHub Actions](https://github.com/fulldecent/FDTake/actions)
1. This automatically checks that the Podfile is building
2. Push a release commit
1. Create a new Master section at the top
2. Rename the old Master section like:
## [1.0.5](https://github.com/fulldecent/FDTake/releases/tag/1.0.5)
Released on 2016-02-14.
3. Update the Podspec version number
3. Create a GitHub release
1. Tag the release (like `1.0.5`)
2. Paste notes from [CHANGELOG.md](CHANGELOG.md)
3. Push the Podspec to CocoaPods
1. `pod trunk push`
4. Create Carthage binaries
1. `carthage build --no-skip-current`
2. `carthage archive FDTake`
3. Add to the GitHub release
23 changes: 0 additions & 23 deletions FDTake.podspec

This file was deleted.

2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PackageDescription

let package = Package(
name: "FDTake",
platforms: [.iOS(.v12)],
platforms: [.iOS(.v15)],
products: [
.library(
name: "FDTake",
Expand Down
27 changes: 3 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# FDTake

[![CI Status](https://github.com/fulldecent/FDTake/workflows/CI/badge.svg)](https://github.com/fulldecent/FDTake/actions)
[![Version](https://img.shields.io/cocoapods/v/FDTake.svg?style=flat)](http://cocoapods.org/pods/FDTake)
[![License](https://img.shields.io/cocoapods/l/FDTake.svg?style=flat)](http://cocoapods.org/pods/FDTake)
[![Platform](https://img.shields.io/cocoapods/p/FDTake.svg?style=flat)](http://cocoapods.org/pods/FDTake)
[![Readme Score](http://readme-score-api.herokuapp.com/score.svg?url=fulldecent/FDTake)](http://clayallsopp.github.io/readme-score?url=fulldecent/FDTake)

Easily take a photo or video or choose from library
Expand All @@ -12,7 +9,7 @@ Easily take a photo or video or choose from library

## Usage

To run the example project, clone the repo, and run `pod install` from the Example directory first.
To run the example project, clone the repo and open `iOS Example/iOS Example.xcodeproj`.

To use it in your project, add an `FDTakeController` to your view controller and implement:

Expand Down Expand Up @@ -112,9 +109,6 @@ open func present()
open func dismiss()
```

Other available options are documented at <a href="http://cocoadocs.org/docsets/FDTake/">CocoaDocs for FDTake</a>.


## How it works

1. See if device has camera
Expand Down Expand Up @@ -159,22 +153,7 @@ Other available options are documented at <a href="http://cocoadocs.org/docsets/

## Installation

Add this to your project using Swift Package Manager. In Xcode that is simply: File > Swift Packages > Add Package Dependency... and you're done. Alternative installation options are shown below for legacy projects.

### CocoaPods

If you are already using [CocoaPods](http://cocoapods.org), just add 'FDTake' to your `Podfile` then run `pod install`.

### Carthage

If you are already using [Carthage](https://github.com/Carthage/Carthage), just add to your `Cartfile`:

```ogdl
github "fulldecent/FDTake"
```

Then run `carthage update` to build the framework and drag the built `FDTake`.framework into your Xcode project.

Add this to your project using Swift Package Manager. In Xcode that is simply: File > Swift Packages > Add Package Dependency... and you're done.

## Author

Expand All @@ -184,7 +163,7 @@ William Entriken, github.com@phor.net

This is a mature project and we do not expect to add new features unless something has already become state-of-the-art in other applications. Please be prepared to cite screenshots of other apps before making a feature request.

We support targets for the latest released versions of Xcode, Carthage, CocoaPods and Swift Package Manager. If there are incompatabilities, for example CocoaPods not supporting the latest version of Xcode, then we will only support the latest released versions/combinations that are supported. If you would like to support pre-release versions of these packages, please open a pull request, not an issue.
We support targets for the latest released versions of Xcode and Swift Package Manager. If there are incompatibilities, we will only support the latest released versions/combinations that are supported. If you would like to support pre-release versions of these packages, please open a pull request, not an issue.

## License

Expand Down
12 changes: 6 additions & 6 deletions Sources/FDTake/FDTakeController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
//

import Foundation
import MobileCoreServices
import UIKit
import Photos
import UniformTypeIdentifiers

/// A class for selecting and taking photos
open class FDTakeController: NSObject {
Expand Down Expand Up @@ -237,10 +237,10 @@ open class FDTakeController: NSObject {
self.imagePicker.allowsEditing = self.allowsEditing
var mediaTypes = [String]()
if self.allowsPhoto {
mediaTypes.append(String(kUTTypeImage))
mediaTypes.append(UTType.image.identifier)
}
if self.allowsVideo {
mediaTypes.append(String(kUTTypeMovie))
mediaTypes.append(UTType.movie.identifier)
}
self.imagePicker.mediaTypes = mediaTypes

Expand Down Expand Up @@ -300,8 +300,8 @@ extension FDTakeController : UIImagePickerControllerDelegate, UINavigationContro
didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]
) {
UIApplication.shared.isStatusBarHidden = true
switch info[.mediaType] as! CFString {
case kUTTypeImage:
switch info[.mediaType] as! String {
case UTType.image.identifier:
let imageToSave: UIImage
if let editedImage = info[.editedImage] as? UIImage {
imageToSave = editedImage
Expand All @@ -315,7 +315,7 @@ extension FDTakeController : UIImagePickerControllerDelegate, UINavigationContro
if UI_USER_INTERFACE_IDIOM() == .pad {
self.imagePicker.dismiss(animated: true)
}
case kUTTypeMovie:
case UTType.movie.identifier:
self.didGetVideo?(info[.mediaURL] as! URL, info)
default:
break
Expand Down
61 changes: 0 additions & 61 deletions Tests/CheckCocoaPodsQualityIndexes.rb

This file was deleted.

Loading
Loading