1 Commits

Author SHA1 Message Date
cardoso fbea890f79 Support SPM 2020-07-16 19:44:40 -03:00
9 changed files with 79 additions and 18 deletions
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
+10 -13
View File
@@ -109,9 +109,9 @@
26B3E7E389D001446B4D6F601832BCBD /* EmojiView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiView.swift; path = Streamoji/Classes/EmojiView.swift; sourceTree = "<group>"; };
2A4B88848D713BA31555E0F20D8B0B11 /* SwiftyGif.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftyGif.debug.xcconfig; sourceTree = "<group>"; };
2D8CBF549D2A8177D1C7F99A86AE3F05 /* ImageEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageEncoding.swift; path = Sources/ImageEncoding.swift; sourceTree = "<group>"; };
2DAD7D76FC007F48AE48F2FD15BF01BB /* Nuke.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Nuke.framework; path = Nuke.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2DAD7D76FC007F48AE48F2FD15BF01BB /* Nuke.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Nuke.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2E6A14973F1B56349393A8122BF73001 /* Pods-Streamoji_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Streamoji_Tests.release.xcconfig"; sourceTree = "<group>"; };
2E95EA1A4BA25268E8E7E7A289B9FD04 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = "<group>"; };
2E95EA1A4BA25268E8E7E7A289B9FD04 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
34DE839B866076A7C8CF3079FC285021 /* EmojiSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSource.swift; path = Streamoji/Classes/EmojiSource.swift; sourceTree = "<group>"; };
3722BC6CAB9620D28C998D72736E72FD /* SwiftyGif-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "SwiftyGif-Info.plist"; sourceTree = "<group>"; };
396E31B0C360D5414D34E77D838C4A91 /* Pods-Streamoji_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Streamoji_Example-acknowledgements.plist"; sourceTree = "<group>"; };
@@ -129,20 +129,20 @@
5798B8FBF57A7C505CA325C2EDE3A230 /* Pods-Streamoji_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Streamoji_Tests-umbrella.h"; sourceTree = "<group>"; };
5E54F7D7B5735AEC68F92989B85ECFB1 /* SwiftyGif.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftyGif.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5E9A2CEF63FEAE693D1351C475273FB4 /* Deprecated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecated.swift; path = Sources/Deprecated.swift; sourceTree = "<group>"; };
60F67E5B81AC28AA66C74FF15DD2F1EE /* Pods_Streamoji_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Streamoji_Example.framework; path = "Pods-Streamoji_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; };
60F67E5B81AC28AA66C74FF15DD2F1EE /* Pods_Streamoji_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Streamoji_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6550B16B86EEAFC37E5F8107D20CAC9C /* Streamoji.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Streamoji.debug.xcconfig; sourceTree = "<group>"; };
69990B6448B1A43B72798DF243B5DB1C /* ImageDecoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageDecoding.swift; path = Sources/ImageDecoding.swift; sourceTree = "<group>"; };
7303EA18B11E8382CEB625C1C1B7951D /* Pods-Streamoji_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Streamoji_Example-dummy.m"; sourceTree = "<group>"; };
75C5292E426EA1749958621AB3EB29FC /* DataLoader.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DataLoader.swift; path = Sources/DataLoader.swift; sourceTree = "<group>"; };
79553AB5373915EED1B3B5ADC379ABB1 /* Streamoji.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Streamoji.modulemap; sourceTree = "<group>"; };
7AD67EFB9A7864151301DC2890207AA2 /* SwiftyGif.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SwiftyGif.framework; path = SwiftyGif.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7AD67EFB9A7864151301DC2890207AA2 /* SwiftyGif.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftyGif.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7E626F32C91339EA3C4ABDC94159E5B2 /* Pods-Streamoji_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Streamoji_Example.release.xcconfig"; sourceTree = "<group>"; };
8491598EA722BC0A99E62BAEA1D1FA8E /* SwiftyGif.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SwiftyGif.h; path = SwiftyGif/SwiftyGif.h; sourceTree = "<group>"; };
8D2CB98E923B19137E19C15C027BBDC1 /* Nuke.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Nuke.framework; sourceTree = BUILT_PRODUCTS_DIR; };
90D9944B0AB84177C9A261AE7B807BCC /* Nuke-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nuke-dummy.m"; sourceTree = "<group>"; };
92422AEBC5058C56D5E51E95B82CBBB7 /* Pods-Streamoji_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Streamoji_Tests-acknowledgements.markdown"; sourceTree = "<group>"; };
976776E8C2EC098307C30550CEB194C2 /* Internal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Internal.swift; path = Sources/Internal.swift; sourceTree = "<group>"; };
9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
9E8F0426CAD06F7E87F134EA2A68CF48 /* Streamoji-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Streamoji-umbrella.h"; sourceTree = "<group>"; };
A0880346F6347FFC22028CEC6C34791D /* Pods-Streamoji_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Streamoji_Example-Info.plist"; sourceTree = "<group>"; };
A825DC21C307D07506BAEFD58D2079A3 /* Pods-Streamoji_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Streamoji_Example-umbrella.h"; sourceTree = "<group>"; };
@@ -150,11 +150,11 @@
BC84F0275DD07A4FBF67FECA0E32246B /* String+CodeRanges.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "String+CodeRanges.swift"; sourceTree = "<group>"; };
BD1A9C8FC4BD20B5CC711233FB59DCB0 /* Pods-Streamoji_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-Streamoji_Tests.modulemap"; sourceTree = "<group>"; };
C3A5428E5F382CB472500EABC3568950 /* Pods-Streamoji_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Streamoji_Example-acknowledgements.markdown"; sourceTree = "<group>"; };
C400D6CC38AF80CDBA499D3260FF06D3 /* Pods_Streamoji_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Streamoji_Tests.framework; path = "Pods-Streamoji_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; };
C400D6CC38AF80CDBA499D3260FF06D3 /* Pods_Streamoji_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Streamoji_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C4E64C71EEDF929638AAE1DA05B0A1E9 /* Streamoji-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Streamoji-dummy.m"; sourceTree = "<group>"; };
C6C9D0B1198A47DD4B58750FD434786D /* ImagePipeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImagePipeline.swift; path = Sources/ImagePipeline.swift; sourceTree = "<group>"; };
C8BA3E7738488877616B093A9356A6FD /* Pods-Streamoji_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Streamoji_Tests-dummy.m"; sourceTree = "<group>"; };
CBA0F7F6CB6BD6829B67E13F724110CB /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = "<group>"; };
CBA0F7F6CB6BD6829B67E13F724110CB /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
CBEB2289F675F59D7CB2567EF667252D /* UITextView+Emojis.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UITextView+Emojis.swift"; sourceTree = "<group>"; };
CBF847FA246FC278EA6483C29FC4C588 /* Pods-Streamoji_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Streamoji_Tests.debug.xcconfig"; sourceTree = "<group>"; };
D4782713D1DB3DD8441227DB920B8562 /* SwiftyGif-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftyGif-prefix.pch"; sourceTree = "<group>"; };
@@ -166,12 +166,12 @@
E0937183E031D5AB4D07E99A7414D7C2 /* Task.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Task.swift; path = Sources/Task.swift; sourceTree = "<group>"; };
E226162249A8E031B5E5D4255F684EF3 /* ImageRequest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageRequest.swift; path = Sources/ImageRequest.swift; sourceTree = "<group>"; };
E3B57180E1DE18DA6BE92FBA0ACB5B2A /* NSAttributedString+Emojis.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSAttributedString+Emojis.swift"; sourceTree = "<group>"; };
EAC1963F41D1D4858606C7BEB5FBED16 /* Streamoji.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Streamoji.framework; path = Streamoji.framework; sourceTree = BUILT_PRODUCTS_DIR; };
EAC1963F41D1D4858606C7BEB5FBED16 /* Streamoji.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Streamoji.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F2F8F31CF9252F2A80CEB99CF61636C7 /* Pods-Streamoji_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Streamoji_Tests-acknowledgements.plist"; sourceTree = "<group>"; };
F534A833623DADFCD1FD3B12513D89AE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
F6E748A5560B693EADE29B397A586077 /* Pods-Streamoji_Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Streamoji_Tests-Info.plist"; sourceTree = "<group>"; };
FD75F13F574D5E88656C2B2847EAA317 /* Streamoji.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Streamoji.release.xcconfig; sourceTree = "<group>"; };
FDD99818949826A2D88CEE25F18DB711 /* Streamoji.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = Streamoji.podspec; sourceTree = "<group>"; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
FDD99818949826A2D88CEE25F18DB711 /* Streamoji.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = Streamoji.podspec; sourceTree = "<group>"; tabWidth = 2; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -258,7 +258,6 @@
E0937183E031D5AB4D07E99A7414D7C2 /* Task.swift */,
A5E37429F0A71D5CFA86DA5899BB4715 /* Support Files */,
);
name = Nuke;
path = Nuke;
sourceTree = "<group>";
};
@@ -306,7 +305,6 @@
41CBBFC6BE9A38FA5147366C20ADD02B /* UIImageView+SwiftyGif.swift */,
910EB3815B220B99E9524E611C2BD103 /* Support Files */,
);
name = SwiftyGif;
path = SwiftyGif;
sourceTree = "<group>";
};
@@ -1171,8 +1169,7 @@
MTL_FAST_MATH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 5.0;
SYMROOT = "${SRCROOT}/../build";
};
+1 -1
View File
@@ -45,7 +45,7 @@
607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; };
710F8F737E6CC7E7E5160B6A /* Pods-Streamoji_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Streamoji_Example.debug.xcconfig"; path = "Target Support Files/Pods-Streamoji_Example/Pods-Streamoji_Example.debug.xcconfig"; sourceTree = "<group>"; };
809A322624ABD16300254749 /* ExampleEmojis.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleEmojis.swift; sourceTree = "<group>"; };
B5719351A2A6F7B82EB873D6 /* Streamoji.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Streamoji.podspec; path = ../Streamoji.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
B5719351A2A6F7B82EB873D6 /* Streamoji.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Streamoji.podspec; path = ../Streamoji.podspec; sourceTree = "<group>"; };
CF231BC98C7336EC0A677637 /* Pods_Streamoji_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Streamoji_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D1F17349687F316A33A0DFBD /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
E88B32B91CF9A41459E6DD01 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
+25
View File
@@ -0,0 +1,25 @@
{
"object": {
"pins": [
{
"package": "Nuke",
"repositoryURL": "https://github.com/kean/Nuke.git",
"state": {
"branch": null,
"revision": "6001489d22e5f41a4956c1b6cd4cf7cbe8f44dff",
"version": "8.4.1"
}
},
{
"package": "SwiftyGif",
"repositoryURL": "https://github.com/kirualex/SwiftyGif.git",
"state": {
"branch": null,
"revision": "420d12cba8338b03993f73a72c1f6b70d5273cf2",
"version": "5.3.0"
}
}
]
},
"version": 1
}
+29
View File
@@ -0,0 +1,29 @@
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Streamoji",
platforms: [.iOS(.v10)],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "Streamoji",
targets: ["Streamoji"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/kean/Nuke.git", from: "8.4.0"),
.package(url: "https://github.com/kirualex/SwiftyGif.git", from: "5.2.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "Streamoji",
dependencies: ["Nuke", "SwiftyGif"],
path: "Streamoji")
]
)
+3 -2
View File
@@ -21,8 +21,9 @@ Pod::Spec.new do |s|
s.description = <<-DESC
Custom emoji rendering library for iOS apps with support for GIF & images
Plug-in extension for UITextView
Made with 💘 by GetStream.io
- plug-in extension for UITextView
- performance, cache ✅
- with 💘 from @GetStream
DESC
s.homepage = 'https://github.com/GetStream/Streamoji'
@@ -5,7 +5,7 @@
// Created by Matheus Cardoso on 30/06/20.
//
import Foundation
import UIKit
extension NSAttributedString {
internal func insertingEmojis(
@@ -5,6 +5,8 @@
// Created by Matheus Cardoso on 30/06/20.
//
import Foundation
extension String {
func codeRanges() -> [NSRange] {
let codeRegex = try? NSRegularExpression(pattern: "(```)(?:[a-zA-Z]+)?((?:.|\r|\n)*?)(```)", options: [.anchorsMatchLines])
@@ -5,7 +5,7 @@
// Created by Matheus Cardoso on 30/06/20.
//
import Foundation
import UIKit
fileprivate var renderViews: [EmojiSource: UIImageView] = [:]