SenTestingKit Not found In Xcode4 - iphone

When I tried to import <SenTestingKit/SenTestingKit.h>, I get this error: SenTestingKit/SenTestingKit.h: No such file or directory.
I am using unit testing for the first. I am using xcode 4.2 with ios 5 sdk. But in my system I have two xcode version installed,4.2 and 3.2.5. Although i am using xcode 4.2 ,xcode3.2.5 is the default xcode in my system. Can any one help me with the unit testing?

SenTestingKit.framework is at :
/Developer/Library/Frameworks/SenTestingKit.framework (OS X)
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOSX.X.sdk/Developer/Library/Frameworks/SenTestingKit.framework (iOS)
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulatorX.X.sdk/Developer/Library/Frameworks/SenTestingKit.framework (simulator)
for Xcode versions 4.3 and above prepend /Applications/Xcode.app/Contents/ to the paths above

I don't know, but the frameworks path will be different for both xcodes. it might be in 3.2.5 frameworks path and when using 4.2, it may not find it. Correct me if I'm wrong.

Related

The document “Main.storyboard” requires at least Xcode 12.0

I am working on Xcode 12. And I created a new project on Xcode 12. I compile & run it successfully. when I run this project on Xcode 11.3 then It throws an error like: The document “Main.storyboard” requires at least Xcode 12.0 .
So, help me to fix this problem. I want to run this project in a lower version of Xcode 12.
Since the project is created in Xcode 12. The minimum required Xcode version is Xcode 12. If you want to compile with Xcode 11.3, recreate the main.storyboard using Xcode 11.3
Edit:
As pointed out my matt in a comment alternative way is to open main.storyboard as source code and update toolversion value same as Xcode 11.3. (try sample storyboard to find toolversion for Xcode 11.3)

Distribute Universal framework written in Swift

I'm facing the issue with distributing compiled swift framework. My framework heavily relies on the libxml2 dynamic library. In order to avoid issues with Swift module compatibility, I've set build flag BUILD_LIBRARY_FOR_DISTRIBUTION = YES.
So I've used Xcode 11.3 Swift v5.1.3 to build my framework. I've integrated it into the Demo.app project. As being expected Demo.app works fine in Xcode 11.3.
However, I have another error trying to build Demo.app in Xcode 11.0 Swift 5.1.
I've got the error:
#import "libxml/HTMLparser.h"
^
/Applications/Xcode_11.0.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.0.sdk/usr/include/libxml2/libxml/HTMLparser.h:15:10: error: 'libxml/xmlversion.h' file not found
#include <libxml/xmlversion.h>
^
/.../DemoApp/ThirdParty/testXML.framework/Modules/testXML.swiftmodule/x86_64-apple-tvos-simulator.swiftinterface:6:8: error: could not build Objective-C module 'libxml2'
import libxml2
^
/.../DemoApp/AppDelegate.swift:11:8: error: failed to load module 'testXML'
import testXML
Here is the repo with both framework and app projects.
I'm using both Xcode version on the same Mac.
Your project runs fine on my Xcode 11.3 tvOS simulator. However there's something I've noticed.
The framework you built only contains x86_64 architectures (simulator only), it won't work on physical devices.
For Xcode before 11.3 it seems like you need to add $(SDKROOT)/usr/include/libxml2 and ${SRCROOT}/libxml2 to Build Settings. That fixed the issue for me on Xcode 11.2.1

update Xcode to 10.2.1 run project crash with problem dyld: Library not loaded: #rpath/libswiftCore.dylib

I have a project that was created with Xcode 10, Objective-C, and Swift 4.0 and now upgraded to Xcode 10.2.1.
Error reporting for each run.
I have set Always Embed Swift Standard Libraries to YES
Add #executable_path/Frameworks to "Runpath Search Paths"
These methods don't resolve the issue.
dyld: Library not loaded: #rpath/libswiftCore.dylib
Referenced from: /private/var/containers/Bundle/Application/48371FB5-6A90-4D14-9D65-C7AB5DCAC1A1/one mini.app/Frameworks/Framework152x.framework/Framework152x
Reason: image not found
Actually, the problem is the Framework152x.framework is developed in Swift with Xcode version below 10.2. If your project is built with Xcode 10 with Framework152x.framework means Framework152x.framework runtime is swift 4.2. But if you build your project in Xcode 10.2.1 this issue will occur. Because the XCode 10.2.1 has swift 5 Runtime but Framework152x.framework is expecting swift 4.2. You can resolve this problem only by using Framework152x.framework which needs to be built either in Xcode 10.2 or 10.2.1
I had the same or very similar issue with UI tests failing due to their deployment target being set to iOS 12 and the app under test being set to iOS 10. When I set them both to iOS 10 the UI tests would successfully launch (the app always launched fine). Not sure if that's the problem you're having as you've not mentioned UI tests but perhaps you neglected to mention that :)

Cosmos: Update to Swift 4 reveals new issue: The following binaries use incompatible versions of Swift

After I updated my App to Swift 4 I get this error message:
error: The following binaries use incompatible versions of Swift:
/Users/Konrad/Library/Developer/Xcode/DerivedData/ExploreYourCity-btthjezgywzvnmduiurzwgwzrven/Build/Products/Debug-iphoneos/Cosmos/Cosmos.framework/Cosmos
/Users/Konrad/Library/Developer/Xcode/DerivedData/ExploreYourCity-btthjezgywzvnmduiurzwgwzrven/Build/Products/Debug-iphonesimulator/ExploreYourCity.app/ExploreYourCity
I can not find a solution to this misstake. Whats wrong?
Library setup method: CocoaPods
Version of the library. Example: 12.0.1.
Xcode version. Example:9.0.1.
OS version. Example: iOS 11.0.
*Swift Version: Swift 4.0.
1) Select Project in Project Navigator.
2) Go to General Tab.
3) Remove everything under Embedded Binaries.
4) Remove everything under Linked Frameworks and Libraries except Pods_*.framework
5) Clean, Build and Run.

Module compiled with swift 4.0 cannot be imported in swift 3.0.2

I just used Xcode 9 beta version and did not even compile my app. Now I am not able to run it in Xcode 8. The framework import is giving error. I have to give the archive. Help please. In the snapshot attached , I am importing an external framework MMCardView written in swift. Now that is throwing error in Xcode 8. What should i do?
Try cleaning the project from Product -> Clean in Xcode 8 and build again.