Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
DO NOT REPEAT YOURSELF
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Marco Sero
March 13, 2015
Programming
440
0
Share
DO NOT REPEAT YOURSELF
Leverage the power of C++ and Djinni to write native cross platform code on iOS and Android
Marco Sero
March 13, 2015
More Decks by Marco Sero
See All by Marco Sero
Working on a Legacy App
marcosero
3
3.4k
Event Detection
marcosero
1
1.7k
Other Decks in Programming
See All in Programming
2026_04_15_量子計算をパズルとして解く
hideakitakechi
0
130
セグメントとターゲットを意識するプロポーザルの書き方 〜採択の鍵は、誰に刺すかを見極めるマーケティング戦略にある〜
m3m0r7
PRO
0
640
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
260
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
Spec-driven Development: How AI Changes Everything (And Nothing)
simas
PRO
0
420
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
910
アーキテクチャモダナイゼーションとは何か
nwiizo
19
5.6k
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
300
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
890
How We Practice Exploratory Testing in Iterative Development( #scrumniigata ) / 反復開発の中で、探索的テストをどう実施しているか
teyamagu
PRO
0
110
Claude Code × Gemini × Ebitengine ゲーム制作素人WebエンジニアがGoでゲームを作った話
webzawa
0
200
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
310
Featured
See All Featured
A Soul's Torment
seathinner
6
2.7k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
From π to Pie charts
rasagy
0
180
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
330
The untapped power of vector embeddings
frankvandijk
2
1.7k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
280
First, design no harm
axbom
PRO
2
1.2k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
530
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
230
Transcript
DO NOT REPEAT YOURSELF
IOS AND ANDROID HAVE SOMETHING IN COMMON
C++
BUT USING IT... IT'S NOT GREAT
Objective-C++ on iOS JNI (Java Native Interface) on Android
UNTIL...
DJINNI BY
.djinni interface + C++ implementation Djinni JAVA AND OBJECTIVE-C INTERFACES
THE HACK
SHARED C++ IMAGE CACHE
DEFINE INTERFACE IN A .djinni FILE image_cache = interface +c
{ static create_with_path(path: string): image_cache; image_for_key(key: string): binary; save_image_for_key(key: string, image_data: binary); }
IMPLEMENT IT IN C++ shared_ptr<ImageCache> ImageCache::create_with_path(const std::string &path) { ...
} vector<uint8_t> ImageCache::image_for_key(const string &key) { ... } void ImageCache::save_image_for_key(const string &key, const vector<uint8_t> &image_data) { ... }
USE IT FROM OBJECTIVE-C id<YCCPImageCache> imageCache = [YCPPImageCacheCppProxy createWithPath:cachePath]; NSData
*imageData = [imageCache imageForKey:cacheKey]; [imageCache saveImageForKey:cacheKey imageData:imageData]; AND JAVA ImageCache imageCache = ImageCache.createWithPath(cachePath); byte[] imageBlob = this.imageCache.imageForKey(cacheKey); imageCache.saveImageForKey(cacheKey, imageBlob);
NEVER WRITE JNI AND OBJECTIVE-C++ AGAIN
SHARE NATIVE CODE BETWEEN PLATFORMS MORE EASILY
DO I RECOMMEND THIS?
NO AT LEAST FOR OUR APPS
THANK YOU.