Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console warning: [Malformed Xcode project]: Found orphaned reference #43

Open
rickmed opened this issue Aug 28, 2024 · 2 comments
Open

Comments

@rickmed
Copy link

rickmed commented Aug 28, 2024

I get this console warning:

[Malformed Xcode project]: Found orphaned reference: 13B07F8E1A680F5B00A75B9A > PBXResourcesBuildPhase.files > 6DE26EAA77674812BFD4FF13

I'm using expo-apple-targets to add Notification Service Extension to my react native expo project.

in ./src/targets/notification-service I have:

expo-target.config.js

/** @type {import('@bacons/apple-targets').Config} */
module.exports = {
  type: 'notification-service',
  name: 'NotificationService',
  deploymentTarget: '13.0',
}

and NotificationService.swift (not sure if this file is necessary since there's an identical one in this repo):

import UserNotifications

class NotificationService: UNNotificationServiceExtension {
    var contentHandler: ((UNNotificationContent) -> Void)?
    var bestAttemptContent: UNMutableNotificationContent?

    override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
        self.contentHandler = contentHandler
        bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)

        if let bestAttemptContent = bestAttemptContent {
            // Modify the notification content here
            bestAttemptContent.title = "\(bestAttemptContent.title) [modified]"

            contentHandler(bestAttemptContent)
        }
    }

    override func serviceExtensionTimeWillExpire() {
        // Called just before the extension will be terminated by the system.
        // Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used.
        if let contentHandler = contentHandler, let bestAttemptContent =  bestAttemptContent {
            contentHandler(bestAttemptContent)
        }
    }
}

In my app.json the first plugin is

      [
        "@bacons/apple-targets",
        {
          "appleTeamId": "...",
          "root": "./src/targets"
        }
      ],

I tried without using the root key (so that is not the problem).

@cemck
Copy link

cemck commented Sep 19, 2024

same issue

1 similar comment
@carozo
Copy link

carozo commented Oct 15, 2024

same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants