seq_test.go 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010
  1. // Copyright 2015 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package objc
  5. import (
  6. "flag"
  7. "fmt"
  8. "io"
  9. "io/ioutil"
  10. "log"
  11. "os"
  12. "os/exec"
  13. "path/filepath"
  14. "runtime"
  15. "strings"
  16. "testing"
  17. )
  18. // Use the Xcode XCTestCase framework to run the regular tests and the special SeqBench.m benchmarks.
  19. //
  20. // Regular tests run in the xcodetest project as normal unit test (logic test in Xcode lingo).
  21. // Unit tests execute faster but cannot run on a real device. The benchmarks in SeqBench.m run as
  22. // UI unit tests.
  23. //
  24. // The Xcode files embedded in this file were constructed in Xcode 9 by:
  25. //
  26. // - Creating a new project through Xcode. Both unit tests and UI tests were checked off.
  27. // - Xcode schemes are per-user by default. The shared scheme is created by selecting
  28. // Project => Schemes => Manage Schemes from the Xcode menu and selecting "Shared".
  29. // - Remove files not needed for xcodebuild (determined empirically). In particular, the empty
  30. // tests Xcode creates can be removed and the unused user scheme.
  31. //
  32. // All tests here require the Xcode command line tools.
  33. var destination = flag.String("device", "platform=iOS Simulator,name=iPhone 6s Plus", "Specify the -destination flag to xcodebuild")
  34. var gomobileBin string
  35. func TestMain(m *testing.M) {
  36. os.Exit(testMain(m))
  37. }
  38. func testMain(m *testing.M) int {
  39. binDir, err := ioutil.TempDir("", "bind-objc-test-")
  40. if err != nil {
  41. log.Fatal(err)
  42. }
  43. defer os.RemoveAll(binDir)
  44. exe := ""
  45. if runtime.GOOS == "windows" {
  46. exe = ".exe"
  47. }
  48. if runtime.GOOS != "android" {
  49. gocmd := filepath.Join(runtime.GOROOT(), "bin", "go")
  50. gomobileBin = filepath.Join(binDir, "gomobile"+exe)
  51. gobindBin := filepath.Join(binDir, "gobind"+exe)
  52. if out, err := exec.Command(gocmd, "build", "-o", gomobileBin, "golang.org/x/mobile/cmd/gomobile").CombinedOutput(); err != nil {
  53. log.Fatalf("gomobile build failed: %v: %s", err, out)
  54. }
  55. if out, err := exec.Command(gocmd, "build", "-o", gobindBin, "golang.org/x/mobile/cmd/gobind").CombinedOutput(); err != nil {
  56. log.Fatalf("gobind build failed: %v: %s", err, out)
  57. }
  58. path := binDir
  59. if oldPath := os.Getenv("PATH"); oldPath != "" {
  60. path += string(filepath.ListSeparator) + oldPath
  61. }
  62. os.Setenv("PATH", path)
  63. }
  64. return m.Run()
  65. }
  66. // TestObjcSeqTest runs ObjC test SeqTest.m.
  67. func TestObjcSeqTest(t *testing.T) {
  68. runTest(t, []string{
  69. "golang.org/x/mobile/bind/testdata/testpkg",
  70. "golang.org/x/mobile/bind/testdata/testpkg/secondpkg",
  71. "golang.org/x/mobile/bind/testdata/testpkg/simplepkg",
  72. }, "", "SeqTest.m", "Testpkg.framework", false, false)
  73. }
  74. // TestObjcSeqBench runs ObjC test SeqBench.m.
  75. func TestObjcSeqBench(t *testing.T) {
  76. if testing.Short() {
  77. t.Skip("skipping benchmark in short mode.")
  78. }
  79. runTest(t, []string{"golang.org/x/mobile/bind/testdata/benchmark"}, "", "SeqBench.m", "Benchmark.framework", true, true)
  80. }
  81. // TestObjcSeqWrappers runs ObjC test SeqWrappers.m.
  82. func TestObjcSeqWrappers(t *testing.T) {
  83. runTest(t, []string{"golang.org/x/mobile/bind/testdata/testpkg/objcpkg"}, "", "SeqWrappers.m", "Objcpkg.framework", false, false)
  84. }
  85. // TestObjcCustomPkg runs the ObjC test SeqCustom.m.
  86. func TestObjcCustomPkg(t *testing.T) {
  87. runTest(t, []string{"golang.org/x/mobile/bind/testdata/testpkg"}, "Custom", "SeqCustom.m", "Testpkg.framework", false, false)
  88. }
  89. func runTest(t *testing.T, pkgNames []string, prefix, testfile, framework string, uitest, dumpOutput bool) {
  90. if gomobileBin == "" {
  91. t.Skipf("no gomobile on %s", runtime.GOOS)
  92. }
  93. if _, err := run("which xcodebuild"); err != nil {
  94. t.Skip("command xcodebuild not found, skipping")
  95. }
  96. tmpdir, err := ioutil.TempDir("", "bind-objc-seq-test-")
  97. if err != nil {
  98. t.Fatalf("failed to prepare temp dir: %v", err)
  99. }
  100. defer os.RemoveAll(tmpdir)
  101. t.Logf("tmpdir = %s", tmpdir)
  102. if err := createProject(tmpdir, testfile, framework); err != nil {
  103. t.Fatalf("failed to create project: %v", err)
  104. }
  105. if err := cp(filepath.Join(tmpdir, testfile), testfile); err != nil {
  106. t.Fatalf("failed to copy %s: %v", testfile, err)
  107. }
  108. cmd := exec.Command(gomobileBin, "bind", "-target", "ios", "-tags", "aaa bbb")
  109. if prefix != "" {
  110. cmd.Args = append(cmd.Args, "-prefix", prefix)
  111. }
  112. cmd.Args = append(cmd.Args, pkgNames...)
  113. cmd.Dir = filepath.Join(tmpdir, "xcodetest")
  114. // Reverse binding doesn't work with Go module since imports starting with Java or ObjC are not valid FQDNs.
  115. // Disable Go module explicitly until this problem is solved. See golang/go#27234.
  116. cmd.Env = append(os.Environ(), "GO111MODULE=off")
  117. buf, err := cmd.CombinedOutput()
  118. if err != nil {
  119. t.Logf("%s", buf)
  120. t.Fatalf("failed to run gomobile bind: %v", err)
  121. }
  122. testPattern := "xcodetestTests"
  123. if uitest {
  124. testPattern = "xcodetestUITests"
  125. }
  126. cmd = exec.Command("xcodebuild", "test", "-scheme", "xcodetest", "-destination", *destination, "-only-testing:"+testPattern)
  127. cmd.Dir = tmpdir
  128. buf, err = cmd.CombinedOutput()
  129. if err != nil {
  130. t.Logf("%s", buf)
  131. t.Errorf("failed to run xcodebuild: %v", err)
  132. }
  133. if dumpOutput {
  134. t.Logf("%s", buf)
  135. }
  136. }
  137. func run(cmd string) ([]byte, error) {
  138. c := strings.Split(cmd, " ")
  139. return exec.Command(c[0], c[1:]...).CombinedOutput()
  140. }
  141. func cp(dst, src string) error {
  142. r, err := os.Open(src)
  143. if err != nil {
  144. return fmt.Errorf("failed to read source: %v", err)
  145. }
  146. defer r.Close()
  147. w, err := os.Create(dst)
  148. if err != nil {
  149. return fmt.Errorf("failed to open destination: %v", err)
  150. }
  151. _, err = io.Copy(w, r)
  152. cerr := w.Close()
  153. if err != nil {
  154. return err
  155. }
  156. return cerr
  157. }
  158. // createProject generates the files required for xcodebuild test to run a
  159. // Objective-C testfile with a gomobile bind framework.
  160. func createProject(dir, testfile, framework string) error {
  161. for _, d := range []string{"xcodetest", "xcodetest.xcodeproj/xcshareddata/xcschemes", "xcodetestTests", "xcodetestUITests"} {
  162. if err := os.MkdirAll(filepath.Join(dir, d), 0700); err != nil {
  163. return err
  164. }
  165. }
  166. files := []struct {
  167. path string
  168. content string
  169. }{
  170. {"xcodetest/Info.plist", infoPlist},
  171. {"xcodetest.xcodeproj/project.pbxproj", fmt.Sprintf(pbxproj, testfile, framework)},
  172. {"xcodetest.xcodeproj/xcshareddata/xcschemes/xcodetest.xcscheme", xcodescheme},
  173. {"xcodetestTests/Info.plist", testInfoPlist},
  174. // For UI tests. Only UI tests run on a real idevice.
  175. {"xcodetestUITests/Info.plist", testInfoPlist},
  176. {"xcodetest/AppDelegate.h", appdelegateh},
  177. {"xcodetest/main.m", mainm},
  178. {"xcodetest/AppDelegate.m", appdelegatem},
  179. }
  180. for _, f := range files {
  181. if err := ioutil.WriteFile(filepath.Join(dir, f.path), []byte(f.content), 0700); err != nil {
  182. return err
  183. }
  184. }
  185. return nil
  186. }
  187. const infoPlist = `<?xml version="1.0" encoding="UTF-8"?>
  188. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  189. <plist version="1.0">
  190. <dict>
  191. <key>CFBundleDevelopmentRegion</key>
  192. <string>en</string>
  193. <key>CFBundleExecutable</key>
  194. <string>$(EXECUTABLE_NAME)</string>
  195. <key>CFBundleIdentifier</key>
  196. <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
  197. <key>CFBundleInfoDictionaryVersion</key>
  198. <string>6.0</string>
  199. <key>CFBundleName</key>
  200. <string>$(PRODUCT_NAME)</string>
  201. <key>CFBundlePackageType</key>
  202. <string>APPL</string>
  203. <key>CFBundleShortVersionString</key>
  204. <string>1.0</string>
  205. <key>CFBundleSignature</key>
  206. <string>????</string>
  207. <key>CFBundleVersion</key>
  208. <string>1</string>
  209. <key>LSRequiresIPhoneOS</key>
  210. <true/>
  211. <key>UIRequiredDeviceCapabilities</key>
  212. <array>
  213. <string>armv7</string>
  214. </array>
  215. <key>UISupportedInterfaceOrientations</key>
  216. <array>
  217. <string>UIInterfaceOrientationPortrait</string>
  218. <string>UIInterfaceOrientationLandscapeLeft</string>
  219. <string>UIInterfaceOrientationLandscapeRight</string>
  220. </array>
  221. <key>UISupportedInterfaceOrientations~ipad</key>
  222. <array>
  223. <string>UIInterfaceOrientationPortrait</string>
  224. <string>UIInterfaceOrientationPortraitUpsideDown</string>
  225. <string>UIInterfaceOrientationLandscapeLeft</string>
  226. <string>UIInterfaceOrientationLandscapeRight</string>
  227. </array>
  228. </dict>
  229. </plist>`
  230. const testInfoPlist = `<?xml version="1.0" encoding="UTF-8"?>
  231. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  232. <plist version="1.0">
  233. <dict>
  234. <key>CFBundleDevelopmentRegion</key>
  235. <string>en</string>
  236. <key>CFBundleExecutable</key>
  237. <string>$(EXECUTABLE_NAME)</string>
  238. <key>CFBundleIdentifier</key>
  239. <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
  240. <key>CFBundleInfoDictionaryVersion</key>
  241. <string>6.0</string>
  242. <key>CFBundleName</key>
  243. <string>$(PRODUCT_NAME)</string>
  244. <key>CFBundlePackageType</key>
  245. <string>BNDL</string>
  246. <key>CFBundleShortVersionString</key>
  247. <string>1.0</string>
  248. <key>CFBundleSignature</key>
  249. <string>????</string>
  250. <key>CFBundleVersion</key>
  251. <string>1</string>
  252. </dict>
  253. </plist>`
  254. const pbxproj = `// !$*UTF8*$!
  255. {
  256. archiveVersion = 1;
  257. classes = {
  258. };
  259. objectVersion = 50;
  260. objects = {
  261. /* Begin PBXBuildFile section */
  262. 642D058D2094883B00FE587C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 642D058C2094883B00FE587C /* AppDelegate.m */; };
  263. 642D05952094883C00FE587C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 642D05942094883C00FE587C /* Assets.xcassets */; };
  264. 642D059B2094883C00FE587C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 642D059A2094883C00FE587C /* main.m */; };
  265. 642D05A52094883C00FE587C /* xcodetestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 642D05A42094883C00FE587C /* xcodetestTests.m */; };
  266. 642D05B02094883C00FE587C /* xcodetestUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 642D05AF2094883C00FE587C /* xcodetestUITests.m */; };
  267. 642D05BE209488E400FE587C /* Testpkg.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 642D05BD209488E400FE587C /* Testpkg.framework */; };
  268. 642D05BF209488E400FE587C /* Testpkg.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 642D05BD209488E400FE587C /* Testpkg.framework */; };
  269. 642D05C0209488E400FE587C /* Testpkg.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 642D05BD209488E400FE587C /* Testpkg.framework */; };
  270. /* End PBXBuildFile section */
  271. /* Begin PBXContainerItemProxy section */
  272. 642D05A12094883C00FE587C /* PBXContainerItemProxy */ = {
  273. isa = PBXContainerItemProxy;
  274. containerPortal = 642D05802094883B00FE587C /* Project object */;
  275. proxyType = 1;
  276. remoteGlobalIDString = 642D05872094883B00FE587C;
  277. remoteInfo = xcodetest;
  278. };
  279. 642D05AC2094883C00FE587C /* PBXContainerItemProxy */ = {
  280. isa = PBXContainerItemProxy;
  281. containerPortal = 642D05802094883B00FE587C /* Project object */;
  282. proxyType = 1;
  283. remoteGlobalIDString = 642D05872094883B00FE587C;
  284. remoteInfo = xcodetest;
  285. };
  286. /* End PBXContainerItemProxy section */
  287. /* Begin PBXFileReference section */
  288. 642D05882094883B00FE587C /* xcodetest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = xcodetest.app; sourceTree = BUILT_PRODUCTS_DIR; };
  289. 642D058B2094883B00FE587C /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
  290. 642D058C2094883B00FE587C /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
  291. 642D05942094883C00FE587C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
  292. 642D05992094883C00FE587C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
  293. 642D059A2094883C00FE587C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
  294. 642D05A02094883C00FE587C /* xcodetestTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = xcodetestTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
  295. 642D05A42094883C00FE587C /* xcodetestTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ../%[1]s; sourceTree = "<group>"; };
  296. 642D05A62094883C00FE587C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
  297. 642D05AB2094883C00FE587C /* xcodetestUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = xcodetestUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
  298. 642D05AF2094883C00FE587C /* xcodetestUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ../%[1]s; sourceTree = "<group>"; };
  299. 642D05B12094883C00FE587C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
  300. 642D05BD209488E400FE587C /* Testpkg.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Testpkg.framework; path = %[2]s; sourceTree = "<group>"; };
  301. /* End PBXFileReference section */
  302. /* Begin PBXFrameworksBuildPhase section */
  303. 642D05852094883B00FE587C /* Frameworks */ = {
  304. isa = PBXFrameworksBuildPhase;
  305. buildActionMask = 2147483647;
  306. files = (
  307. 642D05BE209488E400FE587C /* Testpkg.framework in Frameworks */,
  308. );
  309. runOnlyForDeploymentPostprocessing = 0;
  310. };
  311. 642D059D2094883C00FE587C /* Frameworks */ = {
  312. isa = PBXFrameworksBuildPhase;
  313. buildActionMask = 2147483647;
  314. files = (
  315. 642D05BF209488E400FE587C /* Testpkg.framework in Frameworks */,
  316. );
  317. runOnlyForDeploymentPostprocessing = 0;
  318. };
  319. 642D05A82094883C00FE587C /* Frameworks */ = {
  320. isa = PBXFrameworksBuildPhase;
  321. buildActionMask = 2147483647;
  322. files = (
  323. 642D05C0209488E400FE587C /* Testpkg.framework in Frameworks */,
  324. );
  325. runOnlyForDeploymentPostprocessing = 0;
  326. };
  327. /* End PBXFrameworksBuildPhase section */
  328. /* Begin PBXGroup section */
  329. 642D057F2094883B00FE587C = {
  330. isa = PBXGroup;
  331. children = (
  332. 642D058A2094883B00FE587C /* xcodetest */,
  333. 642D05A32094883C00FE587C /* xcodetestTests */,
  334. 642D05AE2094883C00FE587C /* xcodetestUITests */,
  335. 642D05892094883B00FE587C /* Products */,
  336. 642D05BD209488E400FE587C /* Testpkg.framework */,
  337. );
  338. sourceTree = "<group>";
  339. };
  340. 642D05892094883B00FE587C /* Products */ = {
  341. isa = PBXGroup;
  342. children = (
  343. 642D05882094883B00FE587C /* xcodetest.app */,
  344. 642D05A02094883C00FE587C /* xcodetestTests.xctest */,
  345. 642D05AB2094883C00FE587C /* xcodetestUITests.xctest */,
  346. );
  347. name = Products;
  348. sourceTree = "<group>";
  349. };
  350. 642D058A2094883B00FE587C /* xcodetest */ = {
  351. isa = PBXGroup;
  352. children = (
  353. 642D058B2094883B00FE587C /* AppDelegate.h */,
  354. 642D058C2094883B00FE587C /* AppDelegate.m */,
  355. 642D05942094883C00FE587C /* Assets.xcassets */,
  356. 642D05992094883C00FE587C /* Info.plist */,
  357. 642D059A2094883C00FE587C /* main.m */,
  358. );
  359. path = xcodetest;
  360. sourceTree = "<group>";
  361. };
  362. 642D05A32094883C00FE587C /* xcodetestTests */ = {
  363. isa = PBXGroup;
  364. children = (
  365. 642D05A42094883C00FE587C /* xcodetestTests.m */,
  366. 642D05A62094883C00FE587C /* Info.plist */,
  367. );
  368. path = xcodetestTests;
  369. sourceTree = "<group>";
  370. };
  371. 642D05AE2094883C00FE587C /* xcodetestUITests */ = {
  372. isa = PBXGroup;
  373. children = (
  374. 642D05AF2094883C00FE587C /* xcodetestUITests.m */,
  375. 642D05B12094883C00FE587C /* Info.plist */,
  376. );
  377. path = xcodetestUITests;
  378. sourceTree = "<group>";
  379. };
  380. /* End PBXGroup section */
  381. /* Begin PBXNativeTarget section */
  382. 642D05872094883B00FE587C /* xcodetest */ = {
  383. isa = PBXNativeTarget;
  384. buildConfigurationList = 642D05B42094883C00FE587C /* Build configuration list for PBXNativeTarget "xcodetest" */;
  385. buildPhases = (
  386. 642D05842094883B00FE587C /* Sources */,
  387. 642D05852094883B00FE587C /* Frameworks */,
  388. 642D05862094883B00FE587C /* Resources */,
  389. );
  390. buildRules = (
  391. );
  392. dependencies = (
  393. );
  394. name = xcodetest;
  395. productName = xcodetest;
  396. productReference = 642D05882094883B00FE587C /* xcodetest.app */;
  397. productType = "com.apple.product-type.application";
  398. };
  399. 642D059F2094883C00FE587C /* xcodetestTests */ = {
  400. isa = PBXNativeTarget;
  401. buildConfigurationList = 642D05B72094883C00FE587C /* Build configuration list for PBXNativeTarget "xcodetestTests" */;
  402. buildPhases = (
  403. 642D059C2094883C00FE587C /* Sources */,
  404. 642D059D2094883C00FE587C /* Frameworks */,
  405. 642D059E2094883C00FE587C /* Resources */,
  406. );
  407. buildRules = (
  408. );
  409. dependencies = (
  410. 642D05A22094883C00FE587C /* PBXTargetDependency */,
  411. );
  412. name = xcodetestTests;
  413. productName = xcodetestTests;
  414. productReference = 642D05A02094883C00FE587C /* xcodetestTests.xctest */;
  415. productType = "com.apple.product-type.bundle.unit-test";
  416. };
  417. 642D05AA2094883C00FE587C /* xcodetestUITests */ = {
  418. isa = PBXNativeTarget;
  419. buildConfigurationList = 642D05BA2094883C00FE587C /* Build configuration list for PBXNativeTarget "xcodetestUITests" */;
  420. buildPhases = (
  421. 642D05A72094883C00FE587C /* Sources */,
  422. 642D05A82094883C00FE587C /* Frameworks */,
  423. 642D05A92094883C00FE587C /* Resources */,
  424. );
  425. buildRules = (
  426. );
  427. dependencies = (
  428. 642D05AD2094883C00FE587C /* PBXTargetDependency */,
  429. );
  430. name = xcodetestUITests;
  431. productName = xcodetestUITests;
  432. productReference = 642D05AB2094883C00FE587C /* xcodetestUITests.xctest */;
  433. productType = "com.apple.product-type.bundle.ui-testing";
  434. };
  435. /* End PBXNativeTarget section */
  436. /* Begin PBXProject section */
  437. 642D05802094883B00FE587C /* Project object */ = {
  438. isa = PBXProject;
  439. attributes = {
  440. LastUpgradeCheck = 0930;
  441. ORGANIZATIONNAME = golang;
  442. TargetAttributes = {
  443. 642D05872094883B00FE587C = {
  444. CreatedOnToolsVersion = 9.3;
  445. };
  446. 642D059F2094883C00FE587C = {
  447. CreatedOnToolsVersion = 9.3;
  448. TestTargetID = 642D05872094883B00FE587C;
  449. };
  450. 642D05AA2094883C00FE587C = {
  451. CreatedOnToolsVersion = 9.3;
  452. TestTargetID = 642D05872094883B00FE587C;
  453. };
  454. };
  455. };
  456. buildConfigurationList = 642D05832094883B00FE587C /* Build configuration list for PBXProject "xcodetest" */;
  457. compatibilityVersion = "Xcode 9.3";
  458. developmentRegion = en;
  459. hasScannedForEncodings = 0;
  460. knownRegions = (
  461. en,
  462. Base,
  463. );
  464. mainGroup = 642D057F2094883B00FE587C;
  465. productRefGroup = 642D05892094883B00FE587C /* Products */;
  466. projectDirPath = "";
  467. projectRoot = "";
  468. targets = (
  469. 642D05872094883B00FE587C /* xcodetest */,
  470. 642D059F2094883C00FE587C /* xcodetestTests */,
  471. 642D05AA2094883C00FE587C /* xcodetestUITests */,
  472. );
  473. };
  474. /* End PBXProject section */
  475. /* Begin PBXResourcesBuildPhase section */
  476. 642D05862094883B00FE587C /* Resources */ = {
  477. isa = PBXResourcesBuildPhase;
  478. buildActionMask = 2147483647;
  479. files = (
  480. 642D05952094883C00FE587C /* Assets.xcassets in Resources */,
  481. );
  482. runOnlyForDeploymentPostprocessing = 0;
  483. };
  484. 642D059E2094883C00FE587C /* Resources */ = {
  485. isa = PBXResourcesBuildPhase;
  486. buildActionMask = 2147483647;
  487. files = (
  488. );
  489. runOnlyForDeploymentPostprocessing = 0;
  490. };
  491. 642D05A92094883C00FE587C /* Resources */ = {
  492. isa = PBXResourcesBuildPhase;
  493. buildActionMask = 2147483647;
  494. files = (
  495. );
  496. runOnlyForDeploymentPostprocessing = 0;
  497. };
  498. /* End PBXResourcesBuildPhase section */
  499. /* Begin PBXSourcesBuildPhase section */
  500. 642D05842094883B00FE587C /* Sources */ = {
  501. isa = PBXSourcesBuildPhase;
  502. buildActionMask = 2147483647;
  503. files = (
  504. 642D059B2094883C00FE587C /* main.m in Sources */,
  505. 642D058D2094883B00FE587C /* AppDelegate.m in Sources */,
  506. );
  507. runOnlyForDeploymentPostprocessing = 0;
  508. };
  509. 642D059C2094883C00FE587C /* Sources */ = {
  510. isa = PBXSourcesBuildPhase;
  511. buildActionMask = 2147483647;
  512. files = (
  513. 642D05A52094883C00FE587C /* xcodetestTests.m in Sources */,
  514. );
  515. runOnlyForDeploymentPostprocessing = 0;
  516. };
  517. 642D05A72094883C00FE587C /* Sources */ = {
  518. isa = PBXSourcesBuildPhase;
  519. buildActionMask = 2147483647;
  520. files = (
  521. 642D05B02094883C00FE587C /* xcodetestUITests.m in Sources */,
  522. );
  523. runOnlyForDeploymentPostprocessing = 0;
  524. };
  525. /* End PBXSourcesBuildPhase section */
  526. /* Begin PBXTargetDependency section */
  527. 642D05A22094883C00FE587C /* PBXTargetDependency */ = {
  528. isa = PBXTargetDependency;
  529. target = 642D05872094883B00FE587C /* xcodetest */;
  530. targetProxy = 642D05A12094883C00FE587C /* PBXContainerItemProxy */;
  531. };
  532. 642D05AD2094883C00FE587C /* PBXTargetDependency */ = {
  533. isa = PBXTargetDependency;
  534. target = 642D05872094883B00FE587C /* xcodetest */;
  535. targetProxy = 642D05AC2094883C00FE587C /* PBXContainerItemProxy */;
  536. };
  537. /* End PBXTargetDependency section */
  538. /* Begin XCBuildConfiguration section */
  539. 642D05B22094883C00FE587C /* Debug */ = {
  540. isa = XCBuildConfiguration;
  541. buildSettings = {
  542. ALWAYS_SEARCH_USER_PATHS = NO;
  543. CLANG_ANALYZER_NONNULL = YES;
  544. CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
  545. CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
  546. CLANG_CXX_LIBRARY = "libc++";
  547. CLANG_ENABLE_MODULES = YES;
  548. CLANG_ENABLE_OBJC_ARC = YES;
  549. CLANG_ENABLE_OBJC_WEAK = YES;
  550. CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
  551. CLANG_WARN_BOOL_CONVERSION = YES;
  552. CLANG_WARN_COMMA = YES;
  553. CLANG_WARN_CONSTANT_CONVERSION = YES;
  554. CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
  555. CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
  556. CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
  557. CLANG_WARN_EMPTY_BODY = YES;
  558. CLANG_WARN_ENUM_CONVERSION = YES;
  559. CLANG_WARN_INFINITE_RECURSION = YES;
  560. CLANG_WARN_INT_CONVERSION = YES;
  561. CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
  562. CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
  563. CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
  564. CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
  565. CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
  566. CLANG_WARN_STRICT_PROTOTYPES = YES;
  567. CLANG_WARN_SUSPICIOUS_MOVE = YES;
  568. CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
  569. CLANG_WARN_UNREACHABLE_CODE = YES;
  570. CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
  571. CODE_SIGN_IDENTITY = "Apple Development";
  572. COPY_PHASE_STRIP = NO;
  573. DEBUG_INFORMATION_FORMAT = dwarf;
  574. ENABLE_STRICT_OBJC_MSGSEND = YES;
  575. ENABLE_TESTABILITY = YES;
  576. GCC_C_LANGUAGE_STANDARD = gnu11;
  577. GCC_DYNAMIC_NO_PIC = NO;
  578. GCC_NO_COMMON_BLOCKS = YES;
  579. GCC_OPTIMIZATION_LEVEL = 0;
  580. GCC_PREPROCESSOR_DEFINITIONS = (
  581. "DEBUG=1",
  582. "$(inherited)",
  583. );
  584. GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
  585. GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
  586. GCC_WARN_UNDECLARED_SELECTOR = YES;
  587. GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
  588. GCC_WARN_UNUSED_FUNCTION = YES;
  589. GCC_WARN_UNUSED_VARIABLE = YES;
  590. IPHONEOS_DEPLOYMENT_TARGET = 11.3;
  591. MTL_ENABLE_DEBUG_INFO = YES;
  592. ONLY_ACTIVE_ARCH = YES;
  593. SDKROOT = iphoneos;
  594. };
  595. name = Debug;
  596. };
  597. 642D05B32094883C00FE587C /* Release */ = {
  598. isa = XCBuildConfiguration;
  599. buildSettings = {
  600. ALWAYS_SEARCH_USER_PATHS = NO;
  601. CLANG_ANALYZER_NONNULL = YES;
  602. CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
  603. CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
  604. CLANG_CXX_LIBRARY = "libc++";
  605. CLANG_ENABLE_MODULES = YES;
  606. CLANG_ENABLE_OBJC_ARC = YES;
  607. CLANG_ENABLE_OBJC_WEAK = YES;
  608. CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
  609. CLANG_WARN_BOOL_CONVERSION = YES;
  610. CLANG_WARN_COMMA = YES;
  611. CLANG_WARN_CONSTANT_CONVERSION = YES;
  612. CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
  613. CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
  614. CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
  615. CLANG_WARN_EMPTY_BODY = YES;
  616. CLANG_WARN_ENUM_CONVERSION = YES;
  617. CLANG_WARN_INFINITE_RECURSION = YES;
  618. CLANG_WARN_INT_CONVERSION = YES;
  619. CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
  620. CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
  621. CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
  622. CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
  623. CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
  624. CLANG_WARN_STRICT_PROTOTYPES = YES;
  625. CLANG_WARN_SUSPICIOUS_MOVE = YES;
  626. CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
  627. CLANG_WARN_UNREACHABLE_CODE = YES;
  628. CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
  629. CODE_SIGN_IDENTITY = "Apple Development";
  630. COPY_PHASE_STRIP = NO;
  631. DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
  632. ENABLE_NS_ASSERTIONS = NO;
  633. ENABLE_STRICT_OBJC_MSGSEND = YES;
  634. GCC_C_LANGUAGE_STANDARD = gnu11;
  635. GCC_NO_COMMON_BLOCKS = YES;
  636. GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
  637. GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
  638. GCC_WARN_UNDECLARED_SELECTOR = YES;
  639. GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
  640. GCC_WARN_UNUSED_FUNCTION = YES;
  641. GCC_WARN_UNUSED_VARIABLE = YES;
  642. IPHONEOS_DEPLOYMENT_TARGET = 11.3;
  643. MTL_ENABLE_DEBUG_INFO = NO;
  644. SDKROOT = iphoneos;
  645. VALIDATE_PRODUCT = YES;
  646. };
  647. name = Release;
  648. };
  649. 642D05B52094883C00FE587C /* Debug */ = {
  650. isa = XCBuildConfiguration;
  651. buildSettings = {
  652. CODE_SIGN_STYLE = Automatic;
  653. FRAMEWORK_SEARCH_PATHS = (
  654. "$(inherited)",
  655. "$(PROJECT_DIR)/xcodetest",
  656. );
  657. INFOPLIST_FILE = xcodetest/Info.plist;
  658. LD_RUNPATH_SEARCH_PATHS = (
  659. "$(inherited)",
  660. "@executable_path/Frameworks",
  661. );
  662. PRODUCT_BUNDLE_IDENTIFIER = org.golang.xcodetest;
  663. PRODUCT_NAME = "$(TARGET_NAME)";
  664. TARGETED_DEVICE_FAMILY = "1,2";
  665. };
  666. name = Debug;
  667. };
  668. 642D05B62094883C00FE587C /* Release */ = {
  669. isa = XCBuildConfiguration;
  670. buildSettings = {
  671. CODE_SIGN_STYLE = Automatic;
  672. FRAMEWORK_SEARCH_PATHS = (
  673. "$(inherited)",
  674. "$(PROJECT_DIR)/xcodetest",
  675. );
  676. INFOPLIST_FILE = xcodetest/Info.plist;
  677. LD_RUNPATH_SEARCH_PATHS = (
  678. "$(inherited)",
  679. "@executable_path/Frameworks",
  680. );
  681. PRODUCT_BUNDLE_IDENTIFIER = org.golang.xcodetest;
  682. PRODUCT_NAME = "$(TARGET_NAME)";
  683. TARGETED_DEVICE_FAMILY = "1,2";
  684. };
  685. name = Release;
  686. };
  687. 642D05B82094883C00FE587C /* Debug */ = {
  688. isa = XCBuildConfiguration;
  689. buildSettings = {
  690. BUNDLE_LOADER = "$(TEST_HOST)";
  691. CODE_SIGN_STYLE = Automatic;
  692. FRAMEWORK_SEARCH_PATHS = (
  693. "$(inherited)",
  694. "$(PROJECT_DIR)/xcodetest",
  695. );
  696. INFOPLIST_FILE = xcodetestTests/Info.plist;
  697. LD_RUNPATH_SEARCH_PATHS = (
  698. "$(inherited)",
  699. "@executable_path/Frameworks",
  700. "@loader_path/Frameworks",
  701. );
  702. PRODUCT_BUNDLE_IDENTIFIER = org.golang.xcodetestTests;
  703. PRODUCT_NAME = "$(TARGET_NAME)";
  704. TARGETED_DEVICE_FAMILY = "1,2";
  705. TEST_HOST = "$(BUILT_PRODUCTS_DIR)/xcodetest.app/xcodetest";
  706. };
  707. name = Debug;
  708. };
  709. 642D05B92094883C00FE587C /* Release */ = {
  710. isa = XCBuildConfiguration;
  711. buildSettings = {
  712. BUNDLE_LOADER = "$(TEST_HOST)";
  713. CODE_SIGN_STYLE = Automatic;
  714. FRAMEWORK_SEARCH_PATHS = (
  715. "$(inherited)",
  716. "$(PROJECT_DIR)/xcodetest",
  717. );
  718. INFOPLIST_FILE = xcodetestTests/Info.plist;
  719. LD_RUNPATH_SEARCH_PATHS = (
  720. "$(inherited)",
  721. "@executable_path/Frameworks",
  722. "@loader_path/Frameworks",
  723. );
  724. PRODUCT_BUNDLE_IDENTIFIER = org.golang.xcodetestTests;
  725. PRODUCT_NAME = "$(TARGET_NAME)";
  726. TARGETED_DEVICE_FAMILY = "1,2";
  727. TEST_HOST = "$(BUILT_PRODUCTS_DIR)/xcodetest.app/xcodetest";
  728. };
  729. name = Release;
  730. };
  731. 642D05BB2094883C00FE587C /* Debug */ = {
  732. isa = XCBuildConfiguration;
  733. buildSettings = {
  734. CODE_SIGN_STYLE = Automatic;
  735. FRAMEWORK_SEARCH_PATHS = (
  736. "$(inherited)",
  737. "$(PROJECT_DIR)/xcodetest",
  738. );
  739. INFOPLIST_FILE = xcodetestUITests/Info.plist;
  740. LD_RUNPATH_SEARCH_PATHS = (
  741. "$(inherited)",
  742. "@executable_path/Frameworks",
  743. "@loader_path/Frameworks",
  744. );
  745. PRODUCT_BUNDLE_IDENTIFIER = org.golang.xcodetestUITests;
  746. PRODUCT_NAME = "$(TARGET_NAME)";
  747. TARGETED_DEVICE_FAMILY = "1,2";
  748. TEST_TARGET_NAME = xcodetest;
  749. };
  750. name = Debug;
  751. };
  752. 642D05BC2094883C00FE587C /* Release */ = {
  753. isa = XCBuildConfiguration;
  754. buildSettings = {
  755. CODE_SIGN_STYLE = Automatic;
  756. FRAMEWORK_SEARCH_PATHS = (
  757. "$(inherited)",
  758. "$(PROJECT_DIR)/xcodetest",
  759. );
  760. INFOPLIST_FILE = xcodetestUITests/Info.plist;
  761. LD_RUNPATH_SEARCH_PATHS = (
  762. "$(inherited)",
  763. "@executable_path/Frameworks",
  764. "@loader_path/Frameworks",
  765. );
  766. PRODUCT_BUNDLE_IDENTIFIER = org.golang.xcodetestUITests;
  767. PRODUCT_NAME = "$(TARGET_NAME)";
  768. TARGETED_DEVICE_FAMILY = "1,2";
  769. TEST_TARGET_NAME = xcodetest;
  770. };
  771. name = Release;
  772. };
  773. /* End XCBuildConfiguration section */
  774. /* Begin XCConfigurationList section */
  775. 642D05832094883B00FE587C /* Build configuration list for PBXProject "xcodetest" */ = {
  776. isa = XCConfigurationList;
  777. buildConfigurations = (
  778. 642D05B22094883C00FE587C /* Debug */,
  779. 642D05B32094883C00FE587C /* Release */,
  780. );
  781. defaultConfigurationIsVisible = 0;
  782. defaultConfigurationName = Release;
  783. };
  784. 642D05B42094883C00FE587C /* Build configuration list for PBXNativeTarget "xcodetest" */ = {
  785. isa = XCConfigurationList;
  786. buildConfigurations = (
  787. 642D05B52094883C00FE587C /* Debug */,
  788. 642D05B62094883C00FE587C /* Release */,
  789. );
  790. defaultConfigurationIsVisible = 0;
  791. defaultConfigurationName = Release;
  792. };
  793. 642D05B72094883C00FE587C /* Build configuration list for PBXNativeTarget "xcodetestTests" */ = {
  794. isa = XCConfigurationList;
  795. buildConfigurations = (
  796. 642D05B82094883C00FE587C /* Debug */,
  797. 642D05B92094883C00FE587C /* Release */,
  798. );
  799. defaultConfigurationIsVisible = 0;
  800. defaultConfigurationName = Release;
  801. };
  802. 642D05BA2094883C00FE587C /* Build configuration list for PBXNativeTarget "xcodetestUITests" */ = {
  803. isa = XCConfigurationList;
  804. buildConfigurations = (
  805. 642D05BB2094883C00FE587C /* Debug */,
  806. 642D05BC2094883C00FE587C /* Release */,
  807. );
  808. defaultConfigurationIsVisible = 0;
  809. defaultConfigurationName = Release;
  810. };
  811. /* End XCConfigurationList section */
  812. };
  813. rootObject = 642D05802094883B00FE587C /* Project object */;
  814. }`
  815. const xcodescheme = `<?xml version="1.0" encoding="UTF-8"?>
  816. <Scheme
  817. LastUpgradeVersion = "0930"
  818. version = "1.3">
  819. <BuildAction
  820. parallelizeBuildables = "YES"
  821. buildImplicitDependencies = "YES">
  822. <BuildActionEntries>
  823. <BuildActionEntry
  824. buildForTesting = "YES"
  825. buildForRunning = "YES"
  826. buildForProfiling = "YES"
  827. buildForArchiving = "YES"
  828. buildForAnalyzing = "YES">
  829. <BuildableReference
  830. BuildableIdentifier = "primary"
  831. BlueprintIdentifier = "642D05872094883B00FE587C"
  832. BuildableName = "xcodetest.app"
  833. BlueprintName = "xcodetest"
  834. ReferencedContainer = "container:xcodetest.xcodeproj">
  835. </BuildableReference>
  836. </BuildActionEntry>
  837. </BuildActionEntries>
  838. </BuildAction>
  839. <TestAction
  840. buildConfiguration = "Debug"
  841. selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  842. selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  843. shouldUseLaunchSchemeArgsEnv = "YES">
  844. <Testables>
  845. <TestableReference
  846. skipped = "NO">
  847. <BuildableReference
  848. BuildableIdentifier = "primary"
  849. BlueprintIdentifier = "642D059F2094883C00FE587C"
  850. BuildableName = "xcodetestTests.xctest"
  851. BlueprintName = "xcodetestTests"
  852. ReferencedContainer = "container:xcodetest.xcodeproj">
  853. </BuildableReference>
  854. </TestableReference>
  855. <TestableReference
  856. skipped = "NO">
  857. <BuildableReference
  858. BuildableIdentifier = "primary"
  859. BlueprintIdentifier = "642D05AA2094883C00FE587C"
  860. BuildableName = "xcodetestUITests.xctest"
  861. BlueprintName = "xcodetestUITests"
  862. ReferencedContainer = "container:xcodetest.xcodeproj">
  863. </BuildableReference>
  864. </TestableReference>
  865. </Testables>
  866. <MacroExpansion>
  867. <BuildableReference
  868. BuildableIdentifier = "primary"
  869. BlueprintIdentifier = "642D05872094883B00FE587C"
  870. BuildableName = "xcodetest.app"
  871. BlueprintName = "xcodetest"
  872. ReferencedContainer = "container:xcodetest.xcodeproj">
  873. </BuildableReference>
  874. </MacroExpansion>
  875. <AdditionalOptions>
  876. </AdditionalOptions>
  877. </TestAction>
  878. <LaunchAction
  879. buildConfiguration = "Debug"
  880. selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  881. selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  882. launchStyle = "0"
  883. useCustomWorkingDirectory = "NO"
  884. ignoresPersistentStateOnLaunch = "NO"
  885. debugDocumentVersioning = "YES"
  886. debugServiceExtension = "internal"
  887. allowLocationSimulation = "YES">
  888. <BuildableProductRunnable
  889. runnableDebuggingMode = "0">
  890. <BuildableReference
  891. BuildableIdentifier = "primary"
  892. BlueprintIdentifier = "642D05872094883B00FE587C"
  893. BuildableName = "xcodetest.app"
  894. BlueprintName = "xcodetest"
  895. ReferencedContainer = "container:xcodetest.xcodeproj">
  896. </BuildableReference>
  897. </BuildableProductRunnable>
  898. <AdditionalOptions>
  899. </AdditionalOptions>
  900. </LaunchAction>
  901. <ProfileAction
  902. buildConfiguration = "Release"
  903. shouldUseLaunchSchemeArgsEnv = "YES"
  904. savedToolIdentifier = ""
  905. useCustomWorkingDirectory = "NO"
  906. debugDocumentVersioning = "YES">
  907. <BuildableProductRunnable
  908. runnableDebuggingMode = "0">
  909. <BuildableReference
  910. BuildableIdentifier = "primary"
  911. BlueprintIdentifier = "642D05872094883B00FE587C"
  912. BuildableName = "xcodetest.app"
  913. BlueprintName = "xcodetest"
  914. ReferencedContainer = "container:xcodetest.xcodeproj">
  915. </BuildableReference>
  916. </BuildableProductRunnable>
  917. </ProfileAction>
  918. <AnalyzeAction
  919. buildConfiguration = "Debug">
  920. </AnalyzeAction>
  921. <ArchiveAction
  922. buildConfiguration = "Release"
  923. revealArchiveInOrganizer = "YES">
  924. </ArchiveAction>
  925. </Scheme>`
  926. const appdelegateh = `#import <UIKit/UIKit.h>
  927. @interface AppDelegate : UIResponder <UIApplicationDelegate>
  928. @property (strong, nonatomic) UIWindow *window;
  929. @end`
  930. const appdelegatem = `#import "AppDelegate.h"
  931. @interface AppDelegate ()
  932. @end
  933. @implementation AppDelegate
  934. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  935. return YES;
  936. }
  937. - (void)applicationWillResignActive:(UIApplication *)application {
  938. }
  939. - (void)applicationDidEnterBackground:(UIApplication *)application {
  940. }
  941. - (void)applicationWillEnterForeground:(UIApplication *)application {
  942. }
  943. - (void)applicationDidBecomeActive:(UIApplication *)application {
  944. }
  945. - (void)applicationWillTerminate:(UIApplication *)application {
  946. }
  947. @end`
  948. const mainm = `#import <UIKit/UIKit.h>
  949. #import "AppDelegate.h"
  950. int main(int argc, char * argv[]) {
  951. @autoreleasepool {
  952. return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
  953. }
  954. }`