Giter VIP home page Giter VIP logo

nantes's Introduction

Nantes ๐Ÿฅ•

CI Status CocoaPods Compatible Carthage Compatible

This library is a Swift port/fork of the popular Objective-C library TTTAttributedLabel. Much โค๏ธ and credit goes to Mattt for creating such a great UILabel replacement library.

Nantes is a pure-Swift UILabel replacement. It supports attributes, data detectors, and more. It also supports link embedding automatically and with NSTextCheckingTypes.

Come build awesome things with us here at Instacart!

Requirements

  • iOS 8.0+
  • Swift 4.2

Installation

Nantes is available through Carthage. To install it, add the following line to your Cartfile:

github "instacart/nantes"

CocoaPods

Nantes is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'Nantes'

Communication

If you need help, feel free to open an issue. Please search before opening one, someone might have run into something similar.

Contributing

Opening a pull request is the best way to get something fixed. If you need help, feel free to open an issue, hopefully someone can help you out with a problem you're running into.

Author

chansen22, [email protected]

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Getting Started

Check out Nantes in the Example directory for more examples.

import Nantes

let label: NantesLabel = .init(frame: .zero)
label.attributedTruncationToken = NSAttributedString(string: "... more")
label.numberOfLines = 3
label.labelTappedBlock = {
  label.numberOfLines = label.numberOfLines == 0 ? 3 : 0 // Flip between limiting lines and not

  UIView.animateWithDuration(0.2, animations: {
    self.view.layoutIfNeeded()
  })
}

label.text = "Nantes label is great! Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ac urna et ante lobortis varius. Nunc rhoncus enim vitae sem commodo sodales. Morbi id augue id augue finibus tincidunt. Cras ac massa nisi. Maecenas elementum vitae elit eu mattis. Duis pretium turpis ut justo accumsan molestie. Mauris elit elit, maximus eu risus sed, vestibulum sodales enim. Sed porttitor vestibulum tincidunt. Maecenas mollis tortor quam, sed porta justo rhoncus id. Phasellus vitae augue tempor, luctus metus sit amet, dictum urna. Morbi sit amet feugiat purus. Proin vitae finibus lectus, eu gravida erat."
view.addSubview(label)

let linkLabel: NantesLabel = .init(frame: .zero)
linkLabel.delegate = self // NantesLabelDelegate
linkLabel.linkAttributes = [NSAttributedString.Key.foregroundColor: UIColor.green]
linkLabel.text = "https://www.instacart.com"
view.addSubview(linkLabel)

// Link handling

func attributedLabel(_ label: NantesLabel, didSelectLink link: URL) {
  print("Tapped link: \(link)")
}

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

nantes's People

Contributors

alexzd avatar bohan-v avatar brunnerjosh avatar chansen22 avatar namolnad avatar ngoleo avatar patrickdotstar avatar pilky avatar spadafiva avatar trispo avatar willbishop avatar yas375 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nantes's Issues

Example build failure

Describe the bug
I follow your instructions and run the project after executing the pod install command in the Example directory. The result is wrong.

Screenshots
ๅฑๅน•ๅฟซ็…ง 2019-05-21 ไธŠๅˆ10 45 36

Operating environment
Xcode Version: 10.2.1
Device: Simulator iPhone 8plus

Index out of range when using background fill or stroke

When I attempt to set a background fill or stroke, like so:

string.addAttribute(.nantesLabelBackgroundFillColor, value: UIColor.lightGray, range: range)

App crashes with:

Swift/ContiguousArrayBuffer.swift:600: Fatal error: Index out of range

The termination point is Drawing.swift:198, when accessing origins[lineIndex].x:
runBounds.origin.x = origins[lineIndex].x + rect.origin.x + xOffset - fillPadding.left - rect.origin.x

I have verified that the NSRange I provide in the addAttribute call is valid, as I can use the nantesLabelStrikeOut attribute and it works fine.

Fails to run repo using Xcode 12.4

Describe the bug

On a clean fork if I run carthage bootstrap --use-xcframeworks, open the Nantes.xcodeproj and try to run the tests. It fails due to missing SnapshotTesting.framework.

To Reproduce
Steps to reproduce the behavior:

  1. Clone repo.
  2. cd into Nantes/Nantes
  3. With Xcode 12.4 installed run carthage bootstrap --use-xcframeworks
  4. Open Nantes.xcodeproj
  5. Run all Unit Tests

Expected behavior
Tests should run with xcframworks. (Or README describe how to actually run the project)

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):
Mac mini 2018 OS 11.2.2

Smartphone (please complete the following information):

  • Mac mini

Additional context

Showing Recent Messages

Prepare build
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description



Build target Nantes of project Nantes with configuration Debug
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'Nantes' from project 'Nantes')


