From 2f2c1e22bdcc93929deb0383081381f12f9130b4 Mon Sep 17 00:00:00 2001 From: Nathan Tannar Date: Fri, 16 Feb 2018 11:21:34 -0800 Subject: [PATCH] Possible fix for #25 #26 --- Examples/Pods/Pods.xcodeproj/project.pbxproj | 316 +++++++++--------- .../MessageAutocompleteController.swift | 10 + ...NSAttributedString+HighlightingTests.swift | 2 +- 3 files changed, 174 insertions(+), 154 deletions(-) diff --git a/Examples/Pods/Pods.xcodeproj/project.pbxproj b/Examples/Pods/Pods.xcodeproj/project.pbxproj index 3b02173..e904bef 100644 --- a/Examples/Pods/Pods.xcodeproj/project.pbxproj +++ b/Examples/Pods/Pods.xcodeproj/project.pbxproj @@ -13,17 +13,17 @@ 48043ABFE79418EF931960ED29855796 /* MessageViewController+MessageViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88120228CF458435D2236C64DB036E3A /* MessageViewController+MessageViewDelegate.swift */; }; 49533A4F96F222F89E7EA3EFDBE8668A /* UIButton+BottomHeightOffset.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADDAE55DEE91482E257BDEE39BFA11ED /* UIButton+BottomHeightOffset.swift */; }; 6D6F7C71D33AF6BA0424AC50F967D7F1 /* String+WordAtRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = C73D0538CE197D3ECB173BD3DABEB1DB /* String+WordAtRange.swift */; }; - 7FDE8A5D2EF8E282D1A6452530E137CB /* MessageViewController-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F13D958197C185B2E05B89A28ACF7F9A /* MessageViewController-dummy.m */; }; + 7FDE8A5D2EF8E282D1A6452530E137CB /* MessageViewController-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 09BB4ED01E28A639AF0CE74073DBFA9E /* MessageViewController-dummy.m */; }; 8292B0109F5D42139CC88F8876755C0B /* MessageAutocompleteController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA6BA99CB0A264C8FDCF9F2A35255AC3 /* MessageAutocompleteController.swift */; }; 95924FE621C38A19A48516605DC9239F /* UIView+iOS11.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDF8E22ACCDA47937A3A8B4297428F27 /* UIView+iOS11.swift */; }; A7253CC5BDB0113BB96BDEE765DA85D6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; B2EF6D06C6241A1C2B322696295C1F12 /* MessageTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8740D7783AEE9AB8796BE9ADEF37D488 /* MessageTextView.swift */; }; B5E1C48814B6A0E0057C7399B60E6A1F /* UIScrollView+StopScrolling.swift in Sources */ = {isa = PBXBuildFile; fileRef = B81C0A064878637EDBEC425A7F7CB56D /* UIScrollView+StopScrolling.swift */; }; - D35DB21A6B4BFCA7A27850C679EFE960 /* Pods-Examples-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = CF476AA8B123161C7E43AA19423F34A0 /* Pods-Examples-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D35DB21A6B4BFCA7A27850C679EFE960 /* Pods-Examples-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 708CE1D611334D20D20054A47B165A45 /* Pods-Examples-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; D579113B22A93703CA6CF9BB6F4725DF /* NSAttributedString+ReplaceRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A72229B3439164C419EBDAB2B2D268D /* NSAttributedString+ReplaceRange.swift */; }; - D6310001724F0A69C71F00E53B42BAFE /* Pods-Examples-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = CC67987DCD20B0E11FEC64AD36A08104 /* Pods-Examples-dummy.m */; }; + D6310001724F0A69C71F00E53B42BAFE /* Pods-Examples-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 088CE4DEBD5AFD36D1D4293911018293 /* Pods-Examples-dummy.m */; }; DD0F13CA430DB78B26A436C0A5F90ECB /* UITextView+Prefixes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54C1C1DDF830861C9F4713F8FF88A0B8 /* UITextView+Prefixes.swift */; }; - F31E2AC194AA0AA562D1BD90E8F7A9FD /* MessageViewController-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E4C436AF795185CF66188C76AE8E086F /* MessageViewController-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F31E2AC194AA0AA562D1BD90E8F7A9FD /* MessageViewController-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = FB973EA763BAFF9C3590E30B52211451 /* MessageViewController-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; F69A2FF839825859E66394B591A018E8 /* MessageViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88F10B46643C0101E4B04654062D1729 /* MessageViewDelegate.swift */; }; /* End PBXBuildFile section */ @@ -38,40 +38,40 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 05AE4B3FEB69721F62BD8F1111C0B3E0 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 088CE4DEBD5AFD36D1D4293911018293 /* Pods-Examples-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Examples-dummy.m"; sourceTree = ""; }; + 09BB4ED01E28A639AF0CE74073DBFA9E /* MessageViewController-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "MessageViewController-dummy.m"; sourceTree = ""; }; 0A5396B044562E78E0FDEC0D9A3B915B /* MessageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MessageView.swift; path = MessageViewController/MessageView.swift; sourceTree = ""; }; - 212992D9667EAD3AF415D69AA72A8C39 /* Pods-Examples-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Examples-acknowledgements.plist"; sourceTree = ""; }; - 28CBB08EFD96DDDCA35F85D08ADC7A2F /* MessageViewController.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MessageViewController.xcconfig; sourceTree = ""; }; - 2B038BDA4A2DE18B6392A8EB939D461B /* Pods-Examples-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Examples-acknowledgements.markdown"; sourceTree = ""; }; + 0E85C4F4BE728F6D81B641C896B26881 /* Pods-Examples-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Examples-acknowledgements.markdown"; sourceTree = ""; }; + 23DDC2117ADBDBEA3983436B4D327BF7 /* Pods-Examples.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-Examples.modulemap"; sourceTree = ""; }; + 241EED3A73D5812658DC7A78D7DB7F46 /* MessageViewController-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MessageViewController-prefix.pch"; sourceTree = ""; }; + 25D24A4923125F0787F9AC31237C307D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 3A72229B3439164C419EBDAB2B2D268D /* NSAttributedString+ReplaceRange.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSAttributedString+ReplaceRange.swift"; path = "MessageViewController/NSAttributedString+ReplaceRange.swift"; sourceTree = ""; }; - 4B5D175174FED0D211005E28DCCB9A59 /* Pods-Examples.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Examples.debug.xcconfig"; sourceTree = ""; }; + 46F8A3D3F0984D3DA8E7A4D3DED400CC /* Pods-Examples.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Examples.debug.xcconfig"; sourceTree = ""; }; + 526C87AAE61AF7D56D0A31C47144DFD0 /* Pods-Examples-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Examples-frameworks.sh"; sourceTree = ""; }; 54C1C1DDF830861C9F4713F8FF88A0B8 /* UITextView+Prefixes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UITextView+Prefixes.swift"; path = "MessageViewController/UITextView+Prefixes.swift"; sourceTree = ""; }; - 5B01107EB1B9BD80E1F283B8EE931EB1 /* Pods-Examples-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Examples-frameworks.sh"; sourceTree = ""; }; 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 6A4502DB0407EDA9A5E4A8CB547804A2 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; + 708CE1D611334D20D20054A47B165A45 /* Pods-Examples-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Examples-umbrella.h"; sourceTree = ""; }; 8740D7783AEE9AB8796BE9ADEF37D488 /* MessageTextView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MessageTextView.swift; path = MessageViewController/MessageTextView.swift; sourceTree = ""; }; 88120228CF458435D2236C64DB036E3A /* MessageViewController+MessageViewDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MessageViewController+MessageViewDelegate.swift"; path = "MessageViewController/MessageViewController+MessageViewDelegate.swift"; sourceTree = ""; }; 88F10B46643C0101E4B04654062D1729 /* MessageViewDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MessageViewDelegate.swift; path = MessageViewController/MessageViewDelegate.swift; sourceTree = ""; }; - 8C06C3D654F84D4F688594BECFD35C9C /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9A0E36896AE99549372F0A04877B7EAC /* MessageViewController.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = MessageViewController.modulemap; sourceTree = ""; }; 9F7CA8A37DAB011181174507244B8DDB /* MessageViewController.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = MessageViewController.framework; path = MessageViewController.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A4286613166589E2719A2DB5F24F4D3F /* Pods-Examples-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Examples-resources.sh"; sourceTree = ""; }; - A49DE978024C59B3806D9FA0F83571EC /* MessageViewController-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MessageViewController-prefix.pch"; sourceTree = ""; }; - A9CAD72ABED699BF6E5726387A50E8F7 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; AA6BA99CB0A264C8FDCF9F2A35255AC3 /* MessageAutocompleteController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MessageAutocompleteController.swift; path = MessageViewController/MessageAutocompleteController.swift; sourceTree = ""; }; ADDAE55DEE91482E257BDEE39BFA11ED /* UIButton+BottomHeightOffset.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIButton+BottomHeightOffset.swift"; path = "MessageViewController/UIButton+BottomHeightOffset.swift"; sourceTree = ""; }; - AEA989834329C60EEEF30AF4F9BC718F /* Pods-Examples.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Examples.release.xcconfig"; sourceTree = ""; }; + B1FB8612BC577D3F77B698722906DE03 /* Pods-Examples-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Examples-acknowledgements.plist"; sourceTree = ""; }; B81C0A064878637EDBEC425A7F7CB56D /* UIScrollView+StopScrolling.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIScrollView+StopScrolling.swift"; path = "MessageViewController/UIScrollView+StopScrolling.swift"; sourceTree = ""; }; BF6DA74672171E204495E4B360143C6A /* MessageViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MessageViewController.swift; path = MessageViewController/MessageViewController.swift; sourceTree = ""; }; C711475B7A4F0F74CFD0D19DEC518676 /* Pods_Examples.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Examples.framework; path = "Pods-Examples.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; C73D0538CE197D3ECB173BD3DABEB1DB /* String+WordAtRange.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+WordAtRange.swift"; path = "MessageViewController/String+WordAtRange.swift"; sourceTree = ""; }; C92F366458F5B5EC84057D47A6D19024 /* MessageViewController.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; path = MessageViewController.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - CC67987DCD20B0E11FEC64AD36A08104 /* Pods-Examples-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Examples-dummy.m"; sourceTree = ""; }; - CF476AA8B123161C7E43AA19423F34A0 /* Pods-Examples-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Examples-umbrella.h"; sourceTree = ""; }; - E329317942600C29B668F24E5DFE7E93 /* Pods-Examples.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-Examples.modulemap"; sourceTree = ""; }; - E4C436AF795185CF66188C76AE8E086F /* MessageViewController-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MessageViewController-umbrella.h"; sourceTree = ""; }; - F13D958197C185B2E05B89A28ACF7F9A /* MessageViewController-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "MessageViewController-dummy.m"; sourceTree = ""; }; + DD4D1E3AFD802BF8F7580C35AF94D1BB /* Pods-Examples.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Examples.release.xcconfig"; sourceTree = ""; }; + E485B535C96BF2B01485A4DA1A17BB0D /* MessageViewController.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = MessageViewController.modulemap; sourceTree = ""; }; + E77E224A96828E7063E6B672F4F159B0 /* MessageViewController.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MessageViewController.xcconfig; sourceTree = ""; }; + EC461691A22FF7DB4A1FB4F7A7487EA4 /* Pods-Examples-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Examples-resources.sh"; sourceTree = ""; }; F3FFCFA344E1D6543F6DF7598CE9B593 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; + FB973EA763BAFF9C3590E30B52211451 /* MessageViewController-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MessageViewController-umbrella.h"; sourceTree = ""; }; FDF8E22ACCDA47937A3A8B4297428F27 /* UIView+iOS11.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+iOS11.swift"; path = "MessageViewController/UIView+iOS11.swift"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -95,6 +95,24 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 2BE154C4D0BF4B1F8648C7B5D87586AF /* Pods-Examples */ = { + isa = PBXGroup; + children = ( + 25D24A4923125F0787F9AC31237C307D /* Info.plist */, + 23DDC2117ADBDBEA3983436B4D327BF7 /* Pods-Examples.modulemap */, + 0E85C4F4BE728F6D81B641C896B26881 /* Pods-Examples-acknowledgements.markdown */, + B1FB8612BC577D3F77B698722906DE03 /* Pods-Examples-acknowledgements.plist */, + 088CE4DEBD5AFD36D1D4293911018293 /* Pods-Examples-dummy.m */, + 526C87AAE61AF7D56D0A31C47144DFD0 /* Pods-Examples-frameworks.sh */, + EC461691A22FF7DB4A1FB4F7A7487EA4 /* Pods-Examples-resources.sh */, + 708CE1D611334D20D20054A47B165A45 /* Pods-Examples-umbrella.h */, + 46F8A3D3F0984D3DA8E7A4D3DED400CC /* Pods-Examples.debug.xcconfig */, + DD4D1E3AFD802BF8F7580C35AF94D1BB /* Pods-Examples.release.xcconfig */, + ); + name = "Pods-Examples"; + path = "Target Support Files/Pods-Examples"; + sourceTree = ""; + }; 3441085000E940EF2B125D20434A3947 /* Pod */ = { isa = PBXGroup; children = ( @@ -114,24 +132,6 @@ name = Products; sourceTree = ""; }; - 6B333696FCF08235E417336B6A77B269 /* Pods-Examples */ = { - isa = PBXGroup; - children = ( - A9CAD72ABED699BF6E5726387A50E8F7 /* Info.plist */, - E329317942600C29B668F24E5DFE7E93 /* Pods-Examples.modulemap */, - 2B038BDA4A2DE18B6392A8EB939D461B /* Pods-Examples-acknowledgements.markdown */, - 212992D9667EAD3AF415D69AA72A8C39 /* Pods-Examples-acknowledgements.plist */, - CC67987DCD20B0E11FEC64AD36A08104 /* Pods-Examples-dummy.m */, - 5B01107EB1B9BD80E1F283B8EE931EB1 /* Pods-Examples-frameworks.sh */, - A4286613166589E2719A2DB5F24F4D3F /* Pods-Examples-resources.sh */, - CF476AA8B123161C7E43AA19423F34A0 /* Pods-Examples-umbrella.h */, - 4B5D175174FED0D211005E28DCCB9A59 /* Pods-Examples.debug.xcconfig */, - AEA989834329C60EEEF30AF4F9BC718F /* Pods-Examples.release.xcconfig */, - ); - name = "Pods-Examples"; - path = "Target Support Files/Pods-Examples"; - sourceTree = ""; - }; 7B47F98F59AAA0EB63C0936C64F99F82 /* Development Pods */ = { isa = PBXGroup; children = ( @@ -167,7 +167,7 @@ 54C1C1DDF830861C9F4713F8FF88A0B8 /* UITextView+Prefixes.swift */, FDF8E22ACCDA47937A3A8B4297428F27 /* UIView+iOS11.swift */, 3441085000E940EF2B125D20434A3947 /* Pod */, - BF949C53550F0A899D2EF2C7268EBC97 /* Support Files */, + F1BDFFB272377CBEA3E2BC04250D19C6 /* Support Files */, ); name = MessageViewController; path = ../..; @@ -181,32 +181,32 @@ name = Frameworks; sourceTree = ""; }; - BF949C53550F0A899D2EF2C7268EBC97 /* Support Files */ = { + D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { isa = PBXGroup; children = ( - 8C06C3D654F84D4F688594BECFD35C9C /* Info.plist */, - 9A0E36896AE99549372F0A04877B7EAC /* MessageViewController.modulemap */, - 28CBB08EFD96DDDCA35F85D08ADC7A2F /* MessageViewController.xcconfig */, - F13D958197C185B2E05B89A28ACF7F9A /* MessageViewController-dummy.m */, - A49DE978024C59B3806D9FA0F83571EC /* MessageViewController-prefix.pch */, - E4C436AF795185CF66188C76AE8E086F /* MessageViewController-umbrella.h */, + 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, ); - name = "Support Files"; - path = "Examples/Pods/Target Support Files/MessageViewController"; + name = iOS; sourceTree = ""; }; - D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { + F1BDFFB272377CBEA3E2BC04250D19C6 /* Support Files */ = { isa = PBXGroup; children = ( - 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, + 05AE4B3FEB69721F62BD8F1111C0B3E0 /* Info.plist */, + E485B535C96BF2B01485A4DA1A17BB0D /* MessageViewController.modulemap */, + E77E224A96828E7063E6B672F4F159B0 /* MessageViewController.xcconfig */, + 09BB4ED01E28A639AF0CE74073DBFA9E /* MessageViewController-dummy.m */, + 241EED3A73D5812658DC7A78D7DB7F46 /* MessageViewController-prefix.pch */, + FB973EA763BAFF9C3590E30B52211451 /* MessageViewController-umbrella.h */, ); - name = iOS; + name = "Support Files"; + path = "Examples/Pods/Target Support Files/MessageViewController"; sourceTree = ""; }; F872D0250D61C30260F42D978EB4C3C0 /* Targets Support Files */ = { isa = PBXGroup; children = ( - 6B333696FCF08235E417336B6A77B269 /* Pods-Examples */, + 2BE154C4D0BF4B1F8648C7B5D87586AF /* Pods-Examples */, ); name = "Targets Support Files"; sourceTree = ""; @@ -274,8 +274,8 @@ D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0700; + LastSwiftUpdateCheck = 0930; + LastUpgradeCheck = 0930; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -336,7 +336,72 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 12C4B864767C59600DBFA238F1E2F8BC /* Release */ = { + 040C1DC3099ABF8BD2B2E200261F5DE6 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E77E224A96828E7063E6B672F4F159B0 /* MessageViewController.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/MessageViewController/MessageViewController-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/MessageViewController/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/MessageViewController/MessageViewController.modulemap"; + PRODUCT_NAME = MessageViewController; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 0D47015413F80F8636213D1D3177B4E2 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E77E224A96828E7063E6B672F4F159B0 /* MessageViewController.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/MessageViewController/MessageViewController-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/MessageViewController/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/MessageViewController/MessageViewController.modulemap"; + PRODUCT_NAME = MessageViewController; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 13A95306D85E4471AB6BE665B012E60A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -346,10 +411,12 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -357,6 +424,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -367,13 +435,16 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -383,52 +454,21 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = NO; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Release; - }; - 147AC3194B0F6A48F522CB49D022DBCA /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4B5D175174FED0D211005E28DCCB9A59 /* Pods-Examples.debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-Examples/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-Examples/Pods-Examples.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_Examples; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; + SYMROOT = "${SRCROOT}/../build"; }; name = Debug; }; - 3E544B95CE7FA945B119867DAE165629 /* Release */ = { + 68D38E0A8A3C85BC70E930EF0A3EA620 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AEA989834329C60EEEF30AF4F9BC718F /* Pods-Examples.release.xcconfig */; + baseConfigurationReference = DD4D1E3AFD802BF8F7580C35AF94D1BB /* Pods-Examples.release.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -459,7 +499,7 @@ }; name = Release; }; - 59F0302F2371FCC6B73EF0A418D40734 /* Debug */ = { + 8E8333274F4AB64785B04AB5B2A37231 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -469,10 +509,12 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -480,6 +522,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -490,16 +533,13 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", + "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -509,20 +549,19 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; + MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SYMROOT = "${SRCROOT}/../build"; }; - name = Debug; + name = Release; }; - 9CEB38629B78DA0985C3F2B2D18B2BC5 /* Debug */ = { + D3520EA8ECC2FE4A69A07D59355442E4 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 28CBB08EFD96DDDCA35F85D08ADC7A2F /* MessageViewController.xcconfig */; + baseConfigurationReference = 46F8A3D3F0984D3DA8E7A4D3DED400CC /* Pods-Examples.debug.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -532,64 +571,35 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/MessageViewController/MessageViewController-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/MessageViewController/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-Examples/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/MessageViewController/MessageViewController.modulemap"; - PRODUCT_NAME = MessageViewController; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Examples/Pods-Examples.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_Examples; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - B90BDB4FC43C44A0AAD94B3DA4C88810 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 28CBB08EFD96DDDCA35F85D08ADC7A2F /* MessageViewController.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/MessageViewController/MessageViewController-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/MessageViewController/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/MessageViewController/MessageViewController.modulemap"; - PRODUCT_NAME = MessageViewController; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 59F0302F2371FCC6B73EF0A418D40734 /* Debug */, - 12C4B864767C59600DBFA238F1E2F8BC /* Release */, + 13A95306D85E4471AB6BE665B012E60A /* Debug */, + 8E8333274F4AB64785B04AB5B2A37231 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -597,8 +607,8 @@ 6DFFE0C37BE6DD75CAE4E48F2FC1C3D6 /* Build configuration list for PBXNativeTarget "Pods-Examples" */ = { isa = XCConfigurationList; buildConfigurations = ( - 147AC3194B0F6A48F522CB49D022DBCA /* Debug */, - 3E544B95CE7FA945B119867DAE165629 /* Release */, + D3520EA8ECC2FE4A69A07D59355442E4 /* Debug */, + 68D38E0A8A3C85BC70E930EF0A3EA620 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -606,8 +616,8 @@ 9E9D28C4F11B5242D1D6EAAEA04342EC /* Build configuration list for PBXNativeTarget "MessageViewController" */ = { isa = XCConfigurationList; buildConfigurations = ( - 9CEB38629B78DA0985C3F2B2D18B2BC5 /* Debug */, - B90BDB4FC43C44A0AAD94B3DA4C88810 /* Release */, + 040C1DC3099ABF8BD2B2E200261F5DE6 /* Debug */, + 0D47015413F80F8636213D1D3177B4E2 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/MessageViewController/MessageAutocompleteController.swift b/MessageViewController/MessageAutocompleteController.swift index e9edd11..7f9d10a 100644 --- a/MessageViewController/MessageAutocompleteController.swift +++ b/MessageViewController/MessageAutocompleteController.swift @@ -46,8 +46,17 @@ public final class MessageAutocompleteController: MessageTextViewListener { private var typingTextAttributes: [NSAttributedStringKey: Any] { var attributes = defaultTextAttributes attributes[NSAttributedAutocompleteKey] = false + attributes[.paragraphStyle] = paragraphStyle return attributes } + + /// The NSAttributedStringKey.paragraphStyle value applied to attributed strings + private let paragraphStyle: NSMutableParagraphStyle = { + let style = NSMutableParagraphStyle() + style.paragraphSpacingBefore = 2 + style.lineHeightMultiple = 1 + return style + }() internal var registeredPrefixes = Set() internal let border = CALayer() @@ -165,6 +174,7 @@ public final class MessageAutocompleteController: MessageTextViewListener { public func registerAutocomplete(prefix: String, attributes: [NSAttributedStringKey: Any]) { autocompleteTextAttributes[prefix] = attributes + autocompleteTextAttributes[prefix]?[.paragraphStyle] = paragraphStyle } // MARK: Private API diff --git a/MessageViewControllerTests/NSAttributedString+HighlightingTests.swift b/MessageViewControllerTests/NSAttributedString+HighlightingTests.swift index db9d994..b4d3740 100644 --- a/MessageViewControllerTests/NSAttributedString+HighlightingTests.swift +++ b/MessageViewControllerTests/NSAttributedString+HighlightingTests.swift @@ -15,7 +15,7 @@ class NSAttributedString_HighlightingTests: XCTestCase { var textView: MessageTextView? /// A key used for referencing which substrings were autocompletes - private let NSAttributedAutocompleteKey = NSAttributedStringKey.init("com.system.autocompletekey") + private let NSAttributedAutocompleteKey = NSAttributedStringKey.init("com.messageviewcontroller.autocompletekey") override func setUp() { super.setUp()