Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
2.0.0.tar.gz | 2019-06-07 | 79.0 kB | |
2.0.0.zip | 2019-06-07 | 95.6 kB | |
README.md | 2019-06-07 | 3.6 kB | |
Totals: 3 Items | 178.2 kB | 0 |
⚠️ Breaking Changes
We took the learnings from our initial iOS SDK release and made some improvements.
Endpoints
Endpoint functions may return DataRequest
Previously, endpoint functions returned void
, but they now may return a DataRequest
so you can control in-flight requests.
getTrending no longer returns nextPageCursor
getTrending
responses will no longer provide the string nextPageCursor
. Instead, use the integer nextPageNum
for pagination.
getMedia now takes a parameter with argument label id
Old
:::swift
SvrfSDK.getMedia(identifier: "547963", /* ... *)
New
:::swift
_ = SvrfSDK.getMedia(id: "547963", /* ... */)
Utilities
getNodeFromMedia ️️️➡️ generateNode
The function's name is now more explicit and the parameter's argument label has been changed from media
to for
. The class Media
has been renamed as SvrfMedia
.
Old
:::swift
SvrfSDK.getNodeFromMedia(media: media, onSuccess: { node in
/* ... */
})
New
:::swift
_ = SvrfSDK.generateNode(for: media, onSuccess: { node in
/* ... */
})
getFaceFilter ➡️ generateFaceFilterNode
The function's name is now more explicit and the parameter's argument label has been changed from with
to for
. The class Media
has been renamed as SvrfMedia
. On success, faceFilterNode
is now returned in place of faceFilter
.
Old
:::swift
SvrfSDK.getFaceFilter(with: media, onSuccess: { faceFilter in
/* ... */
})
New
:::swift
_ = SvrfSDK.generateFaceFilterNode(for: media, onSuccess: { faceFilterNode in
/* ... */
})
Structs
SearchOptions and TrendingOptions ➡️ SvrfOptions
Search and Trending endpoint requests now accept the same struct
, SvrfOptions
. nextPageCursor
is no longer supported for Trending requests, instead provide a pageNum
.
Old
:::swift
// Search Endpoint
let searchOptions = SearchOptions(type: [._3d], stereoscopicType: nil, category: nil, size: nil, pageNum: nil)
SvrfSDK.search(query: "Five Eyes", options: searchOptions, /* ... */)
// Trending Endpoint
let trendingOptions = TrendingOptions(type: [._3d], stereoscopicType: nil, category: nil, size: nil, pageNum: nil)
SvrfSDK.getTrending(options: trendingOptions, /* ... */)
New
:::swift
let options = SvrfOptions(type: [._3d], stereoscopicType: nil, category: nil, size: nil, pageNum: nil)
_ = SvrfSDK.search(query: "Five Eyes", options: options, /* ... */)
_ = SvrfSDK.getTrending(options: options, /* ... */)
Errors
The SvrfError
now conforms to the Error
protocol.
Old
:::swift
print(svrfError.title)
print(svrfError.description)
New
:::swift
print(svrfError.svrfDescription)
print(svrfError.localizedDescription)
⭐️ Improvements
[13a612] - Conformed SvrfError
to theError
protocol.
[474969] - Renamed getNodeFromMedia
and getFaceFilter
to generateNode
and generateFaceFilterNode
, respectively.
[b07b3b] - Make node generation asynchronous for remote URLs and return DataRequest
.
[353930] - generateFaceFilterNode
has an option to use the provided occluder or exclude it.
🚧 Maintenance
[353930] - Removed the SvrfClient
dependency, so all http requests are handled by the SDK.
[dba774] - Updated README.
[353930] - Upgrade to SvrfGLTFSceneKit 1.1.0
🐛 Bug Fixes
[353930] - Media
now includes MediaMetaData
.