Skip to content

iOS SDK9.3 - PrivateFrameworks issues #146

@merdok

Description

@merdok

Hi,

i have just updated to the latest Xcode and iOS SDK9.3 and i get the following error when trying to make:

ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/PrivateFrameworks'
ld: framework not found Preferences

I checked under the location where the PrivateFrameworks is always located and it is not there anymore.
Did the PrivateFrameworks directory move or got deleted in the newest SDK?

Activity

kirb

kirb commented on Mar 22, 2016

@kirb
Member

Xcode 7.3 removed all private frameworks from the SDK. For now, please download iOS 9.2 SDK from https://jbdevs.org/sdks/, extract to Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs and set TARGET to use that, or just download Xcode 7.2 again (https://developer.apple.com/downloads/) and use xcode-select to switch to it.

merdok

merdok commented on Mar 22, 2016

@merdok
Author

Thanks! That solved my issue.

kirb

kirb commented on Mar 23, 2016

@kirb
Member

Going to reopen this so people coming to report an issue will see it, and becase we do need to find a solution to this.

reopened this on Mar 23, 2016
mstg

mstg commented on Mar 31, 2016

@mstg
Member

Im gonna dump shared cache to generate tbds with my new tool machotbd (thanks to @uroboro for help)
@kirb and I have talked about this, but just noting it here.

0xdeafcafe

0xdeafcafe commented on Apr 15, 2016

@0xdeafcafe

@kirb When you say set TARGET to use that, I'm not sure exactly what you're referring to. Are you saying set TARGET in the makefile to that directory, or to iPhoneOS9.2.sdk, or something completely different?

kirb

kirb commented on Apr 15, 2016

@kirb
Member

@0xdeafcafe Definitely should have explained that more, sorry.

TARGET is a combination of 4 different configuration options related to the platform being built for. The default is iphone:clang:latest:latest, meaning to build for iOS, using clang, with the latest SDK version, deploying to support iOS versions matching the SDK version, or newer. The second argument is a little useless at the moment as the only possible value is clang (or nothing).

In this case, you should edit ~/.theosrc (which probably doesn’t exist, so create it) and insert something along the lines of:

TARGET = iphone::9.2:9.0

Which indicates that you are building for iOS, using SDK 9.2, and intending to support iOS 9.0 and newer.

0xdeafcafe

0xdeafcafe commented on Apr 15, 2016

@0xdeafcafe

@kirb ah perfect. all working now. thanks!

fiquett

fiquett commented on Apr 16, 2016

@fiquett

hmm.. ive got xcode 7.3 and i downloaded the 9.0 and 9.2 sdks into the SDKs folder.. and then set my ~/.theosrc to TARGET = iphone::9.2:9.0... but it still is complaining and pointing to the 9.3 SDK on make... hmmm... anywhere else to look?

fiquett

fiquett commented on Apr 16, 2016

@fiquett

i think im just going to have to go to xcode 7.0.1. sounds like you cannot run older SDKs with 7.3 ... if i remove the other SDKs temporarily.. the compile complains that 9.0 SDK has been skipped because 9.3 is min version.

128keaton

128keaton commented on Apr 18, 2016

@128keaton

I'm having the same issue, but I've pointed the TARGET var properly...

kirb

kirb commented on Apr 19, 2016

@kirb
Member

Yeah, something isn’t right… will need to look into it. The alternative is SDKVERSION, as I use in my setup here: kirb/dotfiles@6ad4e38

7 remaining items

bolencki13

bolencki13 commented on Jul 18, 2016

@bolencki13

This will require me to add the headers manually into these include rather than through the SDK?

kirb

kirb commented on Jul 18, 2016

@kirb
Member

Private headers were never in the SDK. Public headers are unchanged.

JesseVelden

JesseVelden commented on Jul 27, 2016

@JesseVelden

I'm running theos on iOS 9.3.3 and I got the same error when compiling my preference bundle with ios SDK 9.3:

==> Linking bundle xxxPrefs (armv7)…
ld: framework not found Preferences  
clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation) 

However I included the .h files from https://github.com/theos/headers/tree/master/Preferences and added the Preferences.framework to the PrivateFrameworks folder in the SDK.
Also tried to make clean && make package and added the TARGET to ~/.theosrc
I have to compile with the iOS 9.0 SDK in order to let it work.

kirb

kirb commented on Jul 27, 2016

@kirb
Member

@MegaCookie, yes, this is what this issue is about. Use of the iOS 9.2 SDK or older is the solution for now.

ZaneH

ZaneH commented on Aug 14, 2016

@ZaneH

After following everything in this thread I still couldn't get my project to compile with Preferences. I had one final solution: Terminate the iPhoneOS9.3.sdk symlink.

