Objective Sharpie Does Not See Older iPhone SDKs when using iPhoneos 9.3 - ios

I am trying to bind a framework that has its own Info.plist which requires iphoneos8.2. Per the documentation
https://developer.xamarin.com/guides/cross-platform/macios/binding/objective-sharpie/tools/
I installed Xcode 6.2 which shows the iPhoneos8.2.sdk inside of Applications/Contents/... so that a sharpie command of
sharpie xcode -sdks -v
should return any sdk found at /Application/Xcode*.app. However, my output still just shows the 9.3 sdks. I also tried copying the 8.2 sdk into the Xcode.app/Contents/.. folders as suggested in other posts on SO to no avail. The output does see both Xcode 7.3.1 and 6.2 but it does not list sdk: iphoneos8.2 under the Xcode 6.2 only the macosx10.10 sdk. Like I said the 8.2 iphoneos8.2 is confirmed in the contents/developer/sdks folder for 6.2.
Does anyone know why the 8.2 sdk would not be found by sharpie?

So here's the short of why this doesn't appear.
Objective Sharpie enumerates /Applications/Xcode*.app thus you would think it would pickup an old iphoneos sdk. However it cannot do that because it has a dependency on clang in which clang has a minimum compatibility version against the respective iphoneos, macosx, and watchos. Thus in this case, iphoneos must be > 8.3 and any that meet this requirement will be detected against the sharpie xcode -sdks command.
These of course come directly from clang:
http://clang.llvm.org/docs/AttributeReference.html#availability
ios
Apple’s iOS operating system. The minimum deployment target is specified by the -mios-version-min=*version* or -miphoneos-version-min=*version* command-line arguments.
macos
Apple’s Mac OS X operating system. The minimum deployment target is specified by the -mmacosx-version-min=*version* command-line argument. macosx is supported for backward-compatibility reasons, but it is deprecated.
tvos
Apple’s tvOS operating system. The minimum deployment target is specified by the -mtvos-version-min=*version* command-line argument.
watchos
Apple’s watchOS operating system. The minimum deployment target is specified by the -mwatchos-version-min=*version* command-line argument.

For me, what I did, was to just go into all the info.plist's in the pods I was trying to bind, and change
DTSDKName iphoneos9.3
to
DTSDKName iphoneos10.2
I came up with iphoneos10.2 by running
sharpie xcode -sdks -v
to see what I had available.
I also had to do a soft-link as sharpie was looking into the wrong frameworks directories for header files.
ln -s Pods/XX/iOS/XX.framework Pods/XX/XX.framework
(of course, remove the Pods/XX/XX.framework directory that contains a redirect run & README before doing the soft link)

Related

dumpdecrypted.dylib: missing LC_DYLD_INFO load command

when i use dumpdecrypted.dylib to crack app,i got below:
"dyld: could not load inserted library 'dumpdecrypted.dylib' because no suitable image found. Did find:
dumpdecrypted.dylib: missing LC_DYLD_INFO load command"
Any ideas?
dumpdecrypted to compile with the same SDK version as the iOS version, works fine. Open "Terminal (Terminal)", type xcrun --sdk iphoneos --show-sdk-path. My output is
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk
If the device and xcode's sdk are not the same version, you need to modify the makefile
My system version is iOS8.3,
so the modification is as follows
SDK=xcrun --sdk iphoneos --show-sdk-path
for
SDK=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk
(This iPhoneOS8.X.sdk needs to go to the Internet to download the old version of xcode, and then extract the old version of the sdk, see the description below for the extraction method, and then put it in the same directory as the new version of the sdk, above SDK=/Applications/Xcode.app/Contents/ Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.X.sdk)
8.3 sdk is backward compatible, that is, 8.3 is compatible with 8.0 8.1 ....
The path is the path of the downloaded sdk)

iOS simulator builds fail on M1 Mac with binary framework - "Module compiled with Swift 5.4.2 cannot be imported by the Swift 5.5.1 compiler"

