Skip to content

Commit

Permalink
fix: changed install instructions to adapt to ios and adapted some io…
Browse files Browse the repository at this point in the history
…s styles
  • Loading branch information
DiegoBM committed May 31, 2021
1 parent b1b106e commit e4c1ac8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ const sdk = new Appwrite();
sdk.setEndpoint('http://localhost/v1').setProject('123456789');
```

For iOS devices you'll need to link the relevant CocoaPods. From the `example/ios` directory run:

```sh
pod install
```

Finally run the code in your desired platform, using one of the following commands:

To run the example app on Android:
Expand Down
9 changes: 7 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
Modal,
View,
Button,
Platform,
StyleSheet,
ActivityIndicator,
} from 'react-native';
Expand Down Expand Up @@ -35,10 +36,10 @@ const DefaultLayout: React.FC<ModalLayoutProps> = ({
};

return (
<>
<View style={styles.container}>
<Button title="Cancel" onPress={handleCancel} />
<WebViewComponent />
</>
</View>
);
};

Expand Down Expand Up @@ -248,6 +249,10 @@ const AppwriteOauth: React.FC<AppwriteOauthProps> = ({
};

const styles = StyleSheet.create({
container: {
flex: 1,
marginTop: Platform.select({ ios: 30, android: 0 }),
},
fill: {
flex: 1,
alignItems: 'stretch',
Expand Down

0 comments on commit e4c1ac8

Please sign in to comment.