Skip to content

Commit

Permalink
Merge pull request #109 from ennioma/develop
Browse files Browse the repository at this point in the history
Bump version 2.0.0
  • Loading branch information
ennioma authored Feb 3, 2018
2 parents f243e0e + 5cd5433 commit 3533d17
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 72 deletions.
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "Codeido/PMAlertController", "3.1.0"
github "Codeido/PMAlertController", "3.2.0"
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "Codeido/PMAlertController" "2.1.2"
github "Codeido/PMAlertController" "3.2.0"
102 changes: 51 additions & 51 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
PODS:
- arek (1.7.1):
- arek/Bluetooth (= 1.7.1)
- arek/Camera (= 1.7.1)
- arek/CloudKit (= 1.7.1)
- arek/Contacts (= 1.7.1)
- arek/Core (= 1.7.1)
- arek/Events (= 1.7.1)
- arek/Health (= 1.7.1)
- arek/Location (= 1.7.1)
- arek/MediaLibrary (= 1.7.1)
- arek/Microphone (= 1.7.1)
- arek/Motion (= 1.7.1)
- arek/Notifications (= 1.7.1)
- arek/Photos (= 1.7.1)
- arek/Reminders (= 1.7.1)
- arek/SpeechRecognizer (= 1.7.1)
- PMAlertController (= 3.1.0)
- arek/Bluetooth (1.7.1):
- arek (2.0.0):
- arek/Bluetooth (= 2.0.0)
- arek/Camera (= 2.0.0)
- arek/CloudKit (= 2.0.0)
- arek/Contacts (= 2.0.0)
- arek/Core (= 2.0.0)
- arek/Events (= 2.0.0)
- arek/Health (= 2.0.0)
- arek/Location (= 2.0.0)
- arek/MediaLibrary (= 2.0.0)
- arek/Microphone (= 2.0.0)
- arek/Motion (= 2.0.0)
- arek/Notifications (= 2.0.0)
- arek/Photos (= 2.0.0)
- arek/Reminders (= 2.0.0)
- arek/SpeechRecognizer (= 2.0.0)
- PMAlertController (= 3.2.0)
- arek/Bluetooth (2.0.0):
- arek/Core
- PMAlertController (= 3.1.0)
- arek/Camera (1.7.1):
- PMAlertController (= 3.2.0)
- arek/Camera (2.0.0):
- arek/Core
- PMAlertController (= 3.1.0)
- arek/CloudKit (1.7.1):
- PMAlertController (= 3.2.0)
- arek/CloudKit (2.0.0):
- arek/Core
- PMAlertController (= 3.1.0)
- arek/Contacts (1.7.1):
- PMAlertController (= 3.2.0)
- arek/Contacts (2.0.0):
- arek/Core
- PMAlertController (= 3.1.0)
- arek/Core (1.7.1):
- PMAlertController (= 3.1.0)
- arek/Events (1.7.1):
- PMAlertController (= 3.2.0)
- arek/Core (2.0.0):
- PMAlertController (= 3.2.0)
- arek/Events (2.0.0):
- arek/Core
- PMAlertController (= 3.1.0)
- arek/Health (1.7.1):
- PMAlertController (= 3.2.0)
- arek/Health (2.0.0):
- arek/Core
- PMAlertController (= 3.1.0)
- arek/Location (1.7.1):
- PMAlertController (= 3.2.0)
- arek/Location (2.0.0):
- arek/Core
- PMAlertController (= 3.1.0)
- arek/MediaLibrary (1.7.1):
- PMAlertController (= 3.2.0)
- arek/MediaLibrary (2.0.0):
- arek/Core
- PMAlertController (= 3.1.0)
- arek/Microphone (1.7.1):
- PMAlertController (= 3.2.0)
- arek/Microphone (2.0.0):
- arek/Core
- PMAlertController (= 3.1.0)
- arek/Motion (1.7.1):
- PMAlertController (= 3.2.0)
- arek/Motion (2.0.0):
- arek/Core
- PMAlertController (= 3.1.0)
- arek/Notifications (1.7.1):
- PMAlertController (= 3.2.0)
- arek/Notifications (2.0.0):
- arek/Core
- PMAlertController (= 3.1.0)
- arek/Photos (1.7.1):
- PMAlertController (= 3.2.0)
- arek/Photos (2.0.0):
- arek/Core
- PMAlertController (= 3.1.0)
- arek/Reminders (1.7.1):
- PMAlertController (= 3.2.0)
- arek/Reminders (2.0.0):
- arek/Core
- PMAlertController (= 3.1.0)
- arek/SpeechRecognizer (1.7.1):
- PMAlertController (= 3.2.0)
- arek/SpeechRecognizer (2.0.0):
- arek/Core
- PMAlertController (= 3.1.0)
- PMAlertController (3.1.0)
- PMAlertController (= 3.2.0)
- PMAlertController (3.2.0)

DEPENDENCIES:
- arek (from `../`)
Expand All @@ -70,9 +70,9 @@ EXTERNAL SOURCES:
:path: ../

SPEC CHECKSUMS:
arek: 9c3a43358625ae21c23e2fef806458ef41d9d94a
PMAlertController: 2c9f27b318e5adf685ba10737ff84be0a3ac5618
arek: 23436a17670c4dd7244d70283a7392455a5a92de
PMAlertController: 46047b840f6e1833c2a5395c91ccad29e72ae2c0

PODFILE CHECKSUM: 51391b981566b427912c687e0f5ba15813bf3aa4

