Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/1.0' into fix_ios
* release/1.0: (62 commits) fix UT due to migration to getContext DI fix styling on tizenwear add RNV_SKIP_LINKING env to androidRunner use build folder only when bundling assets add react-native-photo-editor for ios + fix copying of builds folder from external pluginTemplatess clean code remove unnecessary changes add react-native-photo-editor overrides fix fetchAndMovePhoto add PhotoEditor for android fix kaios sim run command update logger small fix regen schema, move rnvNewPatchDependencies to bootstrapConfig, add template spec for testing schemas add await alternative execute add tests for getAndroidDeviceToRunOn fix UTs, linter additional c cleanup more c cleanup ... # Conflicts: # packages/sdk-apple/src/runner.ts
- Loading branch information
Showing
229 changed files
with
3,289 additions
and
2,608 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 |
---|---|---|
|
@@ -20,6 +20,7 @@ jobs: | |
run: | | ||
yarn | ||
yarn bootstrap | ||
yarn lint | ||
yarn test | ||
env: | ||
CI: true | ||
|
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
12 changes: 9 additions & 3 deletions
12
packages/app-harness/src/components/NewModuleButton/index.native.tsx
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 |
---|---|---|
@@ -1,17 +1,23 @@ | ||
import React from 'react'; | ||
import { NativeModules, Button } from 'react-native'; | ||
import { useLoggerContext } from '../../context'; | ||
|
||
export const NewModuleButton = () => { | ||
const { TestNativeModule } = NativeModules; | ||
const { logDebug } = useLoggerContext(); | ||
const callback = (error: any, result: string) => { | ||
if (error) { | ||
console.log(error); | ||
logDebug(error); | ||
} else { | ||
console.log(result); | ||
logDebug(result); | ||
} | ||
}; | ||
const onPress = () => { | ||
TestNativeModule.createTestEvent('testName', 'testLocation', callback); | ||
if (TestNativeModule) { | ||
TestNativeModule.createTestEvent('testName', 'testLocation', callback); | ||
} else { | ||
logDebug('NativeModules not supported for this platform'); | ||
} | ||
}; | ||
return <Button title="Click to invoke native module!" color="#841584" onPress={onPress} />; | ||
}; |
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import React from 'react'; | ||
import { Button } from 'react-native'; | ||
import { useLoggerContext } from '../../context'; | ||
|
||
export const NewModuleButton = () => { | ||
const { logDebug } = useLoggerContext(); | ||
const onPress = () => { | ||
console.log('NativeModules not supported in web'); | ||
logDebug('NativeModules not supported in web'); | ||
}; | ||
return <Button title="Click to invoke native module!" color="#841584" onPress={onPress} />; | ||
}; |
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
export const addNotificationListeners = () => { | ||
console.log('addNotificationListeners not supported on this platform'); | ||
import { NotificationCallback } from '../types'; | ||
|
||
export const addNotificationListeners = (callback: NotificationCallback) => { | ||
callback('addNotificationListeners not supported on this platform'); | ||
}; | ||
|
||
export const removeNotificationListeners = () => { | ||
console.log('removeNotificationListeners not supported on this platform'); | ||
export const removeNotificationListeners = (callback: NotificationCallback) => { | ||
callback('removeNotificationListeners not supported on this platform'); | ||
}; |
4 changes: 1 addition & 3 deletions
4
packages/app-harness/src/components/Permissions/index.mobile.ts
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
import { request, PERMISSIONS } from 'react-native-permissions'; | ||
|
||
export const requestPermissions = () => { | ||
request(PERMISSIONS.IOS.CONTACTS).then((result) => { | ||
console.log(result); | ||
}); | ||
return request(PERMISSIONS.IOS.CONTACTS); | ||
}; |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export const requestPermissions = () => { | ||
console.log('requestPermissions not supported on this platform'); | ||
return 'requestPermissions not supported on this platform'; | ||
}; |
40 changes: 40 additions & 0 deletions
40
packages/app-harness/src/components/PhotoEditor/index.mobile.tsx
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 React, { useEffect } from 'react'; | ||
import { Button, Image } from 'react-native'; | ||
import { RNPhotoEditor } from 'react-native-photo-editor'; | ||
import RNFS from 'react-native-fs'; | ||
import RNFetchBlob from 'rn-fetch-blob'; | ||
import { useLoggerContext } from '../../context'; | ||
import { ICON_LOGO } from '../../config'; | ||
|
||
export const PhotoEditorButton = () => { | ||
const { logDebug } = useLoggerContext(); | ||
const photoPath = RNFS.DocumentDirectoryPath + ICON_LOGO; | ||
useEffect(() => { | ||
const fetchAndMovePhoto = async () => { | ||
const binaryFile = Image.resolveAssetSource(ICON_LOGO); | ||
try { | ||
const resp = await RNFetchBlob.config({ fileCache: true }).fetch('GET', binaryFile.uri); | ||
if (await RNFS.exists(photoPath)) { | ||
await RNFS.unlink(photoPath); | ||
} | ||
await RNFS.moveFile(resp.path(), photoPath); | ||
logDebug('FILE WRITTEN!'); | ||
} catch (error) { | ||
logDebug(`${error}`); | ||
} | ||
}; | ||
fetchAndMovePhoto(); | ||
}, []); | ||
const handlePhotoEditor = () => { | ||
RNPhotoEditor.Edit({ | ||
path: photoPath, | ||
onDone: () => { | ||
logDebug('on done'); | ||
}, | ||
onCancel: () => { | ||
logDebug('on cancel'); | ||
}, | ||
}); | ||
}; | ||
return <Button onPress={handlePhotoEditor} title="Show PhotoEditor" />; | ||
}; |
Oops, something went wrong.