This document applies to our SDK version 5.1.2 for iOS and tvOS.
Our SDK is delivered as a binary xcframework built with Swift Library Evolution support.
iOS 11.0 or later, tvOS 11.0 or later, and the Latest Xcode version.
A reference integration sample application can be obtained from
https://github.com/System73/polynet-ios-sample-app. Once you clone the project, make a checkout to get the version 5 of the integration sample
git checkout PolyNetSDK-version-5.
To build and run the samples, follow the instructions of the README.md in the project directory.
Adding the SDK to your project¶
Information Property List File (Info.plist)¶
Arbitrary HTTP Loads¶
By default, the application will prevent non secure HTTP requests. Open the
Info.plist as a source code, add the following code to allow non-secure HTTP requests.
Instead of modifying the source code directly, you can select the Info tab of your project's target and add the tag
App Transport Security Settings. Inside the App Transport tag, add the tag
Allow Arbitrary Loads: YES.
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict>
Embed Swift Standard Libraries [Only in pure ObjectiveC projects]¶
Select the Build Settings tab of your project's target and go to Build section. Set Always Embed Swift Standard Libraries to YES.
To integrate the
PolyNetSDK.xcframework, the project will need the following frameworks:
To integrate our Service into your Xcode project using CocoaPods, specify in your Podfile the pod
PolyNetSDK. Note that
PolyNetSDK is a framework and you must use the
use_frameworks! flag. The pod will download and build our SDK and the required dependencies.
A sample Podfile for iOS and tvOS:
use_frameworks! target 'YourApp' do pod 'PolyNetSDK', '~> 5.0' end
It is recommended to use the pattern '~> 5.0' to match the latest major version 5.
To integrate Edge Intelligence SDK into your Xcode project using Carthage, specify it in your Cartfile together with the apple/swift-protobuf and daltoniam/Starscream, which are dependencies of the PolyNetSDK.
A sample Cartfile for iOS and tvOS:
binary "https://artifacts.s73cloud.com/repository/raw-s73-releases/s73-polynet-plat/polynet-apple-sdk/PolynetSDK.json" ~> 5.0 github "apple/swift-protobuf" ~> 1.0 github "daltoniam/Starscream" ~> 3.0
Use the operator ~> to match the latest major compatible version for Our SDK and its dependencies.
--use-xcframeworks parameter when using Carthage update.
For Xcode 14 and above, Carthage update will give you the message “Could not find any available simulators for tvOS“. It is because Xcode 14 only have iOS and macOS simulators built-in. To fix this issue tvOS needs to be downloaded to update the Carthage for Swift protobuf and Starscream to install the SDK.