Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode 9 fixes #1483

Merged
merged 18 commits into from
Dec 14, 2017
Merged

Xcode 9 fixes #1483

merged 18 commits into from
Dec 14, 2017

Conversation

kneth
Copy link
Contributor

@kneth kneth commented Nov 10, 2017

What, How & Why?

We have seen many issue related to Xcode recently. The number of issues increased when Xcode 9 was released but it is still unclear if all the issues are related to that version.

TODO

  • The version of node inside Xcode must match version used when executing npm install
  • Find React header files (React/RCTBridge.h not found)
  • Build React (libReact.a not found)
  • Fix warnings ('sendAppEventWithName:body:' is deprecated: Subclass RCTEventEmitter instead)
  • Update ReactExample to newer UI components (the old navigator is deprecated)
  • Update CHANGELOG.md

Status

  • Tests are no longer included in the test app
  • Debug version of the test app crashes with a segmentation fault

shellScript = "node ../scripts/download-realm.js ios --sync";
showEnvVarsInLog = 0;
shellPath = "/bin/sh";
shellScript = "[ -z \"$NVM_DIR\" ] && export NVM_DIR=\"$HOME/.nvm\"\n\nif [[ -s \"$HOME/.nvm/nvm.sh\" ]]; then\n . \"$HOME/.nvm/nvm.sh\"\nelif [[ -x \"$(command -v brew)\" && -s \"$(brew --prefix nvm)/nvm.sh\" ]]; then\n . \"$(brew --prefix nvm)/nvm.sh\"\nfi\nnode ../scripts/download-realm.js ios --sync";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will probably fail on CI

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it failed last time I committed it.

@kneth kneth mentioned this pull request Nov 20, 2017
@blagoev blagoev self-assigned this Nov 22, 2017
@blagoev blagoev requested review from blagoev and removed request for blagoev December 13, 2017 16:56
render() {
// let objects = realm.objects('Todo');
// let extraItems = [
// { name: 'Complete', items: objects.filtered('done = true') },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we're adding a bunch of commented-out code (here, and elsewhere)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no this is leftover. will remove

Copy link
Contributor Author

@kneth kneth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I will post a separate comment when I have tried to build locally.

@@ -0,0 +1,63 @@
////////////////////////////////////////////////////////////////////////////
//
// Copyright 2016 Realm Inc.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2017

Platform,
StyleSheet
} from 'react-native';
// import NavigationExperimental from 'react-native-deprecated-custom-components';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be removed (and line 27 too)

import realm from './realm';
import styles from './styles';

export default class TodoApp extends React.Component {
// import NavigationExperimental from 'react-native-deprecated-custom-components';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be removed

});
}
this.todoLists.addListener((name, changes) => {
console.log("changed: " + JSON.stringify(changes));
if (params) {
console.error("params.json indicate a test run. Exiting application");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"indicate" -> "indicates"

});
console.log("registered listener");


// Bind all the methods that we will be passing as props.
this.renderScene = this.renderScene.bind(this);
// this.renderScene = this.renderScene.bind(this);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove?

scripts/test.sh Outdated
: # nothing to see here, will stop cycling on the first successful run
done
#parse devices
IOS_RUNTIME=$(xcrun simctl list runtimes | grep -m1 -o '(com.apple.CoreSimulator.SimRuntime.iOS.*)' | sed 's/[()]//g')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't work for me locally. Doing xcrun simctl list runtimes | grep -m1 'com.apple.CoreSimulator.SimRuntime.iOS.*' | awk '{ print $2 }', gets the iOS version number for me locally. When running ./scripts/test.sh react-tests I see the following in the end:

Shuttting down realm-js-test simulator. (device is not deleted. you can use it to debug the app)
Checking tests results
*** ReactTests SUCCESS ***

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ending is normal

import RNFS from 'react-native-fs';
import RNExitApp from 'react-native-exit-app-no-history';

// import {setJSExceptionHandler} from 'react-native-exception-handler';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this section be removed?

@blagoev blagoev merged commit e1f69ed into master Dec 14, 2017
@bmunkholm bmunkholm deleted the kneth/xcode9 branch October 8, 2018 07:52
@kneth kneth mentioned this pull request Nov 14, 2018
1 task
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants