Mobile Services SDK and watchOS support using CocoaPods | Community
Skip to main content
December 24, 2019
Solved

Mobile Services SDK and watchOS support using CocoaPods

  • December 24, 2019
  • 1 reply
  • 4389 views

Hello,

For years now Mobile Services from Adobe Marketing Cloud are used by the app we develop in our office.

Now we added Apple Watch app (as a companion to main app) to the portfolio and we would like to track Analytics from that app.

We tried to follow the guide https://docs.adobe.com/help/en/mobile-services/ios/apple-watch-implementation-watchkit.html

But we were unable to perform some steps described.

 

There is a task to link to AdobeMobileLibrary_Watch.a for Watch target.

But there is no such library available for us.

We use CocoaPods to download and link Mobile Services SDK.

When we try to add a pod with Mobile Services SDK for watchOS target an error is received: 

The platform of the target [target name] (watchOS 2.0) is not compatible with `AdobeMobileSDK (4.18.8)`, which does not support `watchOS`

And when using a pod dedicated to iOS target - there is obviously no access to AdobeMobileLibrary_Watch.a.

 

Instructions posted on https://docs.adobe.com/content/help/en/mobile-services/ios/getting-started-ios/dev-qs.html state:

Before you download the SDK, complete the steps in Create a Report Suite in Core implementation and lifecycle to set up a development report suite and download a pre-populated version of the configuration file.

It seems that this way of getting software package should include libraries for extensions and watchOS app.

But this is not a way for us to handle 3rd party libraries. With such approach we would lose automatic versioning.

We also don't have an access to Suites as these are accessible only for our client so we cannot download a pre-populated package.

 

So how to use Mobile Services SDK for tracking analytics on Apple Watch app when SDK is linked via CocoaPods?

Currently we are blocked with the release because of this issue.

Any help will be appreciated, thank you in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Kevin_Lind

@maciejh79128515 

 

In your Podfile, can you try adding the following line to your watchOS target, as we are handling watchOS as a subspec:

pod 'AdobeMobileSDK/WatchOS2'

 

Please let us know if that resolves the error you are receiving.

 

Thank you,

Kevin Lind

1 reply

Kevin_LindAdobe EmployeeAccepted solution
Adobe Employee
December 26, 2019

@maciejh79128515 

 

In your Podfile, can you try adding the following line to your watchOS target, as we are handling watchOS as a subspec:

pod 'AdobeMobileSDK/WatchOS2'

 

Please let us know if that resolves the error you are receiving.

 

Thank you,

Kevin Lind

December 31, 2019
Thanks! That completely resolved my problem!