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

Feature Flags #80

Merged
merged 27 commits into from
Oct 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e89fd05
Remove Health variant and add build flags for all categories
Sep 30, 2016
d13a816
Remove Health variant schemes
Oct 4, 2016
387e940
Update recommended Xcode settings
Oct 4, 2016
6358e42
Add configuration file to fix sample app
Oct 4, 2016
8461b55
Add xcconfig hook to framework
Oct 4, 2016
26df0ba
Fix Speech feature flag
Oct 4, 2016
5f0f52c
Provide sample file for build configuration
Oct 4, 2016
70f95ed
Add feature flag for music permission and improve documentation
Oct 6, 2016
99c59f5
Fix event store permissions
Oct 6, 2016
1d72bbd
Minor comments improvements in sample app
Oct 6, 2016
093279a
Remove sample app and duplicate test target
Oct 7, 2016
ffebcd6
Clean up travis file
Oct 7, 2016
6fc85a5
Add missing import
Oct 7, 2016
09358e2
Explain new build requirements in README.md
Oct 7, 2016
1bc4d9c
Minor documentation improvements
Oct 10, 2016
0eb08eb
Improve README
Oct 11, 2016
3e08ae1
Merge pull request #75 from iosphere/feature/feature-flags
Oct 11, 2016
ba9fbff
Add Coverage configuration based on Debug config
Oct 11, 2016
3fa08f2
Merge pull request #76 from iosphere/feature/test-configuration
Oct 12, 2016
b66754d
Add subspecs for all permission categories
Oct 12, 2016
515d000
Additional README fixes
Oct 12, 2016
d2077be
Intentionally mis-spell CocoaPods to ensure the section stays in
Oct 12, 2016
bf6d661
Merge pull request #77 from iosphere/feature/subspecs
Oct 13, 2016
c226dca
Link to sample app repository
Oct 12, 2016
5da528c
Merge pull request #78 from iosphere/feature/sample-app
Oct 13, 2016
7deda9f
Remove unnecessary imports
Oct 12, 2016
a488130
Merge pull request #79 from iosphere/feature/import-cleanup
Oct 14, 2016
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
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ install:

script:
- set -o pipefail
# Build framework variants and clean all targets between builds
- xcodebuild -project ISHPermissionKit.xcodeproj -scheme ISHPermissionKit+HealthKit -destination 'platform=iOS Simulator,name=iPhone 6' -derivedDataPath build/ISHPermissionKitHealth clean build | xcpretty
# Build framework target and clean all targets between builds
- xcodebuild -project ISHPermissionKit.xcodeproj -scheme ISHPermissionKit -destination 'platform=iOS Simulator,name=iPhone 6' -derivedDataPath build/ISHPermissionKit clean build | xcpretty

# Build static lib variants and clean all targets between builds
# Build static lib target and clean all targets between builds
- xcodebuild -project ISHPermissionKit.xcodeproj -scheme ISHPermissionKitLib -destination 'platform=iOS Simulator,name=iPhone 6' -derivedDataPath build/ISHPermissionKitLib clean build | xcpretty
- xcodebuild -project ISHPermissionKit.xcodeproj -scheme 'ISHPermissionKitLib+HealthKit' -destination 'platform=iOS Simulator,name=iPhone 6' -derivedDataPath build/ISHPermissionKitLibHealth clean build | xcpretty

# run tests
- xcodebuild -project ISHPermissionKit.xcodeproj -scheme 'ISHPermissionKitLib+HealthKit' -destination 'platform=iOS Simulator,name=iPhone 6' -derivedDataPath build/ISHPermissionKitLibHealth clean test | xcpretty
- xcodebuild -project ISHPermissionKit.xcodeproj -scheme 'ISHPermissionKit+HealthKit' -destination 'platform=iOS Simulator,name=iPhone 6' -derivedDataPath build/ISHPermissionKitHealth clean test | xcpretty
- xcodebuild -project ISHPermissionKit.xcodeproj -scheme 'ISHPermissionKit' -destination 'platform=iOS Simulator,name=iPhone 6' -derivedDataPath build/ISHPermissionKit clean test | xcpretty
109 changes: 107 additions & 2 deletions ISHPermissionKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,116 @@ Pod::Spec.new do |s|
core.requires_arc = true
end

s.subspec 'Motion' do |motion|
motion.dependency 'ISHPermissionKit/Core'
motion.weak_framework = 'CoreMotion'
feature_flags = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'ISHPermissionRequestMotionEnabled' }
motion.pod_target_xcconfig = feature_flags
motion.user_target_xcconfig = feature_flags
end

