Skip to content

Commit bb9362f

Browse files
(Feature)|Add support for SwiftPM (#8)
This adds support for SwiftPM 5.3 while also maintaining existing support for Carthage / CocoaPods: - Source files have been restructured to follow Swift Package guidelines - Headers have been isolated in order to specify a `publicHeadersPath`. This includes `_Private` and `_Protected` headers, which don't really provide much benefit to begin with - `NSBundle` resolution attempts to access the generated `SWIFTPM_MODULE_BUNDLE` if it exists, which is necessary for projects that link the target via SwiftPM
1 parent 47a1ab4 commit bb9362f

48 files changed

Lines changed: 94 additions & 299 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ Pods
2424

2525
#Carthage
2626
Carthage
27+
28+
# SwiftPM
29+
.build
30+
.swiftpm

MBDebugPanel.podspec

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,19 @@ Pod::Spec.new do |s|
33
s.version = "0.2.3"
44
s.summary = "A painless, configurable, hidden panel to add shortcuts to run code, test features, or whatever you like."
55
s.description = <<-DESC
6-
MBDebugPanel offers a simple way to embed a set of dev-mode-only features
6+
MBDebugPanel offers a simple way to embed a set of dev-mode-only features
77
(Though you could ship it with your app if you really wanted to.)
8-
8+
99
It's like the Konami code, but for your app.
1010
DESC
1111
s.homepage = "https://github.com/mindbody/MBDebugPanel.git"
1212
s.license = 'MIT'
1313
s.author = { "Matthew Holden" => "matthew.holden@mindbodyonline.com" }
1414
s.source = { :git => "https://github.com/mindbody/MBDebugPanel.git", :tag => s.version.to_s }
1515

16-
s.platform = :ios, '7.0'
16+
s.platform = :ios, '8.0'
1717
s.requires_arc = true
1818

19-
s.source_files = 'MBDebugPanel/Sources/Classes/**/*.{h,m}'
20-
s.resources = 'MBDebugPanel/Sources/Assets/componentCells/*.xib'
21-
s.private_header_files = 'MBDebugPanel/Sources/Classes/ios/private/*.h'
19+
s.source_files = 'MBDebugPanel/Sources/MBDebugPanel/Classes/**/*.{h,m}', 'MBDebugPanel/Sources/MBDebugPanel/Headers/**/*.{h}'
20+
s.resources = 'MBDebugPanel/Sources/MBDebugPanel/Assets/componentCells/*.xib'
2221
end

MBDebugPanel/MBDebugPanel.xcodeproj/project.pbxproj renamed to MBDebugPanel.xcodeproj/project.pbxproj

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
/* End PBXCopyFilesBuildPhase section */
9494

9595
/* Begin PBXFileReference section */
96+
1B2A4CC7255C2C7F00DA9688 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
9697
9A10FA381EA5633500D2B095 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
9798
9A10FA391EA5633500D2B095 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
9899
9A10FA3A1EA5633500D2B095 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
@@ -174,6 +175,32 @@
174175
/* End PBXFrameworksBuildPhase section */
175176

176177
/* Begin PBXGroup section */
178+
1B2A4CC3255C2BD100DA9688 /* MBDebugPanel */ = {
179+
isa = PBXGroup;
180+
children = (
181+
1B2A4CCE255C2F9800DA9688 /* Headers */,
182+
9A5DE2991EA55DC500C90F62 /* Assets */,
183+
9A5DE29E1EA55DC500C90F62 /* Classes */,
184+
9A5DE2B51EA55DC500C90F62 /* SupportingFiles */,
185+
);
186+
path = MBDebugPanel;
187+
sourceTree = "<group>";
188+
};
189+
1B2A4CCE255C2F9800DA9688 /* Headers */ = {
190+
isa = PBXGroup;
191+
children = (
192+
9A5DE2A91EA55DC500C90F62 /* MBDebugPanel.h */,
193+
9A5DE2AD1EA55DC500C90F62 /* MBDebugPanel_Private.h */,
194+
9A5DE2AB1EA55DC500C90F62 /* MBDebugPanelComponent.h */,
195+
9A5DE2A11EA55DC500C90F62 /* MBDebugPanelSimpleButtonComponent.h */,
196+
9A5DE2A31EA55DC500C90F62 /* MBDebugPanelSimpleComponent.h */,
197+
9A5DE2AE1EA55DC500C90F62 /* MBDebugPanelSimpleComponent_Protected.h */,
198+
9A5DE2A51EA55DC500C90F62 /* MBDebugPanelSimpleSwitchComponent.h */,
199+
9A5DE2A71EA55DC500C90F62 /* MBDebugPanelSimpleTextFieldComponent.h */,
200+
);
201+
path = Headers;
202+
sourceTree = "<group>";
203+
};
177204
9A10FA361EA5633500D2B095 /* MBDebugPanelTestsApplicationContainer */ = {
178205
isa = PBXGroup;
179206
children = (
@@ -191,9 +218,7 @@
191218
9A5DE2981EA55DC500C90F62 /* Sources */ = {
192219
isa = PBXGroup;
193220
children = (
194-
9A5DE2991EA55DC500C90F62 /* Assets */,
195-
9A5DE29E1EA55DC500C90F62 /* Classes */,
196-
9A5DE2B51EA55DC500C90F62 /* Supporting Files */,
221+
1B2A4CC3255C2BD100DA9688 /* MBDebugPanel */,
197222
);
198223
path = Sources;
199224
sourceTree = "<group>";
@@ -228,45 +253,29 @@
228253
isa = PBXGroup;
229254
children = (
230255
9A5DE2A01EA55DC500C90F62 /* components */,
231-
9A5DE2A91EA55DC500C90F62 /* MBDebugPanel.h */,
232256
9A5DE2AA1EA55DC500C90F62 /* MBDebugPanel.m */,
233-
9A5DE2AB1EA55DC500C90F62 /* MBDebugPanelComponent.h */,
234-
9A5DE2AC1EA55DC500C90F62 /* private */,
235257
);
236258
path = ios;
237259
sourceTree = "<group>";
238260
};
239261
9A5DE2A01EA55DC500C90F62 /* components */ = {
240262
isa = PBXGroup;
241263
children = (
242-
9A5DE2A11EA55DC500C90F62 /* MBDebugPanelSimpleButtonComponent.h */,
243264
9A5DE2A21EA55DC500C90F62 /* MBDebugPanelSimpleButtonComponent.m */,
244-
9A5DE2A31EA55DC500C90F62 /* MBDebugPanelSimpleComponent.h */,
245265
9A5DE2A41EA55DC500C90F62 /* MBDebugPanelSimpleComponent.m */,
246-
9A5DE2A51EA55DC500C90F62 /* MBDebugPanelSimpleSwitchComponent.h */,
247266
9A5DE2A61EA55DC500C90F62 /* MBDebugPanelSimpleSwitchComponent.m */,
248-
9A5DE2A71EA55DC500C90F62 /* MBDebugPanelSimpleTextFieldComponent.h */,
249267
9A5DE2A81EA55DC500C90F62 /* MBDebugPanelSimpleTextFieldComponent.m */,
250268
);
251269
path = components;
252270
sourceTree = "<group>";
253271
};
254-
9A5DE2AC1EA55DC500C90F62 /* private */ = {
255-
isa = PBXGroup;
256-
children = (
257-
9A5DE2AD1EA55DC500C90F62 /* MBDebugPanel_Private.h */,
258-
9A5DE2AE1EA55DC500C90F62 /* MBDebugPanelSimpleComponent_Protected.h */,
259-
);
260-
path = private;
261-
sourceTree = "<group>";
262-
};
263-
9A5DE2B51EA55DC500C90F62 /* Supporting Files */ = {
272+
9A5DE2B51EA55DC500C90F62 /* SupportingFiles */ = {
264273
isa = PBXGroup;
265274
children = (
266275
9A5DE2B61EA55DC500C90F62 /* Info-iOS.plist */,
267276
9A5DE2BA1EA55DC500C90F62 /* MBDebugPanel.h */,
268277
);
269-
path = "Supporting Files";
278+
path = SupportingFiles;
270279
sourceTree = "<group>";
271280
};
272281
9A5DE3331EA55DEC00C90F62 /* Tests */ = {
@@ -302,6 +311,7 @@
302311
FDCFACE418A49E6800E4AD74 = {
303312
isa = PBXGroup;
304313
children = (
314+
1B2A4CC7255C2C7F00DA9688 /* Package.swift */,
305315
9A5DE2981EA55DC500C90F62 /* Sources */,
306316
9A5DE3331EA55DEC00C90F62 /* Tests */,
307317
FDCFACF118A49E9200E4AD74 /* Frameworks */,
@@ -462,6 +472,7 @@
462472
developmentRegion = English;
463473
hasScannedForEncodings = 0;
464474
knownRegions = (
475+
English,
465476
en,
466477
);
467478
mainGroup = FDCFACE418A49E6800E4AD74;
@@ -650,7 +661,7 @@
650661
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
651662
GCC_WARN_UNUSED_FUNCTION = YES;
652663
GCC_WARN_UNUSED_VARIABLE = YES;
653-
INFOPLIST_FILE = "$(SRCROOT)/Sources/Supporting Files/Info-iOS.plist";
664+
INFOPLIST_FILE = "$(SRCROOT)/Sources/MBDebugPanel/SupportingFiles/Info-iOS.plist";
654665
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
655666
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
656667
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
@@ -713,7 +724,7 @@
713724
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
714725
GCC_WARN_UNUSED_FUNCTION = YES;
715726
GCC_WARN_UNUSED_VARIABLE = YES;
716-
INFOPLIST_FILE = "$(SRCROOT)/Sources/Supporting Files/Info-iOS.plist";
727+
INFOPLIST_FILE = "$(SRCROOT)/Sources/MBDebugPanel/SupportingFiles/Info-iOS.plist";
717728
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
718729
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
719730
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";

MBDebugPanel/MBDebugPanel.xcodeproj/project.xcworkspace/contents.xcworkspacedata renamed to MBDebugPanel.xcodeproj/project.xcworkspace/contents.xcworkspacedata

File renamed without changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

MBDebugPanel/MBDebugPanel.xcodeproj/xcshareddata/xcschemes/MBDebugPanel iOS.xcscheme renamed to MBDebugPanel.xcodeproj/xcshareddata/xcschemes/MBDebugPanel iOS.xcscheme

File renamed without changes.

MBDebugPanel.xcworkspace/contents.xcworkspacedata

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MBDebugPanel/Sources/Classes/MBDebugPanelTestsApplicationContainer/Images.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 0 additions & 48 deletions
This file was deleted.

MBDebugPanel/Sources/Classes/MBDebugPanelTestsApplicationContainer/MBDebugPanelTestsApplicationContainer-Info.plist

Lines changed: 0 additions & 38 deletions
This file was deleted.

MBDebugPanel/Tests/MBDebugPanelTestsApplicationContainer/Images.xcassets/LaunchImage.launchimage/Contents.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)