COCOAPODS: 1.3.1
COCOAPODS: 1.4.0
35 changes: 28 additions & 7 deletions Example/arek_example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,13 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 0830;
LastUpgradeCheck = 0920;
ORGANIZATIONNAME = ennioma;
TargetAttributes = {
7569AF8C1E7447F300E81C95 = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = MQ7M5YR8SU;
LastSwiftMigration = 0920;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.Siri = {
Expand All @@ -253,11 +254,13 @@
};
7569AFA01E7447F300E81C95 = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 0920;
ProvisioningStyle = Automatic;
TestTargetID = 7569AF8C1E7447F300E81C95;
};
7569AFAB1E7447F300E81C95 = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 0920;
ProvisioningStyle = Automatic;
TestTargetID = 7569AF8C1E7447F300E81C95;
};
Expand Down Expand Up @@ -449,15 +452,21 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -498,15 +507,21 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -546,7 +561,8 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ennioma.arek;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -565,7 +581,8 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ennioma.arek;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -578,7 +595,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.ennioma.arek-exampleTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/arek_example.app/arek_example";
};
name = Debug;
Expand All @@ -592,7 +610,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.ennioma.arek-exampleTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/arek_example.app/arek_example";
};
name = Release;
Expand All @@ -605,7 +624,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.ennioma.arek-exampleUITests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
TEST_TARGET_NAME = arek_example;
};
name = Debug;
Expand All @@ -618,7 +638,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.ennioma.arek-exampleUITests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
TEST_TARGET_NAME = arek_example;
};
name = Release;
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Every goal could be easily reached using **AREK**.
* show a popup to invite the user to re-enable the permission if it has been denied
* manage through an easy configuration how many times to ask the user to re-enable the permission (Only once, every hour, once a day, weekly, always😷)

🚨 AREK is a **Swift 3** and **XCode 8** compatible project 🚨
🚨 AREK is a **Swift 4** and **XCode 9** compatible project 🚨

## Build Status

Expand Down Expand Up @@ -192,15 +192,15 @@ Add AREK to your Podfile
```ruby
use_frameworks!
target 'MyTarget' do
pod 'arek', '~> 1.6.0'
pod 'arek', '~> 2.0.0'
end
```

If you want to install just a specific permission, let's say `Bluetooth`, you have to specify:
```ruby
use_frameworks!
target 'MyTarget' do
pod 'arek/Bluetooth', '~> 1.6.0'
pod 'arek/Bluetooth', '~> 2.0.0'
end
```

Expand All @@ -210,7 +210,7 @@ $ pod install

## Carthage
```ruby
github "ennioma/arek" ~> "1.6.0"
github "ennioma/arek" ~> "2.0.0"
```

Then on your application target *Build Phases* settings tab, add a "New Run Script Phase". Create a Run Script with the following content:
Expand All @@ -233,11 +233,13 @@ import PackageDescription
let package = Package(
name: "YourApp",
dependencies: [
.Package(url: "https://github.com/ennioma/arek.git", versionMajor: 3, minor: 0)
.Package(url: "https://github.com/ennioma/arek.git", versionMajor: 2, minor: 0)
]
)
```

Note that if you want to install a *Swift 3* version of Arek, the latest compatible version is the *1.7.0*.

## Add AREK source code to your project
Add [https://github.com/ennioma/arek/tree/master/arek/arek/Arek](https://github.com/ennioma/arek/tree/master/arek/Classes) folder to your project.

Expand Down
5 changes: 3 additions & 2 deletions arek.podspec
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
Pod::Spec.new do |s|
s.name = 'arek'
s.version = '1.7.1'
s.version = '2.0.0'
s.summary = 'AREK is a clean and easy to use wrapper over any kind of iOS permission.'
s.homepage = 'https://github.com/ennioma/arek'
s.license = { :type => 'MIT', :file => 'LICENSE'}
s.author = { 'Ennio Masi' => 'ennio.masi@gmail.com' }
s.source = { :git => 'https://github.com/ennioma/arek.git', :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/ennioma'
s.ios.deployment_target = '9.0'
s.swift_version = '4.0'
s.source_files = 'code/Classes/**/*', 'code/Classes/Core/**/*', 'code/Classes/Permissions/**/*'
s.exclude_files = 'Example/*'
s.dependency 'PMAlertController', '3.1.0'
s.dependency 'PMAlertController', '3.2.0'

s.subspec 'Core' do |ss|
ss.source_files = 'code/Classes/Core/**/*.swift'
Expand Down
4 changes: 2 additions & 2 deletions code/Classes/Permissions/ArekCamera.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ open class ArekCamera: ArekBasePermission, ArekPermissionProtocol {
}

open func status(completion: @escaping ArekPermissionResponse) {
switch AVCaptureDevice.authorizationStatus(forMediaType: AVMediaTypeVideo) {
switch AVCaptureDevice.authorizationStatus(for: .video) {
case .notDetermined:
return completion(.notDetermined)
case .restricted, .denied:
Expand All @@ -49,7 +49,7 @@ open class ArekCamera: ArekBasePermission, ArekPermissionProtocol {
}

open func askForPermission(completion: @escaping ArekPermissionResponse) {
AVCaptureDevice.requestAccess(forMediaType: AVMediaTypeVideo) { (authorized) in
AVCaptureDevice.requestAccess(for: .video) { (authorized) in
if authorized {
print("[🚨 Arek 🚨] 📷 permission authorized by user ✅")
return completion(.authorized)
Expand Down
2 changes: 0 additions & 2 deletions code/Classes/Permissions/ArekMicrophone.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ open class ArekMicrophone: ArekBasePermission, ArekPermissionProtocol {
return completion(.notDetermined)
case AVAudioSessionRecordPermission.granted:
return completion(.authorized)
default:
return completion(.notDetermined)
}
}

Expand Down

0 comments on commit 3533d17

Please sign in to comment.