From ce452f5b7a6d91052458fe6a37dd9dad272fa125 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Sun, 18 Jun 2023 08:05:35 -0700 Subject: [PATCH] Introduce Tuist in the Template Summary: [tuist.io](https://tuist.io) is a tool that allows to describe the xcode project-related files using Swift, in a declarative way. This tool solves the problem of working with the xcodeproj files completely, as it abstracts its details. The xcodeproj is notoriously a painful file to work with, especially when multiple engineers works together on the same project, and it is also one of the main sources of frustration for our users when it comes to update an app. This change introduce the `Project.swift` file for the template. However, currently, using tuist has to be done manually, as the RN CLI does not have knowledge of it. Therefore, to make everything work, we are going to commit all the files that tuist generates, to have an atomic commits that works. ## Next Steps: 1. update the CLI so that it can use swift 2. Remove the generated files from the template and add them to the .gitignore. 3. update RN Doctor so that it knows about tuist ## Changelog: [iOS][Added] - Introduce `tuist` in the template Differential Revision: D46711973 fbshipit-source-id: dc904d52fba63198439b988a59c749c8ab55d4a8 --- .../Sources/TuistAssets+HelloWorld.swift | 29 + .../Sources/TuistBundle+HelloWorld.swift | 24 + .../ios/HelloWorld.xcodeproj/project.pbxproj | 634 ++++++++---------- .../xcschemes/HelloWorld.xcscheme | 10 +- .../react-native/template/ios/Project.swift | 117 ++++ 5 files changed, 442 insertions(+), 372 deletions(-) create mode 100644 packages/react-native/template/ios/Derived/Sources/TuistAssets+HelloWorld.swift create mode 100644 packages/react-native/template/ios/Derived/Sources/TuistBundle+HelloWorld.swift create mode 100644 packages/react-native/template/ios/Project.swift diff --git a/packages/react-native/template/ios/Derived/Sources/TuistAssets+HelloWorld.swift b/packages/react-native/template/ios/Derived/Sources/TuistAssets+HelloWorld.swift new file mode 100644 index 00000000000000..a5859f1b189457 --- /dev/null +++ b/packages/react-native/template/ios/Derived/Sources/TuistAssets+HelloWorld.swift @@ -0,0 +1,29 @@ +// swiftlint:disable all +// swift-format-ignore-file +// swiftformat:disable all +// Generated using tuist — https://github.com/tuist/tuist + +#if os(macOS) + import AppKit +#elseif os(iOS) + import UIKit +#elseif os(tvOS) || os(watchOS) + import UIKit +#endif +#if canImport(SwiftUI) + import SwiftUI +#endif + +// swiftlint:disable superfluous_disable_command file_length implicit_return + +// MARK: - Asset Catalogs + +// swiftlint:disable identifier_name line_length nesting type_body_length type_name +public enum HelloWorldAsset { +} +// swiftlint:enable identifier_name line_length nesting type_body_length type_name + +// MARK: - Implementation Details + +// swiftlint:enable all +// swiftformat:enable all diff --git a/packages/react-native/template/ios/Derived/Sources/TuistBundle+HelloWorld.swift b/packages/react-native/template/ios/Derived/Sources/TuistBundle+HelloWorld.swift new file mode 100644 index 00000000000000..098218e40ca3e4 --- /dev/null +++ b/packages/react-native/template/ios/Derived/Sources/TuistBundle+HelloWorld.swift @@ -0,0 +1,24 @@ +// swiftlint:disable all +// swift-format-ignore-file +// swiftformat:disable all +import Foundation + +// MARK: - Swift Bundle Accessor + +private class BundleFinder {} + +extension Foundation.Bundle { + /// Since HelloWorld is a application, the bundle for classes within this module can be used directly. + static let module = Bundle(for: BundleFinder.self) +} + +// MARK: - Objective-C Bundle Accessor + +@objc +public class HelloWorldResources: NSObject { + @objc public class var bundle: Bundle { + return .module + } +} +// swiftlint:enable all +// swiftformat:enable all diff --git a/packages/react-native/template/ios/HelloWorld.xcodeproj/project.pbxproj b/packages/react-native/template/ios/HelloWorld.xcodeproj/project.pbxproj index afc51486e318f7..186fbe3e489719 100644 --- a/packages/react-native/template/ios/HelloWorld.xcodeproj/project.pbxproj +++ b/packages/react-native/template/ios/HelloWorld.xcodeproj/project.pbxproj @@ -3,382 +3,274 @@ archiveVersion = 1; classes = { }; - objectVersion = 54; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ - 00E356F31AD99517003FC87E /* HelloWorldTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* HelloWorldTests.m */; }; - 0C80B921A6F3F58F76C31292 /* libPods-HelloWorld.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-HelloWorld.a */; }; - 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 7699B88040F8A987B510C191 /* libPods-HelloWorld-HelloWorldTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-HelloWorld-HelloWorldTests.a */; }; - 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; + 23340AF7898C878DF6CA32E5 /* HelloWorldTests.m in Sources */ = {isa = PBXBuildFile; fileRef = AC6F63E7CFF88B6D24DCDC72 /* HelloWorldTests.m */; }; + 4704EAD4381B7EF85557DF0D /* TuistBundle+HelloWorld.swift in Sources */ = {isa = PBXBuildFile; fileRef = 750A07DB6A7FCC25BC2A78CD /* TuistBundle+HelloWorld.swift */; }; + 796690B26026F9EAA09D66C5 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 061E581A746006B0F2F56E4B /* Images.xcassets */; }; + 8E23C46CE233EB2FBFB86FEC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5504DACA1F21E4046B456797 /* main.m */; }; + 9602C5AA7121D3D1A206BD38 /* TuistAssets+HelloWorld.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05BE302582DE6D864E0A34C1 /* TuistAssets+HelloWorld.swift */; }; + AF2534B2AF4983C36840C1B9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D396B41F132B44F2036322D2 /* LaunchScreen.storyboard */; }; + B2B6A74B39DD28FDEA5898B5 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = F2BE9E74208B9EAEA87EC3B6 /* AppDelegate.mm */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { + D55A565A7DD3AEE13776779F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; + containerPortal = 993C38E6B55CB9C6F082FDCA /* Project object */; proxyType = 1; - remoteGlobalIDString = 13B07F861A680F5B00A75B9A; + remoteGlobalIDString = 479BCD1507C869E5783E1EC4; remoteInfo = HelloWorld; }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 65A76DB76439075F86A7EBCE /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 783A22C08E41D1E6CB1B49BE /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ - 00E356EE1AD99517003FC87E /* HelloWorldTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HelloWorldTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 00E356F21AD99517003FC87E /* HelloWorldTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HelloWorldTests.m; sourceTree = ""; }; - 13B07F961A680F5B00A75B9A /* HelloWorld.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorld.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = HelloWorld/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = HelloWorld/AppDelegate.mm; sourceTree = ""; }; - 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = HelloWorld/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = HelloWorld/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = HelloWorld/main.m; sourceTree = ""; }; - 19F6CBCC0A4E27FBF8BF4A61 /* libPods-HelloWorld-HelloWorldTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HelloWorld-HelloWorldTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 3B4392A12AC88292D35C810B /* Pods-HelloWorld.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld.debug.xcconfig"; path = "Target Support Files/Pods-HelloWorld/Pods-HelloWorld.debug.xcconfig"; sourceTree = ""; }; - 5709B34CF0A7D63546082F79 /* Pods-HelloWorld.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld.release.xcconfig"; path = "Target Support Files/Pods-HelloWorld/Pods-HelloWorld.release.xcconfig"; sourceTree = ""; }; - 5B7EB9410499542E8C5724F5 /* Pods-HelloWorld-HelloWorldTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld-HelloWorldTests.debug.xcconfig"; path = "Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests.debug.xcconfig"; sourceTree = ""; }; - 5DCACB8F33CDC322A6C60F78 /* libPods-HelloWorld.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HelloWorld.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = HelloWorld/LaunchScreen.storyboard; sourceTree = ""; }; - 89C6BE57DB24E9ADA2F236DE /* Pods-HelloWorld-HelloWorldTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld-HelloWorldTests.release.xcconfig"; path = "Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests.release.xcconfig"; sourceTree = ""; }; - ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; + 05BE302582DE6D864E0A34C1 /* TuistAssets+HelloWorld.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TuistAssets+HelloWorld.swift"; sourceTree = ""; }; + 061E581A746006B0F2F56E4B /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 32126DC477657AD268F72BA7 /* HelloWorld.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorld.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 5504DACA1F21E4046B456797 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 73951FA26A01DFB96875E9E2 /* HelloWorldTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HelloWorldTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 750A07DB6A7FCC25BC2A78CD /* TuistBundle+HelloWorld.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TuistBundle+HelloWorld.swift"; sourceTree = ""; }; + AC6F63E7CFF88B6D24DCDC72 /* HelloWorldTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HelloWorldTests.m; sourceTree = ""; }; + C1B9ACCD56698DA1A02093A2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + D396B41F132B44F2036322D2 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; + F2BE9E74208B9EAEA87EC3B6 /* AppDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AppDelegate.mm; sourceTree = ""; }; + F8D4DC64138CA8CFE6A953DE /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + FCE9532F3FD5C6C602FC0A45 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 00E356EB1AD99517003FC87E /* Frameworks */ = { + 35B8671B48C61FE65AD8E6B1 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7699B88040F8A987B510C191 /* libPods-HelloWorld-HelloWorldTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { + D4C57884A372C8EC69F16CAD /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0C80B921A6F3F58F76C31292 /* libPods-HelloWorld.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 00E356EF1AD99517003FC87E /* HelloWorldTests */ = { + 00961668E9C919BF4554CF95 /* Products */ = { isa = PBXGroup; children = ( - 00E356F21AD99517003FC87E /* HelloWorldTests.m */, - 00E356F01AD99517003FC87E /* Supporting Files */, + 32126DC477657AD268F72BA7 /* HelloWorld.app */, + 73951FA26A01DFB96875E9E2 /* HelloWorldTests.xctest */, ); - path = HelloWorldTests; + name = Products; sourceTree = ""; }; - 00E356F01AD99517003FC87E /* Supporting Files */ = { + 233C02D11715113C71B6A657 /* HelloWorldTests */ = { isa = PBXGroup; children = ( - 00E356F11AD99517003FC87E /* Info.plist */, + AC6F63E7CFF88B6D24DCDC72 /* HelloWorldTests.m */, + C1B9ACCD56698DA1A02093A2 /* Info.plist */, ); - name = "Supporting Files"; + path = HelloWorldTests; sourceTree = ""; }; - 13B07FAE1A68108700A75B9A /* HelloWorld */ = { + 35F91BCADE984BFC787698DC /* Sources */ = { isa = PBXGroup; children = ( - 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.mm */, - 13B07FB51A68108700A75B9A /* Images.xcassets */, - 13B07FB61A68108700A75B9A /* Info.plist */, - 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, - 13B07FB71A68108700A75B9A /* main.m */, + 05BE302582DE6D864E0A34C1 /* TuistAssets+HelloWorld.swift */, + 750A07DB6A7FCC25BC2A78CD /* TuistBundle+HelloWorld.swift */, ); - name = HelloWorld; + path = Sources; sourceTree = ""; }; - 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { + 604D834728055BF069F11711 /* Project */ = { isa = PBXGroup; children = ( - ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - 5DCACB8F33CDC322A6C60F78 /* libPods-HelloWorld.a */, - 19F6CBCC0A4E27FBF8BF4A61 /* libPods-HelloWorld-HelloWorldTests.a */, + A449FD8DB625E61074D258AE /* Derived */, + C9EA8F0CA0DB9603AD97881D /* HelloWorld */, + 233C02D11715113C71B6A657 /* HelloWorldTests */, ); - name = Frameworks; + name = Project; sourceTree = ""; }; - 832341AE1AAA6A7D00B99B32 /* Libraries */ = { + A449FD8DB625E61074D258AE /* Derived */ = { isa = PBXGroup; children = ( + 35F91BCADE984BFC787698DC /* Sources */, ); - name = Libraries; + path = Derived; sourceTree = ""; }; - 83CBB9F61A601CBA00E9B192 = { + BA5BA4FCB5C6FB916AC8577F /* Frameworks */ = { isa = PBXGroup; children = ( - 13B07FAE1A68108700A75B9A /* HelloWorld */, - 832341AE1AAA6A7D00B99B32 /* Libraries */, - 00E356EF1AD99517003FC87E /* HelloWorldTests */, - 83CBBA001A601CBA00E9B192 /* Products */, - 2D16E6871FA4F8E400B85C8A /* Frameworks */, - BBD78D7AC51CEA395F1C20DB /* Pods */, - ); - indentWidth = 2; + ); + name = Frameworks; sourceTree = ""; - tabWidth = 2; - usesTabs = 0; }; - 83CBBA001A601CBA00E9B192 /* Products */ = { + C9EA8F0CA0DB9603AD97881D /* HelloWorld */ = { isa = PBXGroup; children = ( - 13B07F961A680F5B00A75B9A /* HelloWorld.app */, - 00E356EE1AD99517003FC87E /* HelloWorldTests.xctest */, - ); - name = Products; + F8D4DC64138CA8CFE6A953DE /* AppDelegate.h */, + F2BE9E74208B9EAEA87EC3B6 /* AppDelegate.mm */, + 061E581A746006B0F2F56E4B /* Images.xcassets */, + FCE9532F3FD5C6C602FC0A45 /* Info.plist */, + D396B41F132B44F2036322D2 /* LaunchScreen.storyboard */, + 5504DACA1F21E4046B456797 /* main.m */, + ); + path = HelloWorld; sourceTree = ""; }; - BBD78D7AC51CEA395F1C20DB /* Pods */ = { + E8630311BAB2B628B85BC5D2 = { isa = PBXGroup; children = ( - 3B4392A12AC88292D35C810B /* Pods-HelloWorld.debug.xcconfig */, - 5709B34CF0A7D63546082F79 /* Pods-HelloWorld.release.xcconfig */, - 5B7EB9410499542E8C5724F5 /* Pods-HelloWorld-HelloWorldTests.debug.xcconfig */, - 89C6BE57DB24E9ADA2F236DE /* Pods-HelloWorld-HelloWorldTests.release.xcconfig */, + 604D834728055BF069F11711 /* Project */, + BA5BA4FCB5C6FB916AC8577F /* Frameworks */, + 00961668E9C919BF4554CF95 /* Products */, ); - path = Pods; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 00E356ED1AD99517003FC87E /* HelloWorldTests */ = { + 479BCD1507C869E5783E1EC4 /* HelloWorld */ = { isa = PBXNativeTarget; - buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "HelloWorldTests" */; + buildConfigurationList = 39A71CFC79D014E76D4445EB /* Build configuration list for PBXNativeTarget "HelloWorld" */; buildPhases = ( - A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, - 00E356EA1AD99517003FC87E /* Sources */, - 00E356EB1AD99517003FC87E /* Frameworks */, - 00E356EC1AD99517003FC87E /* Resources */, - C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, - F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, + 4A590CB0D847DB4C38DDCDFC /* Sources */, + E62A259B904C1D9512E25AB1 /* Resources */, + 783A22C08E41D1E6CB1B49BE /* Embed Frameworks */, + D4C57884A372C8EC69F16CAD /* Frameworks */, + 0C622804B3CDBCE3035A1E48 /* Bundle React Native code and images */, + 4965EA695F167310DB36346E /* Start Packager */, ); buildRules = ( ); dependencies = ( - 00E356F51AD99517003FC87E /* PBXTargetDependency */, ); - name = HelloWorldTests; - productName = HelloWorldTests; - productReference = 00E356EE1AD99517003FC87E /* HelloWorldTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; + name = HelloWorld; + productName = HelloWorld; + productReference = 32126DC477657AD268F72BA7 /* HelloWorld.app */; + productType = "com.apple.product-type.application"; }; - 13B07F861A680F5B00A75B9A /* HelloWorld */ = { + DE5CD5E050490D65859A7E16 /* HelloWorldTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "HelloWorld" */; + buildConfigurationList = BA1A92C5BB6773368AA82596 /* Build configuration list for PBXNativeTarget "HelloWorldTests" */; buildPhases = ( - C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, - FD10A7F022414F080027D42C /* Start Packager */, - 13B07F871A680F5B00A75B9A /* Sources */, - 13B07F8C1A680F5B00A75B9A /* Frameworks */, - 13B07F8E1A680F5B00A75B9A /* Resources */, - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, - E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, + B2D66EFCC5EC3BAAE3AA05DB /* Sources */, + 390F64E1B8D0C4D0B015FF7E /* Resources */, + 65A76DB76439075F86A7EBCE /* Embed Frameworks */, + 35B8671B48C61FE65AD8E6B1 /* Frameworks */, ); buildRules = ( ); dependencies = ( + 2162722467E7A041D0B2BD13 /* PBXTargetDependency */, ); - name = HelloWorld; - productName = HelloWorld; - productReference = 13B07F961A680F5B00A75B9A /* HelloWorld.app */; - productType = "com.apple.product-type.application"; + name = HelloWorldTests; + productName = HelloWorldTests; + productReference = 73951FA26A01DFB96875E9E2 /* HelloWorldTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 83CBB9F71A601CBA00E9B192 /* Project object */ = { + 993C38E6B55CB9C6F082FDCA /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1210; + ORGANIZATIONNAME = org.reactjs.native.example; TargetAttributes = { - 00E356ED1AD99517003FC87E = { - CreatedOnToolsVersion = 6.2; - TestTargetID = 13B07F861A680F5B00A75B9A; - }; - 13B07F861A680F5B00A75B9A = { - LastSwiftMigration = 1120; + DE5CD5E050490D65859A7E16 = { + TestTargetID = 479BCD1507C869E5783E1EC4; }; }; }; - buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "HelloWorld" */; - compatibilityVersion = "Xcode 12.0"; + buildConfigurationList = 04EE2E1E635D92BC638F96E0 /* Build configuration list for PBXProject "HelloWorld" */; + compatibilityVersion = "Xcode 13.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( - en, Base, + en, ); - mainGroup = 83CBB9F61A601CBA00E9B192; - productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; + mainGroup = E8630311BAB2B628B85BC5D2; + productRefGroup = 00961668E9C919BF4554CF95 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 13B07F861A680F5B00A75B9A /* HelloWorld */, - 00E356ED1AD99517003FC87E /* HelloWorldTests */, + 479BCD1507C869E5783E1EC4 /* HelloWorld */, + DE5CD5E050490D65859A7E16 /* HelloWorldTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 00E356EC1AD99517003FC87E /* Resources */ = { + 390F64E1B8D0C4D0B015FF7E /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 13B07F8E1A680F5B00A75B9A /* Resources */ = { + E62A259B904C1D9512E25AB1 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, + 796690B26026F9EAA09D66C5 /* Images.xcassets in Resources */, + AF2534B2AF4983C36840C1B9 /* LaunchScreen.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { + 0C622804B3CDBCE3035A1E48 /* Bundle React Native code and images */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( "$(SRCROOT)/.xcode.env.local", "$(SRCROOT)/.xcode.env", ); name = "Bundle React Native code and images"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; - }; - 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-HelloWorld-HelloWorldTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "set -e\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\""; }; - C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-HelloWorld-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - FD10A7F022414F080027D42C /* Start Packager */ = { + 4965EA695F167310DB36346E /* Start Packager */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -394,158 +286,108 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; - showEnvVarsInLog = 0; + shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi"; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 00E356EA1AD99517003FC87E /* Sources */ = { + 4A590CB0D847DB4C38DDCDFC /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 00E356F31AD99517003FC87E /* HelloWorldTests.m in Sources */, + 9602C5AA7121D3D1A206BD38 /* TuistAssets+HelloWorld.swift in Sources */, + 4704EAD4381B7EF85557DF0D /* TuistBundle+HelloWorld.swift in Sources */, + B2B6A74B39DD28FDEA5898B5 /* AppDelegate.mm in Sources */, + 8E23C46CE233EB2FBFB86FEC /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 13B07F871A680F5B00A75B9A /* Sources */ = { + B2D66EFCC5EC3BAAE3AA05DB /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, - 13B07FC11A68108700A75B9A /* main.m in Sources */, + 23340AF7898C878DF6CA32E5 /* HelloWorldTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { + 2162722467E7A041D0B2BD13 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 13B07F861A680F5B00A75B9A /* HelloWorld */; - targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; + name = HelloWorld; + target = 479BCD1507C869E5783E1EC4 /* HelloWorld */; + targetProxy = D55A565A7DD3AEE13776779F /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 00E356F61AD99517003FC87E /* Debug */ = { + 0B5B930D79A90C7027822E7F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-HelloWorld-HelloWorldTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); + CODE_SIGN_IDENTITY = "iPhone Developer"; INFOPLIST_FILE = HelloWorldTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - "$(inherited)", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_BUNDLE_IDENTIFIER = org.reactjs.native.example.HelloWorldTests; + PRODUCT_NAME = HelloWorldTests; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HelloWorld.app/HelloWorld"; + TEST_TARGET_NAME = HelloWorld; }; - name = Debug; + name = Release; }; - 00E356F71AD99517003FC87E /* Release */ = { + 0E0204C76B7F7F7FB621C316 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-HelloWorld-HelloWorldTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - COPY_PHASE_STRIP = NO; + CODE_SIGN_IDENTITY = "iPhone Developer"; INFOPLIST_FILE = HelloWorldTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - "$(inherited)", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HelloWorld.app/HelloWorld"; - }; - name = Release; - }; - 13B07F941A680F5B00A75B9A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-HelloWorld.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 1; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = HelloWorld/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = HelloWorld; + PRODUCT_BUNDLE_IDENTIFIER = org.reactjs.native.example.HelloWorldTests; + PRODUCT_NAME = HelloWorldTests; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_COMPILATION_MODE = singlefile; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HelloWorld.app/HelloWorld"; + TEST_TARGET_NAME = HelloWorld; }; name = Debug; }; - 13B07F951A680F5B00A75B9A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-HelloWorld.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 1; - INFOPLIST_FILE = HelloWorld/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = HelloWorld; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - 83CBBA201A601CBA00E9B192 /* Debug */ = { + 3280429393A41FA3FBA1F5D6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; @@ -558,14 +400,15 @@ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; - GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -573,50 +416,122 @@ "DEBUG=1", "$(inherited)", ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 72DC351F8133C2EE79D7230F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 1; + ENABLE_BITCODE = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + INFOPLIST_FILE = HelloWorld/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD_RUNPATH_SEARCH_PATHS = ( - /usr/lib/swift, "$(inherited)", + /usr/lib/swift, ); LIBRARY_SEARCH_PATHS = ( - "\"$(SDKROOT)/usr/lib/swift\"", - "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", - "\"$(inherited)\"", + "$(inherited)", + "$(SDKROOT)/usr/lib/swift", + "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)", ); - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; + MARKETING_VERSION = 1.0; OTHER_CPLUSPLUSFLAGS = ( + "$(inherited)", "$(OTHER_CFLAGS)", "-DFOLLY_NO_CONFIG", "-DFOLLY_MOBILE=1", "-DFOLLY_USE_LIBCPP=1", ); + OTHER_LD_FLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = org.reactjs.native.example.HelloWorld; + PRODUCT_NAME = HelloWorld; SDKROOT = iphoneos; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; + SWIFT_VERSION = 5; + TARGETED_DEVICE_FAMILY = 1; + VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; }; - 83CBBA211A601CBA00E9B192 /* Release */ = { + 91C02734642ACB1BD6BF3AE6 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + COPY_PHASE_STRIP = YES; + CURRENT_PROJECT_VERSION = 1; + GCC_C_LANGUAGE_STANDARD = gnu99; + INFOPLIST_FILE = HelloWorld/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + /usr/lib/swift, + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(SDKROOT)/usr/lib/swift", + "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)", + ); + MARKETING_VERSION = 1.0; + OTHER_CPLUSPLUSFLAGS = ( + "$(inherited)", + "$(OTHER_CFLAGS)", + "-DFOLLY_NO_CONFIG", + "-DFOLLY_MOBILE=1", + "-DFOLLY_USE_LIBCPP=1", + ); + OTHER_LD_FLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = org.reactjs.native.example.HelloWorld; + PRODUCT_NAME = HelloWorld; + SDKROOT = iphoneos; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; + SWIFT_VERSION = 5; + TARGETED_DEVICE_FAMILY = 1; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + C24C7A9544E293DB9D604F47 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; @@ -629,14 +544,15 @@ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; - GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; @@ -644,24 +560,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; - LD_RUNPATH_SEARCH_PATHS = ( - /usr/lib/swift, - "$(inherited)", - ); - LIBRARY_SEARCH_PATHS = ( - "\"$(SDKROOT)/usr/lib/swift\"", - "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", - "\"$(inherited)\"", - ); MTL_ENABLE_DEBUG_INFO = NO; - OTHER_CPLUSPLUSFLAGS = ( - "$(OTHER_CFLAGS)", - "-DFOLLY_NO_CONFIG", - "-DFOLLY_MOBILE=1", - "-DFOLLY_USE_LIBCPP=1", - ); - SDKROOT = iphoneos; + PRODUCT_NAME = "$(TARGET_NAME)"; VALIDATE_PRODUCT = YES; }; name = Release; @@ -669,34 +569,34 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "HelloWorldTests" */ = { + 04EE2E1E635D92BC638F96E0 /* Build configuration list for PBXProject "HelloWorld" */ = { isa = XCConfigurationList; buildConfigurations = ( - 00E356F61AD99517003FC87E /* Debug */, - 00E356F71AD99517003FC87E /* Release */, + 3280429393A41FA3FBA1F5D6 /* Debug */, + C24C7A9544E293DB9D604F47 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "HelloWorld" */ = { + 39A71CFC79D014E76D4445EB /* Build configuration list for PBXNativeTarget "HelloWorld" */ = { isa = XCConfigurationList; buildConfigurations = ( - 13B07F941A680F5B00A75B9A /* Debug */, - 13B07F951A680F5B00A75B9A /* Release */, + 72DC351F8133C2EE79D7230F /* Debug */, + 91C02734642ACB1BD6BF3AE6 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "HelloWorld" */ = { + BA1A92C5BB6773368AA82596 /* Build configuration list for PBXNativeTarget "HelloWorldTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 83CBBA201A601CBA00E9B192 /* Debug */, - 83CBBA211A601CBA00E9B192 /* Release */, + 0E0204C76B7F7F7FB621C316 /* Debug */, + 0B5B930D79A90C7027822E7F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; + rootObject = 993C38E6B55CB9C6F082FDCA /* Project object */; } diff --git a/packages/react-native/template/ios/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme b/packages/react-native/template/ios/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme index b57be22ab2d66f..45e3b3fe37cc03 100644 --- a/packages/react-native/template/ios/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme +++ b/packages/react-native/template/ios/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme @@ -1,6 +1,6 @@ @@ -32,7 +32,7 @@ skipped = "NO"> @@ -54,7 +54,7 @@ runnableDebuggingMode = "0"> @@ -71,7 +71,7 @@ runnableDebuggingMode = "0"> diff --git a/packages/react-native/template/ios/Project.swift b/packages/react-native/template/ios/Project.swift new file mode 100644 index 00000000000000..dc916d0e4a5fed --- /dev/null +++ b/packages/react-native/template/ios/Project.swift @@ -0,0 +1,117 @@ +import ProjectDescription + +let reactNativeXCodeScript = +""" +set -e +WITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\" +REACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\" +/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\" +""" + +let startPackagerScript = +""" +export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\" +echo \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\" +if [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then + if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then + if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then + echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\" + exit 2 + fi + else + open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\" + fi +fi +""" + +let project = Project( + name: "HelloWorld", + organizationName: "org.reactjs.native.example", + targets: [ + Target( + name: "HelloWorld", + platform: .iOS, + product: .app, + bundleId: "org.reactjs.native.example.HelloWorld", + deploymentTarget: .iOS(targetVersion: "13.4", devices: .iphone), + infoPlist: "HelloWorld/Info.plist", + sources: ["HelloWorld/*.m", "HelloWorld/*.mm"], + resources: [ + "HelloWorld/Images.xcassets", + "HelloWorld/LaunchScreen.storyboard"], + headers: .headers( + public: ["HelloWorld/**"] + ), + scripts: [ + .post( + script: reactNativeXCodeScript, + name: "Bundle React Native code and images", + inputPaths: [ + "$(SRCROOT)/.xcode.env.local", + "$(SRCROOT)/.xcode.env" + ], + shellPath: "/bin/sh" + ), + .post( + script: startPackagerScript, + name: "Start Packager", + shellPath: "/bin/sh" + ) + ], + settings: .settings( + base: [ + "GCC_C_LANGUAGE_STANDARD" : "gnu99", + "SWIFT_VERSION": "5", + "LD_RUNPATH_SEARCH_PATHS" : [ + "$(inherited)", + "/usr/lib/swift" + ], + "LIBRARY_SEARCH_PATHS" : [ + "$(inherited)", + "$(SDKROOT)/usr/lib/swift", + "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)" + ], + "OTHER_CPLUSPLUSFLAGS": [ + "$(inherited)", + "$(OTHER_CFLAGS)", + "-DFOLLY_NO_CONFIG", + "-DFOLLY_MOBILE=1", + "-DFOLLY_USE_LIBCPP=1" + ], + "OTHER_LD_FLAGS": [ + "$(inherited)", + "-ObjC", + "-lc++", + ], + "CLANG_ENABLE_MODULES": "YES", + "CURRENT_PROJECT_VERSION": "1", + "MARKETING_VERSION": "1.0", + "VERSIONING_SYSTEM": "apple-generic" + ], + configurations: [ + .debug(name: "Debug", settings: [ + "ENABLE_BITCODE": "NO", + "GCC_SYMBOLS_PRIVATE_EXTERN": "NO", + "SDKROOT": "iphoneos" + ]), + .release(name: "Release", settings: [ + "COPY_PHASE_STRIP": "YES" + ]) + ], + defaultSettings: .none + ) + + ), + Target( + name: "HelloWorldTests", + platform: .iOS, + product: .unitTests, + bundleId: "org.reactjs.native.example.HelloWorldTests", + infoPlist: "HelloWorldTests/Info.plist", + sources: ["HelloWorldTests/*.m"], + dependencies: [ + .target(name: "HelloWorld") + ] + ), + ] +)