Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
D E P L O Y M E N T A N D T E S T I N G
D A N I E L G R A H A M P H D
S H A R I N G E X P O A P P L I C AT I O N O N Y O U R P R O F I L E
{ "expo": { "name": "AckeePod", "slug": "ackeePod", "privacy": "public", "sdkVersion": "32.0.0", "platforms": [ "ios", "android" ],
N E E D T O S P E C I F Y I N Y O U R A P P. J S O N
T H AT Y O U R A P P W I T H B E P U B L I C
Options: •Private •Public •Unlisted
D E P L O Y I N G T O Y O U R E X P O P R O F I L E
Enable production mode Removes the bloat of
Publish to your profile
W H AT A B O U T D E P L O Y I N G T O T H E A P P S T O R E S
S TA N D A L O N E A P P L I C AT I O N
J S P U B L I S H O N E X P O S E R V E R S
A P P. J S O N
{ "expo": { "name": "Your App Name", "icon": "./path/to/your/app-icon.png", "version": "1.0.0", "slug": "your-app-slug", "sdkVersion": "XX.0.0", "ios": { "bundleIdentifier": "com.yourcompany.yourappname" }, "android": { "package": "com.yourcompany.yourappname" } } }
Must include these
A P R I VA C Y P O L I C Y
• Several open source privacy policies
• https://www.docracy.com/mobileprivacy/#description
• Advertisement
B U I L D I N G T H E P L AT F O R M S P E C I F I C B I N A R I E S• Building IOs binary
• expo build:android
• Remember to replace default icon
• You will need an valid apple
• Building android binaries
• expo build:android
• (Let expo handle your keystore)
M O N I T O R I N G Y O U R B U I L D S
G O O G L E P L AY D E P L O Y M E N T S
• Tour of the android development console.
•
T E S T I N G
• One of the best frameworks for testing react native applications is called JEST
• Delightful Javascript testing
• By the same group that metro (Build system) & yarn( javascript package manager) at facebook
• opencollective.com/jest
• https://www.youtube.com/watch?time_continue=4&v=cAKYQpTC7MA
G E T T I N G S E T U P I N S TA L L J E S T
npm i jest-expo --save-dev
yarn add jest-expo --dev
Npm test
This is how we would run the JEST test
A D D T O T H E PA C K A G E . J S O N
"scripts": { "test": "node_modules/.bin/jest" }, "jest": { "preset": "jest-expo" }
W R I T I N G M E A N I N G F U L T E S T J A S M I N E • Your test should be your spec.
•
https://jasmine.github.io/setup/nodejs.html
describe(“The cancel button”, function() { var event_manager = load_event_manager() var event = load_event(); event_manager.cancel_event(event);
it(“deletes the event locally", function() { expect(event_manager.find(event)).toBe(undefined); });
it(“deletes the event in the database", function() { expect(db_manager.find(event)).toBe(undefined); });
});
T E S T I N G
• Integration testing
• Regression testing
• Code coverage
L E T S T E S T F U N C T I O N T H AT C O N V E R T S M I L L I S E C O N D I N A C K E E P O D T O M I N U T E & S E C O N D S
millisToMinutesAndSeconds(millis) { var minutes = Math.floor(millis / 60000); var seconds = ((millis % 60000) / 1000).toFixed(0); return minutes + ":" + (seconds < 10 ? '0' : '') + seconds; }
W R I T E A T E S T C A S E F O R A C K E E P O D
test('works', () => { expect(1).toBe(1); })
it('works', () => { expect(1).toBe(1); })
I T I S A N A L I A S F O R
T E S T
import PlayerScreen from "../components/PlayerScreen"
test('Converts mills to readable format', () => { expect(PlayerScreen.millisToMinutesAndSeconds(1000000)).toBe("16:40"); });
T E S T I N G T H E M I L L I S E C O N D F U N C T I O N
import PlayerScreen from "../components/PlayerScreen"
test('Converts mills to readable format', () => { expect(PlayerScreen.millisToMinutesAndSeconds(1000000)).toBe("16:40"); });
static millisToMinutesAndSeconds(millis) { var minutes = Math.floor(millis / 60000); var seconds = ((millis % 60000) / 1000).toFixed(0); return minutes + ":" + (seconds < 10 ? '0' : '') + seconds; }