I'm trying to implement MoPub into my Swift app, but in some of the files that are provided by the MoPub pod there are errors saying Cannot find type 'SKAdImpression' in scope. I also cannot import MoPub in my own documents. I tried running pod update restarting xcode, and making sure I am using the .xcworkspace file
Edit: I just re-read the apple documentation, and noticed that it says SKAdImpression is an iOS 14.5+ feature. The version of Xcode I have is for iOS 14.4, so it makes sense as to why it cannot be found. My only concern is, does this mean that my app will only work on iOS 14.5+?
Edit 2: My mac does not support the latest MacOS which is required for the latest Xcode for 14.5. Is there anything I can do to get MoPub working anyway?
The version of Xcode I have is for iOS 14.4
My mac does not support the latest MacOS
Bad news is that is there is no other way around this error, as far as I can see.
What did not help:
Removing the version, pod 'mopub-ios-sdk' and running pod install of pod update again.
Cleaning Build Folder.
Cleaning the /DerivedData folder.
What did help:
Updating Xcode to the 12.5 version.
Take the version out.
pod 'mopub-ios-sdk'
run pod install
Alternatively you can follow this from their guide:
simply import MoPubSDK/MoPub-Bridging-Header.h to your project and
ensure that the Objective-C Bridging Header build setting under Swift
Compiler - Code Generation has a path to the header.
They also have a sample program, take a look at that as well. You can find it here:
https://github.com/mopub/mopub-ios-sdk/tree/master/Canary
Also, make sure you have the project closed out before you run pod install. I have seen issues in the past when this happens.
I have installed SVProgressHud to my Xcode project via cocoa pods but I am getting an error during build time. I have posted an image of the error I am getting. I am using swift 3 and Xcode 8. I have searched everywhere for a solution but can't find anything. The only issue I can think of is the SVProgressHud cocoa pod that I have installed is not compatible with swift 3 and Xcode 8. I tried to install an earlier version of SVProgressHud but it automatically updates to the latest. I really don't know where to go from here. Help would be very much appreciated! Thanks in advance
Edited:
If you would like to try an older version of the pod, you can visit here for list of versions/changelogs: https://cocoapods.org/pods/SVProgressHUD#changelog
and then in your podfile you can set the version like so:
pod 'SVProgressHUD', '2.2.1'
I was able to install the pod and build without issues on Xcode 9.2, so not sure if its and issue with xcode 8 or something else. If its an option, why not update to 9.2?
I have a running project which is working fine with pods. I had to copy this project to develop version-2. Now when I try to build project, I encounter following issue in pod's code. I tried removing this specific pod but same type of errors were shown in different pod.
tried all of this: https://guides.cocoapods.org/using/troubleshooting.html ,but it didn't help at all.
Being new to iOS development, I can't figure out, what I am doing wrong.
It seems like you are using the newer version of pod in older Xcode. So either you need to update your Xcode or downgrade your pod to the relevant version supporting Xcode. From image i can guess you might be using Xcode 7.2 or down and pod is in swift 2.3 or 3
I was able to run my Swift project on the emulator successfully, but wen I try to run it with the device I'm keep getting this error.
This is my POD file
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, ‘9.0’
use_frameworks!
target :’safetyv1’ do
pod 'AWSS3'
end
I tried to do the following in both MyProject.xcodeproj and Pods.xcodeproj
Unfortunately, I'm still getting both errors, I can't run it with my IPhone. I'm using Version 8.0 beta (8S128d) and deployment target set to 8.0 in both .xcodeproj files.
Can someone please help me to fix this? I am stuck with this.
Thanks a lot!
Finally, I managed to fix it. I will post my answer here so it will help someone.
Click on the Pods (blue icon) and expand the left navigation under Pods page. This will show you the installed libraries. Click on the targets one by one and assign a team.
Now you can Clean the project and run it without errors.
This might not the best solution, this is a quick fix to run your project.
More info
Error when build project in new Xcode 8.0 beta
when I run my project, I get errors like this:
It seems that all frameworks in my cocoapods have problem. Is it my problem of my cocoapods? I have reinstalled my cocoapods, and used 'pod setup' or 'pod install' and others, but it doesn't work, and I still have the same errors...
And in Xcode, red 'rd' on the 'Podfile' like this, I don't know if it is related to errors.
pod 1.0.0
ruby 2.0.0
xcode 7.3.1
Anyone have the same problem?
This worked for me:
pod deintegrate
pod install
I faced similar problem in my project. After hours of searching I found that in GENERAL settings of the project in section "Linked Frameworks and Libraries" there are two files for pods: "libPods.a" and "Pods_ProjectName.framework"
Deleting "libPods.a" helped in my case.
Actually issue is related to dependency management for xcode project. You can refer below answer link for solving "linker issue" in xcode. That worked for me.
https://stackoverflow.com/a/38371271/6827175
There are can be a few different cases;
Also, it would help to know all information from your print screen :)
Have you tried to clean your delivery data ?
Go to Xcode -> Preferences -> Open "Location Menu" -> Open Folder With DeliveryData
Close your XCode;(even go to "Force Quit.." menu and close XCode there);
Clean trash bin;
And try build again.
Second case:
Open your target -> Build Settings -> Build Active Architecture
Only-> set "No" option
Do the same with all
your pods' target
Try to deleting Podfile.lock file and Pods folder. Then try to pods install.
I spent 2 days to find the real culprit. It turns out that I tried to run the "Project" instead of running the "Workspace". How this will help others!
I changed Deployment target from 10.0 to 11.0, and this work !
First, you need to check your Xcode version and than check pod version which you installed. If your Xcode version under 9.0 then you should reinstall pod with but old version not latest. It will work.
In my case, I plugged out my real device but in the simulator still it looks Generic iOS device. So I changed it with some simulator and it is fixed.
in my case i changed run simulator to iphone x with ios 11.4 , then it compailed and run OK , then i run in iphone 4s with ios 9.3 , and it wont got error
i think probably issue is in ui test and unit testing components , i hope that apple fix them
I had this issue in test project just make sure that the project has valid host application
This happened to my project because I used Admob in my Unity project and then build it for iOS. I did not note that Unity-iPhone.xcworkspace is created to open instead of Unity-iPhone.xcodeproj. I was keep opening Unity-iPhone.xcodeproj and it was giving the error. Opening the project with Unity-iPhone.xcworkspace fixed the problem for me.
Same issues here. I had not made any changes other than adding some icons to the project. After a few hours of clicking around, I clicked on the pods project and changed the search path to Yes. That solved it for me.
Workspace Setting and change Build System to Legacy Build System worked for me
If you selected Legacy Build System so change that because this has deprecated
from xcode so use
pod deintegrate
pod install
Quick Fix worked for me
File -> New -> File
Create a swift file
Confirm Create Bridging Header
Go to Build Settings and set Always Embed Swift Standard Libraries to YES
pod deintegrate
pod install
Answer from AlVelig answer