diff --git a/.swift-version b/.swift-version deleted file mode 100644 index bf77d54..0000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -4.2 diff --git a/.travis.yml b/.travis.yml index 60a57b1..fb047d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,12 +3,14 @@ # * https://github.com/supermarin/xcpretty#usage language: objective-c -osx_image: xcode10 +osx_image: xcode11.3 +bundler_args: --retry 5 # cache: cocoapods # podfile: Example/Podfile before_install: -- gem install cocoapods -v 1.1.1 +- gem install cocoapods --no-document --quiet +- pod repo update - pod install --project-directory=Example script: diff --git a/Example/Gemfile b/Example/Gemfile index 69a2a02..e095535 100644 --- a/Example/Gemfile +++ b/Example/Gemfile @@ -1,4 +1,4 @@ source 'https://rubygems.org' -gem 'cocoapods', '1.2.0' -gem 'cocoapods-deintegrate', '1.0.1' +gem 'cocoapods', '1.9.1' +gem 'cocoapods-deintegrate', '1.0.4' diff --git a/Example/Gemfile.lock b/Example/Gemfile.lock index 54d757c..94a1158 100644 --- a/Example/Gemfile.lock +++ b/Example/Gemfile.lock @@ -1,76 +1,91 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (2.3.5) - activesupport (4.2.7.1) + CFPropertyList (3.0.2) + activesupport (4.2.11.1) i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - claide (1.0.1) - cocoapods (1.2.0) + algoliasearch (1.27.1) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) + atomos (0.1.3) + claide (1.0.3) + cocoapods (1.9.1) activesupport (>= 4.0.2, < 5) - claide (>= 1.0.1, < 2.0) - cocoapods-core (= 1.2.0) - cocoapods-deintegrate (>= 1.0.1, < 2.0) - cocoapods-downloader (>= 1.1.3, < 2.0) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.9.1) + cocoapods-deintegrate (>= 1.0.3, < 2.0) + cocoapods-downloader (>= 1.2.2, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) cocoapods-stats (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.1.2, < 2.0) + cocoapods-trunk (>= 1.4.0, < 2.0) cocoapods-try (>= 1.1.0, < 2.0) - colored (~> 1.2) + colored2 (~> 3.1) escape (~> 0.0.4) - fourflusher (~> 2.0.1) + fourflusher (>= 2.3.0, < 3.0) gh_inspector (~> 1.0) - molinillo (~> 0.5.5) + molinillo (~> 0.6.6) nap (~> 1.0) - ruby-macho (~> 0.2.5) - xcodeproj (>= 1.4.1, < 2.0) - cocoapods-core (1.2.0) - activesupport (>= 4.0.2, < 5) + ruby-macho (~> 1.4) + xcodeproj (>= 1.14.0, < 2.0) + cocoapods-core (1.9.1) + activesupport (>= 4.0.2, < 6) + algoliasearch (~> 1.0) + concurrent-ruby (~> 1.1) fuzzy_match (~> 2.0.4) nap (~> 1.0) - cocoapods-deintegrate (1.0.1) - cocoapods-downloader (1.1.3) + netrc (~> 0.11) + typhoeus (~> 1.0) + cocoapods-deintegrate (1.0.4) + cocoapods-downloader (1.3.0) cocoapods-plugins (1.0.0) nap cocoapods-search (1.0.0) - cocoapods-stats (1.0.0) - cocoapods-trunk (1.1.2) + cocoapods-stats (1.1.0) + cocoapods-trunk (1.4.1) nap (>= 0.8, < 2.0) - netrc (= 0.7.8) - cocoapods-try (1.1.0) - colored (1.2) + netrc (~> 0.11) + cocoapods-try (1.2.0) + colored2 (3.1.2) + concurrent-ruby (1.1.6) escape (0.0.4) - fourflusher (2.0.1) + ethon (0.12.0) + ffi (>= 1.3.0) + ffi (1.12.2) + fourflusher (2.3.1) fuzzy_match (2.0.4) - gh_inspector (1.0.3) - i18n (0.8.0) - json (1.8.3) - minitest (5.10.1) - molinillo (0.5.6) - nanaimo (0.2.3) + gh_inspector (1.1.3) + httpclient (2.8.3) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + json (2.3.0) + minitest (5.14.0) + molinillo (0.6.6) + nanaimo (0.2.6) nap (1.1.0) - netrc (0.7.8) - ruby-macho (0.2.6) - thread_safe (0.3.5) - tzinfo (1.2.2) + netrc (0.11.0) + ruby-macho (1.4.0) + thread_safe (0.3.6) + typhoeus (1.3.1) + ethon (>= 0.9.0) + tzinfo (1.2.7) thread_safe (~> 0.1) - xcodeproj (1.4.2) - CFPropertyList (~> 2.3.3) - activesupport (>= 3) - claide (>= 1.0.1, < 2.0) - colored (~> 1.2) - nanaimo (~> 0.2.3) + xcodeproj (1.16.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.2.6) PLATFORMS ruby DEPENDENCIES - cocoapods (= 1.2.0) - cocoapods-deintegrate (= 1.0.1) + cocoapods (= 1.9.1) + cocoapods-deintegrate (= 1.0.4) BUNDLED WITH - 1.14.4 + 1.17.3 diff --git a/Example/Podfile b/Example/Podfile index 5a6670c..59462bc 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -3,6 +3,6 @@ platform :ios, '12.0' use_frameworks! target 'YoshiExample' do - pod "Instabug", '5.2.4' + pod "Instabug", '9.1.2' pod "Yoshi", :path => "../", :subspecs => ['QAKit'] end diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 79fe9c0..3a98053 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,15 +1,15 @@ PODS: - - Instabug (5.2.4) - - Yoshi/Core (3.0.0) - - Yoshi/QAKit (3.0.0): + - Instabug (9.1.2) + - Yoshi/Core (3.0.1) + - Yoshi/QAKit (3.0.1): - Yoshi/Core DEPENDENCIES: - - Instabug (= 5.2.4) + - Instabug (= 9.1.2) - Yoshi/QAKit (from `../`) SPEC REPOS: - https://github.com/cocoapods/specs.git: + https://github.com/CocoaPods/Specs.git: - Instabug EXTERNAL SOURCES: @@ -17,9 +17,9 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - Instabug: 6fa40a5e2a4620f0589dfc8e4e01b1018c8c42b1 - Yoshi: f681e9474a3d0aa8ec7ec935c579f52c2d00a360 + Instabug: a638cb57c8768b102bab2930b68ed81f2d7ab877 + Yoshi: 60f2e8fc0c47363c50a73b9adedbb7cb81c9a0a0 -PODFILE CHECKSUM: 6937f5f3704e17fb013434d20f6bd261b2e48f51 +PODFILE CHECKSUM: 51eb4be134648631dd57751eb3e238ef40a38f9d -COCOAPODS: 1.5.3 +COCOAPODS: 1.9.1 diff --git a/Example/YoshiExample.xcodeproj/project.pbxproj b/Example/YoshiExample.xcodeproj/project.pbxproj index 6470c31..9aa2fa2 100644 --- a/Example/YoshiExample.xcodeproj/project.pbxproj +++ b/Example/YoshiExample.xcodeproj/project.pbxproj @@ -140,7 +140,6 @@ 276BCEC81C29F060002138C7 /* Frameworks */, 276BCEC91C29F060002138C7 /* Resources */, 9807FA47239685B35BD1B1CC /* [CP] Embed Pods Frameworks */, - 2FE9A2C899648AB92ACEAA90 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -201,40 +200,26 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 2FE9A2C899648AB92ACEAA90 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-YoshiExample/Pods-YoshiExample-resources.sh", - "${PODS_ROOT}/Instabug/Instabug.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Instabug.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-YoshiExample/Pods-YoshiExample-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 9807FA47239685B35BD1B1CC /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-YoshiExample/Pods-YoshiExample-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-YoshiExample/Pods-YoshiExample-frameworks.sh", + "${PODS_ROOT}/Instabug/Instabug.framework", + "${PODS_ROOT}/Instabug/Instabug.framework.dSYM", "${BUILT_PRODUCTS_DIR}/Yoshi/Yoshi.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Instabug.framework", + "${DWARF_DSYM_FOLDER_PATH}/Instabug.framework.dSYM", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Yoshi.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-YoshiExample/Pods-YoshiExample-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-YoshiExample/Pods-YoshiExample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; A406AEF3198A3BAC81FB073C /* [CP] Check Pods Manifest.lock */ = { diff --git a/Example/YoshiExample/AppDelegate.swift b/Example/YoshiExample/AppDelegate.swift index 96ae593..5170c47 100644 --- a/Example/YoshiExample/AppDelegate.swift +++ b/Example/YoshiExample/AppDelegate.swift @@ -64,13 +64,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } private func instabugMenu() -> YoshiMenu { - Instabug.start(withToken: "cf779d2e19c0affaad8567a7598e330d", invocationEvent: .none) - Instabug.setDefaultInvocationMode(.bugReporter) + Instabug.start(withToken: "cf779d2e19c0affaad8567a7598e330d", invocationEvents: [.none]) + BugReporting.promptOptionsEnabledReportTypes = [.bug] return YoshiActionMenu(title: "Start Instabug", subtitle: nil, completion: { - Instabug.invoke() + Instabug.show() }) } diff --git a/Example/YoshiExample/YoshiExample-Bridging-Header.h b/Example/YoshiExample/YoshiExample-Bridging-Header.h index 099887a..392b22c 100644 --- a/Example/YoshiExample/YoshiExample-Bridging-Header.h +++ b/Example/YoshiExample/YoshiExample-Bridging-Header.h @@ -2,4 +2,4 @@ // Use this file to import your target's public headers that you would like to expose to Swift. // -#import \ No newline at end of file +#import diff --git a/Yoshi.podspec b/Yoshi.podspec index 41917e5..c2a87dc 100644 --- a/Yoshi.podspec +++ b/Yoshi.podspec @@ -7,26 +7,20 @@ # Pod::Spec.new do |s| - s.name = "Yoshi" - s.version = "3.0.0" - s.summary = "A helpful companion for your iOS app." - -# This description is used to generate tags and improve search results. -# * Think: What does it do? Why did you write it? What is the focus? -# * Try to keep it short, snappy and to the point. -# * Write the description between the DESC delimiters below. -# * Finally, don't worry about the indent, CocoaPods strips it! + s.name = 'Yoshi' + s.version = '3.0.1' + s.summary = 'A helpful companion for your iOS app.' + s.license = 'MIT' + s.homepage = 'https://github.com/prolificinteractive/Yoshi' + s.authors = { 'Michael Campbell' => 'Michael@prolificinteractive.com' , 'Luna An' => 'luna@prolificinteractive.com'} + s.source = { :git => "https://github.com/prolificinteractive/Yoshi.git", :tag => s.version } + s.screenshots = 'https://raw.githubusercontent.com/prolificinteractive/Yoshi/a6e85e87cbd67f2bb3bfe60157e7b13281d80f20/Images/Yoshi.png", "https://raw.githubusercontent.com/prolificinteractive/Yoshi/c66cdf8dc2ab643fe57996d20d3cd37b8b70ceff/Images/Yoshi_iPad.png' s.description = <<-DESC Yoshi is a convenient wrapper around the UI code that is often needed for displaying debug menus. Out of the box, Yoshi provides easy-to-implement date, list and custom menus. DESC - s.homepage = "https://github.com/prolificinteractive/Yoshi" - s.screenshots = "https://raw.githubusercontent.com/prolificinteractive/Yoshi/a6e85e87cbd67f2bb3bfe60157e7b13281d80f20/Images/Yoshi.png", "https://raw.githubusercontent.com/prolificinteractive/Yoshi/c66cdf8dc2ab643fe57996d20d3cd37b8b70ceff/Images/Yoshi_iPad.png" - s.license = { :type => 'MIT', :file => 'LICENSE' } - s.author = { "Michael Campbell" => "Michael@prolificinteractive.com" , "Luna An" => "luna@prolificinteractive.com"} - s.source = { :git => "https://github.com/prolificinteractive/Yoshi.git", :tag => s.version.to_s } - - s.platform = :ios, '8.0' + s.ios.deployment_target = '8.0' + s.requires_arc = true # Default subspec that contains all shared code files for the library diff --git a/Yoshi/Yoshi.xcodeproj/project.pbxproj b/Yoshi/Yoshi.xcodeproj/project.pbxproj index f42c373..32602ac 100644 --- a/Yoshi/Yoshi.xcodeproj/project.pbxproj +++ b/Yoshi/Yoshi.xcodeproj/project.pbxproj @@ -353,20 +353,21 @@ TargetAttributes = { 276BCEA01C29A6EF002138C7 = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0900; + LastSwiftMigration = 1130; }; 276BCEAA1C29A6EF002138C7 = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0900; + LastSwiftMigration = 1130; }; }; }; buildConfigurationList = 276BCE9B1C29A6EF002138C7 /* Build configuration list for PBXProject "Yoshi" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = 276BCE971C29A6EF002138C7; productRefGroup = 276BCEA21C29A6EF002138C7 /* Products */; @@ -561,20 +562,23 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Yoshi/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 3.0.1; PRODUCT_BUNDLE_IDENTIFIER = com.prolificinteractive.Yoshi; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -582,43 +586,48 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Yoshi/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 3.0.1; PRODUCT_BUNDLE_IDENTIFIER = com.prolificinteractive.Yoshi; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; 276BCEB91C29A6EF002138C7 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = YoshiTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.prolificinteractive.YoshiTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; 276BCEBA1C29A6EF002138C7 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = YoshiTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.prolificinteractive.YoshiTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Yoshi/Yoshi/YoshiConfigurationManager.swift b/Yoshi/Yoshi/YoshiConfigurationManager.swift index 70b8aa4..d0f31a4 100644 --- a/Yoshi/Yoshi/YoshiConfigurationManager.swift +++ b/Yoshi/Yoshi/YoshiConfigurationManager.swift @@ -7,7 +7,7 @@ // /// The configuration manager for the debug menu. -final class YoshiConfigurationManager { +final class YoshiConfigurationManager: NSObject, UIAdaptivePresentationControllerDelegate { /// The default instance. static let sharedInstance = YoshiConfigurationManager() @@ -131,6 +131,7 @@ final class YoshiConfigurationManager { }) }) + navigationController.presentationController?.delegate = self navigationController.modalPresentationStyle = .formSheet navigationController.setViewControllers([debugViewController], animated: false) @@ -138,5 +139,9 @@ final class YoshiConfigurationManager { self.debugViewController = debugViewController } } + + func presentationControllerDidDismiss(_ presentationController: UIPresentationController) { + dismiss() + } }