OneSignal-iOS-SDK icon indicating copy to clipboard operation
OneSignal-iOS-SDK copied to clipboard

tvOS Support [Needs Implementation]

Open matteocrippa opened this issue 8 years ago β€’ 16 comments

This change is Reviewable

matteocrippa avatar Feb 21 '17 00:02 matteocrippa

it is needed to add support to library to tvOS too in order to have this working

matteocrippa avatar Feb 21 '17 00:02 matteocrippa

@matteocrippa Sorry about the delay, thanks for the pull request. We haven't tested our SDK with tvOS yet so we haven't added this to our podspec.

In your testing is push working for you?

jkasten2 avatar Mar 13 '17 23:03 jkasten2

@jkasten2 nope I'm stuck, I noticed that the lib lacks of the AppleTV support, if you can add that when you compile your library it should work fine now.

matteocrippa avatar Mar 14 '17 09:03 matteocrippa

@matteocrippa We don't have an Apple TV to test this one. Could you use your fork with cocopods to see if OneSignal is working on your Apple TV after the podspec change?

You can use the following in your Podfile to try your changes.

pod 'OneSignal', :git => 'https://github.com/matteocrippa/OneSignal-iOS-SDK.git'

jkasten2 avatar Apr 27 '17 19:04 jkasten2

@jkasten2 I confirm is not working here the issue that raises


Showing Recent Issues
ld: in /Pods/OneSignal/iOS_SDK/Framework/OneSignal.framework/OneSignal(OneSignalAlertViewDelegate.o), building for tvOS, but linking in object file built for iOS, for architecture arm64

so the issue is with the library file, you should add tvOS as supported architecture in order to proceed

matteocrippa avatar Apr 27 '17 21:04 matteocrippa

@matteocrippa I see, could you test this with a local copy of our SDK with the change? Open /Pods/OneSignal/iOS_SDKOneSignal.xcodeproj, add the tvOS architecture, then build the SDK.

You might have to also add tvOS to the Run Script that creates the framework. image

You can the use a local directly as a pod.

pod 'OneSignal', :local => '/Pods/OneSignal'

If you get stuck I can try to make a branch for you to test with.

jkasten2 avatar Apr 27 '17 21:04 jkasten2

@jkasten2 I had a quick check, but I think the API is now using some functions that are not available in tvOS (e.g. currentUserNotificationSettings) so it fails to compile.

I tried to manage to tweak a little using device check, but it is quite huge to fix

matteocrippa avatar Apr 28 '17 12:04 matteocrippa

@matteocrippa Thanks for the details, thinking the best approach to this would be to create another build target and exclude specific source files from the build. Some code will need to be moved into different or new .m files to accomplish this however.

jkasten2 avatar Apr 28 '17 18:04 jkasten2

@jkasten2 I do think so, I managed in the meanwhile to create an Alamofire based wrapper to handle the network calls to Onesignal SDK and it works. I had to do that in order to slip the UI layer that seems to be the one that is providing issue in having the tvOS lib to compile (most of the functions are not available on tvOS)

matteocrippa avatar Apr 28 '17 18:04 matteocrippa

@matteocrippa Good to hear you were able to get OneSignal working with REST API calls.

We would like our SDK to be as compatible as possible but we haven't had to much demand for tvOS support. I'll update this thread if we decide to start work on implementing this.

jkasten2 avatar Apr 28 '17 20:04 jkasten2

Apple TV would also be useful for our project.

IBacklundKuma avatar Jun 19 '17 16:06 IBacklundKuma

Hello, is this ever going to be done. Use OneSignal on tvOS would help me very much. Best regards.

valeriologiudice avatar Jun 06 '20 10:06 valeriologiudice

Gl :package:

matteocrippa avatar Jun 06 '20 11:06 matteocrippa

Gl πŸ“¦

What does it mean @matteocrippa? πŸ˜„

valeriologiudice avatar Jun 06 '20 11:06 valeriologiudice

Cit. "Lasciate ogni speranza o voi che entrate"

matteocrippa avatar Jun 06 '20 14:06 matteocrippa

Is there any hope for this feature? I need it.

ghost avatar Jan 21 '21 11:01 ghost