Skip to content

Commit

Permalink
Update for iOS 9 min deployment target
Browse files Browse the repository at this point in the history
Increased IPHONEOS_DEPLOYMENT_TARGET to 9.0
Switched from stringByAddingPercentEscapesUsingEncoding to stringByAddingPercentEncodingWithAllowedCharacters
  • Loading branch information
neilmorton committed Jul 19, 2019
1 parent d9bbe62 commit e255b09
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
14 changes: 7 additions & 7 deletions TSMarkdownParser.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@
};
buildConfigurationList = CC3C717FD5DA31AA1A2B87BF /* Build configuration list for PBXProject "TSMarkdownParser" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -891,7 +891,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "TSMarkdownParserExample iOS/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = "se.computertalk.TSMarkdownParserExample-iOS";
Expand All @@ -911,7 +911,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "TSMarkdownParserExample iOS/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "se.computertalk.TSMarkdownParserExample-iOS";
Expand Down Expand Up @@ -1112,7 +1112,7 @@
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_PARAMETER = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "se.computertalk.$(PRODUCT_NAME:rfc1034identifier)";
Expand Down Expand Up @@ -1173,7 +1173,7 @@
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_PARAMETER = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_BUNDLE_IDENTIFIER = "se.computertalk.$(PRODUCT_NAME:rfc1034identifier)";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -1213,7 +1213,7 @@
);
INFOPLIST_FILE = TSMarkdownParserFramework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = TSMarkdownParserFramework/module.modulemap;
MTL_ENABLE_DEBUG_INFO = YES;
Expand Down Expand Up @@ -1241,7 +1241,7 @@
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = TSMarkdownParserFramework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = TSMarkdownParserFramework/module.modulemap;
MTL_ENABLE_DEBUG_INFO = NO;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
6 changes: 3 additions & 3 deletions TSMarkdownParser/TSMarkdownParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ + (instancetype)standardParser {
}
if (!weakParser.skipLinkAttribute) {
NSURL *url = [NSURL URLWithString:link] ?: [NSURL URLWithString:
[link stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
[link stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]]];
if (url.scheme) {
[attributedString addAttribute:NSLinkAttributeName
value:url
Expand All @@ -159,7 +159,7 @@ + (instancetype)standardParser {
[defaultParser addLinkParsingWithLinkFormattingBlock:^(NSMutableAttributedString *attributedString, NSRange range, NSString * _Nullable link) {
if (!weakParser.skipLinkAttribute) {
NSURL *url = [NSURL URLWithString:link] ?: [NSURL URLWithString:
[link stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
[link stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]]];
if (url) {
[attributedString addAttribute:NSLinkAttributeName
value:url
Expand Down Expand Up @@ -189,7 +189,7 @@ + (instancetype)standardParser {
return;
}
NSURL *url = [NSURL URLWithString:link] ?: [NSURL URLWithString:
[link stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
[link stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]]];

[attributedString addAttribute:NSLinkAttributeName
value:url
Expand Down

0 comments on commit e255b09

Please sign in to comment.