-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(swift): update swift modules, take out view stuff
- Loading branch information
1 parent
3b352f0
commit 5d0c583
Showing
11 changed files
with
89 additions
and
33 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
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
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
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
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,20 @@ | ||
// Created by react-native-create-bridge | ||
// {{template}}-Bridging-Header.h | ||
|
||
// import RCTBridgeModule | ||
#if __has_include(<React/RCTBridgeModule.h>) | ||
#import <React/RCTBridgeModule.h> | ||
#elif __has_include(“RCTBridgeModule.h”) | ||
#import “RCTBridgeModule.h” | ||
#else | ||
#import “React/RCTBridgeModule.h” // Required when used as a Pod in a Swift project | ||
#endif | ||
|
||
// import RCTEventEmitter | ||
#if __has_include(<React/RCTEventEmitter.h>) | ||
#import <React/RCTEventEmitter.h> | ||
#elif __has_include(“RCTEventEmitter.h”) | ||
#import “RCTEventEmitter.h” | ||
#else | ||
#import “React/RCTEventEmitter.h” // Required when used as a Pod in a Swift project | ||
#endif |
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,29 @@ | ||
// Created by react-native-create-bridge | ||
|
||
// import RCTBridgeModule | ||
#if __has_include(<React/RCTBridgeModule.h>) | ||
#import <React/RCTBridgeModule.h> | ||
#elif __has_include(“RCTBridgeModule.h”) | ||
#import “RCTBridgeModule.h” | ||
#else | ||
#import “React/RCTBridgeModule.h” // Required when used as a Pod in a Swift project | ||
#endif | ||
|
||
// import RCTEventEmitter | ||
#if __has_include(<React/RCTEventEmitter.h>) | ||
#import <React/RCTEventEmitter.h> | ||
#elif __has_include(“RCTEventEmitter.h”) | ||
#import “RCTEventEmitter.h” | ||
#else | ||
#import “React/RCTEventEmitter.h” // Required when used as a Pod in a Swift project | ||
#endif | ||
|
||
// Export a native module | ||
// https://facebook.github.io/react-native/docs/native-modules-ios.html#exporting-swift | ||
@interface RCT_EXTERN_MODULE({{template}}, NSObject) | ||
|
||
// Export methods to a native module | ||
// https://facebook.github.io/react-native/docs/native-modules-ios.html#exporting-swift | ||
RCT_EXTERN_METHOD(exampleMethod) | ||
|
||
@end |
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,16 @@ | ||
// Created by react-native-create-bridge | ||
|
||
import Foundation | ||
|
||
@objc({{template}}) | ||
class {{template}} : NSObject { | ||
// Export constants to use in your native module | ||
override func constantsToExport() -> [String : Any]! { | ||
return ["EXAMPLE_CONSTANT": "example"] | ||
} | ||
|
||
// Implement methods that you want to export to the native module | ||
@objc func exampleMethod() { | ||
// write method here | ||
} | ||
} |
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
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
14 changes: 0 additions & 14 deletions
14
templates/ui-components/ios-swift/Template-Bridging-Header.h
This file was deleted.
Oops, something went wrong.