Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Sharing Code Between iOS & Android
Search
Ken Myers
September 11, 2018
Programming
96
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Sharing Code Between iOS & Android
Ken Myers
September 11, 2018
Other Decks in Programming
See All in Programming
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
Next.js: The final boss of Web Performance
guaca
0
250
ActionController meets Protocol Buffers
sorah
0
520
Railsバージョンを4倍にした話
optim
0
350
APNsからLive Activityを開始する話
yumnumm
0
170
ジョジョの世界をXRで再現する
mofurune
0
160
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
880
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
1
430
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
790
Featured
See All Featured
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
430
For a Future-Friendly Web
brad_frost
184
10k
Un-Boring Meetings
codingconduct
0
460
So, you think you're a good person
axbom
PRO
2
2.2k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
370
Designing for Performance
lara
612
70k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
500
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
750
Automating Front-end Workflow
addyosmani
1369
210k
The Curse of the Amulet
leimatthew05
3
16k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
540
Transcript
© Coiney, Inc. !1
© Coiney, Inc. Sharing Code Between iOS & Android Ken
Myers iOS Developer at Coiney !2
© Coiney, Inc. !3
Commands Responses !4 App Terminal • Commands & responses are
byte sequences sent over Bluetooth • Driver generates commands & parses responses • Developed in-house
© Coiney, Inc. FeliCa Support Coming This Year !5 But...
© Coiney, Inc. Problems With Previous Setup • Separate Objective-C
& Java implementations • Functional discrepancies • Have to maintain two separate implementations • Lots of technical debt • Limited resources !6
© Coiney, Inc. What we did • Implement a C++
library with Objective-C & Java APIs • For iOS, wrap in a Cocoa Touch Framework • For Android, write a JNI layer !7
© Coiney, Inc. !8 iOS App Android App C++ Library
Cocoa Touch Framework JNI
© Coiney, Inc. !9 App Cocoa Touch Framework Glue Layer
.h .mm C++ Lib iOS Interface
© hey, Inc. Made with fun. !10
© Coiney, Inc. !11 App JNI C++ Library Android Interface
© hey, Inc. Made with fun. !12 package com.coiney.commonmpi object
CMCommand { init { System.loadLibrary("native-mpi") } @JvmStatic external fun createDisplayImage(fileName: String): ByteArray @JvmStatic external fun createDisplayMedia(fileName: String, offsetX: Int, offsetY: Int): ByteArray @JvmStatic external fun createStartNFC(): ByteArray @JvmStatic external fun createStopNFC(): ByteArray @JvmStatic external fun createFlashLED( led1: Boolean, led2: Boolean, led3: Boolean, led4: Boolean ): ByteArray @JvmStatic external fun createIlluminateLED( led1: Boolean, led2: Boolean, led3: Boolean,
© Coiney, Inc. Challenges • Coming up with a clean
API • Objective-C • JNI • Comprehensive unit tests with CI !13
© Coiney, Inc. Conclusion • Team members gained C++ experience
• Improved modularity • Unit tests improved quality !14
© Coiney, Inc. We're Hiring iOS Developers! !15