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

Realm doesn't build for release on Mac-Catalyst #7213

Closed
gklka opened this issue Apr 18, 2021 · 4 comments
Closed

Realm doesn't build for release on Mac-Catalyst #7213

gklka opened this issue Apr 18, 2021 · 4 comments

Comments

@gklka
Copy link

gklka commented Apr 18, 2021

Goals

I want to add Mac Catalyst support for my existing iOS app.

Expected Results

I expect the Xcode to build the app for release when I select Archive for the Mac target.

Actual Results

Building works for "My Mac" (development), but doesn't work for "Archive" (release). Error:
"/Users/gk/Library/Developer/Xcode/DerivedData/RealmTest-aujphqtuarytmidttxmqzkwezbbs/Build/Intermediates.noindex/ArchiveIntermediates/RealmTest/BuildProductsPath/Release-maccatalyst/Realm/Realm.framework/Modules/module.modulemap:2:21: Umbrella header 'Realm.h' not found"

Steps for others to Reproduce

  1. create new iOS project in Xcode
  2. pod init
  3. add 'Realm' and 'Realm/Headers' to Podfile
  4. pod install
  5. open xcworkspace
  6. add import into ViewController.m
  7. add Mac target
  8. select any Mac target then hit "Archive"

Code Sample

ViewController.m:

//
//  ViewController.m
//  RealmTest
//
//  Created by GK on 2021.04.18..
//

#import "ViewController.h"

@import Realm;


@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}


@end

Podfile:

# Uncomment the next line to define a global platform for your project
platform :ios, '13.0'

target 'RealmTest' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for RealmTest
  pod 'Realm'
  pod 'Realm/Headers'
  
end

Version of Realm and Tooling

Realm framework version: Realm (10.7.2)

Realm Object Server version: ?

Xcode version: 12.4

iOS/OSX version: 11.2.3

Dependency manager + version: Cocoapods 1.10.1

@tgoyne
Copy link
Member

tgoyne commented Apr 18, 2021

CocoaPods/CocoaPods#10224 fixes this.

@pavel-ship-it
Copy link
Contributor

Hi @gklka, the mentioned fix should be available in CocoaPods 1.10.2

@sync-by-unito sync-by-unito bot closed this as completed Apr 19, 2021
@RichAppz
Copy link

RichAppz commented May 8, 2021

Hey peps, little lost I have seen 1.10.2 as a fix on 2 posts now but there doesn't seem to be a release anywhere for 1.10.2 not even a pre release.

Can you let me know where or when this release will be available?

@DSPerson
Copy link

DSPerson commented Jun 8, 2021

delete RealmSwift from your Podfile file, add it swift Package manager
detail: https://stackoverflow.com/questions/67150275/building-realm-for-mac-catalyst-fails-realm-h-not-found

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants