Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
💥 Custom Playgrounds 🎯
Boris Bügling
June 26, 2014
Technology
1
270
💥 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.3k
Cross-platform Swift
neonichu
4
17k
Building better API clients in Swift
neonichu
1
250
Cross-platform Swift
neonichu
3
780
Swift Package Manager
neonichu
2
300
Swift Package Manager
neonichu
0
39
📺
neonichu
0
1.6k
Cross-Platform Swift
neonichu
0
62
Swift Package Manager
neonichu
6
3.9k
Other Decks in Technology
See All in Technology
2022年度新卒技術研修「エンジニアマインド」講義
excitejp
PRO
0
340
視座とアジャイル / shiza_and_agile
kyoshimoto
0
180
GeoLocationAnchor and MKTileOverlay
toyship
0
110
ひとりでも安定して 組織を変える活動を続けていくための ストレスマネジメント
pastelinc
0
770
雑な攻撃からELBを守る一工夫 +おまけ / Know-how to protect servers from miscellaneous attacks
hiroga
0
420
機械学習システムアーキテクチャ入門 #1
asei
3
1.2k
Scrum Fest Osaka 2022 段階的スクラムマスターのススメ
orimomo
0
690
Target SDK Versionを上げない Notification runtime permission対応
napplecomputer
0
120
The role of the data organization as a business progresses
line_developers
PRO
3
820
JJUG2022_spring_Keycloak (Red Hat Single Sign-on)
tinoue
0
190
データエンジニアリングの潮流を俯瞰する
tetsuroito
1
720
miisan's career talk
mii3king
0
220
Featured
See All Featured
Embracing the Ebb and Flow
colly
73
3.4k
Creatively Recalculating Your Daily Design Routine
revolveconf
207
10k
Designing on Purpose - Digital PM Summit 2013
jponch
106
5.6k
VelocityConf: Rendering Performance Case Studies
addyosmani
316
22k
Atom: Resistance is Futile
akmur
255
20k
Put a Button on it: Removing Barriers to Going Fast.
kastner
56
2.3k
Automating Front-end Workflow
addyosmani
1351
200k
Web Components: a chance to create the future
zenorocha
303
40k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
12
920
Bootstrapping a Software Product
garrettdimon
296
110k
The Brand Is Dead. Long Live the Brand.
mthomps
46
2.7k
Art, The Web, and Tiny UX
lynnandtonic
280
17k
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