Setting Deployment info to iOS 14 and testing on iOS 13 not working

Hi,

I'm having issues testing an app that was originally built for iOS 13.

I have tree building targets:
Main app: iOS 13
TodaysExtension: iOS 13
WidgetKit: iOS 14 --> this is the new part.

I assumed that the Deployment info section was a way to specify in witch iOS versión should the target be available.

Is there a way to exclude completely the target for non iOS 14 versions?

When testing on an iOS 13 device I get this error:


dyld: Library not loaded: /System/Library/Frameworks/WidgetKit.framework/WidgetKit

When I test the todaysExtension, it works as it should in the iOS 13 device, but when I try to open the MainApp, it crashes.

In the MainApp target, in the Build Phase, there's no widgetkit.framework in the "Link Binary With Libraries".

Maybe it's a bug? 🤷🏻‍♂️

I'm Using Xcode 12 Beta 6.

Thanks in advance,

Hi, your assumption is correct, this setup is expected to work and the main app crashing seems to be unexpected.

Does this also continue to happen after you clean build folder?

If the issue persists, would you be able to submit a feedback with a failing project? (it would be best if you can reproduce on a test project)
Hi,

Thanks for your response.

I started doing the things you suggested and find some interesting behavior:
  1. I created a new project using Xcode Version 11.7 (11E801a) the project consisted of two targets: MainApp and TodaysExtension, both on target 13.0

  2. Then opened the project on Xcode version 12.0 beta 6 (12A8189n), and added the WidgetKit obviously on target 14.0

Then I wan the app on an iPad with iOS versión 13.x.

The worked as it should.


Then I made a copy of my app, opened in Xcode Version 11.7 (11E801a) and deleted the Widget all together, target and code, compile it and there's an error on Xcode


ld: framework not found WidgetKit


Code Block Ld /Users/jgomez/Library/Developer/Xcode/DerivedData/purpleair-bnshrgiqtoqpatelpqxnpswvzjhq/Build/Products/Debug-iphoneos/purpleair.app/purpleair normal arm64 (in target 'purpleair' from project 'purpleair')
    cd /Users/jgomez/Documents/Desarrollos/Copia\ de\ airpollution/airpollution
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios13.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.7.sdk -L/Users/jgomez/Library/Developer/Xcode/DerivedData/purpleair-bnshrgiqtoqpatelpqxnpswvzjhq/Build/Products/Debug-iphoneos -F/Users/jgomez/Library/Developer/Xcode/DerivedData/purpleair-bnshrgiqtoqpatelpqxnpswvzjhq/Build/Products/Debug-iphoneos -filelist /Users/jgomez/Library/Developer/Xcode/DerivedData/purpleair-bnshrgiqtoqpatelpqxnpswvzjhq/Build/Intermediates.noindex/purpleair.build/Debug-iphoneos/purpleair.build/Objects-normal/arm64/purpleair.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/jgomez/Library/Developer/Xcode/DerivedData/purpleair-bnshrgiqtoqpatelpqxnpswvzjhq/Build/Intermediates.noindex/purpleair.build/Debug-iphoneos/purpleair.build/Objects-normal/arm64/purpleair_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/jgomez/Library/Developer/Xcode/DerivedData/purpleair-bnshrgiqtoqpatelpqxnpswvzjhq/Build/Intermediates.noindex/purpleair.build/Debug-iphoneos/purpleair.build/Objects-normal/arm64/purpleair.swiftmodule -framework WidgetKit -Xlinker -dependency_info -Xlinker /Users/jgomez/Library/Developer/Xcode/DerivedData/purpleair-bnshrgiqtoqpatelpqxnpswvzjhq/Build/Intermediates.noindex/purpleair.build/Debug-iphoneos/purpleair.build/Objects-normal/arm64/purpleair_dependency_info.dat -o /Users/jgomez/Library/Developer/Xcode/DerivedData/purpleair-bnshrgiqtoqpatelpqxnpswvzjhq/Build/Products/Debug-iphoneos/purpleair.app/purpleair



  • framework WidgetKit -Xlinker

Despite not having a WidgetKit anymore there's a mention to the library somewhere.

Any ideas on this?

Thanks in advance,


Setting Deployment info to iOS 14 and testing on iOS 13 not working
 
 
Q