no such file or directory: 'SwiftyJSON' - ios

I want to ask why my swiftyJSON.framework in a linked library like disable. I already install that framework before, but suddenly I got that message when I run the project, I already remove and reinstall using pod but when I add that framework to my linked library, its show like disable
here the screenshot;
please help.

Create proper podfile where you declare platform and your target (last part of bundle identifier). Make sure they are the same as in your Xcode project settings. When you run pod install you will notice that the file .xcworkspace was created. Open it with Xcode and you should be good to go - just remember to import SwiftyJSON each time you want to use it.
Here you have a swiftyJSON documentation for further reading.

Try to pod install with no SwiftyJSON in your podfile. SwiftyJSON.framework should be removed completely from your Xcode, if not, you have to remove it by yourself.
And then add it back to podfile and pod install again.

You might want to delete your Derived Data folder which is location in /Users/username/Library/Developer/Xcode/DerivedData. As well as this, you might want to do a project clean as well as a folder clean like so:
Project clean:
Shift + command ⌘ + K
Folder clean:
Shift + alt + command ⌘ + K
Make sure your project name isn't the same as the framework name as Xcode doesn't seem to like that and can cause the same error. I hope this helps.

AH , I just solved my problem , it caused by Other linker flag in build settings, i remove all at first and add $(inherited) again , sorry i got mistake to delete one of framework inside there before. thanks , case closed

Try to follow there step:
Click to framework/project you working on.
Remove framework cause error from framework folder
Move to trash Pods folder
Go to target
Choose Build phase
Click x button at trailing of "[CP] Check Pods Manifest.lock"
Clear build folder
Clear data in DerivedData: File>Workspace setting>Users/admin..DerivedData. Delete data in folder hold this project data
Back to terminal and hit "pod update"

Related

symbol(s) not found for architecture arm64

Facing ObjC file reference issue. I tried pod deintegration, removing DerivedData, Cleaning the project, Adding -Objc and $(inherited) FLAGS.
I am using cocoapods, Xcode 9, Swift 4. Please revert if anyone have resolved this issue.
I had same issue make your your ".m" implementation files are assigned to the Target Membership:
For me none of these answers worked, and appeared to cause more problems.
My solution was in terminal trying "pod install" It added a missing file for me and everything was good to go
Try this
Goto Project -> Build setting
Serach enable bitcode & set it to NO
Check for the AppDelegate and OnBoardingViewCtontroller file in your project.
Just delete to and add it again. When your are adding it again make sure that Copy If needed option is checked
This is bcoz if your uncheck this check box then the file reference is created and if you move project the you will get this error.
Check Your Pod file that is it targeting your App Target?.
May be Pod is not targeting your App Target.
This error occurs when you have reference of File or Framework that is not included in Target.
change the Build Configuration from Debug to Release.
Edit Scheme... -> Info -> Run -> Build Configuration
Try Build Active Architecture Only to NO:
You need to add necessary framework to your project. Check all third party party framework and search its required framework for support. For e.g. if you add google analytic then you need to add CoreData , Foundation etc framework. There is some framework is missing for which third party framework needs.
Or you can-
Press "Cmd+Shift+K" to clean up, and quit Xcode.
Delete the cache Run "rm -rf ~/Library/Developer/Xcode/DerivedData"
in terminal
Open the project and re-build it
Hope this will solve your problem.
Pods for UITest and Test projects for the pods was causing the issue. Check for it.
Check if there are certain function which are declared in .h file but are not implemented in implementation file and they are being called from another class.
It should be -ObjC, not -Objc. Note the upper case C.

Pod installed Alamofire 4.4, but class is not being autocomplete by Xcode 8.3

