Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
2 changes: 0 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ workflows:
- ios/test:
name: Test
xcode-version: "11.0"
carthage-update: true
carthage-working-directory: Example
bundle-install: false
pod-install: false
workspace: Aztec.xcworkspace
Expand Down
93 changes: 0 additions & 93 deletions Aztec.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,6 @@
remoteGlobalIDString = 5951CB8D1D8BC93600E1866F;
remoteInfo = Aztec;
};
E8CE3F041F213AD0003254AB /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5951CB851D8BC93600E1866F /* Project object */;
proxyType = 1;
remoteGlobalIDString = E8CE3EFE1F213AAA003254AB;
remoteInfo = "Carthage Update";
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
Expand Down Expand Up @@ -1415,23 +1408,6 @@
};
/* End PBXHeadersBuildPhase section */

/* Begin PBXLegacyTarget section */
E8CE3EFE1F213AAA003254AB /* Carthage Update */ = {
isa = PBXLegacyTarget;
buildArgumentsString = "$(ACTION)";
buildConfigurationList = E8CE3F031F213AAA003254AB /* Build configuration list for PBXLegacyTarget "Carthage Update" */;
buildPhases = (
);
buildToolPath = "${PROJECT_DIR}/Scripts/carthage_script.sh";
buildWorkingDirectory = "";
dependencies = (
);
name = "Carthage Update";
passBuildSettingsInEnvironment = 1;
productName = "Carthage Update";
};
/* End PBXLegacyTarget section */