PhaseScriptExecution Lint /Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/Script-431D2B4722178C53000184FA.sh (in target 'Nantes' from project 'Nantes')
    cd /Users/timmiller/src/Nantes/Nantes
    export ACTION\=build
    export AD_HOC_CODE_SIGNING_ALLOWED\=YES
    export ALTERNATE_GROUP\=staff
    export ALTERNATE_MODE\=u+w,go-w,a+rX
    export ALTERNATE_OWNER\=timmiller
    export ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES\=NO
    export ALWAYS_SEARCH_USER_PATHS\=NO
    export ALWAYS_USE_SEPARATE_HEADERMAPS\=NO
    export APPLE_INTERNAL_DEVELOPER_DIR\=/AppleInternal/Developer
    export APPLE_INTERNAL_DIR\=/AppleInternal
    export APPLE_INTERNAL_DOCUMENTATION_DIR\=/AppleInternal/Documentation
    export APPLE_INTERNAL_LIBRARY_DIR\=/AppleInternal/Library
    export APPLE_INTERNAL_TOOLS\=/AppleInternal/Developer/Tools
    export APPLICATION_EXTENSION_API_ONLY\=NO
    export APPLY_RULES_IN_COPY_FILES\=NO
    export APPLY_RULES_IN_COPY_HEADERS\=NO
    export ARCHS\=x86_64
    export ARCHS_STANDARD\=arm64\ i386\ x86_64
    export ARCHS_STANDARD_32_64_BIT\=arm64\ i386\ x86_64
    export ARCHS_STANDARD_32_BIT\=i386
    export ARCHS_STANDARD_64_BIT\=arm64\ x86_64
    export ARCHS_STANDARD_INCLUDING_64_BIT\=arm64\ i386\ x86_64
    export ARCHS_UNIVERSAL_IPHONE_OS\=arm64\ i386\ x86_64
    export ASSETCATALOG_FILTER_FOR_DEVICE_MODEL\=iPhone13,2
    export ASSETCATALOG_FILTER_FOR_DEVICE_OS_VERSION\=14.1
    export AVAILABLE_PLATFORMS\=appletvos\ appletvsimulator\ iphoneos\ iphonesimulator\ macosx\ watchos\ watchsimulator
    export AppIdentifierPrefix\=QN9F5RXY98.
    export BITCODE_GENERATION_MODE\=marker
    export BUILD_ACTIVE_RESOURCES_ONLY\=YES
    export BUILD_COMPONENTS\=headers\ build
    export BUILD_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Products
    export BUILD_LIBRARY_FOR_DISTRIBUTION\=NO
    export BUILD_ROOT\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Products
    export BUILD_STYLE\=
    export BUILD_VARIANTS\=normal
    export BUILT_PRODUCTS_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Products/Debug-iphonesimulator
    export BUNDLE_CONTENTS_FOLDER_PATH_deep\=Contents/
    export BUNDLE_EXECUTABLE_FOLDER_NAME_deep\=MacOS
    export BUNDLE_FORMAT\=shallow
    export BUNDLE_FRAMEWORKS_FOLDER_PATH\=Frameworks
    export BUNDLE_PLUGINS_FOLDER_PATH\=PlugIns
    export BUNDLE_PRIVATE_HEADERS_FOLDER_PATH\=PrivateHeaders
    export BUNDLE_PUBLIC_HEADERS_FOLDER_PATH\=Headers
    export CACHE_ROOT\=/var/folders/fj/2_q4vbs15pgdp7kbmvffpw8w0000gn/C/com.apple.DeveloperTools/12.1-12A7403/Xcode
    export CCHROOT\=/var/folders/fj/2_q4vbs15pgdp7kbmvffpw8w0000gn/C/com.apple.DeveloperTools/12.1-12A7403/Xcode
    export CHMOD\=/bin/chmod
    export CHOWN\=/usr/sbin/chown
    export CLANG_ANALYZER_NONNULL\=YES
    export CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION\=YES_AGGRESSIVE
    export CLANG_COVERAGE_MAPPING\=YES
    export CLANG_CXX_LANGUAGE_STANDARD\=gnu++14
    export CLANG_CXX_LIBRARY\=libc++
    export CLANG_ENABLE_MODULES\=YES
    export CLANG_ENABLE_OBJC_ARC\=YES
    export CLANG_ENABLE_OBJC_WEAK\=YES
    export CLANG_MODULES_BUILD_SESSION_FILE\=/Users/timmiller/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation
    export CLANG_PROFILE_DATA_DIRECTORY\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/ProfileData
    export CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING\=YES
    export CLANG_WARN_BOOL_CONVERSION\=YES
    export CLANG_WARN_COMMA\=YES
    export CLANG_WARN_CONSTANT_CONVERSION\=YES
    export CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS\=YES
    export CLANG_WARN_DIRECT_OBJC_ISA_USAGE\=YES_ERROR
    export CLANG_WARN_DOCUMENTATION_COMMENTS\=YES
    export CLANG_WARN_EMPTY_BODY\=YES
    export CLANG_WARN_ENUM_CONVERSION\=YES
    export CLANG_WARN_INFINITE_RECURSION\=YES
    export CLANG_WARN_INT_CONVERSION\=YES
    export CLANG_WARN_NON_LITERAL_NULL_CONVERSION\=YES
    export CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF\=YES
    export CLANG_WARN_OBJC_LITERAL_CONVERSION\=YES
    export CLANG_WARN_OBJC_ROOT_CLASS\=YES_ERROR
    export CLANG_WARN_RANGE_LOOP_ANALYSIS\=YES
    export CLANG_WARN_STRICT_PROTOTYPES\=YES
    export CLANG_WARN_SUSPICIOUS_MOVE\=YES
    export CLANG_WARN_UNGUARDED_AVAILABILITY\=YES_AGGRESSIVE
    export CLANG_WARN_UNREACHABLE_CODE\=YES
    export CLANG_WARN__DUPLICATE_METHOD_MATCH\=YES
    export CLASS_FILE_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/JavaClasses
    export CLEAN_PRECOMPS\=YES
    export CLONE_HEADERS\=NO
    export CODESIGNING_FOLDER_PATH\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Products/Debug-iphonesimulator/Nantes.framework
    export CODE_SIGNING_ALLOWED\=YES
    export CODE_SIGNING_REQUIRED\=NO
    export CODE_SIGNING_REQUIRES_TEAM\=YES
    export CODE_SIGN_CONTEXT_CLASS\=XCiPhoneSimulatorCodeSignContext
    export CODE_SIGN_INJECT_BASE_ENTITLEMENTS\=YES
    export CODE_SIGN_STYLE\=Manual
    export COLOR_DIAGNOSTICS\=NO
    export COMBINE_HIDPI_IMAGES\=NO
    export COMPILER_INDEX_STORE_ENABLE\=Default
    export COMPOSITE_SDK_DIRS\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/CompositeSDKs
    export COMPRESS_PNG_FILES\=YES
    export CONFIGURATION\=Debug
    export CONFIGURATION_BUILD_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Products/Debug-iphonesimulator
    export CONFIGURATION_TEMP_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator
    export CONTENTS_FOLDER_PATH\=Nantes.framework
    export COPYING_PRESERVES_HFS_DATA\=NO
    export COPY_HEADERS_RUN_UNIFDEF\=NO
    export COPY_PHASE_STRIP\=NO
    export COPY_RESOURCES_FROM_STATIC_FRAMEWORKS\=YES
    export CORRESPONDING_DEVICE_PLATFORM_DIR\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
    export CORRESPONDING_DEVICE_PLATFORM_NAME\=iphoneos
    export CORRESPONDING_DEVICE_SDK_DIR\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.1.sdk
    export CORRESPONDING_DEVICE_SDK_NAME\=iphoneos14.1
    export CP\=/bin/cp
    export CREATE_INFOPLIST_SECTION_IN_BINARY\=NO
    export CURRENT_ARCH\=undefined_arch
    export CURRENT_PROJECT_VERSION\=1
    export CURRENT_VARIANT\=normal
    export CURRENT_VERSION\=Current
    export DEAD_CODE_STRIPPING\=YES
    export DEBUGGING_SYMBOLS\=YES
    export DEBUG_INFORMATION_FORMAT\=dwarf
    export DEFAULT_COMPILER\=com.apple.compilers.llvm.clang.1_0
    export DEFAULT_DEXT_INSTALL_PATH\=/System/Library/DriverExtensions
    export DEFAULT_KEXT_INSTALL_PATH\=/System/Library/Extensions
    export DEFINES_MODULE\=YES
    export DEPLOYMENT_LOCATION\=NO
    export DEPLOYMENT_POSTPROCESSING\=NO
    export DEPLOYMENT_TARGET_CLANG_ENV_NAME\=IPHONEOS_DEPLOYMENT_TARGET
    export DEPLOYMENT_TARGET_CLANG_FLAG_NAME\=mios-simulator-version-min
    export DEPLOYMENT_TARGET_CLANG_FLAG_PREFIX\=-mios-simulator-version-min\=
    export DEPLOYMENT_TARGET_LD_ENV_NAME\=IPHONEOS_DEPLOYMENT_TARGET
    export DEPLOYMENT_TARGET_LD_FLAG_NAME\=ios_simulator_version_min
    export DEPLOYMENT_TARGET_SETTING_NAME\=IPHONEOS_DEPLOYMENT_TARGET
    export DEPLOYMENT_TARGET_SUGGESTED_VALUES\=9.0\ 9.1\ 9.2\ 9.3\ 10.0\ 10.1\ 10.2\ 10.3\ 11.0\ 11.1\ 11.2\ 11.3\ 11.4\ 12.0\ 12.1\ 12.2\ 12.3\ 12.4\ 13.0\ 13.1\ 13.2\ 13.3\ 13.4\ 13.5\ 13.6\ 14.0\ 14.1
    export DERIVED_FILES_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/DerivedSources
    export DERIVED_FILE_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/DerivedSources
    export DERIVED_SOURCES_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/DerivedSources
    export DEVELOPER_APPLICATIONS_DIR\=/Applications/Xcode.app/Contents/Developer/Applications
    export DEVELOPER_BIN_DIR\=/Applications/Xcode.app/Contents/Developer/usr/bin
    export DEVELOPER_DIR\=/Applications/Xcode.app/Contents/Developer
    export DEVELOPER_FRAMEWORKS_DIR\=/Applications/Xcode.app/Contents/Developer/Library/Frameworks
    export DEVELOPER_FRAMEWORKS_DIR_QUOTED\=/Applications/Xcode.app/Contents/Developer/Library/Frameworks
    export DEVELOPER_LIBRARY_DIR\=/Applications/Xcode.app/Contents/Developer/Library
    export DEVELOPER_SDK_DIR\=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
    export DEVELOPER_TOOLS_DIR\=/Applications/Xcode.app/Contents/Developer/Tools
    export DEVELOPER_USR_DIR\=/Applications/Xcode.app/Contents/Developer/usr
    export DEVELOPMENT_LANGUAGE\=en
    export DOCUMENTATION_FOLDER_PATH\=Nantes.framework/en.lproj/Documentation
    export DONT_GENERATE_INFOPLIST_FILE\=NO
    export DO_HEADER_SCANNING_IN_JAM\=NO
    export DSTROOT\=/tmp/Nantes.dst
    export DT_TOOLCHAIN_DIR\=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
    export DWARF_DSYM_FILE_NAME\=Nantes.framework.dSYM
    export DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT\=NO
    export DWARF_DSYM_FOLDER_PATH\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Products/Debug-iphonesimulator
    export DYLIB_COMPATIBILITY_VERSION\=1
    export DYLIB_CURRENT_VERSION\=1
    export DYLIB_INSTALL_NAME_BASE\=@rpath
    export EFFECTIVE_PLATFORM_NAME\=-iphonesimulator
    export EMBEDDED_CONTENT_CONTAINS_SWIFT\=NO
    export EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE\=NO
    export ENABLE_BITCODE\=NO
    export ENABLE_DEFAULT_HEADER_SEARCH_PATHS\=YES
    export ENABLE_HARDENED_RUNTIME\=NO
    export ENABLE_HEADER_DEPENDENCIES\=YES
    export ENABLE_ON_DEMAND_RESOURCES\=NO
    export ENABLE_PREVIEWS\=NO
    export ENABLE_STRICT_OBJC_MSGSEND\=YES
    export ENABLE_TESTABILITY\=YES
    export ENABLE_TESTING_SEARCH_PATHS\=NO
    export ENTITLEMENTS_DESTINATION\=__entitlements
    export ENTITLEMENTS_REQUIRED\=NO
    export EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS\=.DS_Store\ .svn\ .git\ .hg\ CVS
    export EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES\=\*.nib\ \*.lproj\ \*.framework\ \*.gch\ \*.xcode\*\ \*.xcassets\ \(\*\)\ .DS_Store\ CVS\ .svn\ .git\ .hg\ \*.pbproj\ \*.pbxproj
    export EXECUTABLES_FOLDER_PATH\=Nantes.framework/en.lproj
    export EXECUTABLE_FOLDER_PATH\=Nantes.framework
    export EXECUTABLE_NAME\=Nantes
    export EXECUTABLE_PATH\=Nantes.framework/Nantes
    export EXPANDED_CODE_SIGN_IDENTITY\=-
    export EXPANDED_CODE_SIGN_IDENTITY_NAME\=-
    export FILE_LIST\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/Objects/LinkFileList
    export FIXED_FILES_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/FixedFiles
    export FRAMEWORKS_FOLDER_PATH\=Nantes.framework/Frameworks
    export FRAMEWORK_FLAG_PREFIX\=-framework
    export FRAMEWORK_SEARCH_PATHS\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Products/Debug-iphonesimulator\ 
    export FRAMEWORK_VERSION\=A
    export FULL_PRODUCT_NAME\=Nantes.framework
    export GCC3_VERSION\=3.3
    export GCC_C_LANGUAGE_STANDARD\=gnu11
    export GCC_DYNAMIC_NO_PIC\=NO
    export GCC_INLINES_ARE_PRIVATE_EXTERN\=YES
    export GCC_NO_COMMON_BLOCKS\=YES
    export GCC_OBJC_LEGACY_DISPATCH\=YES
    export GCC_OPTIMIZATION_LEVEL\=0
    export GCC_PFE_FILE_C_DIALECTS\=c\ objective-c\ c++\ objective-c++
    export GCC_PREPROCESSOR_DEFINITIONS\=DEBUG\=1\ 
    export GCC_TREAT_WARNINGS_AS_ERRORS\=NO
    export GCC_VERSION\=com.apple.compilers.llvm.clang.1_0
    export GCC_VERSION_IDENTIFIER\=com_apple_compilers_llvm_clang_1_0
    export GCC_WARN_64_TO_32_BIT_CONVERSION\=YES
    export GCC_WARN_ABOUT_RETURN_TYPE\=YES_ERROR
    export GCC_WARN_UNDECLARED_SELECTOR\=YES
    export GCC_WARN_UNINITIALIZED_AUTOS\=YES_AGGRESSIVE
    export GCC_WARN_UNUSED_FUNCTION\=YES
    export GCC_WARN_UNUSED_VARIABLE\=YES
    export GENERATED_MODULEMAP_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/GeneratedModuleMaps-iphonesimulator
    export GENERATE_MASTER_OBJECT_FILE\=NO
    export GENERATE_PKGINFO_FILE\=NO
    export GENERATE_PROFILING_CODE\=NO
    export GENERATE_TEXT_BASED_STUBS\=NO
    export GID\=20
    export GROUP\=staff
    export HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT\=YES
    export HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES\=YES
    export HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS\=YES
    export HEADERMAP_INCLUDES_PROJECT_HEADERS\=YES
    export HEADERMAP_USES_FRAMEWORK_PREFIX_ENTRIES\=YES
    export HEADERMAP_USES_VFS\=YES
    export HEADER_SEARCH_PATHS\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Products/Debug-iphonesimulator/include\ 
    export HIDE_BITCODE_SYMBOLS\=YES
    export HOME\=/Users/timmiller
    export ICONV\=/usr/bin/iconv
    export INFOPLISTSTRINGS_PATH\=Nantes.framework/en.lproj/InfoPlist.strings
    export INFOPLIST_EXPAND_BUILD_SETTINGS\=YES
    export INFOPLIST_FILE\=Nantes/Info.plist
    export INFOPLIST_OUTPUT_FORMAT\=binary
    export INFOPLIST_PATH\=Nantes.framework/Info.plist
    export INFOPLIST_PREPROCESS\=NO
    export INLINE_PRIVATE_FRAMEWORKS\=NO
    export INSTALLHDRS_COPY_PHASE\=NO
    export INSTALLHDRS_SCRIPT_PHASE\=NO
    export INSTALL_DIR\=/tmp/Nantes.dst/Library/Frameworks
    export INSTALL_GROUP\=staff
    export INSTALL_MODE_FLAG\=u+w,go-w,a+rX
    export INSTALL_OWNER\=timmiller
    export INSTALL_PATH\=/Library/Frameworks
    export INSTALL_ROOT\=/tmp/Nantes.dst
    export IPHONEOS_DEPLOYMENT_TARGET\=8.0
    export JAVAC_DEFAULT_FLAGS\=-J-Xms64m\ -J-XX:NewSize\=4M\ -J-Dfile.encoding\=UTF8
    export JAVA_APP_STUB\=/System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub
    export JAVA_ARCHIVE_CLASSES\=YES
    export JAVA_ARCHIVE_TYPE\=JAR
    export JAVA_COMPILER\=/usr/bin/javac
    export JAVA_FOLDER_PATH\=Nantes.framework/Java
    export JAVA_FRAMEWORK_RESOURCES_DIRS\=Resources
    export JAVA_JAR_FLAGS\=cv
    export JAVA_SOURCE_SUBDIR\=.
    export JAVA_USE_DEPENDENCIES\=YES
    export JAVA_ZIP_FLAGS\=-urg
    export JIKES_DEFAULT_FLAGS\=+E\ +OLDCSO
    export KEEP_PRIVATE_EXTERNS\=NO
    export LD_DEPENDENCY_INFO_FILE\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/Objects-normal/undefined_arch/Nantes_dependency_info.dat
    export LD_DYLIB_INSTALL_NAME\=@rpath/Nantes.framework/Nantes
    export LD_GENERATE_MAP_FILE\=NO
    export LD_MAP_FILE_PATH\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/Nantes-LinkMap-normal-undefined_arch.txt
    export LD_NO_PIE\=NO
    export LD_QUOTE_LINKER_ARGUMENTS_FOR_COMPILER_DRIVER\=YES
    export LD_RUNPATH_SEARCH_PATHS\=\ @executable_path/Frameworks\ @loader_path/Frameworks
    export LEGACY_DEVELOPER_DIR\=/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer
    export LEX\=lex
    export LIBRARY_DEXT_INSTALL_PATH\=/Library/DriverExtensions
    export LIBRARY_FLAG_NOSPACE\=YES
    export LIBRARY_FLAG_PREFIX\=-l
    export LIBRARY_KEXT_INSTALL_PATH\=/Library/Extensions
    export LIBRARY_SEARCH_PATHS\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Products/Debug-iphonesimulator\ 
    export LINKER_DISPLAYS_MANGLED_NAMES\=NO
    export LINK_FILE_LIST_normal_x86_64\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/Objects-normal/x86_64/Nantes.LinkFileList
    export LINK_WITH_STANDARD_LIBRARIES\=YES
    export LLVM_TARGET_TRIPLE_OS_VERSION\=ios8.0
    export LLVM_TARGET_TRIPLE_SUFFIX\=-simulator
    export LLVM_TARGET_TRIPLE_VENDOR\=apple
    export LOCALIZED_RESOURCES_FOLDER_PATH\=Nantes.framework/en.lproj
    export LOCALIZED_STRING_MACRO_NAMES\=NSLocalizedString\ CFCopyLocalizedString
    export LOCALIZED_STRING_SWIFTUI_SUPPORT\=YES
    export LOCAL_ADMIN_APPS_DIR\=/Applications/Utilities
    export LOCAL_APPS_DIR\=/Applications
    export LOCAL_DEVELOPER_DIR\=/Library/Developer
    export LOCAL_LIBRARY_DIR\=/Library
    export LOCROOT\=/Users/timmiller/src/Nantes/Nantes
    export LOCSYMROOT\=/Users/timmiller/src/Nantes/Nantes
    export MACH_O_TYPE\=mh_dylib
    export MAC_OS_X_PRODUCT_BUILD_VERSION\=20D80
    export MAC_OS_X_VERSION_ACTUAL\=110202
    export MAC_OS_X_VERSION_MAJOR\=110200
    export MAC_OS_X_VERSION_MINOR\=0202
    export METAL_LIBRARY_FILE_BASE\=default
    export METAL_LIBRARY_OUTPUT_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Products/Debug-iphonesimulator/Nantes.framework
    export MODULES_FOLDER_PATH\=Nantes.framework/Modules
    export MODULE_CACHE_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/ModuleCache.noindex
    export MTL_ENABLE_DEBUG_INFO\=INCLUDE_SOURCE
    export MTL_FAST_MATH\=YES
    export NATIVE_ARCH\=x86_64
    export NATIVE_ARCH_32_BIT\=i386
    export NATIVE_ARCH_64_BIT\=x86_64
    export NATIVE_ARCH_ACTUAL\=x86_64
    export NO_COMMON\=YES
    export OBJC_ABI_VERSION\=2
    export OBJECT_FILE_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/Objects
    export OBJECT_FILE_DIR_normal\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/Objects-normal
    export OBJROOT\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex
    export ONLY_ACTIVE_ARCH\=YES
    export OS\=MACOS
    export OSAC\=/usr/bin/osacompile
    export PACKAGE_TYPE\=com.apple.package-type.wrapper.framework
    export PASCAL_STRINGS\=YES
    export PATH\=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
    export PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES\=/usr/include\ /usr/local/include\ /System/Library/Frameworks\ /System/Library/PrivateFrameworks\ /Applications/Xcode.app/Contents/Developer/Headers\ /Applications/Xcode.app/Contents/Developer/SDKs\ /Applications/Xcode.app/Contents/Developer/Platforms
    export PBDEVELOPMENTPLIST_PATH\=Nantes.framework/pbdevelopment.plist
    export PER_ARCH_OBJECT_FILE_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/Objects-normal/undefined_arch
    export PER_VARIANT_OBJECT_FILE_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/Objects-normal
    export PKGINFO_FILE_PATH\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/PkgInfo
    export PKGINFO_PATH\=Nantes.framework/PkgInfo
    export PLATFORM_DEVELOPER_APPLICATIONS_DIR\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications
    export PLATFORM_DEVELOPER_BIN_DIR\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin
    export PLATFORM_DEVELOPER_LIBRARY_DIR\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library
    export PLATFORM_DEVELOPER_SDK_DIR\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs
    export PLATFORM_DEVELOPER_TOOLS_DIR\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Tools
    export PLATFORM_DEVELOPER_USR_DIR\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr
    export PLATFORM_DIR\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
    export PLATFORM_DISPLAY_NAME\=iOS\ Simulator
    export PLATFORM_FAMILY_NAME\=iOS
    export PLATFORM_NAME\=iphonesimulator
    export PLATFORM_PREFERRED_ARCH\=x86_64
    export PLATFORM_PRODUCT_BUILD_VERSION\=18A8394
    export PLIST_FILE_OUTPUT_FORMAT\=binary
    export PLUGINS_FOLDER_PATH\=Nantes.framework/PlugIns
    export PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR\=YES
    export PRECOMP_DESTINATION_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/PrefixHeaders
    export PRESERVE_DEAD_CODE_INITS_AND_TERMS\=NO
    export PRIVATE_HEADERS_FOLDER_PATH\=Nantes.framework/PrivateHeaders
    export PRODUCT_BUNDLE_IDENTIFIER\=com.instacart.Nantes
    export PRODUCT_BUNDLE_PACKAGE_TYPE\=FMWK
    export PRODUCT_MODULE_NAME\=Nantes
    export PRODUCT_NAME\=Nantes
    export PRODUCT_SETTINGS_PATH\=/Users/timmiller/src/Nantes/Nantes/Nantes/Info.plist
    export PRODUCT_TYPE\=com.apple.product-type.framework
    export PROFILING_CODE\=NO
    export PROJECT\=Nantes
    export PROJECT_DERIVED_FILE_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/DerivedSources
    export PROJECT_DIR\=/Users/timmiller/src/Nantes/Nantes
    export PROJECT_FILE_PATH\=/Users/timmiller/src/Nantes/Nantes/Nantes.xcodeproj
    export PROJECT_NAME\=Nantes
    export PROJECT_TEMP_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build
    export PROJECT_TEMP_ROOT\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex
    export PUBLIC_HEADERS_FOLDER_PATH\=Nantes.framework/Headers
    export RECURSIVE_SEARCH_PATHS_FOLLOW_SYMLINKS\=YES
    export REMOVE_CVS_FROM_RESOURCES\=YES
    export REMOVE_GIT_FROM_RESOURCES\=YES
    export REMOVE_HEADERS_FROM_EMBEDDED_BUNDLES\=YES
    export REMOVE_HG_FROM_RESOURCES\=YES
    export REMOVE_SVN_FROM_RESOURCES\=YES
    export REZ_COLLECTOR_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/ResourceManagerResources
    export REZ_OBJECTS_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/ResourceManagerResources/Objects
    export REZ_SEARCH_PATHS\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Products/Debug-iphonesimulator\ 
    export SCAN_ALL_SOURCE_FILES_FOR_INCLUDES\=NO
    export SCRIPTS_FOLDER_PATH\=Nantes.framework/Scripts
    export SCRIPT_INPUT_FILE_COUNT\=0
    export SCRIPT_INPUT_FILE_LIST_COUNT\=0
    export SCRIPT_OUTPUT_FILE_COUNT\=0
    export SCRIPT_OUTPUT_FILE_LIST_COUNT\=0
    export SDKROOT\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.1.sdk
    export SDK_DIR\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.1.sdk
    export SDK_DIR_iphonesimulator14_1\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.1.sdk
    export SDK_NAME\=iphonesimulator14.1
    export SDK_NAMES\=iphonesimulator14.1
    export SDK_PRODUCT_BUILD_VERSION\=18A8394
    export SDK_VERSION\=14.1
    export SDK_VERSION_ACTUAL\=140100
    export SDK_VERSION_MAJOR\=140000
    export SDK_VERSION_MINOR\=100
    export SED\=/usr/bin/sed
    export SEPARATE_STRIP\=NO
    export SEPARATE_SYMBOL_EDIT\=NO
    export SET_DIR_MODE_OWNER_GROUP\=YES
    export SET_FILE_MODE_OWNER_GROUP\=NO
    export SHALLOW_BUNDLE\=YES
    export SHARED_DERIVED_FILE_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Products/Debug-iphonesimulator/DerivedSources
    export SHARED_FRAMEWORKS_FOLDER_PATH\=Nantes.framework/SharedFrameworks
    export SHARED_PRECOMPS_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/PrecompiledHeaders
    export SHARED_SUPPORT_FOLDER_PATH\=Nantes.framework
    export SKIP_INSTALL\=YES
    export SOURCE_ROOT\=/Users/timmiller/src/Nantes/Nantes
    export SRCROOT\=/Users/timmiller/src/Nantes/Nantes
    export STRINGS_FILE_OUTPUT_ENCODING\=binary
    export STRIP_BITCODE_FROM_COPIED_FILES\=NO
    export STRIP_INSTALLED_PRODUCT\=YES
    export STRIP_STYLE\=debugging
    export STRIP_SWIFT_SYMBOLS\=YES
    export SUPPORTED_DEVICE_FAMILIES\=1,2
    export SUPPORTED_PLATFORMS\=iphoneos\ iphonesimulator
    export SUPPORTS_TEXT_BASED_API\=NO
    export SWIFT_ACTIVE_COMPILATION_CONDITIONS\=DEBUG
    export SWIFT_OPTIMIZATION_LEVEL\=-Onone
    export SWIFT_PLATFORM_TARGET_PREFIX\=ios
    export SWIFT_RESPONSE_FILE_PATH_normal_x86_64\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/Objects-normal/x86_64/Nantes.SwiftFileList
    export SWIFT_VERSION\=5.0
    export SYMROOT\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Products
    export SYSTEM_ADMIN_APPS_DIR\=/Applications/Utilities
    export SYSTEM_APPS_DIR\=/Applications
    export SYSTEM_CORE_SERVICES_DIR\=/System/Library/CoreServices
    export SYSTEM_DEMOS_DIR\=/Applications/Extras
    export SYSTEM_DEVELOPER_APPS_DIR\=/Applications/Xcode.app/Contents/Developer/Applications
    export SYSTEM_DEVELOPER_BIN_DIR\=/Applications/Xcode.app/Contents/Developer/usr/bin
    export SYSTEM_DEVELOPER_DEMOS_DIR\=/Applications/Xcode.app/Contents/Developer/Applications/Utilities/Built\ Examples
    export SYSTEM_DEVELOPER_DIR\=/Applications/Xcode.app/Contents/Developer
    export SYSTEM_DEVELOPER_DOC_DIR\=/Applications/Xcode.app/Contents/Developer/ADC\ Reference\ Library
    export SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR\=/Applications/Xcode.app/Contents/Developer/Applications/Graphics\ Tools
    export SYSTEM_DEVELOPER_JAVA_TOOLS_DIR\=/Applications/Xcode.app/Contents/Developer/Applications/Java\ Tools
    export SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR\=/Applications/Xcode.app/Contents/Developer/Applications/Performance\ Tools
    export SYSTEM_DEVELOPER_RELEASENOTES_DIR\=/Applications/Xcode.app/Contents/Developer/ADC\ Reference\ Library/releasenotes
    export SYSTEM_DEVELOPER_TOOLS\=/Applications/Xcode.app/Contents/Developer/Tools
    export SYSTEM_DEVELOPER_TOOLS_DOC_DIR\=/Applications/Xcode.app/Contents/Developer/ADC\ Reference\ Library/documentation/DeveloperTools
    export SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR\=/Applications/Xcode.app/Contents/Developer/ADC\ Reference\ Library/releasenotes/DeveloperTools
    export SYSTEM_DEVELOPER_USR_DIR\=/Applications/Xcode.app/Contents/Developer/usr
    export SYSTEM_DEVELOPER_UTILITIES_DIR\=/Applications/Xcode.app/Contents/Developer/Applications/Utilities
    export SYSTEM_DEXT_INSTALL_PATH\=/System/Library/DriverExtensions
    export SYSTEM_DOCUMENTATION_DIR\=/Library/Documentation
    export SYSTEM_KEXT_INSTALL_PATH\=/System/Library/Extensions
    export SYSTEM_LIBRARY_DIR\=/System/Library
    export TAPI_VERIFY_MODE\=ErrorsOnly
    export TARGETED_DEVICE_FAMILY\=1,2
    export TARGETNAME\=Nantes
    export TARGET_BUILD_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Products/Debug-iphonesimulator
    export TARGET_DEVICE_IDENTIFIER\=3246D183-F32E-4042-8661-91ED5162ACC9
    export TARGET_DEVICE_MODEL\=iPhone13,2
    export TARGET_DEVICE_OS_VERSION\=14.1
    export TARGET_NAME\=Nantes
    export TARGET_TEMP_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build
    export TEMP_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build
    export TEMP_FILES_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build
    export TEMP_FILE_DIR\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build
    export TEMP_ROOT\=/Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex
    export TEST_FRAMEWORK_SEARCH_PATHS\=\ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks\ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.1.sdk/Developer/Library/Frameworks
    export TEST_LIBRARY_SEARCH_PATHS\=\ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/lib
    export TOOLCHAINS\=com.apple.dt.toolchain.XcodeDefault
    export TOOLCHAIN_DIR\=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
    export TREAT_MISSING_BASELINES_AS_TEST_FAILURES\=NO
    export TeamIdentifierPrefix\=QN9F5RXY98.
    export UID\=501
    export UNLOCALIZED_RESOURCES_FOLDER_PATH\=Nantes.framework
    export UNSTRIPPED_PRODUCT\=NO
    export USER\=timmiller
    export USER_APPS_DIR\=/Users/timmiller/Applications
    export USER_LIBRARY_DIR\=/Users/timmiller/Library
    export USE_DYNAMIC_NO_PIC\=YES
    export USE_HEADERMAP\=YES
    export USE_HEADER_SYMLINKS\=NO
    export USE_LLVM_TARGET_TRIPLES\=YES
    export USE_LLVM_TARGET_TRIPLES_FOR_CLANG\=YES
    export USE_LLVM_TARGET_TRIPLES_FOR_LD\=YES
    export USE_LLVM_TARGET_TRIPLES_FOR_TAPI\=YES
    export VALIDATE_DEVELOPMENT_ASSET_PATHS\=YES_ERROR
    export VALIDATE_PRODUCT\=NO
    export VALIDATE_WORKSPACE\=YES_ERROR
    export VALID_ARCHS\=arm64\ arm64e\ i386\ x86_64
    export VERBOSE_PBXCP\=NO
    export VERSIONING_SYSTEM\=apple-generic
    export VERSIONPLIST_PATH\=Nantes.framework/version.plist
    export VERSIONS_FOLDER_PATH\=Nantes.framework
    export VERSION_INFO_BUILDER\=timmiller
    export VERSION_INFO_FILE\=Nantes_vers.c
    export VERSION_INFO_STRING\=\"@\(\#\)PROGRAM:Nantes\ \ PROJECT:Nantes-1\"
    export WRAPPER_EXTENSION\=framework
    export WRAPPER_NAME\=Nantes.framework
    export WRAPPER_SUFFIX\=.framework
    export WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES\=NO
    export XCODE_APP_SUPPORT_DIR\=/Applications/Xcode.app/Contents/Developer/Library/Xcode
    export XCODE_PRODUCT_BUILD_VERSION\=12A7403
    export XCODE_VERSION_ACTUAL\=1210
    export XCODE_VERSION_MAJOR\=1200
    export XCODE_VERSION_MINOR\=1210
    export XPCSERVICES_FOLDER_PATH\=Nantes.framework/XPCServices
    export YACC\=yacc
    export arch\=undefined_arch
    export variant\=normal
    /bin/sh -c /Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Intermediates.noindex/Nantes.build/Debug-iphonesimulator/Nantes.build/Script-431D2B4722178C53000184FA.sh

