diff options
author | dmaclach <dmaclach@google.com> | 2016-10-07 12:10:23 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2016-10-07 12:21:06 -0400 |
commit | 42124b3691197c3c4f52f069775fa0390a8ff942 (patch) | |
tree | ebd373d398ea64b45bdc1d196fa0a2c5f57cabfd /UnitTesting/GTMIPhoneUnitTestMain.m | |
parent | 57eeab4193210df8ab0c81e9d3f1ee1ad3e24492 (diff) |
First cut at pruning things/updating things.
Remove a bunch of code that Google stopped using/maintaining rather than trying
to update it it. Some would be hard to update, some actually has system provided
replacements; others are patterns that just don't seem as common now.
Prune out the code related to macOS <= 10.5, start pruning some of the really
old iOS support also.
Get the projects mostly limping again with modern Xcodes so tests can be run.
If someone ends up on this commit via history for something they still find
as useful, feel free to do a pull request to bring the snippet of code back to
life and update it for current SDKs.
Diffstat (limited to 'UnitTesting/GTMIPhoneUnitTestMain.m')
-rw-r--r-- | UnitTesting/GTMIPhoneUnitTestMain.m | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/UnitTesting/GTMIPhoneUnitTestMain.m b/UnitTesting/GTMIPhoneUnitTestMain.m index 6bfc711..0a504b7 100644 --- a/UnitTesting/GTMIPhoneUnitTestMain.m +++ b/UnitTesting/GTMIPhoneUnitTestMain.m @@ -22,6 +22,30 @@ #endif #import <UIKit/UIKit.h> +#if GTM_ENABLE_TCCSERVICE_ACCESS + +// Enable access to AddressBook, Calendar and Photos +// https://groups.google.com/forum/#!topic/kif-framework/xayP4VVBPyg + +__asm(".section __TEXT,__entitlements"); +__asm(".ascii \"" + "<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\n" + "<!DOCTYPE plist PUBLIC \\\"-//Apple//DTD PLIST 1.0//EN\\\" " + "\\\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\\\">" + "<plist version=\\\"1.0\\\">" + "<dict>" + "<key>com.apple.private.tcc.allow</key>" + "<array>" + "<string>kTCCServiceAddressBook</string>" + "<string>kTCCServiceCalendar</string>" + "<string>kTCCServicePhotos</string>" + "</array>" + "</dict>" + "</plist>" + "\""); + +#endif // GTM_ENABLE_TCCSERVICE_ACCESS + // Creates an application that runs all tests from classes extending // SenTestCase, outputs results and test run time, and terminates right // afterwards. @@ -32,8 +56,8 @@ int main(int argc, char *argv[]) { #else NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; #endif -#if GTM_IPHONE_USE_SENTEST - // Is using SenTest, just create a dummy app that can be used as the +#if GTM_IPHONE_USE_SENTEST || GTM_USING_XCTEST + // Is using SenTest or XCTest, just create a dummy app that can be used as the // TEST_HOST. retVal = UIApplicationMain(argc, argv, nil, nil); #else |