I want to archive my app with selecting the Build Option "Generic iOS Device" (and i've done that a couple of times before i upgraded to Xcode 9.2) but unfortunatly it fails every time saying "No such module 'CryptoSwift'".
To make it clear, it doesn't have to do anything with SwiftyBeaver; it maybe have to do with my CocoaPods, maybe they don't like that libraries against the target. Or maybe with Xcode 9.2 itself.
To be more specific, it fails here:
import CryptoSwift //No such module 'CryptoSwift'
Whenever i select the simulator or a device (for building, not archiving), it compiles and everything works as expected.
Any suggestions?
The answere was in the first line of my cocoa pod file:
platform :ios, '11.0'
Instead of using 11.0, i changed it platform :ios, '11'.
And than i had to change the deployment target to 11.2. I don't know, what that was changed to 10.0 but those two changes did it.
So if you guys are using any minor versions of iOS in your pod file and you aren't sure, if it exists, just leave it blank!
Apparently it did cause those No such module '' errors, because the compiler wasn't able to build that frameworks in the Derived folder because it didn't know what iOS Version i wanted them to be built.
Related
I am working on an iOS project. This project has been implemented in Swift with some pods (Frameworks) included in the project.
Recently a requirement has come to change Deployment Target from iOS 8.0 to 9.0, I changed it and built the app. The app works fine without any error. But this project has Podfile with below line,
platform :ios, '8.0'
I am confused whether to change this as well or not.
Other than this please mention any other changes required in the project after changing deployment target?
Yes, you should change the podfile as well, so that the code in the library also gets compiled with iOS 9 as its deployment target.
My Swift 4 app rebuilds and runs successfully on all simulators except for Generic iOS Device. If I try to archive it or do a rebuild on Generic iOS Device, I get a No such module error relating to one of my pod frameworks.
I tried adding the framework to Linked Frameworks and Libraries, and that removed the error, but then it fails on the next pod framework, and so on. I have tried all sorts of paths in Framework Search Paths with no luck.
Currently, the value is set to:
I even tried deleting the workspace, the pod lock file, and the pods folder, and then I did a pod install to rebuild everything. Again, it rebuilds clean on any simulator except the generic one. On the generic one, I get No such module on all import statements for pod frameworks.
Any suggestions appreciated, as this problem has me completely stalled, since I can't get a release out.
For me what fixed it was removing one line from my Podfile and rerun pod install.
platform :ios, '11.0'
I think the version of the pods was not aligned with the version of my target, causing this issue.
I was able to fix the problem editing the ios version line in the Podfile to match the Project target version (10.0 in this case) in Info.
#Podfile
platform :ios, '10.0'
Finally I had to run
pod update
After that, I was able to Archive my project selecting Generic iOS Device
In my case I had selected a Device on Xcode when archiving, choosing Generic iOS Device solved my problem.
It's better to check the project settings by going to Build Settings, find Framework Search Paths and add $(SRCROOT) and be sure it's recursive.
I kept facing the issue "No such module" while archiving the app.
I tried this approved answer and it worked perfectly but, a new warning was appearing in my Podifle.
So I did the below and it worked without any warning.
Podfile :
XCode -> Targets -> My App -> General :
switched iOS from 10.0 to 11.0 and then everything worked perfectly.
Seems like by opening up the project by double clicking Runner.xcworkspace instead of Runner.xcodeproj, xcode can finally figure out where everything is. Even though you can still debug in an emulator and on a connected phone from the .xcodeproj file...
Seems strange that it would fix it. But I'm happy to have an Archived build now.
Check out this link for more info
There is another case similar to the same error. when you have an Embedded Framework project with min iOS 10 (Any iOS Device arm64, arm7) while I am archiving the build of the project with min deployment version iOS 11(Any iOS Device amr64) in Xcode 12.5.1.
I have to change the min deployment version of the Embedded Framework project to iOS 11(Any iOS Device amr64) to match with my project's deployment version.
first build your project command + b and see if the frameworks are in red when you look at then at the right sidebar, if they are, xcode did not find your files on the specified path, if not, building and then archiving should work
I was able to get it to archive by re-creating the project from scratch. I created a new project, used the same pod file to install the pod libraries, then copied everything over from the other project. I am now able to archive it and push it to the store. Must have been some corruption or a rogue setting.
In my case, the module which couldn't be found was a dynamic Obj-C framework with a minimum deployment target higher than my application project's minimum deployment target. Bumping my minimum version fixed it, but you could drop the version on the framework instead.
I've searched for hours but cannot find an answer. I have a xcode project with Cocoapods 0.39. in my Podfile i use !use_frameworks to enable a external Swift library in my Objective-C project.
But when i validate (or submit) with xcode, i get the codesigning dialog box. Normally only my app is shown but now it also shows the dynamic framework (cocoapods dependency). I think this is because of the !use_frameworks option.
The screenshot shows the dialog:
Screenshot
I can upload my binary to testflight and it will get processed but is this something i need to worry about? Is likely that apple will reject my app because of this?
There is nothing to worry about it, cocoapods are usually shown in codesigning dialog box, every cocoapod dependency that you will use will be shown there, there will be no issue and Apple will also not reject cocoapods
If you can upload your binary, I guess your minimum deployment target is iOS 8.0 or above, also in your Swift source code, you must
import AXRatingView
If your App's minimum deployment target is iOS 7, you can do this in the Podfile
#use_frameworks!
and comment
//import AXRatingView
then in your ...Bridging-Header.h
#import <AXRatingView/AXRatingView.h>
My App's minimum deployment target is iOS 7.0, ready for sale now.
I recently integrated Google Cloud Messaging into an app targeting iOS 7 and iOS 8. Just grabbed Xcode 7 beta 4 to get started on iOS 9 support, and now I'm getting an error from the linker:
ld: warning: object file (.../Pods/GoogleInterchangeUtilities/Libraries
/libProtocolBuffers.a(Descriptor.pb.o)) was built for newer iOS version (8.3)
than being linked (7.0)
and a handful more like that all for parts of libProtocolBuffers.a.
Does this mean that iOS 8.3 is required to use the GCM library? If so, why did Xcode 6 happily spit out code that (by all appearances in my testing with iOS 7 devices) delivered push notifications to iOS 7.3 without issue?
Given that they're just warnings, I can still compile fine, however I prefer not to ship code that is wrong.
Edit: I emailed google and they said top people will look into it. In the mean time, if you're reading this and bothered by the warning, maybe also email so they'll be encouraged to deal with it.
It actually means that the Minimum Deployment Target of the included library was is to 8.3 and linking it with lower Minimum Deployment Target produces this warning.
Library does not officially support targets lower than 8.3 in this case. While linking this library to target with ower Minimum Deployment Target will still work, it might produce crashes at runtime, if any 8.3 only code is executed on a device that runs older system than 8.3.
There is a reason why developers set 8.3 as the minimum target and this warning should NOT be ignored. It might be harmless in this case, but it is not necessarily harmless in other cases!
To fix these warnings, either use an older version of the library or set your Minimum deployment target to 8.3.
This just means that one of the libraries(Protocol Buffers here) GCM depends on was built for 8.3 although it's compatible with the min sdk version of GCM i.e. 7.0. XCode 7 is just more severe and reports it as a warning but it was always there just not being reported by previous versions.
Overall this is just harmless, everything should work fine. Also there is not much that you can do unless Google patches GCM by building all of it's dependencies with the min sdk version (7.0).
My way to fix:
Check "Deployment Target" is equal to Podfile "Platform"
Delete DerivedData (/Users/yourUser/Library/Developer/Xcode)
Pod install (Terminal)
Clean/Build Project
P.s. Can add more info if needed.
In targets/Build Settings/Linking/Other Linker Flags ,add
-w
silence the warning for me.
FYI, the latest version of the relevant pods seems to have fixed this issue.
Specifically, it looks like it was the upgrade of GoogleInterchangeUtilities from 1.0.0 to 1.1.0 that did the trick.
If you're seeing this, a "pod update" should make it all better!
In my case the reason was that I just updated pods then changed deployment target to lower then it was before and got such warnings. Running pod update again solves the issue.
I am trying to import Parse and Bolts frameworks, but the Xcode is unable to build the project. I tried following ways, but nothing seems to work out :
Creating groups, and copying the folder.
Cleaning the project and Deleting the derived data.
Importing the frameworks into the project and create references.
I am using Xcode 7.0 beta (swift 2.0). Screenshot of the same is attached.
Cheers and thanks in advance!![
I had a similar issue, but I was using cocoapods, as shown in parse.com docs (but they are not yet updated for XCode7 and Swift2).
I just added use_frameworks! to my Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Bolts'
pod 'Parse'
I had the same error and I wrote in the support of the parse and they answered me that they would update for the swift 2 when Xcode 7 will get out from a beta version.
Them answer "We plan to support Swift 2 and Xcode 7 by the time they go out of beta. Currently, there's only one initial beta release of Xcode and iOS 9, and typically a lot of things change before Beta 3 or 4 is released. We'll be keeping a close eye on things and do a release once things settled down. We're tracking any issues reported around Swift 2 and Xcode 7: please file a bug! https://parse.com/help#report".
I had the same problem on XCode 7 beta 6 and the 7.1
It seems that XCode does not "like" to import frameworks from a "relative" location (in this case I was importing the framework from the download folder)
I have copied the libraries in the "Frameworks" directory and imported them in the project. From there and they work.
I had the same problem.
I just deleted the Parse Frameworks and added the objective-c ones with a riding-header. Now it works.