๐ŸŒฑ Cloning SwiftLint 0.30.1
๐ŸŒฑ Resolving package
/private/var/folders/fj/2_q4vbs15pgdp7kbmvffpw8w0000gn/T/mint/github.com_realm_SwiftLint: error: manifest parse error(s):
<unknown>:0: warning: using sysroot for 'iPhoneSimulator' but targeting 'MacOSX'
<unknown>:0: error: unable to load standard library for target 'x86_64-apple-macosx10.15'
๐ŸŒฑ Encountered error during "swift package resolve". Use --verbose to see full output
๐ŸŒฑ  Failed to resolve SwiftLint 0.30.1 with SPM

ProcessInfoPlistFile /Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Products/Debug-iphonesimulator/Nantes.framework/Info.plist /Users/timmiller/src/Nantes/Nantes/Nantes/Info.plist (in target 'Nantes' from project 'Nantes')
    cd /Users/timmiller/src/Nantes/Nantes
    builtin-infoPlistUtility /Users/timmiller/src/Nantes/Nantes/Nantes/Info.plist -producttype com.apple.product-type.framework -expandbuildsettings -format binary -platform iphonesimulator -o /Users/timmiller/Library/Developer/Xcode/DerivedData/Nantes-carvoefkkbhkixfhyjechawpwexs/Build/Products/Debug-iphonesimulator/Nantes.framework/Info.plist