I have noticed this problem as closed before but I am getting the same problem.
P.S - I have imported Alamofire in the class mentioned in the screenshot
Here is my pod details
platform :ios, '10.0'
use_frameworks!
target 'PhotoTagger' do
pod 'Alamofire'
end
Also the only thing being auto completed is AlamofireVersionNumber and i cannot access anything when I am trying to use the auto complete feature. Now if i write Alamofire by hand then I can access some methods, but then again something is going wrong and code is not compiling, which i think boils down to the issue that the class isnt being fetched by auto complete.
I have tried -
In Project settings > Build settings
Always search user path To YES
Header search path to only include "$(inherited)" as non-recursive
All other pods are working fine, except Alamofire.
Also after writing class name by hand or copy pasting, some of the methods that are being auto completed does not have the same signature of the actual method of the Alamofire class
Please please please !! help me sort this out, so that someone out there when facing this can help themselves too. There isnt any solution to this as of now.
P.S
I had opened an issue on Alamofire's Github page, but they responded with
Sorry, we're not responsible for Xcode's autocomplete issues.
In the future, you should open questions like this on Stack Overflow
and tag alamofire.
Cheers. 🍻
Please help, I am stuck with this for quite some time.
EDIT :
Here is my project settings details
Also, I have build the project and still the problem persists.
P.S - Writing the class manually by hand , and the methods even, it compiles but everytime, I have to go to the github page, to copy paste the method signature, The problem is that with Autocomplete, i can navigate all method signatures and know about the public available methods. But I am only restricted to the example methods available in github, as everytime I have to copy paste the methods and the overwrite the implementation. Again, this compiles and runs, but the auto complete is not working, not for the class, or for the functions.
Solution 1
Probably this is not about Alamofire or pod libraries but Swift and XCode. This answer could be your solution, shortly:
Go to Xcode > Preferences > Text Editing Under Code completion
Uncheck 'Suggest completions while typing' Quit out of Xcode and then
relaunch Xcode. Go to Xcode > Preferences > Text Editing again Again
go to Code completion and check 'Suggest completions while typing'.
Try typing library function or enum...
Solution 2
Or you can try this answer if your XCode have some cache file issue, shortly close XCode and remove file below:
~/Library/Caches/com.apple.dt.Xcode
and try again.
Solution 3
Or you can try this answer, shortly:
Find any commented out (/* abc */) code after #end in your files and delete.
Let me know if any solution it works.
I had the same problem once. I can’t remember exactly what worked, but we will figure that out now.
In «Build Settings -> Search path -> Framework Search Paths» check to see if you have the following:
Always Search user Paths : NO
Framework Search Paths: $(inherited), "$PODS_CONFIGURATION_BUILD_DIR/Alamofire", "${PODS_ROOT}/Alamofire/"
These search path might not be the same as yours, so just double check that the path above is correct, according to where the files are saved.
Before you do changes in the config files, take a backup in case something get's messed up.
When you do changes, build your project and restart Xcode.
I just did a test project with Alamofire:
Installing pod:
pod 'Alamofire', '~> 4.4'
Opening xcworkspace first time:
Autocompletion doesn't work. Xcode doesn't recognize import Alamofire.
Then:
Build project: Project -> Build
Xcode recognizes import Alamofire.
When typing Alamofire it doesn't work, only AlamofireVersionNumber is autocompleted.
But when typing Alamofire.(and typing a known command from alamofire it will autocomplete)
For me adding anything to the Build Settings didn't work, but deleting Derived Data and building the Pod scheme explicitely did the trick.
Go to "Manage Schemes" and check the Pods-MyProject scheme and the one of the pod which doesn't autocomplete. Close the window. First select the scheme of the broken pod (button next to the run and stop button) and Build for Running shift + cmd + R. Second select the Pods-MyProject scheme and Build this for Running too.
Switch back to your normal scheme and you should be fine.
Did you delete the derived data for your project or the whole of it? I've had this happen, wipe it all.
I had this exact problem a few days back. I think this is happening because Xcode is not able to find the Alamofire header libraries. What I did to resolve was :
1) Go to build settings and search for 'User Header Search Paths'
2) Enter its value as "${PODS_ROOT}/BuildHeaders" including the quotes
3) Click the thing again and in the right side , change the value of the selection to 'recursive'
Now Restart Xcode and build the project. Now the autocomplete works fine
Sometimes when you install some pod from the terminal's window you need to restart xcode or also the mac, before see the import name correctly.
Unfortunately this is Xcode being stupid. Same issue is happening with most advanced libraries even when using server side SPM. Until apple improves xcode some things will just stay hidden to us unfortunately.
I am currently using Xcode 9.2
Just go for a build after removing any code with error (any incomplete alamofire call attempts or so).
SOLUTION
Start by writing "AF" and then the desired function.
AF.request(url...
AF is global namespace containing API
Your pod string may be wrong. Please try this
pod 'Alamofire', '~> 4.4'
Thanks.

Failed to remove "Info.plist" couldn't be removed

I have been trying to fix this a few days before. I was adding JSQMessagesViewController to my iOS project. Added the library manually by dragging and dropping the JSQMessagesViewController folder downloaded from Github. tried to add a Bridging header for jsqmessagesviewcontroller. tried to add
#import JSQMessagesViewController
#import JSQMessages.h
later then when I build the project I found this error message
error: failed to remove /Users/user/Library/Developer/Xcode/DerivedData/CHATAPP-gcvyuyhkvbxvnlfnrrbmaebxevhx/Build/Products/Debug-iphonesimulator/CHATAPP.app/Info.plist: “Info.plist” couldn’t be removed.
I tried searching but didn't help any... what went wrong? How Can I remove this error ? using swift 2.2 and xcode 7.2
I began experiencing this issue right after making a pod install with Fabric (that made some changes to Info.plist). Then I realized that there was two Info.plist references in my project.
To solve the problem I just removed one of them, cleaned my project (Cmd + Shift + K) and built it again.
Hope this helps.
I fixed the similar issue by removing info.plist from BuildPhases-> Copy bundle resources -> "info.plist"
remove error specific .plist file from "Copy bundle resources" (in my case info.plist in MGSwipeTableCell creating issue)
you may need to add the files to your project. While in XCode right click on your files and select "add files to project" navigate to your project folder and select JSQMessagesViewController files then build.
You may also want to clean your derived data if you press Command Option Shift K then build the project again.
Removed those manually added files from my Project then made a fresh install using Pod now I don't have that error.
i recommend to you use pod to your project or drag and drop only require files from JSQMessagesViewController
you should don't import another project completely.
conclusion :
use pod for using JSQMessagesViewController because it has some dependency

'Framework not found' in Xcode

I know this has been asked a couple of times. I followed instructions from these ones:
Adding frameworks to project in Xcode 5 and having *relative* paths added
xcode4: Linker error: Directory not found for option
Still Xcode is giving this error:
Here's my current configuration:
The bolts framework is so I can use the Parse SDK. I downloaded the blank project from here: https://parse.com/apps/quickstart#parse_data/mobile/ios/native/new
It's working. I tried to copy every config option, but it still doesn't work.
Try deleting Bolts.framework from linked framework and re-add it. Also, in your Framework Search Path keep path until Bolts.framework like $(PROJECT_DIR)/Bolts if it is inside Bolts folder at your project directory path.
I'm pretty new to iOS development. Apparently this problem for me was a result of opening the .xcodeproj Xcode project instead of the .xcworkspace Xcode workspace. I opened the workspace instead and the error has gone away.
error: Framework not found
If you use CocoaPods try to run:
pod deintegrate
pod update
Also use .xcworkspace instead of .xcodeproj
Delete the framework link from the Xcode project setting.
Move the framework to the Project Folder.
Re-add the framework in the Xcode project setting.
clean the project and re-compile it.
delete all frameworks from Embedded Binaries and re-add it
me too was getting this error , I moved the framework file to the root project folder and added to framework again and problem is solved.
1:- Delete the framework from the Xcode project. Quit the Xcode.
2:- Open your project in XCode and go to file under Menu and select Add files to "YourProjectName".
3:- Select "YourFramwork.framework" in the directory where you keep it.
4:- Click on the Copy items if needed checkbox.
5:- Click Add.
Make sure that you have the framework added in both Embedded Binaries and Linked Frameworks and Libraries under Target settings - General. As shown in the following images:-
Here is the solution :
Turn the "$(PROJECT_DIR)" attribute(might be non-recursive by default) into recursive option in Select Project Click on Targets Click - Build Settings Search for 'Framework Search Path' - Double click the input.
Scratched from https://stackoverflow.com/a/31298214/4493512
Besides from removing the framework from the Podfile and Linked Frameworks and Libraries, I also had to remove the reference to the framework in Other Linker Flags.
I just had the same situation (was having a hard time to address the OP's build error after adding a 3rd party framework) and it seems like a bug in Xcode (mine is 8.3.2 (8E2002)).
The problem was that a folder name in path to the framework contained spaces. In this case, Xcode incorrectly escaped them with backslashes like this in Build Settings -> Framework Search Paths:
$(PROJECT_DIR)/Folder\ with\ spaces/Lib
To fix this, just manually edit the entry to remove those backslashes and enclose the whole string in quotes like this:
"$(PROJECT_DIR)/Folder with spaces/Lib"
Delete the framework that is causing the issue (by removing the reference).
Then add it again, following these steps for adding FBSDK frameworks and libraries:
click project
general settings
linked framework and libraries
click the plus button and add all that you want
None of the above worked for me until I found that I had a blank "Any Architecture | Any SDK" line underneath Framework Search Paths / Debug under Build Settings.
Deleted the line and it works!
Error: Framework not found
If you use CocoaPods try to run these commands from terminal:
Intel chip:
pod deintegrate
pod update
Apple Silicon M1 chip:
pod deintegrate
arch -x86_64 pod update
Also use .xcworkspace instead of .xcodeproj
When this error occurred to me was because Pods folder was in iCloud and had no local copy on my computer. Go to your project's folder in Finder and check if there is iCloud's symbol in any of the folders inside it!
I realised that I hadn't run/built my framework with the Generic Device, which strangely lead to these issues. I just put the framework back in and it worked.
If you are using CocoaPods. Similar thing has happened to me. Although this question is old someone like me might still be struggling. So for to help:
after pod install it warns you about project files. I didn't notice till now. it says:
[!] Please close any current Xcode sessions and use
ProjectFile.xcworkspace for this project from now on.
So basically, do not continue working on .xcodeproj after installing Pods. If you do linker won't find files.
My framework has long name like FrameworkSDK_Light-1.0.6.framework so I renamed it to FrameworkSDK_Light.framework and it solved my problem.
I got the error 'AdBrixRM framework not found'. I checked the AdBrixRM.framework. I noticed that 'AdBrixRM' excution file is missed. I copied this file into the framework folder and the issue was gone.
I used to encounter this same exact issue in the past with Google Admob SDK. Most recently, this happened when trying to add Validic libraries. I tried the same old good trick this time around as well and it worked in a jiffy.
1) Remove the frameworks, if already added.
2) Locate the framework in Finder and Drag & Drop them directly into the Project Navigator pane under your project tree.
3) Build the project and Whooo!
Not sure what makes the difference, but adding the frameworks by the official way of going to the section "Linked Framework & Libraries" under project settings page (TARGET) and linking from there does not work for me. Hope this helps.
I found that the file.framework was referencing a file outside my project. So I dragged the file into my frameworks folder under my project and then got rid of the earlier file.framework file and it worked.
add github "BoltsFramework/Bolts-iOS" on your cartfile.
then carthage update.
after copy Bolts.framework from ../carthage/Build/iOS
Switching from iOS simulator to real device solved the problem for me.
Was facing the same error and solved it ---> Build Settings > Build Active Architecture Only = Yes
Please after adding both framework also open each Bolts and Parse framework and add Parse and Bolts to the project then problem will be solve
Running pod update in the root directory of the app fixed the issue for me.
If you are developing one module using cocoapods, try to comment the line
s.vendored_frameworks = "YOURMODULE.framework"
on YOURMODULE.podspec
The error will disappear after you generate and copy your YOURMODULE.framework to your project folder.
I had this issue on one of the project i worked, before you delete and readd the framework do a:
git status
on your project and check to see if the framework is not listed as deleted. In the event that it is either do a
git stash
or
git checkout *framework/file/path*

