Opening import file for module 'Swift': Permission denied - ios

As the title shows, I'm currently facing a problem in which I'm trying to add a Swift file to my ObjC project. The bridging header is generated and as soon as I'm trying to build, it stops with the error:
<unknown>:0: error: opening import file for module 'Swift': Permission denied
This only happens with 1 specific project (which is an old app that has been receiving updates once every year or so). A newer project can implement the swift file and build without any problems. I've compared the build settings but couldn't find any differences (and the ones that were there, eventually didn't cause the error).
I've attempted to remove all the Swift related data in the app and let it get generated again, which didn't work. I've also tried to build on both iOS8 and 8.1, but to no avail.
I'm currently out of ideas on what can cause it and I haven't been able to find anything on StackOverflow or Google in general about it so far.

The only method I've found and eventually have used is by creating a completely new Xcode project and restructuring/importing the old files. I've spent an Apple ticket on this project, but they haven't been able to help me out with this problem either.
So, my answer to this is; Create a new Xcode project if it's too outdated to implement Swift.

Related

Transferring Xcode Project from one computer to another brings random errors?

I have a Xcode project I got from another developer. Initially when I opened it it has a bunch of errors (most of which were un-updated frameworks). I got it to work after a while and I fixed it. I want pass it back to the manager since I'm leaving uni in a few months. I copied it over to my friends Mac to see what would happen if I just took the project and all it's folders and made it a zipfile. It didn't work for some reason. It gave me an error:
error: using bridging headers with framework targets is unsupported
But why did that come up? I mean it's the same code on the slightly different versions of Xcode (13.1 versos 14.1) but I doubt there was a massive change between the two that would cause this. I want to be able to pass these app later in the future without having to care about this stuff. I made a GitHub (link below) would cloning that work? Also the laptop I chose was just a fresh reset. Would it be due to not having coco-pods installed?
I feel like I could go through and fix it all on that laptop and document that but then I'm afraid that every time I put it on a new one it would come up with random errors every single time making my documentation moot.
https://github.com/AbdullahMSaid/SonicExperiment-Works
With big help this was Fixed.
Things that fixed it.
Having the correct version of Xcode
Turning everything from absolute path to relative
Lots of other code fixes. But those are my project specific.
You don't need bridging headers in framework. Use should have something like "YourFramework.h" where you can import your .h files.

How to create framework with inner frameworks?

I absolutely can not understand how it works. I started with a simple one: created framework using "Cocoa Touch Framework" template and add some code to source files. Then using cocoapods I installed some pods to this framework-project. All looks good (maybe not so good actually) and build fine. After that there was an attempt to connect my framework to other xcode project. I did this as follows: just took my test.framework file from Product folder and transferred to another project. At first everything was not bad. The import was successful and I can use my framework-code in another project. But when I run it I have error: dyld: Library not loaded: Reason: image not found. I tried all of the answers to this problem, but nothing helped me.
After that, it was decided to try to connect my framework to other project. This time I got a completely different behavior: namely, I was able to connect the framework, but I could not access the code inside it. I'm completely confused, because I did not change anything. I just did the same with another project.
Please help me. What am I doing wrong?
A related questions:
Can I connect the framework just moving test.framework file into
another project?
For some reason, I should use the approach described above, is there a chance in the theory of success or all that I have done before is not correct?
I tried it a lot with the same result you get , until I posted the problem in Apple forums and they respond with Nested frameworks are not supported in IOS

Module "CocoaLumberjackSwift" not found in latest wikipedia-ios app on XCode 9

I am using wikipedia-ios app for educational purposes, and I successfully used XCode 8 with it. But after the update I get the following error on trying to build the app:
Module "CocoaLumberjackSwift" not found
File: WMFLogging.h
I have used the scripts/setup from wiki's archive, and also I have cleaned the build (and all of the derived data). I even removed the project entirely and download it anew. Still I get the same error. Could someone please help me out with it?

"TapkuLibrary/TapkuLibrary.h" File Not Found

I am trying to build my app but I received an error that "TapkuLibrary/TapkuLibrary.h" file not found but the file is added to my references.
I am not the one who did this project, this was just past to me without proper turn over.
I actually replaced my laptop and just open my source code from a new one with XCode 7.3.1
I also tried several solutions that I found here but still not working.
I'm also loosing some Link Binaries,

No such module error

Hello fellow stackers I know this question has been asked before but all of the answers I have seen have not worked for me. I keep getting the following error: No such module 'CloudKit'. I only get this error for the watchkit extension interfaceController the iOS project has zero issues and this whole problem started happening when watchOS 2 came out.
Things I have tried:
changing the framework path to $(SRCROOT)
changing the framework path to ${TARGET_BUILD_DIR}/CloudKit.framework
I tried placing the CloudKit.framework file directly into my project folder which actually gets rid of the no such module error but then I get the “_OBJC_CLASS_$_viewsampleViewController” error
Please help me. Any suggestions would be appreciated:)
Apparently WatchOS 2 decided to drop CloudKit technologies which is a big downer. Now if you wanted to use CloudKit for the watch, you need to relay the data from the parent app which is also a huge buzz kill. I found this in the documentation here: https://developer.apple.com/library/watchos/documentation/General/Conceptual/AppleWatch2TransitionGuide/index.html

Resources