Add property to know if the text is more than `numberOfLines` long

Is your feature request related to a problem? Please describe.
In my code I want to have a button for Read more that pops a full text description into a new page. It would be nice to know if the label is currently displaying all the text so that I can determine whether or not to hide the Read more button

Describe the solution you'd like
I think it should be possible to have a variable on the label class that gets updated in the drawAttributedString(... function that tells if the text is fully displayed. I would be happy to create a class with a PR to add this functionality if this solution makes sense. I'm open to any bikeshedding about the property name. I think isTruncated, isShowingFullText, hasHiddenText could all be possibilities. Specifically, I think that we could put a flag before the for loop and then an update somewhere in here to update the status of that flag and update the label property after looping.

//  ==> var showsFullText = true
for lineIndex in 0..<lineOrigins.count {
   // ...
    if lineIndex == numberOfLines - 1 &&
        truncateLastLine &&
        !(lastLineRange.length == 0 && lastLineRange.location == 0) &&
        lastLineRange.location + lastLineRange.length < textRange.location + textRange.length {
        let truncationDrawingContext = TruncationDrawingContext(attributedString: attributedString, context: context, descent: descent, lastLineRange: lastLineRange, lineOrigin: lineOrigin, numberOfLines: numberOfLines, rect: rect)
//  ==> showsFullText = false
        drawTruncation(truncationDrawingContext)
    } else { // otherwise normal drawing here
        let penOffset = CGFloat(CTLineGetPenOffsetForFlush(line, flushFactor, Double(rect.size.width)))
        let yOffset = lineOrigin.y - descent - font.descender
        context.textPosition = CGPoint(x: penOffset, y: yOffset)
        CTLineDraw(line, context)
    }
}
//  ==> self.showsFullText = showsFullText

Describe alternatives you've considered
It is possible to use a helper function to get the height of a view with a font size / attributed string, but it seems like there is a performance overhead and extra surface area that could potentially be removed.

hyphenationFactor doesn't work

NSMutableParagraphStyle hyphenationFactor doesn't work with NantesLabel

To Reproduce
Steps to reproduce the behavior:

  1. set hyphenationFactor to 1 - example:
    let label = NantesLabel (frame: .zero)
    label.delegate = self
    label.numberOfLines = 0
    let attrString = NSMutableAttributedString(string: longText)
    let style = NSMutableParagraphStyle ()
    style.hyphenationFactor = 1.0
    let fullRange = NSMakeRange(0, attrString.length)
    attrString.addAttributes([NSMutableAttributedString.Key.paragraphStyle : style], range: fullRange)
    label.attributedText = attrString
  2. the resulted label does not have hyphenation.
    If I set the label to UILabel, hyphenation works.

Expected behavior
The line brake for the long text is done with the hyphenation

Support accessibilityValue

When I use a regular UILabel, and set the "accessibilityValue", the text can be heard via VoiceOver
When using a NantesLabel, and set the "accessibilityValue" , the text can not be heard via VoiceOver

I'd think this should work, as NantesLabel is a sub class of UILabel, but for some reason it does not.

Label UI doesn't update after setting text property

Hello ๐Ÿ‘‹,
First of all, thank you for your library.
I wanted to ask why the label textColor/font doesn't change after setting text property.
for example:

// this will work โœ…               // this will not work โŒ

label.textColor = .red                label.text = "test"
label.text  = "test"                  label.textColor = .red

Is there a function to update the label UI ?

Setting an attributedText value containing link as String

Hello,
you did a fix related to this #15 issue and it is working fine only when attributed string contains URL as link. And as confirmation you can see this code:

extension NSAttributedString {
    func findExistingLinks() -> Set<NSTextCheckingResult> {
        var relinks: Set<NSTextCheckingResult> = []
        enumerateAttribute(.link,
                           in: NSRange(location: 0, length: length),
                           options: []) { attribute, linkRange, _ in
                            if let url = attribute as? URL {
                                relinks.insert(NSTextCheckingResult.linkCheckingResult(range: linkRange, url: url))
                            }
        }
        return relinks
    }
}

Why you didn't allow String ?
So it would be more easier if handle this scenario also:

if let linkString = attribute as? String, let url = URL(string: linkString) {

The reason - from some parsing libraries it is coming as String not as URL

No effect on ios13 baselineOffset

in ios 13 attributedText baselineOffset no work

let testLabel = NantesLabel(frame: CGRect(x: 100, y: 100, width: 100, height: 100))
let bigFont = UIFont.systemFont(ofSize: 14)
let smallFont = UIFont.systemFont(ofSize: 9)
let string = NSMutableAttributedString(string: "23", attributes: [.font: bigFont])
string.setAttributes([.font: smallFont, .baselineOffset: 5], range: NSRange(location: 1, length: 1))
testLabel.attributedText = string
self.view.addSubview(testLabel)

Bug managing taps and events

Hello,

In the sample app, if you add a tap gesture recognizer to the view controller view, then the label does not detect touches anymore.

Try adding this in the viewDidLoad

        let gr = UITapGestureRecognizer(target: self, action: #selector(onTest))
        view.addGestureRecognizer(gr)

and this method:

    @objc func onTest(sender: UITapGestureRecognizer) {
        print("--onTest")
    }

Now try to click for example "terms and conditions" or "privacy policy".

The label does not work when we touch a link and the gesture recognizer method is executed. The strange thing is that if you maintain the tap and move it far from the label and release it, sometimes it works properly, calling the label method and not the gesture recognizer we created.
I guess there is a problem in the logic regarding UIResponder. Any suggestions? Thanks.

The expected behaviour is that the nantes label consumes the event completely and the view behind it does not receive the tap event.

I am using version 0.0.8 and iOS 12 and 13.

Text appears to be an address is displayed as a link on iOS17+

Describe the bug
On iOS17+, text that looks like an address is marked as a link.
When adding text to a NantesLabel that could appear as an address, the text is displayed on the phone as a link.
This is an example of such a text:
1230-1420 First bank Team Meeting

To Reproduce
Steps to reproduce the behavior:

  1. Add this label to an Xcode project
func addLabel() {
        let label: NantesLabel = .init(frame: CGRect(x: 20, y: 100, width: 1000, height: 50))
        label.linkAttributes = [NSAttributedString.Key.foregroundColor: UIColor.brown]
        label.text = "1230-1420 First bank Team Meeting"
        view.addSubview(label)
    }

I added an additional label to show that this does not happen due to the time interval (1230-1420)

func addLabel2() {
        let label2: NantesLabel = .init(frame: CGRect(x: 20, y: 50, width: 1000, height: 50))
        label2.linkAttributes = [NSAttributedString.Key.foregroundColor: UIColor.brown]
        label2.text = "1230-1420 we have a meeting at First bank"
        view.addSubview(label2)
    }

Expected behavior
Text that appears as an address should not be seen as a link. There could be a setting that enables/disables this.

Screenshots
Testing on iOS17:
ios17

Testing on iOS16.4:
ios16

Desktop (please complete the following information):

  • OS: macOS13.6

Smartphone (please complete the following information):

  • Device: iPhone SE3
  • OS: iOS17.0

Additional context
NA

SPM error on 0.1.0

Describe the bug
Nantes can't be used via SPM.

To Reproduce
Try to add Nantes via SPM

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
Screenshot 2020-06-22 at 11 46 26

Additional context
This problem was already described in the PR - #54
Seems like it was added then but to the wrong place in Package.swift - correct one is not target - https://developer.apple.com/documentation/swift_packages/package

CoreText note: Client requested name ".SFUI-Regular"

Describe the bug

I'm trying to set a strikethrough on text, to indicate that this item is complete.
I am using this code snippet to add the strikethrough
let struckText = NSAttributedString(string: todoText, attributes: [NSAttributedString.Key.nantesLabelStrikeOut: true])
When the label is rendered the following message appears in the console:
CoreText note: Client requested name ".SFUI-Regular", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[UIFont systemFontOfSize:]. CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.

When setting the CTFontLogSystemFontNameRequest breakpoint, this is the first line in the stack trace.
method - drawStrike(frame: CTFrame, inRect: CGRect, context: CGContext)
file - Drawing.swift
let font = CTFontCreateWithName(myFont.fontName as CFString, myFont.pointSize, nil)

To Reproduce
Steps to reproduce the behavior:

let label: NantesLabel = .init(frame: CGRect(x: 20, y: 100, width: view.frame.width, height: 100)) let attributedText = NSMutableAttributedString(string: text, attributes: [NSAttributedString.Key.backgroundColor: UIColor.lightGray]) let struckText = NSAttributedString(string: text, attributes: [NSAttributedString.Key.nantesLabelStrikeOut: true]) attributedText.append(struckText) label.attributedText = attributedText view.addSubview(label)

Expected behavior
The font passed in with the attributes or the system font should be used

Desktop (please complete the following information):

  • OS: iOS14

Smartphone (please complete the following information):

  • Device: iPhone11
  • OS: iOS14.3

Additional context
NA

Using `adjustsFontSizeToFitWidth` paints with an incorrect frame

Describe the bug
Setting adjustsFontSizeToFitWidth to true causes the label to paint with an incorrect frame. It seems to reduce the height of the label, which causes it to cut of parts of the text.

To Reproduce
Steps to reproduce the behavior:

  1. Run example
  2. Look at the scaling text example

Expected behavior
It shouldn't clip the label, like how UILabel paints.

Screenshots
image

When setting attributedText, existing attributes are overwritten (introduced in 0.0.5)

When setting the attributedText property, the attributes that can be provided by Nantes will replace the ones in the NSAttributedString. This was introduced in 4b540bc.

In my opinion it kind of defeats the purpose of having attributedText open.

A few possible solutions:

  • Revert the change introduced in 0.0.5
  • Make attributedText unavailable from outside
  • Adjust the properties stored in NantesLabel when an attributed string is set (could be problematic as attributes can differ within the same text)

When rendering text that gets truncated the text is offset vertically

Describe the bug
When rendering text that gets truncated the text is offset vertically compared to when text is not truncated. The following code sample produces the screen shot below. The text on the left is offset a few pixels up. The difference becomes even more prominent if you change minimumLineHeight.

let label1 = NantesLabel()
label1.text = "Some long text that should be truncated"
label1.layer.borderColor = UIColor.red.cgColor
label1.layer.borderWidth = 1
let label2 = NantesLabel()
label2.text = "Some other long text"
label2.setContentCompressionResistancePriority(.required, for: .horizontal)
label2.layer.borderColor = UIColor.red.cgColor
label2.layer.borderWidth = 1

I investigated this a bit and found that in the drawAttributedString method the call to CTFrameGetLines for the truncated label returns one CTLine. This line then has multiple CTRuns. The non truncated label gets one CTLine with one CTRun.

CTLineGetTypographicBounds is then called to get the descent of the line and this is the value that differs for the two lines and what seems to caused the differently rendered text. I tried to instead get the first CTRun of the line and call CTRunGetTypographicBounds to get the descent. This results in a descent that is equal for both labels but this is a bit beyond my knowledge of CoreText to say if this is a fix or not.

Expected behavior
Truncated text should be rendered at the same yOffset as non truncated text.

Screenshots
testTruncation 1

Smartphone (please complete the following information):

  • Device: [iPhone 11 and iPhone8 simulator]
  • OS: iOS12, iOS14

Attributed string attributes not preserved

When setting the attributedText property to an NSAttributedString, NantesLabel sets the text property of the label to attributedText.string instead of actually setting the attributedText property, which means that any formatting, and other attributes, set on the NSAttributedString aren't used.

Is it possible to use an NSAttributedString without losing all of the formatting and attributes?

override open var attributedText: NSAttributedString? {
    get {
        return _attributedText
    } set {
        guard newValue != _attributedText else {
            return
        }

        _attributedText = newValue
        setNeedsFramesetter()
        _accessibilityElements = nil
        linkModels = []

        checkText()

        setNeedsDisplay()
        invalidateIntrinsicContentSize()

        super.text = attributedText?.string
    }
}

Crash when emoji inside the text

Describe the bug
If a string contains emoji then crash unexpectedly at Truncation.swift file line of code:

let originalLine = lines[originalIndex]

Please fix this issue as soon as possible.

Support for NSTextAttachment

Is your feature request related to a problem? Please describe.
It would be nice if we could support rendering an NSTextAttachment inside an attributed string, typically used to render icons inline with a label's text.

Describe the solution you'd like
When attributedText contains an NSTextAttachment, render the attachment image inline with the rest of the text, similar to how UILabel renders these.

Examples of usage:

Technical complexity

  • Rendering NSTextAttachment's in UILabel is likely managed by TextKit's NSLayoutManager, which we're bypassing and substituting with our own CoreText drawing in NantesLabel's implementation. Making it work with CoreText might not be practical/possible.

Describe alternatives you've considered

  • Just use UILabel itself, but you lose out on the benefits of NantesLabel. :D
  • Explore not overriding func drawText(in rect: CGRect) and let UILabel do the rendering. Not sure if we can do this and still support the current features.

Additional context

Wrong bullet point format from html string

Describe the bug
When using bullet points from html string transformed in attributed string only the first line is well formatted. After fist line break text is not aligned with first word

Smartphone (please complete the following information):

  • iPhone

crash on Truncation.swift:57 let originalLine = lines[originalIndex]

// numberOfLines = 0
// tokenLines.count = 1
// index = 0
// originalIndex = -1
Truncation.swift:49 let originalIndex = self.numberOfLines - tokenLines.count + index

crash on Truncation.swift:57 let originalLine = lines[originalIndex]

(lldb) po tokenLines
โ–ฟ 1 element
  - 0 : <CTLine: 0x6000034b0000>{run count = 1, string range = (0, 1), width = 13, A/D/L = 12.72/4.08/0, glyph count = 1, runs = (

<CTRun: 0x7fe4fad6ffc0>{string range = (0, 1), string = "\u2026", attributes = {
    NSColor = "UIExtendedSRGBColorSpace 0.4 0.368627 1 1";
    NSFont = "<UICTFont: 0x7fe4fad2e020> font-family: \"PingFangSC-Regular\"; font-weight: normal; font-style: normal; font-size: 12.00pt";
    NSKern = 1;
    NSParagraphStyle = "Alignment 4, LineSpacing 1, ParagraphSpacing 0, ParagraphSpacingBefore 0, HeadIndent 0, TailIndent 0, FirstLineHeadIndent 0, LineHeight 0/0, LineHeightMultiple 0, LineBreakMode 0, Tabs (\n    28L,\n    56L,\n    84L,\n    112L,\n    140L,\n    168L,\n    196L,\n    224L,\n    252L,\n    280L,\n    308L,\n    336L\n), DefaultTabInterval 0, Blocks (\n), Lists (\n), BaseWritingDirection -1, HyphenationFactor 0, TighteningForTruncation NO, HeaderLevel 0";
}}

)
}

touchesEnded and thus handleLinkTapped are never executed

I'm not sure why, but in my project the didSelectLink delegate method is never called. It seems that the root cause is that touchesEnded is also never called inside of NantesLabel, only touchesBegan and touchesCancelled.

In my case the label is used within a UIStackView within a UITableViewCell, auto-sizing everything. I set myLabel.attributedText to an instance of NSAttributedString with the .foregroundColor and .font attributes set, and links are added the old-fashioned way via NSMutableAttributedString's addAttribute. The links are styled just fine (via linkAttributes), so they are definitely recognized. Also within touchesBegan I can see that it does find the link and sets activeLink. But.. touchesEnded is never called, so handleLinkTapped is also never executed.

I'm not sure how easy it's going to be to make a minimum reproducible project ๐Ÿ˜ฐ
But I'll see what I can do!

Only expand the label when the "more" bit is clicked

When using the expand text feature of the label in a tableview and it's a large portion of its height, it consumes clicks.

Describe the solution you'd like
Ideally only expand the label when the "more" bit is clicked.

Setting an attributedText value containing link attributes does not work

Setting an attributedText value to the label that contains a .link: URL attribute does not work. This is because the checkText() method only looks at the raw string value of the attributedString for links. This means that links set that way do not work, they are not highlighted and are not clickable.

Expected behavior
Not sure if I should expect NantesLabel to handle this case but it would be good if it did.

attributedLabel(_ label: NantesLabel, didSelectLink link: URL) doesn't seem to be working

First off, thanks so much for making an awesome looking label replacement. In our app I'm currently doing a lot of work to manually calculate sizes in a UITextview for fields rendering markdown. I think this might be a great replacement if I can work out some of the kinks.

I'm currently using this to try to make something like this:

screen shot 2019-02-27 at 4 04 26 pm

Anyway, thanks in advance for making it, and hopefully it's just user error on my part.

Describe the bug
Cannot get a link to trigger the delegate didSelectLink callback.

To Reproduce
Create a view controller and add code like this:

class ViewController: UIViewController {

    var termsAndConditionsLabel: NantesLabel!


    // MARK: - Life Cycle
    override func viewDidLoad() {
        super.viewDidLoad()
        setupTermsLabel()
    }

    // MARK: - Setup
    private func setupTermsLabel() {
        termsAndConditionsLabel = NantesLabel(frame: .zero)
        termsAndConditionsLabel.numberOfLines = 0
        view.insertSubview(termsAndConditionsLabel, aboveSubview: stackView)
        termsAndConditionsLabel.snp.makeConstraints { $0.top.equalToSuperview().offset(100); $0.left.equalToSuperview(); $0.right.equalToSuperview() }
        let termsText = "I understand by tapping \"Sign up\" my information will be used as described here and in the Privacy Policy, and I agree to the Terms."
        termsAndConditionsLabel.delegate = self
        termsAndConditionsLabel.text = termsText
        let url = URL(string: "https://www.google.com")!
        let privacyPolicyText = "Privacy Policy"
        let privacyPolicyRange = (termsText as NSString).range(of: privacyPolicyText)
        termsAndConditionsLabel.addLink(to: url, withRange: privacyPolicyRange)
    }
}

extension ViewController: NantesLabelDelegate {
    func attributedLabel(_ label: NantesLabel, didSelectLink link: URL) {
        print(link)
    }
}

Expected behavior
I expected to see the link that was tapped printed to the console.

Smartphone (please complete the following information):

  • Device: iOS Simulator on Xcode 10.1 (iPhoneX)
  • OS: 12.1

SwiftUI support

Text in SwiftUI doesn't support showing links, I think it would be really useful to be able to use Nantes in SwiftUI. I'm going to wrap it in UIViewRepresentable for myself, I might add a pull request with minimal customization.

Version 0.0.9 not available for cocoapods

Hi,

Please support the newer release 0.0.9 for cocoapods. Please find the below logs:

[!] CocoaPods could not find compatible versions for pod "Nantes":
In Podfile:
Nantes (= 0.0.9)

None of your spec sources contain a spec satisfying the dependency: Nantes (= 0.0.9).

You have either:

  • out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
  • mistyped the name or version.
  • not added the source repo that hosts the Podspec to your Podfile.

Emoji line height too large

Describe the bug
Text height exactly matches UILabel but when the text contains an emoji the line height is too great. UILabel hugs the top of the emoji exactly. Interestingly CTFramesetterSuggestFrameSizeWithConstraints looks to be at fault.

To Reproduce
Steps to reproduce the behavior:

  1. Create NantesLabel with a string containing one or more emoji
  2. Note line height is too large giving the effect of a top padding

Expected behavior
Line height should be the same as UILabel

Screenshots
IMG_FA6F7CC64E04-1

Smartphone (please complete the following information):

  • Device: iPhoneXS
  • OS: iOS13.3.1
  • Version 0.0.9

Calculate boundingRect get wrong height

  1. set attributedText to NantesLabel, include font, linespace;
  2. Get height by func boundingRect, could not get right height
  3. When I replace NantesLabel to UILabel, can get the right height

Is there any method supports long press at link?

As the Title said. I have a feature that when I long press the link, I can show an action sheet. I think it's a common feature, so is there any method supports long press gesture?
Like the property called 'linkLongPressBlock' in TTTAttributedLabelLink

Click hyperlinks from HTML

Is your feature request related to a problem? Please describe.
I'd love it if hyperlinks from HTML could be clicked. At the moment I construct an NSMutableAttributedString from an HTML string (built-in functionality to iOS), which colors my links but I can not click them.

Describe the solution you'd like
An option to initialize NantesLabel with an HTML string so that it can parse the HTML and display clickable hyperlinks

Describe alternatives you've considered
Trying to calculate the range of links but I thought that'd be too difficult.

Example String: "<a href="http://www.google.com">I can't be clicked"

Head truncation drawing is incorrect

Describe the bug
Setting lineBreakMode to .byTruncatingHead or .byTruncatingMiddle causes the label to paint incorrectly. It truncates the head and the tail, or the middle and the tail, and it doesn't paint the correct section of the label (for .byTruncatingHead).

To Reproduce
Steps to reproduce the behavior:

  1. Run example app
  2. See truncated head and truncated middle examples

Expected behavior
It should paint like UILabel paints. Something like the last line of the string, with the truncation token only appearing at the front of the label, instead of at the front and the end.

Screenshots
image
image

Additional context
Potentially changing the truncation code to check against lineBreakMode before deciding how to truncate might be the fix.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.