seq_test.go 34 KB

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