-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
117cb7d
commit 0047d34
Showing
16 changed files
with
2,883 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# CocoaPods | ||
Pods/ | ||
.xcode.env.local |
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 @@ | ||
export NODE_BINARY=$(command -v node) |
6 changes: 6 additions & 0 deletions
6
fabricmacos-example/macos/FabricMacOSExample-macOS/AppDelegate.h
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,6 @@ | ||
#import <RCTAppDelegate.h> | ||
#import <Cocoa/Cocoa.h> | ||
|
||
@interface AppDelegate : RCTAppDelegate | ||
|
||
@end |
40 changes: 40 additions & 0 deletions
40
fabricmacos-example/macos/FabricMacOSExample-macOS/AppDelegate.mm
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,40 @@ | ||
#import "AppDelegate.h" | ||
|
||
#import <React/RCTBundleURLProvider.h> | ||
|
||
@implementation AppDelegate | ||
|
||
- (void)applicationDidFinishLaunching:(NSNotification *)notification | ||
{ | ||
self.moduleName = @"FabricMacOSExample"; | ||
// 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 applicationDidFinishLaunching:notification]; | ||
} | ||
|
||
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge | ||
{ | ||
#if DEBUG | ||
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; | ||
#else | ||
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; | ||
#endif | ||
} | ||
|
||
/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. | ||
/// | ||
/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html | ||
/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). | ||
/// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`. | ||
- (BOOL)concurrentRootEnabled | ||
{ | ||
#ifdef RN_FABRIC_ENABLED | ||
return true; | ||
#else | ||
return false; | ||
#endif | ||
} | ||
|
||
@end |
58 changes: 58 additions & 0 deletions
58
...s-example/macos/FabricMacOSExample-macOS/Assets.xcassets/AppIcon.appiconset/Contents.json
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,58 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "16x16" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "16x16" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "32x32" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "32x32" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "128x128" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "128x128" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "256x256" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "256x256" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "512x512" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "512x512" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
fabricmacos-example/macos/FabricMacOSExample-macOS/Assets.xcassets/Contents.json
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,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
684 changes: 684 additions & 0 deletions
684
fabricmacos-example/macos/FabricMacOSExample-macOS/Base.lproj/Main.storyboard
Large diffs are not rendered by default.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
fabricmacos-example/macos/FabricMacOSExample-macOS/FabricMacOSExample.entitlements
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.app-sandbox</key> | ||
<true/> | ||
<key>com.apple.security.files.user-selected.read-only</key> | ||
<true/> | ||
<key>com.apple.security.network.client</key> | ||
<true/> | ||
</dict> | ||
</plist> |
47 changes: 47 additions & 0 deletions
47
fabricmacos-example/macos/FabricMacOSExample-macOS/Info.plist
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,47 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>$(DEVELOPMENT_LANGUAGE)</string> | ||
<key>CFBundleExecutable</key> | ||
<string>$(EXECUTABLE_NAME)</string> | ||
<key>CFBundleIconFile</key> | ||
<string></string> | ||
<key>CFBundleIdentifier</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>$(PRODUCT_NAME)</string> | ||
<key>CFBundlePackageType</key> | ||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleVersion</key> | ||
<string>1</string> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string> | ||
<key>NSAppTransportSecurity</key> | ||
<dict> | ||
<key>NSAllowsArbitraryLoads</key> | ||
<true/> | ||
<key>NSExceptionDomains</key> | ||
<dict> | ||
<key>localhost</key> | ||
<dict> | ||
<key>NSExceptionAllowsInsecureHTTPLoads</key> | ||
<true/> | ||
</dict> | ||
</dict> | ||
</dict> | ||
<key>NSMainStoryboardFile</key> | ||
<string>Main</string> | ||
<key>NSPrincipalClass</key> | ||
<string>NSApplication</string> | ||
<key>NSSupportsAutomaticTermination</key> | ||
<true/> | ||
<key>NSSupportsSuddenTermination</key> | ||
<true/> | ||
</dict> | ||
</plist> |
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,5 @@ | ||
#import <Cocoa/Cocoa.h> | ||
|
||
int main(int argc, const char *argv[]) { | ||
return NSApplicationMain(argc, argv); | ||
} |
Oops, something went wrong.