Is it possible to remove some frameworks from the iOS SDK to make them smaller?

For example, what if I wanted to remove CoreData from the SDK when I install to reduce the SDK’s size?

Answered by DTS Engineer in 830727022

The answer to your exact question is “No.” The iOS SDK is embedded within Xcode. Xcode is signed, and removing anything from the SDK would break the seal on its code signature.

Can you take a step back and explain more about the big picture goal here?

The iOS SDK is not exactly huge — currently about 81 MB on disk — so it’s not clear why you think that removing stuff is important.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

The answer to your exact question is “No.” The iOS SDK is embedded within Xcode. Xcode is signed, and removing anything from the SDK would break the seal on its code signature.

Can you take a step back and explain more about the big picture goal here?

The iOS SDK is not exactly huge — currently about 81 MB on disk — so it’s not clear why you think that removing stuff is important.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

i thought it were bigger .. usually when we install the platform support for ios versions it is 2-3gb. Where do I view the ios sdk size exactly in xcode anyway?

You’re mixing up two things:

  • The SDK

  • The platform support

The SDK contains mostly just headers and stub libraries. It’s built in to Xcode. For example:

% find /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/Developer
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/Developer/Library
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/Developer/Library/Frameworks
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/Developer/Library/Frameworks/StoreKitTest.framework
…

If you use the Finder to Get Info on this, you’ll see it’s about 78 MB of content taking 200 MB on disk. The disparity is because the SDK contains lots of small files.

The platform support is much larger, but it’s not built in to Xcode. You manage this using Xcode > Settings > Components. It reports that my iOS 18.2 + iOS 18.3.1 Simulator is 8.71 GB. If you secondary click on this and choose Show in Finder, that takes you to /Library/Developer/CoreSimulator/Volumes/iOS_22D8075/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.3.simruntime. Finder shows it as 18.1 GB of content taking 19 GB on disk. There’s less disparity here because the files are bigger.

Either way both of these items are code signed, and thus there’s no supported way to add or remove parts of them. You can, however, add and remove components as a whole using Xcode > Settings > Components.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

If the sdk is not the platform support, then what is the platform support? What does it mean when we update the xcode and it comes bundled with a newer sdk version?

Is it possible to remove some frameworks from the iOS SDK to make them smaller?
 
 
Q