/* Begin PBXNativeTarget section */
5951CB8D1D8BC93600E1866F /* Aztec */ = {
isa = PBXNativeTarget;
Expand All @@ -1445,7 +1421,6 @@
buildRules = (
);
dependencies = (
E8CE3F051F213AD0003254AB /* PBXTargetDependency */,
);
name = Aztec;
productName = Aztec;
Expand Down Expand Up @@ -1492,10 +1467,6 @@
LastSwiftMigration = 1100;
ProvisioningStyle = Automatic;
};
E8CE3EFE1F213AAA003254AB = {
CreatedOnToolsVersion = 8.3.3;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 5951CB881D8BC93600E1866F /* Build configuration list for PBXProject "Aztec" */;
Expand All @@ -1513,7 +1484,6 @@
targets = (
5951CB8D1D8BC93600E1866F /* Aztec */,
5951CB961D8BC93600E1866F /* AztecTests */,
E8CE3EFE1F213AAA003254AB /* Carthage Update */,
);
};
/* End PBXProject section */
Expand Down Expand Up @@ -1803,11 +1773,6 @@
target = 5951CB8D1D8BC93600E1866F /* Aztec */;
targetProxy = 5951CB991D8BC93600E1866F /* PBXContainerItemProxy */;
};
E8CE3F051F213AD0003254AB /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = E8CE3EFE1F213AAA003254AB /* Carthage Update */;
targetProxy = E8CE3F041F213AD0003254AB /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
Expand Down Expand Up @@ -2035,53 +2000,6 @@
};
name = Release;
};
E8CE3EFF1F213AAA003254AB /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
DEBUGGING_SYMBOLS = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
E8CE3F001F213AAA003254AB /* Release-Alpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = "Release-Alpha";
};
E8CE3F011F213AAA003254AB /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
E8CE3F021F213AAA003254AB /* Profiling */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Profiling;
};
F111A1101DA7E8B600294FD3 /* Profiling */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -2344,17 +2262,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
E8CE3F031F213AAA003254AB /* Build configuration list for PBXLegacyTarget "Carthage Update" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E8CE3EFF1F213AAA003254AB /* Debug */,
E8CE3F001F213AAA003254AB /* Release-Alpha */,
E8CE3F011F213AAA003254AB /* Release */,
E8CE3F021F213AAA003254AB /* Profiling */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 5951CB851D8BC93600E1866F /* Project object */;
Expand Down
14 changes: 4 additions & 10 deletions Example/AztecExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
59280F2A1D47CAF40083FB59 /* content.html in Resources */ = {isa = PBXBuildFile; fileRef = 59280F281D47CAF40083FB59 /* content.html */; };
59280F2B1D47CAF40083FB59 /* SampleText.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 59280F291D47CAF40083FB59 /* SampleText.rtf */; };
592D62C91D8DF5590013EFF7 /* Aztec.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 599F25771D8BD045002871D6 /* Aztec.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
596719401D8BC60D00F18F7F /* Gridicons.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5967193D1D8BC60D00F18F7F /* Gridicons.framework */; };
599F25701D8BCF57002871D6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 599F256F1D8BCF57002871D6 /* AppDelegate.swift */; };
599F25861D8BD998002871D6 /* Gridicons.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5967193D1D8BC60D00F18F7F /* Gridicons.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
59D2873B1D8C599B00B99C80 /* AttachmentDetailsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59D287391D8C599B00B99C80 /* AttachmentDetailsViewController.swift */; };
607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; };
607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; };
Expand Down Expand Up @@ -121,7 +119,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
599F25861D8BD998002871D6 /* Gridicons.framework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -130,7 +127,6 @@
/* Begin PBXFileReference section */
59280F281D47CAF40083FB59 /* content.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = content.html; sourceTree = "<group>"; };
59280F291D47CAF40083FB59 /* SampleText.rtf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.rtf; path = SampleText.rtf; sourceTree = "<group>"; };
5967193D1D8BC60D00F18F7F /* Gridicons.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Gridicons.framework; path = Carthage/Build/iOS/Gridicons.framework; sourceTree = "<group>"; };
599F256F1D8BCF57002871D6 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
599F25711D8BD044002871D6 /* Aztec.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Aztec.xcodeproj; path = ../Aztec.xcodeproj; sourceTree = "<group>"; };
59D287391D8C599B00B99C80 /* AttachmentDetailsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AttachmentDetailsViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -178,7 +174,6 @@
buildActionMask = 2147483647;
files = (
F1D3610A20929EF700B4E7A5 /* Aztec.framework in Frameworks */,
596719401D8BC60D00F18F7F /* Gridicons.framework in Frameworks */,
F1D3610B20929F0200B4E7A5 /* WordPressEditor.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -198,7 +193,6 @@
isa = PBXGroup;
children = (
F122C2502072AE190018ED06 /* libxml2.tbd */,
5967193D1D8BC60D00F18F7F /* Gridicons.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -606,7 +600,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = /usr/include/libxml2;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -660,7 +654,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = /usr/include/libxml2;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
STRIP_INSTALLED_PRODUCT = NO;
Expand Down Expand Up @@ -823,7 +817,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = /usr/include/libxml2;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -907,7 +901,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = /usr/include/libxml2;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down
1 change: 0 additions & 1 deletion Example/Cartfile.private

This file was deleted.

1 change: 0 additions & 1 deletion Example/Cartfile.resolved

This file was deleted.

66 changes: 36 additions & 30 deletions Example/Example/EditorDemoController.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Aztec
import Foundation
import Gridicons
import MobileCoreServices
import Photos
import UIKit
Expand Down Expand Up @@ -998,7 +997,7 @@ extension EditorDemoController {
toolbar.dividerTintColor = .gray
}

toolbar.overflowToggleIcon = .gridicon(.ellipsis)
toolbar.overflowToggleIcon = UIImage.init(systemName: "ellipsis")!
toolbar.frame = CGRect(x: 0, y: 0, width: view.frame.width, height: 44.0)
toolbar.autoresizingMask = [ .flexibleHeight ]
toolbar.formatter = self
Expand Down Expand Up @@ -1108,10 +1107,10 @@ extension EditorDemoController {

static var tintedMissingImage: UIImage = {
if #available(iOS 13.0, *) {
return UIImage.gridicon(.image).withTintColor(.label)
return UIImage.init(systemName: "photo")!.withTintColor(.label)
} else {
// Fallback on earlier versions
return .gridicon(.image)
return UIImage.init(systemName: "photo")!
}
}()

Expand All @@ -1136,61 +1135,68 @@ extension EditorDemoController {
}
}

extension UIImage {

static func systemImage(_ name: String) -> UIImage {
guard let image = UIImage(systemName: name) else {
assertionFailure("Missing system image: \(name)")
return UIImage()
}

return image
}
}

extension FormattingIdentifier {

var iconImage: UIImage {

switch(self) {
case .media:
return gridicon(.addOutline)
return UIImage.systemImage("plus.circle")
case .p:
return gridicon(.heading)
return UIImage.systemImage("textformat.size")
case .bold:
return gridicon(.bold)
return UIImage.systemImage("bold")
case .italic:
return gridicon(.italic)
return UIImage.systemImage("italic")
case .underline:
return gridicon(.underline)
return UIImage.systemImage("underline")
case .strikethrough:
return gridicon(.strikethrough)
return UIImage.systemImage("strikethrough")
case .blockquote:
return gridicon(.quote)
return UIImage.systemImage("text.quote")
case .orderedlist:
return gridicon(.listOrdered)
return UIImage.systemImage("list.number")
case .unorderedlist:
return gridicon(.listUnordered)
return UIImage.systemImage("list.bullet")
case .link:
return gridicon(.link)
return UIImage.systemImage("link")
case .horizontalruler:
return gridicon(.minusSmall)
return UIImage.systemImage("minus")
case .sourcecode:
return gridicon(.code)
return UIImage.systemImage("chevron.left.slash.chevron.right")
case .more:
return gridicon(.readMore)
return UIImage.systemImage("textformat.abc.dottedunderline")
case .header1:
return gridicon(.headingH1)
return UIImage.systemImage("textformat.size")
case .header2:
return gridicon(.headingH2)
return UIImage.systemImage("textformat.size")
case .header3:
return gridicon(.headingH3)
return UIImage.systemImage("textformat.size")
case .header4:
return gridicon(.headingH4)
return UIImage.systemImage("textformat.size")
case .header5:
return gridicon(.headingH5)
return UIImage.systemImage("textformat.size")
case .header6:
return gridicon(.headingH6)
return UIImage.systemImage("textformat.size")
case .code:
return gridicon(.posts)
return UIImage.systemImage("textbox")
default:
return gridicon(.help)
return UIImage.systemImage("info")
}
}

private func gridicon(_ gridiconType: GridiconType) -> UIImage {
let size = EditorDemoController.Constants.formatBarIconSize
return .gridicon(gridiconType, size: size)
}

var accessibilityIdentifier: String {
switch(self) {
case .media:
Expand Down
3 changes: 1 addition & 2 deletions Example/Example/MediaInserter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Foundation
import UIKit
import Aztec
import AVFoundation
import Gridicons

class MediaInserter
{
Expand Down Expand Up @@ -71,7 +70,7 @@ class MediaInserter
timer.invalidate()
let message = NSAttributedString(string: "Upload failed!", attributes: attachmentTextAttributes)
attachment.message = message
attachment.overlayImage = .gridicon(.refresh)
attachment.overlayImage = UIImage.systemImage("arrow.clockwise")
}
if progress.fractionCompleted >= 1 {
timer.invalidate()
Expand Down
Loading