Skip to content

Build fails on Mac Catalyst #311

Closed
Closed
@cuttlas

Description

@cuttlas

Your Environment

  • Plugin version: 3.1.0
  • Platform: macOS
  • OS version: Catalina
  • React Native version (react-native -v): 0.63.0

Expected Behavior

Be able to successfully build and use the library when building an iOS app for Mac Catalyst. The BGTaskScheduler which this library uses is available for Mac Catalyst so I'm guessing it should be possible: https://developer.apple.com/documentation/backgroundtasks/bgtaskscheduler?language=objc
If it's not possible to make it work, at least the build should not fail.

Actual Behavior

Build fails in the linking step with the following error:
In ../node_modules/react-native-background-fetch/ios/RNBackgroundFetch/TSBackgroundFetch.framework/TSBackgroundFetch(TSBGTask.o), building for Mac Catalyst, but linking in object file built for iOS Simulator, file '../node_modules/react-native-background-fetch/ios/RNBackgroundFetch/TSBackgroundFetch.framework/TSBackgroundFetch' for architecture x86_64

Steps to Reproduce

  1. Turn on Mac Catalyst for your iOS app: https://developer.apple.com/tutorials/mac-catalyst/turning-on-mac-catalyst
  2. Change the XCode target to "My Mac" and build the app.

Context

The library works perfectly when building for iOS.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions