Skip to content

Commit

Permalink
Merge pull request #324 from CocoaPods/seg-watchos-tvos-constants
Browse files Browse the repository at this point in the history
Add constants for watchOS and tvOS
  • Loading branch information
segiddins committed Oct 26, 2015
2 parents eedcb65 + 07031f3 commit ea13970
Show file tree
Hide file tree
Showing 116 changed files with 4,373 additions and 841 deletions.
39 changes: 27 additions & 12 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,33 @@ begin
confirm "Make sure you have nothing unsaved there"

targets = {
"Objc_iOS_Native" => { platform: :ios, type: :application, language: :objc, how: "iOS > Master-Detail Application > Language: Objective-C" },
"Swift_iOS_Native" => { platform: :ios, type: :application, language: :swift, how: "iOS > Master-Detail Application > Language: Swift" },
"Objc_iOS_Framework" => { platform: :ios, type: :framework, language: :objc, how: "iOS > Cocoa Touch Framework > Language: Objective-C" },
"Swift_iOS_Framework" => { platform: :ios, type: :framework, language: :swift, how: "iOS > Cocoa Touch Framework > Language: Swift" },
"Objc_iOS_StaticLibrary" => { platform: :ios, type: :static_library, language: :objc, how: "iOS > Cocoa Touch Static Library" },
"Objc_OSX_Native" => { platform: :osx, type: :application, language: :objc, how: "OSX > Cocoa Application > Language: Objective-C" },
"Swift_OSX_Native" => { platform: :osx, type: :application, language: :swift, how: "OSX > Cocoa Application > Language: Swift" },
"Objc_OSX_Framework" => { platform: :osx, type: :framework, language: :objc, how: "OSX > Cocoa Framework > Language: Objective-C" },
"Swift_OSX_Framework" => { platform: :osx, type: :framework, language: :swift, how: "OSX > Cocoa Framework > Language: Swift" },
"Objc_OSX_StaticLibrary" => { platform: :osx, type: :static_library, language: :objc, how: "OSX > Library > Type: Static" },
"Objc_OSX_DynamicLibrary" => { platform: :osx, type: :dynamic_library, language: :objc, how: "OSX > Library > Type: Dynamic" },
"OSX_Bundle" => { platform: :osx, type: :bundle, how: "OSX > Bundle" },
"Objc_iOS_Native" => { platform: :ios, type: :application, language: :objc, how: "iOS > Master-Detail Application > Language: Objective-C" },
"Swift_iOS_Native" => { platform: :ios, type: :application, language: :swift, how: "iOS > Master-Detail Application > Language: Swift" },
"Objc_iOS_Framework" => { platform: :ios, type: :framework, language: :objc, how: "iOS > Cocoa Touch Framework > Language: Objective-C" },
"Swift_iOS_Framework" => { platform: :ios, type: :framework, language: :swift, how: "iOS > Cocoa Touch Framework > Language: Swift" },
"Objc_iOS_StaticLibrary" => { platform: :ios, type: :static_library, language: :objc, how: "iOS > Cocoa Touch Static Library" },

"Objc_OSX_Native" => { platform: :osx, type: :application, language: :objc, how: "OSX > Cocoa Application > Language: Objective-C" },
"Swift_OSX_Native" => { platform: :osx, type: :application, language: :swift, how: "OSX > Cocoa Application > Language: Swift" },
"Objc_OSX_Framework" => { platform: :osx, type: :framework, language: :objc, how: "OSX > Cocoa Framework > Language: Objective-C" },
"Swift_OSX_Framework" => { platform: :osx, type: :framework, language: :swift, how: "OSX > Cocoa Framework > Language: Swift" },
"Objc_OSX_StaticLibrary" => { platform: :osx, type: :static_library, language: :objc, how: "OSX > Library > Type: Static" },
"Objc_OSX_DynamicLibrary" => { platform: :osx, type: :dynamic_library, language: :objc, how: "OSX > Library > Type: Dynamic" },
"OSX_Bundle" => { platform: :osx, type: :bundle, how: "OSX > Bundle" },

"Objc_watchOS_Native" => { platform: :watchos, type: :watch2_app, language: :objc, how: "watchOS > WatchKit App > Language: Objective-C" },
"Objc_watchOS_Native Extension" => { platform: :watchos, type: :watch2_extension, language: :objc, how: "Already done!" },
"Swift_watchOS_Native" => { platform: :watchos, type: :watch2_app, language: :swift, how: "watchOS > WatchKit App > Language: Swift" },
"Swift_watchOS_Native Extension" => { platform: :watchos, type: :watch2_extension, language: :swift, how: "Already done!" },
"Objc_watchOS_Framework" => { platform: :watchos, type: :framework, language: :objc, how: "watchOS > Watch Framework > Language: Objective-C" },
"Swift_watchOS_Framework" => { platform: :watchos, type: :framework, language: :swift, how: "watchOS > Watch Framework > Language: Swift" },
"Objc_watchOS_StaticLibrary" => { platform: :watchos, type: :static_library, language: :objc, how: "watchOS > Watch Static Library > Language: Objective-C" },

"Objc_tvOS_Native" => { platform: :tvos, type: :application, language: :objc, how: "tvOS > Single View Application > Language: Objective-C" },
"Swift_tvOS_Native" => { platform: :tvos, type: :application, language: :swift, how: "tvOS > Single View Application > Language: Swift" },
"Objc_tvOS_Framework" => { platform: :tvos, type: :framework, language: :objc, how: "tvOS > TV Framework > Language: Objective-C" },
"Swift_tvOS_Framework" => { platform: :tvos, type: :framework, language: :swift, how: "tvOS > TV Framework > Language: Swift" },
"Objc_tvOS_StaticLibrary" => { platform: :tvos, type: :static_library, language: :objc, how: "tvOS > TV Static Library > Language: Objective-C" },
}

