-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert HelloWorld to Swift (#48246)
Summary: This PR converts the HelloWorld app to Swift. The HelloWorld app is our internal copy of the Template and the template is now using Swift. It's important that this macroscopic changes are synched between the template and HelloWorld, otherwise we risk to ship changes that works in the helloworld app but that break the template, and therefore the next release. That already happened once this month. ## Changelog: [Internal] - Migrate HelloWorld app to swift Pull Request resolved: #48246 Test Plan: GHA Reviewed By: cortinico Differential Revision: D67143408 Pulled By: cipolleschi fbshipit-source-id: f74412116570e44c2a394173f7d4d3b6dd85e2e5
- Loading branch information
1 parent
59c72e9
commit 61e876e
Showing
6 changed files
with
60 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
packages/helloworld/ios/HelloWorld.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import React | ||
import React_RCTAppDelegate | ||
import ReactAppDependencyProvider | ||
import UIKit | ||
|
||
@main | ||
class AppDelegate: RCTAppDelegate { | ||
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { | ||
self.moduleName = "HelloWorld" | ||
self.dependencyProvider = RCTAppDependencyProvider() | ||
|
||
// You can add your custom initial props in the dictionary below. | ||
// They will be passed down to the ViewController used by React Native. | ||
self.initialProps = [:] | ||
|
||
return super.application(application, didFinishLaunchingWithOptions: launchOptions) | ||
} | ||
|
||
override func sourceURL(for bridge: RCTBridge) -> URL? { | ||
self.bundleURL() | ||
} | ||
|
||
override func bundleURL() -> URL? { | ||
#if DEBUG | ||
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index") | ||
#else | ||
Bundle.main.url(forResource: "main", withExtension: "jsbundle") | ||
#endif | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.