-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added single view application and SpriteKit game template #9
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@interface AppDelegate : UIResponder <UIApplicationDelegate> | ||
|
||
@property (nonatomic, retain) UIWindow *window; | ||
@property (nonatomic, retain) UIViewController *rootViewController; | ||
|
||
@end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#import "AppDelegate.h" | ||
#import "ViewController.h" | ||
|
||
@implementation AppDelegate | ||
|
||
- (void)applicationDidFinishLaunching:(UIApplication *)application { | ||
_window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; | ||
|
||
_rootViewController = [[ViewController alloc] init]; | ||
|
||
_window.rootViewController = _rootViewController; | ||
|
||
|
||
[_window makeKeyAndVisible]; | ||
} | ||
|
||
|
||
@end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
include @@THEOS@@/makefiles/common.mk | ||
|
||
APPLICATION_NAME = @@PROJECTNAME@@ | ||
|
||
@@PROJECTNAME@@_FILES = $(wildcard *.m) | ||
|
||
@@PROJECTNAME@@_FRAMEWORKS = UIKit CoreGraphics | ||
|
||
@@PROJECTNAME@@_CFLAGS = -fobjc-arc | ||
|
||
include $(THEOS_MAKE_PATH)/application.mk | ||
|
||
after-install:: | ||
install.exec "killall \"@@PROJECTNAME@@\"" || true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name "iphone/application_single_view" | ||
|
||
|
||
constrain file "control" to package | ||
constrain "theos" to link_theos |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
<?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>CFBundleExecutable</key> | ||
<string>@@PROJECTNAME@@</string> | ||
<key>CFBundleIcons</key> | ||
<dict> | ||
<key>CFBundlePrimaryIcon</key> | ||
<dict> | ||
<key>CFBundleIconFiles</key> | ||
<array> | ||
<string>AppIcon29x29</string> | ||
<string>AppIcon40x40</string> | ||
<string>AppIcon57x57</string> | ||
<string>AppIcon60x60</string> | ||
</array> | ||
<key>UIPrerenderedIcon</key> | ||
<true/> | ||
</dict> | ||
</dict> | ||
<key>CFBundleIcons~ipad</key> | ||
<dict> | ||
<key>CFBundlePrimaryIcon</key> | ||
<dict> | ||
<key>CFBundleIconFiles</key> | ||
<array> | ||
<string>AppIcon29x29</string> | ||
<string>AppIcon40x40</string> | ||
<string>AppIcon57x57</string> | ||
<string>AppIcon60x60</string> | ||
<string>AppIcon50x50</string> | ||
<string>AppIcon72x72</string> | ||
<string>AppIcon76x76</string> | ||
</array> | ||
<key>UIPrerenderedIcon</key> | ||
<true/> | ||
</dict> | ||
</dict> | ||
<key>CFBundleIdentifier</key> | ||
<string>@@PACKAGENAME@@</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleSupportedPlatforms</key> | ||
<array> | ||
<string>iPhoneOS</string> | ||
</array> | ||
<key>CFBundleVersion</key> | ||
<string>1.0</string> | ||
<key>LSRequiresIPhoneOS</key> | ||
<true/> | ||
<key>UIDeviceFamily</key> | ||
<array> | ||
<integer>1</integer> | ||
<integer>2</integer> | ||
</array> | ||
<key>UIRequiredDeviceCapabilities</key> | ||
<array> | ||
<string>armv7</string> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You might want to add arm64 to the list |
||
</array> | ||
<key>UILaunchImageFile</key> | ||
<string>LaunchImage</string> | ||
<key>UILaunchImages</key> | ||
<array> | ||
<dict> | ||
<key>UILaunchImageMinimumOSVersion</key> | ||
<string>7.0</string> | ||
<key>UILaunchImageName</key> | ||
<string>LaunchImage</string> | ||
<key>UILaunchImageOrientation</key> | ||
<string>Portrait</string> | ||
<key>UILaunchImageSize</key> | ||
<string>{320, 480}</string> | ||
</dict> | ||
<dict> | ||
<key>UILaunchImageMinimumOSVersion</key> | ||
<string>7.0</string> | ||
<key>UILaunchImageName</key> | ||
<string>LaunchImage-700-568h</string> | ||
<key>UILaunchImageOrientation</key> | ||
<string>Portrait</string> | ||
<key>UILaunchImageSize</key> | ||
<string>{320, 568}</string> | ||
</dict> | ||
<dict> | ||
<key>UILaunchImageMinimumOSVersion</key> | ||
<string>7.0</string> | ||
<key>UILaunchImageName</key> | ||
<string>LaunchImage-Portrait</string> | ||
<key>UILaunchImageOrientation</key> | ||
<string>Portrait</string> | ||
<key>UILaunchImageSize</key> | ||
<string>{768, 1024}</string> | ||
</dict> | ||
<dict> | ||
<key>UILaunchImageMinimumOSVersion</key> | ||
<string>7.0</string> | ||
<key>UILaunchImageName</key> | ||
<string>LaunchImage-Landscape</string> | ||
<key>UILaunchImageOrientation</key> | ||
<string>Landscape</string> | ||
<key>UILaunchImageSize</key> | ||
<string>{768, 1024}</string> | ||
</dict> | ||
<dict> | ||
<key>UILaunchImageMinimumOSVersion</key> | ||
<string>8.0</string> | ||
<key>UILaunchImageName</key> | ||
<string>LaunchImage-800-667h</string> | ||
<key>UILaunchImageOrientation</key> | ||
<string>Portrait</string> | ||
<key>UILaunchImageSize</key> | ||
<string>{375, 667}</string> | ||
</dict> | ||
<dict> | ||
<key>UILaunchImageMinimumOSVersion</key> | ||
<string>8.0</string> | ||
<key>UILaunchImageName</key> | ||
<string>LaunchImage-800-Portrait-736h</string> | ||
<key>UILaunchImageOrientation</key> | ||
<string>Portrait</string> | ||
<key>UILaunchImageSize</key> | ||
<string>{414, 736}</string> | ||
</dict> | ||
<dict> | ||
<key>UILaunchImageMinimumOSVersion</key> | ||
<string>8.0</string> | ||
<key>UILaunchImageName</key> | ||
<string>LaunchImage-800-Landscape-736h</string> | ||
<key>UILaunchImageOrientation</key> | ||
<string>Landscape</string> | ||
<key>UILaunchImageSize</key> | ||
<string>{414, 736}</string> | ||
</dict> | ||
</array> | ||
<key>UISupportedInterfaceOrientations</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
<string>UIInterfaceOrientationLandscapeLeft</string> | ||
<string>UIInterfaceOrientationLandscapeRight</string> | ||
</array> | ||
<key>UISupportedInterfaceOrientations~ipad</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
<string>UIInterfaceOrientationPortraitUpsideDown</string> | ||
<string>UIInterfaceOrientationLandscapeLeft</string> | ||
<string>UIInterfaceOrientationLandscapeRight</string> | ||
</array> | ||
</dict> | ||
</plist> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Import UIKit as we no longer do that implicitly |
||
@interface ViewController : UIViewController | ||
|
||
@end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#import "ViewController.h" | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove empty lines |
||
|
||
|
||
|
||
@interface ViewController () | ||
//private interface | ||
|
||
|
||
@end | ||
|
||
|
||
@implementation ViewController { | ||
|
||
} | ||
|
||
- (void)loadView { | ||
[super loadView]; | ||
|
||
|
||
|
||
self.view.backgroundColor = [UIColor whiteColor]; | ||
|
||
|
||
|
||
|
||
} | ||
|
||
- (void)viewDidLoad { | ||
|
||
// do anything after the view loads | ||
|
||
|
||
|
||
} | ||
|
||
|
||
@end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Package: @@PACKAGENAME@@ | ||
Name: @@FULLPROJECTNAME@@ | ||
Version: 0.0.1 | ||
Architecture: iphoneos-arm | ||
Description: An awesome single view application! | ||
Maintainer: @@USER@@ | ||
Author: @@USER@@ | ||
Section: Utilities | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe "Games" section? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#import "AppDelegate.h" | ||
|
||
int main(int argc, char *argv[]) { | ||
@autoreleasepool { | ||
return UIApplicationMain(argc, argv, nil, NSStringFromClass(AppDelegate.class)); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@interface AppDelegate : UIResponder <UIApplicationDelegate> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Import UIKit as we no longer do that implicitly |
||
|
||
@property (nonatomic, retain) UIWindow *window; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Under ARC, wouldn't this be |
||
@property (nonatomic, retain) UIViewController *rootViewController; | ||
|
||
@end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#import "AppDelegate.h" | ||
#import "ViewController.h" | ||
|
||
@implementation AppDelegate | ||
|
||
- (void)applicationDidFinishLaunching:(UIApplication *)application { | ||
_window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; | ||
_rootViewController = [[ViewController alloc] init]; | ||
_window.rootViewController = _rootViewController; | ||
[_window makeKeyAndVisible]; | ||
[application setStatusBarHidden:YES]; | ||
} | ||
/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this commented out code is not necessary to function, please remove it |
||
- (void)dealloc { | ||
[_window release]; | ||
[_rootViewController release]; | ||
[super dealloc]; | ||
} | ||
*/ | ||
|
||
@end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
include @@THEOS@@/makefiles/common.mk | ||
|
||
APPLICATION_NAME = @@PROJECTNAME@@ | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove empty lines 4, 6, 8 |
||
@@PROJECTNAME@@_FILES = $(wildcard *.m) | ||
|
||
@@PROJECTNAME@@_FRAMEWORKS = UIKit CoreGraphics SpriteKit | ||
|
||
@@PROJECTNAME@@_CFLAGS = -fobjc-arc | ||
|
||
|
||
include $(THEOS_MAKE_PATH)/application.mk | ||
|
||
after-install:: | ||
install.exec "killall \"@@PROJECTNAME@@\"" || true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name "iphone/application_spriteKit_game" | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove empty lines 2, 3 |
||
|
||
constrain file "control" to package | ||
constrain "theos" to link_theos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Under ARC, wouldn't this be
strong
?