Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions example/swift/App.swift
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
import SwiftUI
import ReactBrownfield
import SwiftUI

@main
struct MyApp: App {
init() {
ReactNativeBrownfield.shared.startReactNative {
print("loaded")
init() {
ReactNativeBrownfield.shared.startReactNative {
print("loaded")
}
}
}

var body: some Scene {
WindowGroup {
ContentView()

var body: some Scene {
WindowGroup {
ContentView()
}
}
}
}

struct ContentView: View {
var body: some View {
NavigationView {
VStack {
Text("React Native Brownfield App")
.font(.title)
.bold()
.padding()

NavigationLink("Push React Native Screen") {
ReactNativeView(moduleName: "ReactNative")
.navigationBarHidden(true)
}
}
var body: some View {
NavigationView {
VStack {
Text("React Native Brownfield App")
.font(.title)
.bold()
.padding()

NavigationLink("Push React Native Screen") {
ReactNativeView(moduleName: "ReactNative")
.navigationBarHidden(true)
}
}
}.navigationViewStyle(StackNavigationViewStyle())
}
}
}
20 changes: 11 additions & 9 deletions example/swift/SwiftExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-frameworks.sh\"\n";
Expand Down Expand Up @@ -200,7 +204,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\nENTRY_FILE=example/index.js ../../node_modules/react-native/scripts/react-native-xcode.sh\n";
shellScript = "export NODE_BINARY=node\nENTRY_FILE=index.js ../../node_modules/react-native/scripts/react-native-xcode.sh\n";
};
3922106373FF9547107BB112 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -232,10 +236,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-resources.sh\"\n";
Expand Down Expand Up @@ -328,10 +336,7 @@
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
OTHER_LDFLAGS = "$(inherited) ";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
Expand Down Expand Up @@ -395,10 +400,7 @@
MTL_FAST_MATH = YES;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
OTHER_LDFLAGS = "$(inherited) ";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
Loading
Loading