Skip to content

Commit

Permalink
Restructure project to make SPM work 🤦‍♂️
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoNatan committed Mar 31, 2021
1 parent 52a5489 commit e67343b
Show file tree
Hide file tree
Showing 31 changed files with 71 additions and 110 deletions.
50 changes: 22 additions & 28 deletions LNPropertyListEditor/LNPropertyListEditor.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -92,49 +92,41 @@
393E183B207F6119002E6136 /* LNPropertyListEditor */ = {
isa = PBXGroup;
children = (
393E187B207F68B7002E6136 /* Model */,
393E1880207FA52B002E6136 /* Views */,
391FF02A2084060000005D0F /* Assets.xcassets */,
3954022126150727005EEA38 /* Implementation */,
393E1877207F68B4002E6136 /* LNPropertyListNode.h */,
393E1873207F64A0002E6136 /* LNPropertyListEditor.h */,
39DE8E9B2092214300ED16B4 /* LNPropertyListEditor-Private.h */,
393E1874207F64A0002E6136 /* LNPropertyListEditor.m */,
393E183D207F6119002E6136 /* Info.plist */,
391FF02A2084060000005D0F /* Assets.xcassets */,
);
path = LNPropertyListEditor;
sourceTree = "<group>";
};
393E187B207F68B7002E6136 /* Model */ = {
isa = PBXGroup;
children = (
393E1877207F68B4002E6136 /* LNPropertyListNode.h */,
393E1881207FAD26002E6136 /* LNPropertyListNode-Private.h */,
393E1878207F68B4002E6136 /* LNPropertyListNode.m */,
);
path = Model;
sourceTree = "<group>";
};
393E1880207FA52B002E6136 /* Views */ = {
3954022126150727005EEA38 /* Implementation */ = {
isa = PBXGroup;
children = (
393E1871207F61C2002E6136 /* LNPropertyListEditorOutline.xib */,
391FF0312084270400005D0F /* LNPropertyListOutlineView.h */,
391FF0322084270400005D0F /* LNPropertyListOutlineView.m */,
391FF02D208412CC00005D0F /* LNPropertyListRowView.h */,
391FF02E208412CC00005D0F /* LNPropertyListRowView.m */,
39D152942328A9C4009124C8 /* _LNPropertyListDatePicker.h */,
39D152952328A9C4009124C8 /* _LNPropertyListDatePicker.m */,
393E1883207FAEC6002E6136 /* LNPropertyListCellView.h */,
393E1884207FAEC6002E6136 /* LNPropertyListCellView.m */,
39DE8E922092030500ED16B4 /* LNPropertyListPopUpButtonCell.h */,
39DE8E932092030500ED16B4 /* LNPropertyListPopUpButtonCell.m */,
3946906A20976ED300B4A457 /* LNPropertyListDatePicker.h */,
3946906B20976ED300B4A457 /* LNPropertyListDatePicker.m */,
3941486D2095E85900A21F96 /* LNPropertyListDatePickerCell.h */,
3941486E2095E85900A21F96 /* LNPropertyListDatePickerCell.mm */,
39D1528D23289668009124C8 /* LNPropertyListDatePickerPanel.h */,
39D1528E23289668009124C8 /* LNPropertyListDatePickerPanel.m */,
39D152942328A9C4009124C8 /* _LNPropertyListDatePicker.h */,
39D152952328A9C4009124C8 /* _LNPropertyListDatePicker.m */,
3946906A20976ED300B4A457 /* LNPropertyListDatePicker.h */,
3946906B20976ED300B4A457 /* LNPropertyListDatePicker.m */,
39DE8E9B2092214300ED16B4 /* LNPropertyListEditor-Private.h */,
393E1874207F64A0002E6136 /* LNPropertyListEditor.m */,
393E1871207F61C2002E6136 /* LNPropertyListEditorOutline.xib */,
393E1881207FAD26002E6136 /* LNPropertyListNode-Private.h */,
393E1878207F68B4002E6136 /* LNPropertyListNode.m */,
391FF0312084270400005D0F /* LNPropertyListOutlineView.h */,
391FF0322084270400005D0F /* LNPropertyListOutlineView.m */,
39DE8E922092030500ED16B4 /* LNPropertyListPopUpButtonCell.h */,
39DE8E932092030500ED16B4 /* LNPropertyListPopUpButtonCell.m */,
391FF02D208412CC00005D0F /* LNPropertyListRowView.h */,
391FF02E208412CC00005D0F /* LNPropertyListRowView.m */,
);
path = Views;
path = Implementation;
sourceTree = "<group>";
};
/* End PBXGroup section */
Expand Down Expand Up @@ -367,6 +359,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = NO;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
Expand All @@ -392,6 +385,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = NO;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Cocoa/Cocoa.h>
#import <LNPropertyListEditor/LNPropertyListDatePicker.h>
#import "LNPropertyListDatePicker.h"

@interface LNPropertyListCellView : NSTableCellView

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,28 @@ - (instancetype)initWithCoder:(NSCoder *)decoder

- (void)_commonInit
{
[[[NSNib alloc] initWithNibNamed:@"LNPropertyListEditorOutline" bundle:[NSBundle bundleForClass:self.class]] instantiateWithOwner:self topLevelObjects:nil];
NSBundle* bundleToUse;

NSURL* spmBundleURL = [[NSBundle mainBundle] URLForResource:@"LNPropertyListEditor_LNPropertyListEditor" withExtension:@"bundle"];
if(spmBundleURL != nil)
{
bundleToUse = [NSBundle bundleWithURL:spmBundleURL];
}
else
{
spmBundleURL = [[NSBundle bundleForClass:self.class] URLForResource:@"LNPropertyListEditor_LNPropertyListEditor" withExtension:@"bundle"];
if(spmBundleURL != nil)
{
bundleToUse = [NSBundle bundleWithURL:spmBundleURL];
}
}

if(bundleToUse == nil)
{
bundleToUse = [NSBundle bundleForClass:self.class];
}

[[[NSNib alloc] initWithNibNamed:@"LNPropertyListEditorOutline" bundle:bundleToUse] instantiateWithOwner:self topLevelObjects:nil];

_outlineView.enclosingScrollView.translatesAutoresizingMaskIntoConstraints = NO;
_outlineView.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"key" ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)]];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17506" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="18121" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17506"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="18121"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand Down Expand Up @@ -42,7 +42,7 @@
<tableColumnResizingMask key="resizingMask" userResizable="YES"/>
<prototypeCellViews>
<tableCellView identifier="KeyCell" id="t2u-Od-Zzd" customClass="LNPropertyListCellView">
<rect key="frame" x="1" y="1" width="205" height="17"/>
<rect key="frame" x="11" y="1" width="205" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="VNx-8v-7cy">
Expand Down Expand Up @@ -110,11 +110,11 @@
<sortDescriptor key="sortDescriptorPrototype" selector="compare:" sortKey="type"/>
<prototypeCellViews>
<tableCellView identifier="TypeCell" id="Tdk-ZV-3aa" customClass="LNPropertyListCellView">
<rect key="frame" x="208" y="1" width="75" height="17"/>
<rect key="frame" x="218" y="1" width="75" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="hJ1-Ji-yiF" userLabel="Type Button">
<rect key="frame" x="-13" y="0.0" width="88" height="18"/>
<rect key="frame" x="-13" y="2" width="88" height="14"/>
<popUpButtonCell key="cell" type="bevel" title="Array" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" imageScaling="proportionallyDown" inset="2" selectedItem="8UR-hR-pSj" id="oSg-Lu-cDE" customClass="LNPropertyListPopUpButtonCell">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
Expand Down Expand Up @@ -177,7 +177,7 @@
</tableCellView>
</prototypeCellViews>
</tableColumn>
<tableColumn identifier="Value" editable="NO" width="495" minWidth="200" maxWidth="10000000" id="ocb-ja-fwj">
<tableColumn identifier="Value" editable="NO" width="465" minWidth="200" maxWidth="10000000" id="ocb-ja-fwj">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Value">
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -186,11 +186,11 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
<prototypeCellViews>
<tableCellView identifier="ValueCell" id="rKh-Fg-3qw" customClass="LNPropertyListCellView">
<rect key="frame" x="285" y="1" width="500" height="17"/>
<rect key="frame" x="295" y="1" width="470" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="Axh-Xk-Scw" userLabel="Value Title">
<rect key="frame" x="0.0" y="2" width="500" height="14"/>
<rect key="frame" x="0.0" y="2" width="470" height="14"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" title="Value" id="Gaq-fl-VGF">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -208,11 +208,11 @@
</connections>
</tableCellView>
<tableCellView identifier="BoolCell" id="TJI-m7-gdE" customClass="LNPropertyListCellView">
<rect key="frame" x="285" y="21" width="500" height="17"/>
<rect key="frame" x="295" y="21" width="470" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="okM-IP-jIc" userLabel="Type Button">
<rect key="frame" x="-13" y="0.0" width="513" height="18"/>
<rect key="frame" x="-13" y="2" width="483" height="14"/>
<popUpButtonCell key="cell" type="bevel" title="NO" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" imageScaling="proportionallyDown" inset="2" selectedItem="h7F-ry-9JB" id="c8n-Vg-c0j" customClass="LNPropertyListPopUpButtonCell">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
Expand Down Expand Up @@ -244,7 +244,7 @@
</connections>
</tableCellView>
<tableCellView identifier="DateCell" id="BrW-CZ-E8U" customClass="LNPropertyListCellView">
<rect key="frame" x="285" y="41" width="500" height="17"/>
<rect key="frame" x="295" y="41" width="470" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<customView placeholderIntrinsicWidth="279" placeholderIntrinsicHeight="17" translatesAutoresizingMaskIntoConstraints="NO" id="cut-BW-s5Y" customClass="LNPropertyListDatePicker">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Cocoa/Cocoa.h>
#import <LNPropertyListEditor/LNPropertyListEditor-Private.h>
#import "LNPropertyListEditor-Private.h"
#import "LNPropertyListNode.h"

