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 when building in Xcode 10 beta #383

Closed
nijs9 opened this issue Jul 9, 2018 · 14 comments
Closed

Error when building in Xcode 10 beta #383

nijs9 opened this issue Jul 9, 2018 · 14 comments
Labels

Comments

@nijs9
Copy link

nijs9 commented Jul 9, 2018

What did you do?

With a pod install, I use GRDB in my Swift 4.1 project and trying to build the project

What did you expect to happen?

Build without error

What happened instead?

When I build my project, I always get this error:

error: open /Users/user1/Library/Developer/Xcode/DerivedData/App4.0-cnufytypurlkbkdehiqdnpqyspvb/Build/Products/Debug-iphonesimulator/GRDB.swift/GRDB.framework/Headers/GRDB-Bridging.h: Permission denied

Deleting DerivedData folder doesn't fix this. The GRDB-Bridging.h file has only read permissions. When manually changing the permissions to write permission, next time I build permissions are overwritten to readonly again...

When using GRDB.swift 3.2 in Xcode 9, the problem doesn't occur...

Environment

GRDB flavor(s): GRDB.swift
GRDB version: 3.2
Installation method: POD
Xcode version: 10 beta 3
Swift version: 4.1
Platform(s) running GRDB: iOS
macOS version running Xcode: High sierra

@emilpedersen
Copy link

emilpedersen commented Jul 9, 2018

A quick fix I use is:
Put a comment inPods/GRDB.swift/Support/GRDB-Bridging.h file.
// WORKS

@nijs9
Copy link
Author

nijs9 commented Jul 9, 2018

@emilpedersen thanks, this fixed the problem indeed. You are the hero of the day!

@emilpedersen
Copy link

No inside your project folder you should have a Pods folder
Mine is:
Users/emilpedersen/Documents/TimeToStand/Pods/GRDB.swift/Support/GRDB-Bridging.h

@groue
Copy link
Owner

groue commented Jul 9, 2018

Hello, please also see #379

@groue
Copy link
Owner

groue commented Jul 9, 2018

I'm closing this issue since it looks there is no issue any longer. Thanks, @emilpedersen, for chiming in!

@groue groue closed this as completed Jul 9, 2018
@pascalscheffers
Copy link

groue, the problem is not fixed. emilpedersen posted a work around. Until a comment is added to Support/GRDB-Bridging.h, it is not solved.

@groue
Copy link
Owner

groue commented Jul 11, 2018

@pascalscheffers: adding a comment to Support/GRDB-Bridging.h is a very weird workaround. It is unlikely to be the final solution to this problem. And you'll see in #379 that Xcode 10 can give other bizarre symptoms.

You are all running beta software, and this has a meaning: you have chosen to use unfinished software that may contain bugs. You can't expect normal support. You can't expect issues to be solved for you. After all, where's the bug? In your setups? In GRDB? In CocoaPods? In Xcode? Who knows? I certainly don't. And I won't spend much time figuring out, unless I can quickly help, as in #379.

That's why I think that this weird workaround is enough today, and that the issue can be closed.

Yet you can be sure that when Xcode 10 ships for good, GRDB will be ready for good as well. Until then, you have to face the consequences of living in beta 🚧

@sobri909
Copy link
Collaborator

After all, where's the bug? In your setups? In GRDB? In CocoaPods? In Xcode? Who knows?

I think you answered that one yourself: "You are all running beta software". The bug appears to be in the beta software - in Xcode.

The catch is we don't quite have a choice about it. Xcode 10 is here, and a lot of us have to work with it now, even if we would prefer not.

That's why I think that this weird workaround is enough today, and that the issue can be closed.

I agree that it's enough for now. The workaround fixes the problem, but it's also not a sensible piece of code, so committing it to the repo would be weird / wrong.

But the problem is still going to be hitting a whole bunch of devs, who will come looking for answers.

With that in mind, it seems reasonable to keep the issue open until it's no longer a problem? At the very least it gives people an answer when they come looking, thus avoiding duplicate "bug" reports.

@groue
Copy link
Owner

groue commented Jul 11, 2018

With that in mind, it seems reasonable to keep the issue open until it's no longer a problem? At the very least it gives people an answer when they come looking, thus avoiding duplicate "bug" reports.

Sounds sensible 👍

@pascalscheffers
Copy link

@groue cheers. Yeah, I totally agree it is a weird work around, but also harmless. The reality is we need to build in Xcode 10 so we can test on iOS 12.

Cheers.

@groue
Copy link
Owner

groue commented Jul 11, 2018

Yes. Sorry folks I have been slow.

@tapi
Copy link

tapi commented Jul 18, 2018

FWIW it looks like adding a comment and then saving it is just setting the permissions

It is sufficient to run chmod +w Pods/GRDB.swift/Support/GRDB-Bridging.h though apparently you cant put this in a post install hook

@groue
Copy link
Owner

groue commented Sep 5, 2018

GRDB 3.3.0-beta1 is out. It supports Xcode 10 beta 6 and Swift 4.2 - but one may still face Xcode-related issues.

@groue
Copy link
Owner

groue commented Sep 16, 2018

GRDB 3.3.0 is out, with support for Xcode 10 GM.

@groue groue closed this as completed Sep 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants