From 003727746e4b265e8a2d3104624fb3e33fc1c025 Mon Sep 17 00:00:00 2001 From: Engin Kurutepe Date: Tue, 23 Feb 2016 15:00:56 +0100 Subject: [PATCH] Add an example project which tests Carthage build --- examples/CarthageBuildTest/Cartfile | 1 + examples/CarthageBuildTest/Cartfile.resolved | 1 + .../CarthageExample.xcodeproj/project.pbxproj | 349 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../CarthageExample/AppDelegate.h | 17 + .../CarthageExample/AppDelegate.m | 47 +++ .../AppIcon.appiconset/Contents.json | 38 ++ .../Base.lproj/LaunchScreen.storyboard | 27 ++ .../Base.lproj/Main.storyboard | 25 ++ .../CarthageExample/Info.plist | 40 ++ .../CarthageExample/ViewController.h | 15 + .../CarthageExample/ViewController.m | 36 ++ .../CarthageBuildTest/CarthageExample/main.m | 16 + 13 files changed, 619 insertions(+) create mode 100644 examples/CarthageBuildTest/Cartfile create mode 100644 examples/CarthageBuildTest/Cartfile.resolved create mode 100644 examples/CarthageBuildTest/CarthageExample.xcodeproj/project.pbxproj create mode 100644 examples/CarthageBuildTest/CarthageExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 examples/CarthageBuildTest/CarthageExample/AppDelegate.h create mode 100644 examples/CarthageBuildTest/CarthageExample/AppDelegate.m create mode 100644 examples/CarthageBuildTest/CarthageExample/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 examples/CarthageBuildTest/CarthageExample/Base.lproj/LaunchScreen.storyboard create mode 100644 examples/CarthageBuildTest/CarthageExample/Base.lproj/Main.storyboard create mode 100644 examples/CarthageBuildTest/CarthageExample/Info.plist create mode 100644 examples/CarthageBuildTest/CarthageExample/ViewController.h create mode 100644 examples/CarthageBuildTest/CarthageExample/ViewController.m create mode 100644 examples/CarthageBuildTest/CarthageExample/main.m diff --git a/examples/CarthageBuildTest/Cartfile b/examples/CarthageBuildTest/Cartfile new file mode 100644 index 0000000000..aa14143b00 --- /dev/null +++ b/examples/CarthageBuildTest/Cartfile @@ -0,0 +1 @@ +github "facebook/AsyncDisplayKit" "master" diff --git a/examples/CarthageBuildTest/Cartfile.resolved b/examples/CarthageBuildTest/Cartfile.resolved new file mode 100644 index 0000000000..b30ffeb48f --- /dev/null +++ b/examples/CarthageBuildTest/Cartfile.resolved @@ -0,0 +1 @@ +github "facebook/AsyncDisplayKit" "92f87756b3635f59fdd6c9f6c497209e3059ac35" diff --git a/examples/CarthageBuildTest/CarthageExample.xcodeproj/project.pbxproj b/examples/CarthageBuildTest/CarthageExample.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..cffd86f348 --- /dev/null +++ b/examples/CarthageBuildTest/CarthageExample.xcodeproj/project.pbxproj @@ -0,0 +1,349 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 871BB34E1C7C98B1005CF62A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 871BB34D1C7C98B1005CF62A /* main.m */; }; + 871BB3511C7C98B1005CF62A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 871BB3501C7C98B1005CF62A /* AppDelegate.m */; }; + 871BB3541C7C98B1005CF62A /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 871BB3531C7C98B1005CF62A /* ViewController.m */; }; + 871BB3571C7C98B1005CF62A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 871BB3551C7C98B1005CF62A /* Main.storyboard */; }; + 871BB3591C7C98B1005CF62A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 871BB3581C7C98B1005CF62A /* Assets.xcassets */; }; + 871BB35C1C7C98B1005CF62A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 871BB35A1C7C98B1005CF62A /* LaunchScreen.storyboard */; }; + 871BB3651C7C99B0005CF62A /* AsyncDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 871BB3641C7C99B0005CF62A /* AsyncDisplayKit.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 871BB3491C7C98B1005CF62A /* CarthageExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CarthageExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 871BB34D1C7C98B1005CF62A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 871BB34F1C7C98B1005CF62A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 871BB3501C7C98B1005CF62A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 871BB3521C7C98B1005CF62A /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 871BB3531C7C98B1005CF62A /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 871BB3561C7C98B1005CF62A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 871BB3581C7C98B1005CF62A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 871BB35B1C7C98B1005CF62A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 871BB35D1C7C98B1005CF62A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 871BB3641C7C99B0005CF62A /* AsyncDisplayKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AsyncDisplayKit.framework; path = Carthage/Build/iOS/AsyncDisplayKit.framework; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 871BB3461C7C98B1005CF62A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 871BB3651C7C99B0005CF62A /* AsyncDisplayKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 871BB3401C7C98B1005CF62A = { + isa = PBXGroup; + children = ( + 871BB34B1C7C98B1005CF62A /* CarthageExample */, + 871BB34A1C7C98B1005CF62A /* Products */, + ); + sourceTree = ""; + }; + 871BB34A1C7C98B1005CF62A /* Products */ = { + isa = PBXGroup; + children = ( + 871BB3491C7C98B1005CF62A /* CarthageExample.app */, + ); + name = Products; + sourceTree = ""; + }; + 871BB34B1C7C98B1005CF62A /* CarthageExample */ = { + isa = PBXGroup; + children = ( + 871BB34F1C7C98B1005CF62A /* AppDelegate.h */, + 871BB3501C7C98B1005CF62A /* AppDelegate.m */, + 871BB3581C7C98B1005CF62A /* Assets.xcassets */, + 871BB3631C7C9994005CF62A /* Frameworks */, + 871BB35D1C7C98B1005CF62A /* Info.plist */, + 871BB35A1C7C98B1005CF62A /* LaunchScreen.storyboard */, + 871BB3551C7C98B1005CF62A /* Main.storyboard */, + 871BB34C1C7C98B1005CF62A /* Supporting Files */, + 871BB3521C7C98B1005CF62A /* ViewController.h */, + 871BB3531C7C98B1005CF62A /* ViewController.m */, + ); + path = CarthageExample; + sourceTree = ""; + }; + 871BB34C1C7C98B1005CF62A /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 871BB34D1C7C98B1005CF62A /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 871BB3631C7C9994005CF62A /* Frameworks */ = { + isa = PBXGroup; + children = ( + 871BB3641C7C99B0005CF62A /* AsyncDisplayKit.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 871BB3481C7C98B1005CF62A /* CarthageExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 871BB3601C7C98B1005CF62A /* Build configuration list for PBXNativeTarget "CarthageExample" */; + buildPhases = ( + 871BB3451C7C98B1005CF62A /* Sources */, + 871BB3461C7C98B1005CF62A /* Frameworks */, + 871BB3471C7C98B1005CF62A /* Resources */, + 871BB3661C7C99B8005CF62A /* Copy Framworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CarthageExample; + productName = CarthageExample; + productReference = 871BB3491C7C98B1005CF62A /* CarthageExample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 871BB3411C7C98B1005CF62A /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0720; + ORGANIZATIONNAME = "Engin Kurutepe"; + TargetAttributes = { + 871BB3481C7C98B1005CF62A = { + CreatedOnToolsVersion = 7.2.1; + }; + }; + }; + buildConfigurationList = 871BB3441C7C98B1005CF62A /* Build configuration list for PBXProject "CarthageExample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 871BB3401C7C98B1005CF62A; + productRefGroup = 871BB34A1C7C98B1005CF62A /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 871BB3481C7C98B1005CF62A /* CarthageExample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 871BB3471C7C98B1005CF62A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 871BB35C1C7C98B1005CF62A /* LaunchScreen.storyboard in Resources */, + 871BB3591C7C98B1005CF62A /* Assets.xcassets in Resources */, + 871BB3571C7C98B1005CF62A /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 871BB3661C7C99B8005CF62A /* Copy Framworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/Carthage/Build/iOS/AsyncDisplayKit.framework", + ); + name = "Copy Framworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/usr/local/bin/carthage copy-frameworks"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 871BB3451C7C98B1005CF62A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 871BB3541C7C98B1005CF62A /* ViewController.m in Sources */, + 871BB3511C7C98B1005CF62A /* AppDelegate.m in Sources */, + 871BB34E1C7C98B1005CF62A /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 871BB3551C7C98B1005CF62A /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 871BB3561C7C98B1005CF62A /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 871BB35A1C7C98B1005CF62A /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 871BB35B1C7C98B1005CF62A /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 871BB35E1C7C98B1005CF62A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 871BB35F1C7C98B1005CF62A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 871BB3611C7C98B1005CF62A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + INFOPLIST_FILE = CarthageExample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.asyncdisplaykit.CarthageExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 871BB3621C7C98B1005CF62A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + INFOPLIST_FILE = CarthageExample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.asyncdisplaykit.CarthageExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 871BB3441C7C98B1005CF62A /* Build configuration list for PBXProject "CarthageExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 871BB35E1C7C98B1005CF62A /* Debug */, + 871BB35F1C7C98B1005CF62A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 871BB3601C7C98B1005CF62A /* Build configuration list for PBXNativeTarget "CarthageExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 871BB3611C7C98B1005CF62A /* Debug */, + 871BB3621C7C98B1005CF62A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 871BB3411C7C98B1005CF62A /* Project object */; +} diff --git a/examples/CarthageBuildTest/CarthageExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/CarthageBuildTest/CarthageExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..ef35de35d9 --- /dev/null +++ b/examples/CarthageBuildTest/CarthageExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/examples/CarthageBuildTest/CarthageExample/AppDelegate.h b/examples/CarthageBuildTest/CarthageExample/AppDelegate.h new file mode 100644 index 0000000000..6f3bc417f3 --- /dev/null +++ b/examples/CarthageBuildTest/CarthageExample/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// CarthageExample +// +// Created by Engin Kurutepe on 23/02/16. +// Copyright © 2016 Engin Kurutepe. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/examples/CarthageBuildTest/CarthageExample/AppDelegate.m b/examples/CarthageBuildTest/CarthageExample/AppDelegate.m new file mode 100644 index 0000000000..225a9f70b1 --- /dev/null +++ b/examples/CarthageBuildTest/CarthageExample/AppDelegate.m @@ -0,0 +1,47 @@ +// +// AppDelegate.m +// CarthageExample +// +// Created by Engin Kurutepe on 23/02/16. +// Copyright © 2016 Engin Kurutepe. All rights reserved. +// + +@import AsyncDisplayKit; + +#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/examples/CarthageBuildTest/CarthageExample/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/CarthageBuildTest/CarthageExample/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..118c98f746 --- /dev/null +++ b/examples/CarthageBuildTest/CarthageExample/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/CarthageBuildTest/CarthageExample/Base.lproj/LaunchScreen.storyboard b/examples/CarthageBuildTest/CarthageExample/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..2e721e1833 --- /dev/null +++ b/examples/CarthageBuildTest/CarthageExample/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/CarthageBuildTest/CarthageExample/Base.lproj/Main.storyboard b/examples/CarthageBuildTest/CarthageExample/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..f56d2f3bb5 --- /dev/null +++ b/examples/CarthageBuildTest/CarthageExample/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/CarthageBuildTest/CarthageExample/Info.plist b/examples/CarthageBuildTest/CarthageExample/Info.plist new file mode 100644 index 0000000000..6905cc67bb --- /dev/null +++ b/examples/CarthageBuildTest/CarthageExample/Info.plist @@ -0,0 +1,40 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/examples/CarthageBuildTest/CarthageExample/ViewController.h b/examples/CarthageBuildTest/CarthageExample/ViewController.h new file mode 100644 index 0000000000..4cf7ecbc3e --- /dev/null +++ b/examples/CarthageBuildTest/CarthageExample/ViewController.h @@ -0,0 +1,15 @@ +// +// ViewController.h +// CarthageExample +// +// Created by Engin Kurutepe on 23/02/16. +// Copyright © 2016 Engin Kurutepe. All rights reserved. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/examples/CarthageBuildTest/CarthageExample/ViewController.m b/examples/CarthageBuildTest/CarthageExample/ViewController.m new file mode 100644 index 0000000000..a65c7f7d6e --- /dev/null +++ b/examples/CarthageBuildTest/CarthageExample/ViewController.m @@ -0,0 +1,36 @@ +// +// ViewController.m +// CarthageExample +// +// Created by Engin Kurutepe on 23/02/16. +// Copyright © 2016 Engin Kurutepe. All rights reserved. +// + +@import AsyncDisplayKit; + +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + + CGSize screenSize = self.view.bounds.size; + + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + ASTextNode *node = [[ASTextNode alloc] init]; + node.attributedString = [[NSAttributedString alloc] initWithString:@"hello world"]; + [node measure:(CGSize){.width = screenSize.width, .height = CGFLOAT_MAX}]; + node.frame = (CGRect) {.origin = (CGPoint){.x = 100, .y = 100}, .size = node.calculatedSize }; + + dispatch_async(dispatch_get_main_queue(), ^{ + [self.view addSubview:node.view]; + }); + }); +} + +@end diff --git a/examples/CarthageBuildTest/CarthageExample/main.m b/examples/CarthageBuildTest/CarthageExample/main.m new file mode 100644 index 0000000000..e37b278758 --- /dev/null +++ b/examples/CarthageBuildTest/CarthageExample/main.m @@ -0,0 +1,16 @@ +// +// main.m +// CarthageExample +// +// Created by Engin Kurutepe on 23/02/16. +// Copyright © 2016 Engin Kurutepe. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +}