Skip to content

Commit 6e749e1

Browse files
Updates sample apps to Release 0.79.0 (#1041)
## Description Updates sample apps to Release preview .79 ### Why 0.79 Release Resolves [Add Relevant Issue Here] microsoft/react-native-windows#14450 ## Screenshots **Calculator** _csharp_ https://github.com/user-attachments/assets/8d08bf66-0bb4-4f51-bb77-4cee7fbe6b7c _cppwinrt_ https://github.com/user-attachments/assets/702452bc-ecb9-45fe-bde7-90928d90eb4e _Fabric_ https://github.com/user-attachments/assets/58b4d96b-676e-4904-aa56-3a0ad8665ff4 **NativeModuleSample** https://github.com/user-attachments/assets/becb02ca-97ef-4b90-afb7-9aa442c79deb ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/react-native-windows-samples/pull/1041) --------- Co-authored-by: Anupriya Verma <54227869+anupriya13@users.noreply.github.com>
1 parent 749f474 commit 6e749e1

49 files changed

Lines changed: 45842 additions & 20593 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

samples/Calculator/cppwinrt/Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
88
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
99
gem 'xcodeproj', '< 1.26.0'
1010
gem 'concurrent-ruby', '< 1.3.4'
11+
12+
# Ruby 3.4.0 has removed some libraries from the standard library.
13+
gem 'bigdecimal'
14+
gem 'logger'
15+
gem 'benchmark'
16+
gem 'mutex_m'

samples/Calculator/cppwinrt/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ See [../README.md](../README.md) for details of this sample.
44

55
See [../csharp/](../csharp/) for a C# version of this sample.
66

7-
It currently targets React Native Windows 0.78.
7+
It currently targets React Native Windows 0.79.
88

99
### Setup
1010
See [../README.md#Setup](../README.md#Setup).
Binary file not shown.

samples/Calculator/cppwinrt/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

samples/Calculator/cppwinrt/android/gradlew

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/Calculator/cppwinrt/ios/Calculator/AppDelegate.swift

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,36 @@ import React_RCTAppDelegate
44
import ReactAppDependencyProvider
55

66
@main
7-
class AppDelegate: RCTAppDelegate {
8-
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
9-
self.moduleName = "Calculator"
10-
self.dependencyProvider = RCTAppDependencyProvider()
7+
class AppDelegate: UIResponder, UIApplicationDelegate {
8+
var window: UIWindow?
119

12-
// You can add your custom initial props in the dictionary below.
13-
// They will be passed down to the ViewController used by React Native.
14-
self.initialProps = [:]
10+
var reactNativeDelegate: ReactNativeDelegate?
11+
var reactNativeFactory: RCTReactNativeFactory?
1512

16-
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
13+
func application(
14+
_ application: UIApplication,
15+
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
16+
) -> Bool {
17+
let delegate = ReactNativeDelegate()
18+
let factory = RCTReactNativeFactory(delegate: delegate)
19+
delegate.dependencyProvider = RCTAppDependencyProvider()
20+
21+
reactNativeDelegate = delegate
22+
reactNativeFactory = factory
23+
24+
window = UIWindow(frame: UIScreen.main.bounds)
25+
26+
factory.startReactNative(
27+
withModuleName: "Calculator",
28+
in: window,
29+
launchOptions: launchOptions
30+
)
31+
32+
return true
1733
}
34+
}
1835

36+
class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
1937
override func sourceURL(for bridge: RCTBridge) -> URL? {
2038
self.bundleURL()
2139
}

0 commit comments

Comments
 (0)