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

Error in macOS project _OBJC_CLASS_$_PFProductsRequestHandler version 2.0.2 #1699

Closed
4 tasks done
extnous opened this issue Feb 8, 2023 · 9 comments · Fixed by #1739
Closed
4 tasks done

Error in macOS project _OBJC_CLASS_$_PFProductsRequestHandler version 2.0.2 #1699

extnous opened this issue Feb 8, 2023 · 9 comments · Fixed by #1739
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@extnous
Copy link

extnous commented Feb 8, 2023

New Issue Checklist

Issue Description

Getting the following compilation errors

Undefined symbol: OBJC_CLASS$_PFProductsRequestHandler

Parse-SDK-iOS-OSX added with SPM.
Errors only app for mac os application. Project for iOS App no compilation errors.

Steps to reproduce

Compile a new mac os project that make use of Parse-SDK-iOS-OSX version 2.0.1 or 2.0.2.

Actual Outcome

Снимок экрана 2023-02-08 в 16 37 24

Expected Outcome

No compilation errors.

Environment

ObjC SDK version: 2.0.2
Mac OS - Ventura 13.0
Apple M1 Pro
Xcode - Version 14.2 (14C18)

Client

  • Parse ObjC SDK version: 2.0.2

Server

  • Parse Server version: N/A
  • Operating system: N/A
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): N/A

Database

  • System (MongoDB or Postgres): N/A
  • Database version: N/A
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): N/A

Logs

@parse-github-assistant
Copy link

parse-github-assistant bot commented Feb 8, 2023

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label Feb 9, 2023
@rogernolan
Copy link

rogernolan commented Apr 11, 2023

If you just want to get your project linking and surprise this link error, you can add a stub class to the project with the same name:

PFProductsRecord.h:

#import <Foundation/Foundation.h>
@interface PFProductsRecord : NSObject
@end

and PFProductsRequestHandler.m:

#import "PFProductsRequestHandler.h"
@implementation PFProductsRequestHandler
@end

@santiagoprieto
Copy link

santiagoprieto commented Apr 21, 2023

I have the same issue. It might be because PFProduct and PFPurchase are unavailable for Mac as marked by the PF_OSX_UNAVAILABLE_WARNING.

Is there an easy way to ensure these unavailable files are not included in the Mac builds? I didn't have this issue when using CocoaPods, but now that we moved to SPM this occurred.

@sidan5
Copy link

sidan5 commented May 18, 2023

Same issue here running MacBook Pro M2.

@santiagoprieto
Copy link

This issue is still affecting my app. The interim fix suggested by @rogernolan has not worked for me. If I knew how to fix it in the parse code I would. Help! Anyone?

@santiagoprieto
Copy link

This is so frustrating.

@santiagoprieto
Copy link

Because of this error the whole Parse-SDK-iOS-OSX should drop the "OSX" from its name. It won't compile since February for Mac apps.

@dplewis
Copy link
Member

dplewis commented Sep 28, 2023

@santiagoprieto I don't know why PFProduct isn't supported on Mac, probably because StoreKit didn't support Mac at the time of this SDK creation. Looks like it does now from MacOS 10.7+ and StoreKit 2 has been release.

If you want to look into this you can add PF_TARGET_OS_OSX in places required like here for PFPurchase and PFProduct

I've created a PR to fix this issue #1739

@santiagoprieto
Copy link

@dplewis and @mtrezza you are the best. Thanks for your rad improvement. My app is now compiling perfectly and I'm ready to push a long-awaited update to my users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
6 participants