-
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.
Fork UIExplorer.xcodeproj into UIExplorerCxx.xcodeproj
Reviewed By: javache Differential Revision: D4434102 fbshipit-source-id: 45e128e7d985b58c04dda14f8e692051a552a491
- Loading branch information
1 parent
aeab15d
commit 81b2d69
Showing
6 changed files
with
2,289 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
*/ | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
#import "AppDelegate.h" | ||
|
||
int main(int argc, char * argv[]) { | ||
|
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,28 @@ | ||
// Copyright 2004-present Facebook. All Rights Reserved. | ||
|
||
/** | ||
* The examples provided by Facebook are for non-commercial testing and | ||
* evaluation purposes only. | ||
* | ||
* Facebook reserves all rights not expressly granted. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL | ||
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | ||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
#import <React/RCTCxxBridge.h> | ||
|
||
#import "AppDelegate.h" | ||
|
||
int main(int argc, char * argv[]) { | ||
@autoreleasepool { | ||
[RCTCxxBridge enable]; | ||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); | ||
} | ||
} |
Oops, something went wrong.
81b2d69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mhorowitz I was trying to get the cxx bridge working in my app and was hitting compile issues about missing headers. Then I tried running UIExplorer with
UIExplorerCxx.xcodeproj
and hit similar compile errors. Could you verify if it works for you? I'm not sure why the error happens but it seems like the react code doesn't get compiled / headers copied before it tries to build other projects like RCTActionSheet.81b2d69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@janicduplessis thanks for taking the time to try out the new bridge!
I fetched a fresh copy of RN from github and tried to build it myself. It looks like there were a few regressions in the form of some renames and new files, but nothing related to RCTActionSheet, or that looks like ordering.
I've committed a fix for the problems I was seeing (218e37d), and here's what I did to confirm everything is working:
If you're seeing problems which look like dependency ordering, check the Build tab of your scheme, and make sure "Parallelize Build" is unchecked.
Definitely let me know if you have any more issues or questions. I'm working now on making this a bit more seamless to drop in so people can test with it more easily.
81b2d69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mhorowitz Cool, I think I just realize what my issue was, I had RCTActionSheet as the selected project to build instead of UIExplorer... Xcode -_-
Going to try it in my app too now, is there anything else I have to do to convert my existing project to a cxx bridge one except to remove React.xcproj and add CxxReact.xcproj?
81b2d69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I figured it out, I also had to go in the build section of my scheme and remove the missing React dependency from the React project and add it back from the CxxReact project
81b2d69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mhorowitz Found an issue when trying to generate an archive. Looks like double-conversion doesn't work when building for generic ios device. You can repro in xcode by choosing 'Generic iOS Device' as the target and building.
Target architecture was not detected as supported by Double-Conversion.
81b2d69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double-conversion-1.1.5 fixes this. I'm working on an update now.
81b2d69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix here cb3a439