parse-community / Parse-SDK-iOS-OSX

The Apple SDK for Parse Platform (iOS, macOS, watchOS, tvOS)
https://parseplatform.org
Other
2.81k stars 864 forks source link

missing compatible architecture in xcode 14.2 #1686

Closed adwenn closed 1 year ago

adwenn commented 1 year ago

New Issue Checklist

Issue Description

MBP [mid 2015] xcode 14.2 (14C18) carthage 0.38.0 I'm using Carthage to build and deploy the parse-SDK-iOS into my project. It builds but when I try to run it on the iOS simulator I get the following error (snippet):

Frameworks/Parse.framework/Parse' (file does not start with MH_MAGIC[_64], file does not start with MH_MAGIC[_64], fat file, but missing compatible architecture (have 'arm64,x86_64', need 'x86_64')) '/Users/adwenn/Library/Developer/Xcode/DerivedData/adwennproject-bmvhaatqyaqfvqcbtweebkybniax/Build/Products/Debug-iphonesimulator/ParseUI.framework/Frameworks/ParseFacebookUtilsV4.framework/ParseFacebookUtilsV4' (errno=2)

Environment

I'm using version v1.19.4 of Parse-SDK-iOS-OSX

Am I missing something here?

parse-github-assistant[bot] commented 1 year ago

Thanks for opening this issue!

mtrezza commented 1 year ago

Could you please try adding the SDK using Swift Package Manager pointing to the URL in https://github.com/parse-community/Parse-SDK-iOS-OSX/pull/1683. The feature will be released in a few days.

We'll be removing carthage and Cocoapods support soon.

adwenn commented 1 year ago

Thanks for the quick reply. Ok I looked into #1683 but I'm not really sure what URL you mean that I should use. There is so much information in there. It is not clear what URL you are referring that I should use.
e.g. https://github.com/mman/Parse-SDK-iOS-OSX/tree/spm https://github.com/vazarkevych/Parse-SDK-iOS-OSX/tree/SPM

mtrezza commented 1 year ago

The PR is based on this branch: https://github.com/vazarkevych/Parse-SDK-iOS-OSX/tree/SPM

To add the still unmerged branch via SPM:

  1. In Xcode go to: File > Add packages..., enter this URL: https://github.com/vazarkevych/Parse-SDK-iOS-OSX
  2. In field "Branch" enter "SPM"

You can use this to test the integration via SPM. Since this is a URL to a 3rd party repository (of the party submitting the PR) instead of an official Parse Platform repository, we do not recommend to use this in a production environment but rather wait until the PR is merged and we make an official release.

mtrezza commented 1 year ago

@adwenn Did you get a chance to try out adding the SDK using SPM?

mtrezza commented 1 year ago

Closing as release 2.0.0 supports import via Swift Package Manager.

adwenn commented 1 year ago

Hi @mtrezza,

I forgot mention: I used the Swift Package Manager (SPM) from Martin Man: https://github.com/mman/Parse-SDK-iOS-OSX/tree/spm

This one worked perfectly in my case. The newer one of vazarkevych [SPM] gave me some more errors. So I removed and continue with the other one.

Thanks alot for your help. I owe you a cup of coffee.

mtrezza commented 1 year ago

Interesting, would you mind sharing the errors? Maybe it's something we need to fix in the official version.

adwenn commented 1 year ago

Interesting, would you mind sharing the errors? Maybe it's something we need to fix in the official version.

To give you a proper answer to your question I'm going to provide you with a bit of context on the project I'm working on. It was created in 2019 with some 3rd party libraries (including this iOS Parse-SDK-iOS). I had to bring this project back to live with minimal effort. So basically build, run and deploy to the app store. I didn't want to do any rewrite on the existing (2019) code for it to work.

In order for me to properly answer your question: I took a deep dive into it what was causing these errors and it seems that most of them came because I didn't properly remove the carthage (Parse-SDK) version out of the project. The only actual errors I was getting were:

  1. Target Deployment (I have minimum 11.0 but it was built for newer iOS Simulator version 12.0)
  2. import Parse should be change to either import ParseUI or import ParseCore and this implementation started working too.

So it seems that there is no errors or bugs in this version.

If you have any other questions please let me know

adwenn commented 1 year ago

These are not error but warnings:

Object file (/Users/adwenn/Library/Developer/Xcode/DerivedData/thisproject-bmvhaatqyaqfvqcbtweebkybniax/Build/Products/Debug-iphonesimulator/ParseTwitterUtils.o) was built for newer iOS Simulator version (12.0) than being linked (11.0)

Object file (/Users/adwenn/Library/Developer/Xcode/DerivedData/thisproject-bmvhaatqyaqfvqcbtweebkybniax/Build/Products/Debug-iphonesimulator/ParseCore.o) was built for newer iOS Simulator version (12.0) than being linked (11.0)

Object file (/Users/adwenn/Library/Developer/Xcode/DerivedData/thisproject-bmvhaatqyaqfvqcbtweebkybniax/Build/Products/Debug-iphonesimulator/ParseUI.o) was built for newer iOS Simulator version (12.0) than being linked (11.0)

Object file (/Users/adwenn/Library/Developer/Xcode/DerivedData/thisproject-bmvhaatqyaqfvqcbtweebkybniax/Build/Products/Debug-iphonesimulator/FacebookCore.o) was built for newer iOS Simulator version (12.0) than being linked (11.0)

mtrezza commented 1 year ago

@adwenn Thanks for clarifying. We want to make sure we provide a SDK that works so that you don't have to rely on 3rd party repositories and we combine efforts around the SDK development here. Hence my question.