@interface LNPropertyListRowView : NSTableRowView
Expand Down
2 changes: 1 addition & 1 deletion LNPropertyListEditor/LNPropertyListEditor/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0</string>
<string>2.0.-1</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSHumanReadableCopyright</key>
Expand Down
1 change: 0 additions & 1 deletion LNPropertyListEditor/include/LNPropertyListEditor.h

This file was deleted.

1 change: 0 additions & 1 deletion LNPropertyListEditor/include/LNPropertyListNode.h

This file was deleted.

12 changes: 8 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.1
// swift-tools-version:5.3

import PackageDescription

Expand All @@ -25,13 +25,17 @@ let package = Package(
path: "LNPropertyListEditor",
exclude: [
"LNPropertyListEditorExample",
"Supplements"
"Supplements",
"LNPropertyListEditor/Info.plist"
],
resources: [
.process("LNPropertyListEditor/Assets.xcassets"),
.process("LNPropertyListEditor/Views/LNPropertyListEditorOutline.xib")
],
publicHeadersPath: "include",
cSettings: [
.headerSearchPath("."),
.headerSearchPath("Model"),
.headerSearchPath("Views"),
.headerSearchPath("LNPropertyListEditor"),
]),
]
)

0 comments on commit e67343b

Please sign in to comment.