targets.each do |name, attributes|
Expand Down
30 changes: 30 additions & 0 deletions lib/xcodeproj/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,15 @@ module Constants
'CODE_SIGN_IDENTITY' => '-',
'COMBINE_HIDPI_IMAGES' => 'YES',
}.freeze,
[:watchos, :framework] => {
'APPLICATION_EXTENSION_API_ONLY' => 'YES',
'LD_RUNPATH_SEARCH_PATHS' => ['$(inherited)', '@executable_path/Frameworks', '@loader_path/Frameworks'],
'TARGETED_DEVICE_FAMILY' => '4',
}.freeze,
[:tvos, :framework] => {
'LD_RUNPATH_SEARCH_PATHS' => ['$(inherited)', '@executable_path/Frameworks', '@loader_path/Frameworks'],
'TARGETED_DEVICE_FAMILY' => '3',
}.freeze,
[:framework, :swift] => {
'DEFINES_MODULE' => 'YES',
}.freeze,
Expand All @@ -216,6 +225,14 @@ module Constants
'OTHER_LDFLAGS' => '-ObjC',
'SKIP_INSTALL' => 'YES',
}.freeze,
[:watchos, :static_library] => {
'OTHER_LDFLAGS' => '-ObjC',
'SKIP_INSTALL' => 'YES',
}.freeze,
[:tvos, :static_library] => {
'OTHER_LDFLAGS' => '-ObjC',
'SKIP_INSTALL' => 'YES',
}.freeze,
[:osx, :dynamic_library] => {
'CODE_SIGN_IDENTITY' => '-',
'DYLIB_COMPATIBILITY_VERSION' => '1',
Expand All @@ -235,6 +252,19 @@ module Constants
'CODE_SIGN_IDENTITY' => '-',
'LD_RUNPATH_SEARCH_PATHS' => ['$(inherited)', '@executable_path/../Frameworks'],
}.freeze,
[:watchos, :application] => {
'SKIP_INSTALL' => 'YES',
'TARGETED_DEVICE_FAMILY' => '4',
}.freeze,
[:watchos, :application, :swift] => {
'EMBEDDED_CONTENT_CONTAINS_SWIFT' => 'YES',
}.freeze,
[:tvos, :application] => {
'ASSETCATALOG_COMPILER_APPICON_NAME' => 'App Icon & Top Shelf Image',
'ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME' => 'LaunchImage',
'TARGETED_DEVICE_FAMILY' => '3',
'LD_RUNPATH_SEARCH_PATHS' => ['$(inherited)', '@executable_path/Frameworks'],
}.freeze,
[:bundle] => {
'PRODUCT_NAME' => '$(TARGET_NAME)',
'WRAPPER_EXTENSION' => 'bundle',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// Objc_tvOS_Framework.h
// Objc_tvOS_Framework
//
// Created by Samuel Giddins on 10/24/15.
//
//

#import <UIKit/UIKit.h>

//! Project version number for Objc_tvOS_Framework.
FOUNDATION_EXPORT double Objc_tvOS_FrameworkVersionNumber;

//! Project version string for Objc_tvOS_Framework.
FOUNDATION_EXPORT const unsigned char Objc_tvOS_FrameworkVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <Objc_tvOS_Framework/PublicHeader.h>


Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// AppDelegate.h
// Objc_tvOS_Native
//
// Created by Samuel Giddins on 10/24/15.
//
//

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;


@end

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//
// AppDelegate.m
// Objc_tvOS_Native
//
// Created by Samuel Giddins on 10/24/15.
//
//

#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
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"idiom" : "tv",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"layers" : [
{
"filename" : "Front.imagestacklayer"
},
{
"filename" : "Middle.imagestacklayer"
},
{
"filename" : "Back.imagestacklayer"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"idiom" : "tv",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"idiom" : "tv",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"idiom" : "tv",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"layers" : [
{
"filename" : "Front.imagestacklayer"
},
{
"filename" : "Middle.imagestacklayer"
},
{
"filename" : "Back.imagestacklayer"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"idiom" : "tv",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"idiom" : "tv",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading

0 comments on commit ea13970

Please sign in to comment.