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
💥 Custom Playgrounds 🎯
Search
Boris Bügling
June 26, 2014
Technology
1
340
💥 Custom Playgrounds 🎯
Talk on using your own frameworks inside Xcode Playgrounds, given at NSLondon, June 2014.
Boris Bügling
June 26, 2014
Tweet
Share
More Decks by Boris Bügling
See All by Boris Bügling
Testing ⌚️ Apps and Other Extensions
neonichu
1
4.6k
Cross-platform Swift
neonichu
4
18k
Building better API clients in Swift
neonichu
1
300
Cross-platform Swift
neonichu
3
910
Swift Package Manager
neonichu
2
330
Swift Package Manager
neonichu
0
53
📺
neonichu
0
2k
Cross-Platform Swift
neonichu
0
82
Swift Package Manager
neonichu
6
4.3k
Other Decks in Technology
See All in Technology
”知のインストール”戦略:テキスト資産をAIの文脈理解に活かす
kworkdev
PRO
9
4.2k
ソフトウェア開発現代史: "LeanとDevOpsの科学"の「科学」とは何か? - DORA Report 10年の変遷を追って - #DevOpsDaysTokyo
takabow
0
200
Amazon CloudWatch Application Signals ではじめるバーンレートアラーム / Burn rate alarm with Amazon CloudWatch Application Signals
ymotongpoo
5
320
ElixirがHW化され、最新CPU/GPU/NWを過去のものとする数万倍、高速+超省電力化されたWeb/動画配信/AIが動く日
piacerex
0
110
GitHub MCP Serverを使って Pull Requestを作る、レビューする
hiyokose
2
720
Devinで模索する AIファースト開発〜ゼロベースから始めるDevOpsの進化〜
potix2
PRO
6
2.9k
Lakeflow Connectのご紹介
databricksjapan
0
100
はじめてのSDET / My first challenge as a SDET
bun913
1
210
OSSコントリビュートをphp-srcメンテナの立場から語る / OSS Contribute
sakitakamachi
0
1.3k
Webアプリを Lambdaで動かすまでに考えること / How to implement monolithic Lambda Web Application
_kensh
7
1.2k
LLM とプロンプトエンジニアリング/チューターをビルドする / LLM, Prompt Engineering and Building Tutors
ks91
PRO
1
220
Стильный код: натуральный поиск редких атрибутов по картинке. Юлия Антохина, Data Scientist, Lamoda Tech
lamodatech
0
460
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Practical Orchestrator
shlominoach
186
10k
How to Ace a Technical Interview
jacobian
276
23k
Building Applications with DynamoDB
mza
94
6.3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
2.9k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.5k
Docker and Python
trallard
44
3.3k
Adopting Sorbet at Scale
ufuk
76
9.3k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
Navigating Team Friction
lara
184
15k
Transcript
! CUSTOM PLAYGROUNDS " NSLONDON, JUNE 2014 BORIS BÜGLING -
@NEONACHO
None
COCOAPODS - CONTENTFUL
SWIFT?
SWIFT!
REPL
$ swift Welcome to Swift! Type :help for assistance. 1>
import ContentfulDeliveryAPI <REPL>:1:8: error: no such module 'ContentfulDeliveryAPI' import ContentfulDeliveryAPI ^
Copy your framework over to /Applications/Xcode6-Beta2.app/ Contents/Developer/Platforms/MacOSX.platform/Developer/ SDKs/MacOSX10.10.sdk/System/Library/Frameworks
1> import ContentfulDeliveryAPI 2> var client = CDAClient() client: CDAClient
= <extracting data from value failed> error: Couldn't lookup symbols: _OBJC_CLASS_$_CDAClient
LOAD THE DYNAMIC LIBRARY FROM YOUR FRAMEWORK USING dlopen()
3> var handle = dlopen("/Applications/.../Versions/A/ContentfulDeliveryAPI", 2) handle: COpaquePointer = Builtin.RawPointer
= 0x0000000102e2b6e0 -> 0x00007fff5fc37e50 vtable for ImageLoaderMachOCompressed + 16 4> var client = CDAClient() client: CDAClient = {}
SUCCESS
// Playground - noun: a place where people can play
None
None
24/06/14 01:00:00,780 Xcode[84816]: IDEPlaygroundExecutionSessionThread(pid=85188) IDEPlaygroundExecution: [PlaygroundSession <0x7fff12750c70>] Received error from
expr: error: error: Couldn't lookup symbols: _OBJC_CLASS_$_CDAClient
None
SAM MARSHALL
None
XCODE PLUGIN?
None
#import <IDELanguageSupportUI/IDEPlaygroundExecutionDeviceService.h> @interface IDELocalComputerPlaygroundExecutionDeviceService : IDEPlaygroundExecutionDeviceService + (id)capability; - (id)sessionForExecutingPlaygroundWithParameters:(id)arg1;
- (id)defaultStubPathForSDK:(id)arg1; @end
DVTPLAYGROUNDCOMMUNICATION.FRAMEWORK @interface DVTPlaygroundCommunicationListener @interface DVTPlaygroundCommunicationSender Uses TCP/IP on the local
machine to communicate between Xcode and Stub
None
None
None
None
None
DEMO
None
XCODE PLUGIN!
RELEVANT WWDC 2014 SESSIONS ▸ Session 408: Swift Playgrounds ▸
Session 409: Introduction to LLDB and the Swift REPL
LINKS ▸ http://samdmarshall.com/blog/ custom_frameworks_and_swift.html ▸ https://github.com/jas/swift-playground-builder ▸ http://stackoverflow.com/questions/24058336/how-do-i-run- asynchronous-callbacks-in-playground
THANK YOU!
HTTP://VU0.ORG/PLAYGROUNDS