Skip to content

Commit

Permalink
(Maint)|Add Carthage support (#6)
Browse files Browse the repository at this point in the history
* Add Carthage support

- Add shared scheme and an iOS framework target to make this a
framework consumable by Carthage
- Fix broken workspace & project
- Fix broken MBDebugPanelDemo target
- Remove internal cocoapod dependency for itself (for Demo target)
- Fix all build issues
- Reorganize file structure some & remove some stagnant files

* Add 'presentViewController:animated:completion' to public class method declarations

* Cleanup

- Add -setTitle: to MBDebugPanel
- Remove plist files for nonexistent frameworks
- xCode autocorrected some project warnings
  • Loading branch information
brettwellmanmbo authored Apr 20, 2017
1 parent 34a5cbc commit 13c9183
Show file tree
Hide file tree
Showing 75 changed files with 1,916 additions and 1,465 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ DerivedData

# CocoaPods
Pods

#Carthage
Carthage
2 changes: 1 addition & 1 deletion MBDebugPanel.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MBDebugPanel"
s.version = "0.2.2"
s.version = "0.2.3"
s.summary = "A painless, configurable, hidden panel to add shortcuts to run code, test features, or whatever you like."
s.description = <<-DESC
MBDebugPanel offers a simple way to embed a set of dev-mode-only features
Expand Down
11 changes: 10 additions & 1 deletion MBDebugPanel.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

910 changes: 704 additions & 206 deletions MBDebugPanel/MBDebugPanel.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9AB6E68A1EA5574F002DB509"
BuildableName = "MBDebugPanel.framework"
BlueprintName = "MBDebugPanel iOS"
ReferencedContainer = "container:MBDebugPanel.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9AB6E68A1EA5574F002DB509"
BuildableName = "MBDebugPanel.framework"
BlueprintName = "MBDebugPanel iOS"
ReferencedContainer = "container:MBDebugPanel.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9AB6E68A1EA5574F002DB509"
BuildableName = "MBDebugPanel.framework"
BlueprintName = "MBDebugPanel iOS"
ReferencedContainer = "container:MBDebugPanel.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,15 @@
*/
+(BOOL)isPresented;

/*
Present a view controller from the DebugPanel's parent viewcontroller
*/
+ (void)presentViewController:(UIViewController *)viewControllerToPresent
animated:(BOOL)flag
completion:(void (^)(void))completion;

/*
Expose the ability to set the DebugPanel's modal title
*/
+ (void)setTitle:(NSString*)title;
@end
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@ +(BOOL)isPresented
return [MBDebugPanel.sharedPanel_ isPresented];
}

+ (void)presentViewController:(UIViewController *)viewControllerToPresent
animated:(BOOL)flag
completion:(void (^ __nullable)(void))completion {

[[MBDebugPanel.sharedPanel_ wrappingViewController] presentViewController:viewControllerToPresent
animated:flag
completion:completion];
}

+ (void)setTitle:(NSString*)title
{
[MBDebugPanel.sharedPanel_ setTitle:title];
}

#pragma mark UITableViewDataSource/Delegate
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
Expand Down Expand Up @@ -157,4 +171,4 @@ -(BOOL)isPresented
{
return !![[self.class sharedPanel_] parentViewController];
}
@end
@end
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

/** Create a new UISwitch component
@param title The main text to display next to the switch
@param initialValue Will the switch start on, or off?
@param isOn Will the switch start on, or off?
@param changeHandler A callback block to invoke when the switch value changes
*/
-(id)initWithTitle:(NSString *)title
Expand Down
File renamed without changes.
24 changes: 24 additions & 0 deletions MBDebugPanel/Sources/Supporting Files/Info-iOS.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
18 changes: 18 additions & 0 deletions MBDebugPanel/Sources/Supporting Files/MBDebugPanel.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// MBDebugPanel.h
// MBDebugPanel
//
// Created by Brett Wellman on 4/17/17.
//
//

#import <UIKit/UIKit.h>

//! Project version number for MBDebugPanel iOS.
FOUNDATION_EXPORT double MBDebugPanelVersionNumber;

//! Project version string for MBDebugPanel iOS.
FOUNDATION_EXPORT const unsigned char MBDebugPanelVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <MBDebugPanel/PublicHeader.h>

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Loading

0 comments on commit 13c9183

Please sign in to comment.