diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0e9d7bf --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,12 @@ +#Change Log +All notable changes to this project will be documented in this file. +`TSMarkdownParser` adheres to [Semantic Versioning](http://semver.org/). + +--- + +## [2.0.2](https://github.com/laptobbe/TSMarkdownParser/releases/tag/2.0.2) (2016/03/29) +Released on 2016/03/29. All issues associated with this milestone can be found using this [filter](https://github.com/laptobbe/TSMarkdownParser/issues?q=milestone%3A2.0.2+is%3Aclosed). + +#### Added +* Added support to OS X 10.7 +* Added a changelog [#41](https://github.com/laptobbe/TSMarkdownParser/issues/41) diff --git a/TSMarkdownParser.podspec b/TSMarkdownParser.podspec index 8cc3ef9..859be1e 100644 --- a/TSMarkdownParser.podspec +++ b/TSMarkdownParser.podspec @@ -1,10 +1,10 @@ Pod::Spec.new do |s| s.name = "TSMarkdownParser" - s.version = "2.0.0" - s.summary = "A markdown to NSAttributedString parser for iOS" + s.version = "2.0.2" + s.summary = "A markdown to NSAttributedString parser for iOS and OSX" s.description = <<-DESC - TSMarkdownParser is a markdown to NSAttributedString parser for iOS implemented using NSRegularExpressions. + TSMarkdownParser is a markdown to NSAttributedString parser for iOS, TVOS and OSX implemented using NSRegularExpressions. It supports many of the standard tags layed out by John Gruber on his site [Daring Fireball](http://daringfireball.net/projects/markdown/syntax). It is also very extendable via Regular Expressions making it easy to add your own custom tags or a totally different parsing syntax if you like. DESC @@ -15,8 +15,10 @@ Pod::Spec.new do |s| s.social_media_url = "http://twitter.com/laptobbe" s.ios.deployment_target = "6.0" s.tvos.deployment_target = "9.0" + s.osx.deployment_target = "10.7" s.source = { :git => "https://github.com/laptobbe/TSMarkdownParser.git", :tag => s.version.to_s } s.source_files = "TSMarkdownParser/**/*.{h,m}" s.requires_arc = true - s.framework = 'UIKit' + s.ios.framework = 'UIKit' + s.tvos.framework = 'UIKit' end diff --git a/TSMarkdownParser.xcodeproj/project.pbxproj b/TSMarkdownParser.xcodeproj/project.pbxproj index b3567fc..c9db0a1 100644 --- a/TSMarkdownParser.xcodeproj/project.pbxproj +++ b/TSMarkdownParser.xcodeproj/project.pbxproj @@ -7,9 +7,22 @@ objects = { /* Begin PBXBuildFile section */ + 3700F5841CAA637C0034AE2D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3700F5831CAA637C0034AE2D /* main.m */; }; + 3700F5871CAA637C0034AE2D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3700F5861CAA637C0034AE2D /* AppDelegate.m */; }; + 3700F58A1CAA637C0034AE2D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3700F5891CAA637C0034AE2D /* ViewController.m */; }; + 3700F58D1CAA637C0034AE2D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3700F58B1CAA637C0034AE2D /* Main.storyboard */; }; + 3700F58F1CAA637C0034AE2D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3700F58E1CAA637C0034AE2D /* Assets.xcassets */; }; + 3700F59C1CAA63F90034AE2D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3700F59B1CAA63F90034AE2D /* AppDelegate.m */; }; + 3700F59F1CAA63F90034AE2D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3700F59E1CAA63F90034AE2D /* main.m */; }; + 3700F5A21CAA63F90034AE2D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3700F5A11CAA63F90034AE2D /* ViewController.m */; }; + 3700F5A41CAA63F90034AE2D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3700F5A31CAA63F90034AE2D /* Assets.xcassets */; }; + 3700F5A71CAA63F90034AE2D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3700F5A51CAA63F90034AE2D /* Main.storyboard */; }; + 3700F5AC1CAA645D0034AE2D /* TSMarkdownParser.m in Sources */ = {isa = PBXBuildFile; fileRef = CC3C7B7AEA9B50B9BF782FC5 /* TSMarkdownParser.m */; }; + 3700F5AD1CAA645E0034AE2D /* TSMarkdownParser.m in Sources */ = {isa = PBXBuildFile; fileRef = CC3C7B7AEA9B50B9BF782FC5 /* TSMarkdownParser.m */; }; + 3700F5AE1CAA64690034AE2D /* TSBaseParser.m in Sources */ = {isa = PBXBuildFile; fileRef = C81B78D01C5483DF00A1DE36 /* TSBaseParser.m */; }; + 3700F5AF1CAA646A0034AE2D /* TSBaseParser.m in Sources */ = {isa = PBXBuildFile; fileRef = C81B78D01C5483DF00A1DE36 /* TSBaseParser.m */; }; C81B78D11C5483DF00A1DE36 /* TSBaseParser.h in Headers */ = {isa = PBXBuildFile; fileRef = C81B78CF1C5483DF00A1DE36 /* TSBaseParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; C81B78D21C5483DF00A1DE36 /* TSBaseParser.m in Sources */ = {isa = PBXBuildFile; fileRef = C81B78D01C5483DF00A1DE36 /* TSBaseParser.m */; }; - C81B78D31C5483DF00A1DE36 /* TSBaseParser.m in Sources */ = {isa = PBXBuildFile; fileRef = C81B78D01C5483DF00A1DE36 /* TSBaseParser.m */; }; C81B78D41C5483DF00A1DE36 /* TSBaseParser.m in Sources */ = {isa = PBXBuildFile; fileRef = C81B78D01C5483DF00A1DE36 /* TSBaseParser.m */; }; C81B78D51C54B25300A1DE36 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC3C73AAE67D9E3D273712D4 /* UIKit.framework */; }; C81B78DE1C54B4B800A1DE36 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C81B78DD1C54B4B800A1DE36 /* main.m */; }; @@ -61,6 +74,24 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 3700F5801CAA637C0034AE2D /* TSMarkdownParserExample tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "TSMarkdownParserExample tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 3700F5831CAA637C0034AE2D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 3700F5851CAA637C0034AE2D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 3700F5861CAA637C0034AE2D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 3700F5881CAA637C0034AE2D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 3700F5891CAA637C0034AE2D /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 3700F58C1CAA637C0034AE2D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 3700F58E1CAA637C0034AE2D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 3700F5901CAA637C0034AE2D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3700F5981CAA63F90034AE2D /* TSMarkdownParserExample OSX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "TSMarkdownParserExample OSX.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 3700F59A1CAA63F90034AE2D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 3700F59B1CAA63F90034AE2D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 3700F59E1CAA63F90034AE2D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 3700F5A01CAA63F90034AE2D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 3700F5A11CAA63F90034AE2D /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 3700F5A31CAA63F90034AE2D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 3700F5A61CAA63F90034AE2D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 3700F5A81CAA63F90034AE2D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; C81B78CF1C5483DF00A1DE36 /* TSBaseParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSBaseParser.h; sourceTree = ""; }; C81B78D01C5483DF00A1DE36 /* TSBaseParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSBaseParser.m; sourceTree = ""; }; C81B78DA1C54B4B800A1DE36 /* TSMarkdownParser.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TSMarkdownParser.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -94,6 +125,20 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 3700F57D1CAA637C0034AE2D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3700F5951CAA63F90034AE2D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; C81B78D71C54B4B800A1DE36 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -131,7 +176,53 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - C81B78DB1C54B4B800A1DE36 /* TSMarkdownParserExample */ = { + 3700F5811CAA637C0034AE2D /* TSMarkdownParserExample tvOS */ = { + isa = PBXGroup; + children = ( + 3700F5851CAA637C0034AE2D /* AppDelegate.h */, + 3700F5861CAA637C0034AE2D /* AppDelegate.m */, + 3700F5881CAA637C0034AE2D /* ViewController.h */, + 3700F5891CAA637C0034AE2D /* ViewController.m */, + 3700F58B1CAA637C0034AE2D /* Main.storyboard */, + 3700F58E1CAA637C0034AE2D /* Assets.xcassets */, + 3700F5901CAA637C0034AE2D /* Info.plist */, + 3700F5821CAA637C0034AE2D /* Supporting Files */, + ); + path = "TSMarkdownParserExample tvOS"; + sourceTree = ""; + }; + 3700F5821CAA637C0034AE2D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 3700F5831CAA637C0034AE2D /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 3700F5991CAA63F90034AE2D /* TSMarkdownParserExample OSX */ = { + isa = PBXGroup; + children = ( + 3700F59A1CAA63F90034AE2D /* AppDelegate.h */, + 3700F59B1CAA63F90034AE2D /* AppDelegate.m */, + 3700F5A01CAA63F90034AE2D /* ViewController.h */, + 3700F5A11CAA63F90034AE2D /* ViewController.m */, + 3700F5A31CAA63F90034AE2D /* Assets.xcassets */, + 3700F5A51CAA63F90034AE2D /* Main.storyboard */, + 3700F5A81CAA63F90034AE2D /* Info.plist */, + 3700F59D1CAA63F90034AE2D /* Supporting Files */, + ); + path = "TSMarkdownParserExample OSX"; + sourceTree = ""; + }; + 3700F59D1CAA63F90034AE2D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 3700F59E1CAA63F90034AE2D /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + C81B78DB1C54B4B800A1DE36 /* TSMarkdownParserExample iOS */ = { isa = PBXGroup; children = ( C81B78DF1C54B4B800A1DE36 /* AppDelegate.h */, @@ -144,7 +235,7 @@ C81B78ED1C54B4B800A1DE36 /* Info.plist */, C81B78DC1C54B4B800A1DE36 /* Supporting Files */, ); - path = TSMarkdownParserExample; + path = "TSMarkdownParserExample iOS"; sourceTree = ""; }; C81B78DC1C54B4B800A1DE36 /* Supporting Files */ = { @@ -159,7 +250,9 @@ isa = PBXGroup; children = ( F5A4F4431B36EF4100C4F56C /* TSMarkdownParserFramework */, - C81B78DB1C54B4B800A1DE36 /* TSMarkdownParserExample */, + C81B78DB1C54B4B800A1DE36 /* TSMarkdownParserExample iOS */, + 3700F5811CAA637C0034AE2D /* TSMarkdownParserExample tvOS */, + 3700F5991CAA63F90034AE2D /* TSMarkdownParserExample OSX */, CC3C75D2B9DE7B5A7C239205 /* Products */, CC3C7D316168D5FD2480BED2 /* Frameworks */, CC3C733B469527BABC08D90D /* TSMarkdownParser */, @@ -208,6 +301,8 @@ CC3C71DDC9984C6E95E98E36 /* TSMarkdownParser.xctest */, F5A4F4421B36EF4100C4F56C /* TSMarkdownParser.framework */, C81B78DA1C54B4B800A1DE36 /* TSMarkdownParser.app */, + 3700F5801CAA637C0034AE2D /* TSMarkdownParserExample tvOS.app */, + 3700F5981CAA63F90034AE2D /* TSMarkdownParserExample OSX.app */, ); name = Products; sourceTree = ""; @@ -262,9 +357,43 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - C81B78D91C54B4B800A1DE36 /* TSMarkdownParserExample */ = { + 3700F57F1CAA637C0034AE2D /* TSMarkdownParserExample tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3700F5911CAA637C0034AE2D /* Build configuration list for PBXNativeTarget "TSMarkdownParserExample tvOS" */; + buildPhases = ( + 3700F57C1CAA637C0034AE2D /* Sources */, + 3700F57D1CAA637C0034AE2D /* Frameworks */, + 3700F57E1CAA637C0034AE2D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "TSMarkdownParserExample tvOS"; + productName = "TSMarkdownParser tvOS"; + productReference = 3700F5801CAA637C0034AE2D /* TSMarkdownParserExample tvOS.app */; + productType = "com.apple.product-type.application"; + }; + 3700F5971CAA63F90034AE2D /* TSMarkdownParserExample OSX */ = { isa = PBXNativeTarget; - buildConfigurationList = C81B78EE1C54B4B800A1DE36 /* Build configuration list for PBXNativeTarget "TSMarkdownParserExample" */; + buildConfigurationList = 3700F5A91CAA63F90034AE2D /* Build configuration list for PBXNativeTarget "TSMarkdownParserExample OSX" */; + buildPhases = ( + 3700F5941CAA63F90034AE2D /* Sources */, + 3700F5951CAA63F90034AE2D /* Frameworks */, + 3700F5961CAA63F90034AE2D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "TSMarkdownParserExample OSX"; + productName = "TSMarkdownParserExample OSX"; + productReference = 3700F5981CAA63F90034AE2D /* TSMarkdownParserExample OSX.app */; + productType = "com.apple.product-type.application"; + }; + C81B78D91C54B4B800A1DE36 /* TSMarkdownParserExample iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = C81B78EE1C54B4B800A1DE36 /* Build configuration list for PBXNativeTarget "TSMarkdownParserExample iOS" */; buildPhases = ( C81B78D61C54B4B800A1DE36 /* Sources */, C81B78D71C54B4B800A1DE36 /* Frameworks */, @@ -274,7 +403,7 @@ ); dependencies = ( ); - name = TSMarkdownParserExample; + name = "TSMarkdownParserExample iOS"; productName = TSMarkdownParser; productReference = C81B78DA1C54B4B800A1DE36 /* TSMarkdownParser.app */; productType = "com.apple.product-type.application"; @@ -341,6 +470,12 @@ attributes = { ORGANIZATIONNAME = "Computertalk Sweden"; TargetAttributes = { + 3700F57F1CAA637C0034AE2D = { + CreatedOnToolsVersion = 7.3; + }; + 3700F5971CAA63F90034AE2D = { + CreatedOnToolsVersion = 7.3; + }; C81B78D91C54B4B800A1DE36 = { CreatedOnToolsVersion = 7.3; }; @@ -365,12 +500,32 @@ CC3C704FF16FF7C75C832F3A /* TSMarkdownParserLib */, CC3C7DE1CDD4D3F7BEBA4C42 /* TSMarkdownParserTests */, F5A4F4411B36EF4100C4F56C /* TSMarkdownParserFramework */, - C81B78D91C54B4B800A1DE36 /* TSMarkdownParserExample */, + C81B78D91C54B4B800A1DE36 /* TSMarkdownParserExample iOS */, + 3700F57F1CAA637C0034AE2D /* TSMarkdownParserExample tvOS */, + 3700F5971CAA63F90034AE2D /* TSMarkdownParserExample OSX */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 3700F57E1CAA637C0034AE2D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3700F58F1CAA637C0034AE2D /* Assets.xcassets in Resources */, + 3700F58D1CAA637C0034AE2D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3700F5961CAA63F90034AE2D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3700F5A41CAA63F90034AE2D /* Assets.xcassets in Resources */, + 3700F5A71CAA63F90034AE2D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; C81B78D81C54B4B800A1DE36 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -419,6 +574,30 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 3700F57C1CAA637C0034AE2D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3700F5AE1CAA64690034AE2D /* TSBaseParser.m in Sources */, + 3700F5AC1CAA645D0034AE2D /* TSMarkdownParser.m in Sources */, + 3700F58A1CAA637C0034AE2D /* ViewController.m in Sources */, + 3700F5871CAA637C0034AE2D /* AppDelegate.m in Sources */, + 3700F5841CAA637C0034AE2D /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3700F5941CAA63F90034AE2D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3700F5AF1CAA646A0034AE2D /* TSBaseParser.m in Sources */, + 3700F5AD1CAA645E0034AE2D /* TSMarkdownParser.m in Sources */, + 3700F5A21CAA63F90034AE2D /* ViewController.m in Sources */, + 3700F59F1CAA63F90034AE2D /* main.m in Sources */, + 3700F59C1CAA63F90034AE2D /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; C81B78D61C54B4B800A1DE36 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -436,7 +615,6 @@ buildActionMask = 2147483647; files = ( CC3C797C733EECEBC569C218 /* TSMarkdownParserTests.m in Sources */, - C81B78D31C5483DF00A1DE36 /* TSBaseParser.m in Sources */, CC3C7D016BD3BAD6F43D40B3 /* UIImage+Tests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -470,6 +648,22 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ + 3700F58B1CAA637C0034AE2D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 3700F58C1CAA637C0034AE2D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 3700F5A51CAA63F90034AE2D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 3700F5A61CAA63F90034AE2D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; C81B78E51C54B4B800A1DE36 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( @@ -497,6 +691,92 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 3700F5921CAA637C0034AE2D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "TSMarkdownParserExample tvOS/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = "se.computertalk.TSMarkdownParserExample-tvOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.2; + }; + name = Debug; + }; + 3700F5931CAA637C0034AE2D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "TSMarkdownParserExample tvOS/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "se.computertalk.TSMarkdownParserExample-tvOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.2; + }; + name = Release; + }; + 3700F5AA1CAA63F90034AE2D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "TSMarkdownParserExample OSX/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.7; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = "se.computertalk.TSMarkdownParserExample-OSX"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Debug; + }; + 3700F5AB1CAA63F90034AE2D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "TSMarkdownParserExample OSX/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.7; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "se.computertalk.TSMarkdownParserExample-OSX"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Release; + }; C81B78EF1C54B4B800A1DE36 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -506,7 +786,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = TSMarkdownParserExample/Info.plist; + INFOPLIST_FILE = "TSMarkdownParserExample iOS/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; @@ -526,7 +806,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = TSMarkdownParserExample/Info.plist; + INFOPLIST_FILE = "TSMarkdownParserExample iOS/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; @@ -715,7 +995,23 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - C81B78EE1C54B4B800A1DE36 /* Build configuration list for PBXNativeTarget "TSMarkdownParserExample" */ = { + 3700F5911CAA637C0034AE2D /* Build configuration list for PBXNativeTarget "TSMarkdownParserExample tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3700F5921CAA637C0034AE2D /* Debug */, + 3700F5931CAA637C0034AE2D /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 3700F5A91CAA63F90034AE2D /* Build configuration list for PBXNativeTarget "TSMarkdownParserExample OSX" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3700F5AA1CAA63F90034AE2D /* Debug */, + 3700F5AB1CAA63F90034AE2D /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + C81B78EE1C54B4B800A1DE36 /* Build configuration list for PBXNativeTarget "TSMarkdownParserExample iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( C81B78EF1C54B4B800A1DE36 /* Debug */, diff --git a/TSMarkdownParser.xcodeproj/xcshareddata/xcschemes/TSMarkdownParserExample OSX.xcscheme b/TSMarkdownParser.xcodeproj/xcshareddata/xcschemes/TSMarkdownParserExample OSX.xcscheme new file mode 100644 index 0000000..2a2fe37 --- /dev/null +++ b/TSMarkdownParser.xcodeproj/xcshareddata/xcschemes/TSMarkdownParserExample OSX.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TSMarkdownParser.xcodeproj/xcshareddata/xcschemes/TSMarkdownParser.xcscheme b/TSMarkdownParser.xcodeproj/xcshareddata/xcschemes/TSMarkdownParserExample iOS.xcscheme similarity index 91% rename from TSMarkdownParser.xcodeproj/xcshareddata/xcschemes/TSMarkdownParser.xcscheme rename to TSMarkdownParser.xcodeproj/xcshareddata/xcschemes/TSMarkdownParserExample iOS.xcscheme index ce56133..c6bafba 100644 --- a/TSMarkdownParser.xcodeproj/xcshareddata/xcschemes/TSMarkdownParser.xcscheme +++ b/TSMarkdownParser.xcodeproj/xcshareddata/xcschemes/TSMarkdownParserExample iOS.xcscheme @@ -11,13 +11,12 @@ buildForRunning = "YES" buildForProfiling = "YES" buildForArchiving = "YES" - buildForAnalyzing = "YES" - hideIssues = "NO"> + buildForAnalyzing = "YES"> @@ -35,7 +34,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "C81B78D91C54B4B800A1DE36" BuildableName = "TSMarkdownParser.app" - BlueprintName = "TSMarkdownParserExample" + BlueprintName = "TSMarkdownParserExample iOS" ReferencedContainer = "container:TSMarkdownParser.xcodeproj"> @@ -58,7 +57,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "C81B78D91C54B4B800A1DE36" BuildableName = "TSMarkdownParser.app" - BlueprintName = "TSMarkdownParserExample" + BlueprintName = "TSMarkdownParserExample iOS" ReferencedContainer = "container:TSMarkdownParser.xcodeproj"> @@ -77,7 +76,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "C81B78D91C54B4B800A1DE36" BuildableName = "TSMarkdownParser.app" - BlueprintName = "TSMarkdownParserExample" + BlueprintName = "TSMarkdownParserExample iOS" ReferencedContainer = "container:TSMarkdownParser.xcodeproj"> diff --git a/TSMarkdownParser.xcodeproj/xcshareddata/xcschemes/TSMarkdownParserExample tvOS.xcscheme b/TSMarkdownParser.xcodeproj/xcshareddata/xcschemes/TSMarkdownParserExample tvOS.xcscheme new file mode 100644 index 0000000..1c5a45c --- /dev/null +++ b/TSMarkdownParser.xcodeproj/xcshareddata/xcschemes/TSMarkdownParserExample tvOS.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TSMarkdownParser/TSBaseParser.m b/TSMarkdownParser/TSBaseParser.m index 5372eb7..d140c68 100644 --- a/TSMarkdownParser/TSBaseParser.m +++ b/TSMarkdownParser/TSBaseParser.m @@ -7,7 +7,12 @@ // #import "TSBaseParser.h" +#import +#if TARGET_OS_IPHONE #import +#else +#import +#endif @interface TSExpressionBlockPair : NSObject diff --git a/TSMarkdownParser/TSMarkdownParser.h b/TSMarkdownParser/TSMarkdownParser.h index 2d1cdd1..61f1b70 100644 --- a/TSMarkdownParser/TSMarkdownParser.h +++ b/TSMarkdownParser/TSMarkdownParser.h @@ -6,7 +6,12 @@ // Copyright (c) 2014 Computertalk Sweden. All rights reserved. // +#import +#if TARGET_OS_IPHONE #import +#else +#import +#endif #import "TSBaseParser.h" NS_ASSUME_NONNULL_BEGIN diff --git a/TSMarkdownParser/TSMarkdownParser.m b/TSMarkdownParser/TSMarkdownParser.m index 9234fcb..144d84a 100644 --- a/TSMarkdownParser/TSMarkdownParser.m +++ b/TSMarkdownParser/TSMarkdownParser.m @@ -7,7 +7,11 @@ // #import "TSMarkdownParser.h" - +#if !TARGET_OS_IPHONE +typedef NSColor UIColor; +typedef NSImage UIImage; +typedef NSFont UIFont; +#endif @implementation TSMarkdownParser @@ -34,7 +38,12 @@ - (instancetype)init { _monospaceAttributes = @{ NSFontAttributeName: [UIFont fontWithName:@"Menlo" size:12], NSForegroundColorAttributeName: [UIColor colorWithRed:0.95 green:0.54 blue:0.55 alpha:1] }; _strongAttributes = @{ NSFontAttributeName: [UIFont boldSystemFontOfSize:12] }; + +#if TARGET_OS_IPHONE _emphasisAttributes = @{ NSFontAttributeName: [UIFont italicSystemFontOfSize:12] }; +#else + _emphasisAttributes = @{ NSFontAttributeName: [[NSFontManager sharedFontManager] convertFont:[UIFont systemFontOfSize:12] toHaveTrait:NSItalicFontMask] }; +#endif return self; } diff --git a/TSMarkdownParserExample OSX/AppDelegate.h b/TSMarkdownParserExample OSX/AppDelegate.h new file mode 100644 index 0000000..95d04d7 --- /dev/null +++ b/TSMarkdownParserExample OSX/AppDelegate.h @@ -0,0 +1,15 @@ +// +// AppDelegate.h +// TSMarkdownParserExample OSX +// +// Created by Antoine Cœur on 3/29/16. +// Copyright © 2016 Computertalk Sweden. All rights reserved. +// + +#import + +@interface AppDelegate : NSObject + + +@end + diff --git a/TSMarkdownParserExample OSX/AppDelegate.m b/TSMarkdownParserExample OSX/AppDelegate.m new file mode 100644 index 0000000..f81ca9c --- /dev/null +++ b/TSMarkdownParserExample OSX/AppDelegate.m @@ -0,0 +1,25 @@ +// +// AppDelegate.m +// TSMarkdownParserExample OSX +// +// Created by Antoine Cœur on 3/29/16. +// Copyright © 2016 Computertalk Sweden. All rights reserved. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + // Insert code here to initialize your application +} + +- (void)applicationWillTerminate:(NSNotification *)aNotification { + // Insert code here to tear down your application +} + +@end diff --git a/TSMarkdownParserExample OSX/Assets.xcassets/AppIcon.appiconset/Contents.json b/TSMarkdownParserExample OSX/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2db2b1c --- /dev/null +++ b/TSMarkdownParserExample OSX/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TSMarkdownParserExample OSX/Base.lproj/Main.storyboard b/TSMarkdownParserExample OSX/Base.lproj/Main.storyboard new file mode 100644 index 0000000..70df12d --- /dev/null +++ b/TSMarkdownParserExample OSX/Base.lproj/Main.storyboard @@ -0,0 +1,735 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TSMarkdownParserExample OSX/Info.plist b/TSMarkdownParserExample OSX/Info.plist new file mode 100644 index 0000000..fec018c --- /dev/null +++ b/TSMarkdownParserExample OSX/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2016 Computertalk Sweden. All rights reserved. + NSMainStoryboardFile + Main + NSPrincipalClass + NSApplication + + diff --git a/TSMarkdownParserExample OSX/ViewController.h b/TSMarkdownParserExample OSX/ViewController.h new file mode 100644 index 0000000..9e78c93 --- /dev/null +++ b/TSMarkdownParserExample OSX/ViewController.h @@ -0,0 +1,15 @@ +// +// ViewController.h +// TSMarkdownParserExample OSX +// +// Created by Antoine Cœur on 3/29/16. +// Copyright © 2016 Computertalk Sweden. All rights reserved. +// + +#import + +@interface ViewController : NSViewController + + +@end + diff --git a/TSMarkdownParserExample OSX/ViewController.m b/TSMarkdownParserExample OSX/ViewController.m new file mode 100644 index 0000000..a446d8d --- /dev/null +++ b/TSMarkdownParserExample OSX/ViewController.m @@ -0,0 +1,60 @@ +// +// ViewController.m +// TSMarkdownParserExample OSX +// +// Created by Antoine Cœur on 3/29/16. +// Copyright © 2016 Computertalk Sweden. All rights reserved. +// + +#import "ViewController.h" +#import "TSMarkdownParser.h" + + +@interface ViewController () + +@property (strong, nonatomic) TSMarkdownParser *parser; +@property (unsafe_unretained) IBOutlet NSTextView *markdownInput; +@property (weak) IBOutlet NSTextField *markdownOutput; + +@end + + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + // Do any additional setup after loading the view. + + self.markdownInput.string = @"# header\n\ +###### header\n\ +* list, _emphasis_, *emphasis*\n\ +++ list, __bold__, **bold**\n\ +--- list, `code`, ``code``\n\ +> quote\n\ +>> quote\n\ +\\# \\*escaping\\* \\_escaping\\_ \\`escaping\\`\n\ +[link](http://example.net)\n\ +http://example.net\n\ +![image](markdown)"; + + self.parser = [TSMarkdownParser standardParser]; + + // updating output + [self textViewDidChange:self.markdownInput]; +} + +- (void)setRepresentedObject:(id)representedObject { + [super setRepresentedObject:representedObject]; + + // Update the view, if already loaded. +} + +#pragma mark - + +- (void)textViewDidChange:(NSTextView *)textView +{ + self.markdownOutput.attributedStringValue = [self.parser attributedStringFromMarkdown:textView.string]; +} + +@end diff --git a/TSMarkdownParserExample OSX/main.m b/TSMarkdownParserExample OSX/main.m new file mode 100644 index 0000000..df2a626 --- /dev/null +++ b/TSMarkdownParserExample OSX/main.m @@ -0,0 +1,13 @@ +// +// main.m +// TSMarkdownParserExample OSX +// +// Created by Antoine Cœur on 3/29/16. +// Copyright © 2016 Computertalk Sweden. All rights reserved. +// + +#import + +int main(int argc, const char * argv[]) { + return NSApplicationMain(argc, argv); +} diff --git a/TSMarkdownParserExample/AppDelegate.h b/TSMarkdownParserExample iOS/AppDelegate.h similarity index 100% rename from TSMarkdownParserExample/AppDelegate.h rename to TSMarkdownParserExample iOS/AppDelegate.h diff --git a/TSMarkdownParserExample/AppDelegate.m b/TSMarkdownParserExample iOS/AppDelegate.m similarity index 100% rename from TSMarkdownParserExample/AppDelegate.m rename to TSMarkdownParserExample iOS/AppDelegate.m diff --git a/TSMarkdownParserExample/Assets.xcassets/AppIcon.appiconset/Contents.json b/TSMarkdownParserExample iOS/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from TSMarkdownParserExample/Assets.xcassets/AppIcon.appiconset/Contents.json rename to TSMarkdownParserExample iOS/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/TSMarkdownParserExample/Base.lproj/LaunchScreen.storyboard b/TSMarkdownParserExample iOS/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from TSMarkdownParserExample/Base.lproj/LaunchScreen.storyboard rename to TSMarkdownParserExample iOS/Base.lproj/LaunchScreen.storyboard diff --git a/TSMarkdownParserExample/Base.lproj/Main.storyboard b/TSMarkdownParserExample iOS/Base.lproj/Main.storyboard similarity index 97% rename from TSMarkdownParserExample/Base.lproj/Main.storyboard rename to TSMarkdownParserExample iOS/Base.lproj/Main.storyboard index a7b07f5..b75c834 100644 --- a/TSMarkdownParserExample/Base.lproj/Main.storyboard +++ b/TSMarkdownParserExample iOS/Base.lproj/Main.storyboard @@ -1,8 +1,8 @@ - + - + diff --git a/TSMarkdownParserExample/Info.plist b/TSMarkdownParserExample iOS/Info.plist similarity index 100% rename from TSMarkdownParserExample/Info.plist rename to TSMarkdownParserExample iOS/Info.plist diff --git a/TSMarkdownParserExample/ViewController.h b/TSMarkdownParserExample iOS/ViewController.h similarity index 75% rename from TSMarkdownParserExample/ViewController.h rename to TSMarkdownParserExample iOS/ViewController.h index 7379dfd..dc1f551 100644 --- a/TSMarkdownParserExample/ViewController.h +++ b/TSMarkdownParserExample iOS/ViewController.h @@ -8,7 +8,8 @@ #import -@interface ViewController : UIViewController + +@interface ViewController : UIViewController @end diff --git a/TSMarkdownParserExample/ViewController.m b/TSMarkdownParserExample iOS/ViewController.m similarity index 95% rename from TSMarkdownParserExample/ViewController.m rename to TSMarkdownParserExample iOS/ViewController.m index 0b1e569..fb4a14e 100644 --- a/TSMarkdownParserExample/ViewController.m +++ b/TSMarkdownParserExample iOS/ViewController.m @@ -9,7 +9,8 @@ #import "ViewController.h" #import "TSMarkdownParser.h" -@interface ViewController () + +@interface ViewController () @property (strong, nonatomic) TSMarkdownParser *parser; @property (weak, nonatomic) IBOutlet UITextView *markdownInput; @@ -17,6 +18,7 @@ @interface ViewController () @end + @implementation ViewController - (void)viewDidLoad diff --git a/TSMarkdownParserExample/main.m b/TSMarkdownParserExample iOS/main.m similarity index 100% rename from TSMarkdownParserExample/main.m rename to TSMarkdownParserExample iOS/main.m diff --git a/TSMarkdownParserExample tvOS/AppDelegate.h b/TSMarkdownParserExample tvOS/AppDelegate.h new file mode 100644 index 0000000..3eff141 --- /dev/null +++ b/TSMarkdownParserExample tvOS/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// TSMarkdownParser tvOS +// +// Created by Antoine Cœur on 3/29/16. +// Copyright © 2016 Computertalk Sweden. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/TSMarkdownParserExample tvOS/AppDelegate.m b/TSMarkdownParserExample tvOS/AppDelegate.m new file mode 100644 index 0000000..8b15b2b --- /dev/null +++ b/TSMarkdownParserExample tvOS/AppDelegate.m @@ -0,0 +1,45 @@ +// +// AppDelegate.m +// TSMarkdownParser tvOS +// +// Created by Antoine Cœur on 3/29/16. +// Copyright © 2016 Computertalk Sweden. All rights reserved. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..0564959 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json new file mode 100644 index 0000000..8bf75d9 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..0564959 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..0564959 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..0564959 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json new file mode 100644 index 0000000..8bf75d9 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..0564959 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..0564959 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json new file mode 100644 index 0000000..6a3dcfa --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json @@ -0,0 +1,26 @@ +{ + "assets" : [ + { + "size" : "1280x768", + "idiom" : "tv", + "filename" : "App Icon - Large.imagestack", + "role" : "primary-app-icon" + }, + { + "size" : "400x240", + "idiom" : "tv", + "filename" : "App Icon - Small.imagestack", + "role" : "primary-app-icon" + }, + { + "size" : "1920x720", + "idiom" : "tv", + "filename" : "Top Shelf Image.imageset", + "role" : "top-shelf-image" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json new file mode 100644 index 0000000..0564959 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TSMarkdownParserExample tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json b/TSMarkdownParserExample tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 0000000..29d94c7 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "orientation" : "landscape", + "idiom" : "tv", + "extent" : "full-screen", + "minimum-system-version" : "9.0", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TSMarkdownParserExample tvOS/Base.lproj/Main.storyboard b/TSMarkdownParserExample tvOS/Base.lproj/Main.storyboard new file mode 100644 index 0000000..3e6780b --- /dev/null +++ b/TSMarkdownParserExample tvOS/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TSMarkdownParserExample tvOS/Info.plist b/TSMarkdownParserExample tvOS/Info.plist new file mode 100644 index 0000000..4f33860 --- /dev/null +++ b/TSMarkdownParserExample tvOS/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + arm64 + + + diff --git a/TSMarkdownParserExample tvOS/ViewController.h b/TSMarkdownParserExample tvOS/ViewController.h new file mode 100644 index 0000000..779934e --- /dev/null +++ b/TSMarkdownParserExample tvOS/ViewController.h @@ -0,0 +1,15 @@ +// +// ViewController.h +// TSMarkdownParser tvOS +// +// Created by Antoine Cœur on 3/29/16. +// Copyright © 2016 Computertalk Sweden. All rights reserved. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/TSMarkdownParserExample tvOS/ViewController.m b/TSMarkdownParserExample tvOS/ViewController.m new file mode 100644 index 0000000..fa8f1fe --- /dev/null +++ b/TSMarkdownParserExample tvOS/ViewController.m @@ -0,0 +1,27 @@ +// +// ViewController.m +// TSMarkdownParser tvOS +// +// Created by Antoine Cœur on 3/29/16. +// Copyright © 2016 Computertalk Sweden. All rights reserved. +// + +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/TSMarkdownParserExample tvOS/main.m b/TSMarkdownParserExample tvOS/main.m new file mode 100644 index 0000000..cb2818e --- /dev/null +++ b/TSMarkdownParserExample tvOS/main.m @@ -0,0 +1,16 @@ +// +// main.m +// TSMarkdownParser tvOS +// +// Created by Antoine Cœur on 3/29/16. +// Copyright © 2016 Computertalk Sweden. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +}