[add] first
This commit is contained in:
22
Unity-iPhone Tests/Unity-iPhone Tests-Info.plist
Normal file
22
Unity-iPhone Tests/Unity-iPhone Tests-Info.plist
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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>com.unity3d.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
12
Unity-iPhone Tests/Unity-iPhone Tests-Prefix.pch
Normal file
12
Unity-iPhone Tests/Unity-iPhone Tests-Prefix.pch
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// Prefix header
|
||||
//
|
||||
// The contents of this file are implicitly included at the beginning of every source file.
|
||||
//
|
||||
|
||||
#include "Preprocessor.h"
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
37
Unity-iPhone Tests/Unity_iPhone_Tests.m
Normal file
37
Unity-iPhone Tests/Unity_iPhone_Tests.m
Normal file
@@ -0,0 +1,37 @@
|
||||
#import "Preprocessor.h"
|
||||
#import <XCTest/XCTest.h>
|
||||
#include <UnityFramework/UnityFramework.h>
|
||||
|
||||
@interface UnityTest : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation UnityTest
|
||||
|
||||
- (void)testRunUnity
|
||||
{
|
||||
XCTestExpectation *expectation = [self expectationWithDescription: @"testRunUnity"];
|
||||
|
||||
__block bool running = true;
|
||||
|
||||
id<UIApplicationDelegate> delegate = [(UIApplication*)[UIApplication sharedApplication] delegate];
|
||||
[delegate performSelector: @selector(setQuitHandler:) withObject:^{
|
||||
[expectation fulfill];
|
||||
running = false;
|
||||
}];
|
||||
|
||||
// When Apple TV device doesn't have attached monitor or TV it doesn't run display link. So we force
|
||||
// player loop here.
|
||||
#if PLATFORM_TVOS
|
||||
UnityAppController* unityApp = [(UIApplication*)[UIApplication sharedApplication] delegate];
|
||||
while (running)
|
||||
{
|
||||
[unityApp repaint];
|
||||
[[NSRunLoop mainRunLoop] runUntilDate: [NSDate dateWithTimeIntervalSinceNow: 0.001f]];
|
||||
}
|
||||
#endif
|
||||
|
||||
[self waitForExpectationsWithTimeout: 1000000 handler: nil];
|
||||
}
|
||||
|
||||
@end
|
||||
2
Unity-iPhone Tests/en.lproj/InfoPlist.strings
Normal file
2
Unity-iPhone Tests/en.lproj/InfoPlist.strings
Normal file
@@ -0,0 +1,2 @@
|
||||
/* Localized versions of Info.plist keys */
|
||||
|
||||
Reference in New Issue
Block a user