Simulator builds fail in Xcode where a 3rd party framework is being used and that framework is only provided in compiled form.
Device builds are successful, but simulator builds on M1 Macs give an error:
Module compiled with Swift 5.4.2 cannot be imported by the Swift 5.5.1 compiler
The error regarding Swift versions is misleading; as noted in the question, device builds work. It is only simulator builds that fail.
The actual cause is that the framework was built without an M1 simulator slice and so Xcode cannot complete the simulator build.
The framework supplier needs to supply an updated build that includes both x86 and M1 simulator slices.
A work-around is to get Xcode to create X86 simulator builds.
In the Build Settings for your project, specify the x86_64 architecture for iOS simulator builds:

Debug on iOS device with newer release than Base SDK

I have a bug (UI unresponsive) on an app that is built with iOS12 SDK. The bug does not appear if built with iOS13 SDK (but to do this this requires lots of other destabilising changes). I would like to just patch the iOS12SDK build for now until our iOS13SDK build is ready for release.
The problem being is I can't run the debugger on an iOS13.x device on xcode 10.3 to find out what the problem actually is!
It used to be that you can set the Base SDK in xcode to previous versions. There is still a Base SDK option which is set to iphoneos (possible to also use iphoneos13.1), and I have tried ln -s'ing my xcode 10.3 iphoneos12.4.sdk into the xcode 11.1 platforms directory, but xcode does not find it.
Any ideas?
Copy and paste iOS13.x Device Support to the below location.
Xcode app > Show package contet > Contents > Developer > Platforms > iPhoneOS.platform > DeviceSupport
You can download device support from here :
https://github.com/iGhibli/iOS-DeviceSupport

Swift does not support the SDK 'iPhoneSimulator8.4.sdk'

Just updated to Xcode 7.0.1, running on El Capitan (GM) with SIP disabled. And now every time I try to compile a Swift project I get this error;
<unknown>:0: error: Swift does not support the SDK 'iPhoneSimulator8.4.sdk'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
I've tried compiling for actual devices as well and get:
<unknown>:0: error: Swift does not support the SDK 'iPhoneOS8.4.sdk'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
My deployment target was originally set to 8.0, I've tried setting it to 9.0 but that makes no difference. My Base SDK is set to Latest iOS(iOS 9.0).
This is across all my Swift projects, even when I create a new project, I still get this error.
It doesn't seem to be affecting Objective-C. One thought I've had, is could this be an issue with SIP being disabled? It doesn't look like a permissions error but I can see no other reason why this isn't working.
This happened to me when I had simultaneously installed both Xcode 7 and 6.4 and after automatic update I was left with 7.0.1 only.
One indication that something got messed up was output of xcodebuild -sdk -version:
xcodebuild[29131:8243992] [MT] DVTSDK: Warning: SDK path collision for path '<DVTFilePath:0x7fac2ae3c800:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk'>': SDK with name 'iphoneos9.0' being superceded by SDK with 'iphoneos9.0'.
...
iPhoneOS8.4.sdk - iOS 9.0 (iphoneos9.0)
SDKVersion: 9.0
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk
PlatformVersion: 9.0
PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
ProductBuildVersion: 13A340
ProductCopyright: 1983-2015 Apple Inc.
ProductName: iPhone OS
ProductVersion: 9.0
...
There might be easier way to solve this, but reinstalling Xcode 7.0.1 fixed it for me.
If you don't want to re-install Xcode (assumption: you're building for iOS 9), just quit Xcode and go to "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/" and remove the "iPhoneOS8.4.sdk" folder from that directory. Be sure to make an external copy if you still need it so you can put it back later. Then restart Xcode, clean, and build. Worked for me.

Missing SDK in target - iphoneos5.0

I'm using Xcode 4.4.1. I'm getting this warning:
Missing SDK in target MyApp iphoneos5.0
I want to target iOS 5.0 and up. Where should I look to fix this?
In Target, Build Settings, Base SDK is set to iphoneos5.0.
EDIT: Furthermore, if I set the base SDK to latest iOS (5.1), does that mean that users running 5.0 will not be able to install the app?
It means your build settings are incorrect. You set the string to "iphoneos5.0" which doesn't exist anymore. You will now be compiling against "iphoneos5.1". Instead you should simply choose "Latest iOS" (= "iphoneos") To have the compiler select automatically.
Users will still be able to run your app on any version above your app's target version (assuming you didn't use any libraries that don't run on those lower versions).

Resources