After that everything compiled and I can see my preferences in Settings.

mstg

mstg commented on Aug 17, 2016

@mstg
Member

Just published 9.3 sdk with private frameworks.
mstg/iOS-full-sdk

You can place the sdk folder in $THEOS/sdks and do:

SDKVERSION = 9.3
SYSROOT = $(THEOS)/sdks/iPhoneOS9.3.sdk

in ~/.theosrc

wazowski78

wazowski78 commented on Sep 13, 2016

@wazowski78

Editing ~/.theosrc with vi command, other command line editor is giving errors.

infused-kim

infused-kim commented on Jan 30, 2017

@infused-kim

Is what is described here still the correct and recommended way of dealing with frameworks?

I want to use the iOS 7 SDK and deploy to iOS 7 and up.

To do that I have:

  • Added 'TARGET = iphone::7.0:7.0' to my makefile (I only want this project to target iOS 7 and not all of them)
  • Downloaded the iOS 7 SDK from sdks.website and placed it in $(THEOS)/sdks/iPhoneOS7.0.sdk
  • Added to .theosrc: SDKVERSION = 7.0
  • Added to .theosrc: SYSROOT = $(THEOS)/sdks/iPhoneOS7.0.sdk

If I leave any of these steps out, it doesn't work.

Is this how I am supposed to set this up?

It seems strange that I am defining what SDK and deployment target I want to use in the makefile, but then have to do it again in the theosrc globally for all projects.

I have also tried THEOS_PLATFORM_SDK_ROOT, but setting it outside of xcode didn't work either.

I would also prefer to keep the SDKs separately from xcode so that I don't have to redownload them every time xcode is updated.

kirb

kirb commented on Jan 30, 2017

@kirb
Member

@KimchaC, yes. Patched SDK (or older SDK) is basically mandatory at this point, unless you avoid linking private frameworks.

At some point I’ll be adding $THEOS/sdks/ to the SDK search path (currently only Xcode.app/…/iPhoneOS.platform/Developer/SDKs/), so after that you’d only need to set the SDK version in $(TARGET).

infused-kim

infused-kim commented on Jan 30, 2017

@infused-kim

Thanks, adding $THEOS/sdks/ would be much appreciated.

In case someone else is confused, here is how I set it up without editing theosrc:

  • Added 'TARGET = iphone::7.0:7.0' to my makefile (I only want this project to target iOS 7 and not all of them)
  • Downloaded the iOS 7 SDK from sdks.website and placed it in $(THEOS)/sdks/iPhoneOS7.0.sdk
  • Created a symlink into Xcode's folder: sudo ln -s $THEOS/sdks/iPhoneOS7.0.sdk/ /Applications/Xcode.app//Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
crzQag

crzQag commented on Feb 16, 2017

@crzQag

I followed KimchaC and another error appear:
Your current SYSROOT, “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk”, appears to be missing. make: *** [before-all] Error 1
Can anyone help me?

Platypus2

Platypus2 commented on Feb 19, 2017

@Platypus2

That error is because it can't find the sdk. If you tried to make the package before doing all the steps you would have got the same error.

Did you make sure to update the symlink command? I had no problem downloading the 10.1 sdk and creating a symlink with:

sudo ln -s $THEOS/sdks/iPhoneOS10.1.sdk/ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs

Note there isn't a double // between Xcode.app/Contents, and there is a space between iphoneOS10.1sdk/ and /applications.

Make sure theos is up to date as well.

kirb

kirb commented on Feb 20, 2017

@kirb
Member

You should avoid modifying Xcode.app, and I’m pretty sure you can’t anyway as of Xcode 8 when SIP is enabled. Set SDKVERSION and SYSROOT in .theosrc as described in #146 (comment).

kirb

kirb commented on Mar 22, 2017

@kirb
Member

As of bcd16b4, we now scan for SDKs in both Xcode.app and theos/sdks/. There is currently an issue with the logic that determines the latest available SDK, where 10.1 will be seen as older than 9.3 (but 8.4 is older than 9.3 as expected), which will be fun to fix since macOS’s ancient sort doesn’t have the -V flag. Of course, if you’re using the patched iPhoneOS10.1.sdk, while Xcode 8.2 is installed, you’ll still need to manually specify your SDK version using TARGET; otherwise Theos will use iPhoneOS10.2.sdk because it’s newer. This also only applies to iOS targets at this point (see #242).

Despite the bugs, I’m considering this fixed. Will add details on downloading/setting up a patched SDK to the installation wiki page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @snakeninny@merdok@kirb@uroboro@fiquett

        Issue actions

          iOS SDK9.3 - PrivateFrameworks issues · Issue #146 · theos/theos