rvi / ONVIFCamera

Pod and example on how to connect to an ONVIF camera
MIT License
88 stars 18 forks source link

Features/tvos compatibility #3

Closed mohamed-arradi closed 1 year ago

mohamed-arradi commented 6 years ago

TV OS Support

Due to an idea realized during the ONVIFCamera Challenge I was unable to import ONVIFCamera SDK on the TV OS App.

Now it is possible !

Description

So in order to make it happening there was an issue about the SOAP Engine which was compiled only for iOS. Then you cannot have the same SOAPEngine inside the pod...

So I decided to create an another pod spec for the Apple TV which use the same base code but just has a different header file regarding libraries.

Motivation and Context

It fixes an issue I had during the ONVIFChallenge, which was I could not use ONVIF SDK on an TV OS Target even if on the main pod spec it was specified.

How Has This Been Tested?

Manually

Screenshots:

simulator screen shot - apple tv 4k - 2018-06-08 at 14 42 14

rvi commented 6 years ago

Hi Mohamed,

Sorry for the silence, I was quite busy these days, thanks a lot for this great PR!! You rock! I'm adding a few comments in the code.

mohamed-arradi commented 6 years ago

@rvi Hello Remy.

Sorry for the late reply too,

So just to reply to some of your comments.

- Copyright : Yes this is my Xcode I will change them manually to the one which are in the ONVIF projects. Because it is just text I did not make really attention to it.

- Differents Pods: So I looked across the whole web just to see how we can do it, and I get to the same thing as you. Indeed we can have different OS Targets in one pod spec.

However here the issue is not to make the ONVIFCamera Pod shared across TVOs and iOS. The main issue I have been faced is the dependencies... For instance ONVIFCamera iOS use SoapEngine and for TV OS we need to use SoapEngineTV as per below :

s.vendored_frameworks = 'ONVIFCamera/SOAPEngine/SOAPEngineTV.framework'
s.public_header_files = 'ONVIFCamera/SOAPEngine/SOAPEngineTV.framework/Headers/*.h'

Their is no way in a pod spec to do a "If/else" configuration . Hence why the two pod which are the same but have different dependencies. So if you know how to do it I will be pleased to remove this "useless" second pod.