s.subspec 'Health' do |health|
health.dependency 'ISHPermissionKit/Core'

health.weak_framework = 'HealthKit'
health.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'ISHPermissionRequestHealthKitEnabled' }
feature_flags = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'ISHPermissionRequestHealthKitEnabled' }
health.pod_target_xcconfig = feature_flags
health.user_target_xcconfig = feature_flags
end

s.subspec 'Location' do |location|
location.dependency 'ISHPermissionKit/Core'
location.weak_framework = 'CoreLocation'
feature_flags = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'ISHPermissionRequestLocationEnabled' }
location.pod_target_xcconfig = feature_flags
location.user_target_xcconfig = feature_flags
end

s.subspec 'Microphone' do |mic|
mic.dependency 'ISHPermissionKit/Core'
mic.weak_framework = 'AVFoundation'
feature_flags = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'ISHPermissionRequestMicrophoneEnabled' }
mic.pod_target_xcconfig = feature_flags
mic.user_target_xcconfig = feature_flags
end

s.subspec 'PhotoLibrary' do |photo|
photo.dependency 'ISHPermissionKit/Core'
photo.weak_framework = 'Photos', 'AssetsLibrary'
feature_flags = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'ISHPermissionRequestPhotoLibraryEnabled' }
photo.pod_target_xcconfig = feature_flags
photo.user_target_xcconfig = feature_flags
end

s.subspec 'Camera' do |cam|
cam.dependency 'ISHPermissionKit/Core'
cam.weak_framework = 'AVFoundation'
feature_flags = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'ISHPermissionRequestCameraEnabled' }
cam.pod_target_xcconfig = feature_flags
cam.user_target_xcconfig = feature_flags
end

s.subspec 'Notifications' do |note|
note.dependency 'ISHPermissionKit/Core'
note.weak_framework = 'UIKit', 'UserNotifications'
feature_flags = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'ISHPermissionRequestNotificationsEnabled' }
note.pod_target_xcconfig = feature_flags
note.user_target_xcconfig = feature_flags
end

s.subspec 'SocialAccounts' do |social|
social.dependency 'ISHPermissionKit/Core'
social.weak_framework = 'Accounts'
feature_flags = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'ISHPermissionRequestSocialAccountsEnabled' }
social.pod_target_xcconfig = feature_flags
social.user_target_xcconfig = feature_flags
end

s.subspec 'Contacts' do |contacts|
contacts.dependency 'ISHPermissionKit/Core'
contacts.weak_framework = 'Contacts', 'AddressBook'
feature_flags = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'ISHPermissionRequestContactsEnabled' }
contacts.pod_target_xcconfig = feature_flags
contacts.user_target_xcconfig = feature_flags
end

s.subspec 'Calendar' do |cal|
cal.dependency 'ISHPermissionKit/Core'
cal.weak_framework = 'EventKit'
feature_flags = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'ISHPermissionRequestCalendarEnabled' }
cal.pod_target_xcconfig = feature_flags
cal.user_target_xcconfig = feature_flags
end

s.subspec 'Reminders' do |rem|
rem.dependency 'ISHPermissionKit/Core'
rem.weak_framework = 'EventKit'
feature_flags = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'ISHPermissionRequestRemindersEnabled' }
rem.pod_target_xcconfig = feature_flags
rem.user_target_xcconfig = feature_flags
end

s.subspec 'Siri' do |siri|
siri.dependency 'ISHPermissionKit/Core'
siri.weak_framework = 'Intents'
feature_flags = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'ISHPermissionRequestSiriEnabled' }
siri.pod_target_xcconfig = feature_flags
siri.user_target_xcconfig = feature_flags
end

s.subspec 'Speech' do |speech|
speech.dependency 'ISHPermissionKit/Core'
speech.weak_framework = 'Speech'
feature_flags = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'ISHPermissionRequestSpeechEnabled' }
speech.pod_target_xcconfig = feature_flags
speech.user_target_xcconfig = feature_flags
end

s.subspec 'MusicLibrary' do |music|
music.dependency 'ISHPermissionKit/Core'
music.weak_framework = 'MediaPlayer'
feature_flags = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'ISHPermissionRequestMusicLibraryEnabled' }
music.pod_target_xcconfig = feature_flags
music.user_target_xcconfig = feature_flags
end

end
Loading