How to get cocoa pods to work?

I have installed cocoapods. I've done everything that I've seen online, yet I can never successfully import a 3rd party framework into my project. I have tried many, many times--at least 20 probably, and have not once been able to successfully do this. Take for example, this library: https://github.com/uacaps/PageMenu
I added the podfile, I ran "pod install", that worked, I opened up the workspace and not the original project, I added the framework under "linked frameworks and libraries." But it still says "No such module Page Menu." It does this for every single pod that I try to install. What am I doing wrong? From what I've read everyone seems to think they are so easy to install. And they are, problem is they just never work once I do install them. Is there some missing step that everyone else knows about that I don't? I have looked under build settings and I've read something about changing the linker flags, but I couldn't figure out how to do that. I have tried installing the library manually and that didn't work either. Could it be that something is just wrong with my Xcode? I've been having this problem for a few months, and it has stayed consistent since I updated my Xcode recently. Does anyone have any idea what this could be?
edit: link to Podfile photo:
http://i58.tinypic.com/2lc2zqb.png
First,make sure that you have something like this in your PodFile (same folder as your xcode proj)
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'PageMenu'
then cd to the directory and do pod install in terminal.
I am assuming that you are using swift. Build the project. Go to your report navigator.
EDIT:: Do open the proj using xcworkspace instead of xcodeproj
You should see something like this.
This tells you what you have to add in your bridging header.
To create a bridging header, create a random objective c file (with cocoa touch class). XCode will ask you if you want to create bridging header.
Select yes, then delete the files you just created. Next, go to the generated bridging header file. Add in
// this header should be based on the name you see in report navigator.
#import <PageMenu/PageMenu-Swift.h>
Look, Calm Down..
I had the same problem.Didnt give up.try doing this as well,worked for me
create new project
close xcode
go to target folder pop init
open -a Xcode Podfile-uncomment platform -pod 'PageMenu' ( I typed this outside target this time/not like the usual way typing it inside target- do/ ,save and close)
open xcodeworkspace and Type - import PageMenu -( still says unresolved module )
Now Build ..
(worked for me, It somehow works with clean or Build i suppose ,so try both)

Resources