Giter VIP home page Giter VIP logo

Comments (5)

thehesiod avatar thehesiod commented on June 24, 2024

btw, work-around is setting:

export DYLD_FRAMEWORK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks:/Applications/Xcode.app/Contents/OtherFramework

but it would be nice it it behaved nicely with the existing xcode-select/DEVELOPER_DIR mechanism

from ios-sim.

shazron avatar shazron commented on June 24, 2024

Awesome - thanks, I'll try to get to this soon, either that if you want to send a pull request that will be great as well

from ios-sim.

thehesiod avatar thehesiod commented on June 24, 2024

Unfortunately I'm not exactly sure how to dynamically load objective C framework APIs yet. Would take me at least a couple days research (If I get some time off I'll try, also I'm a github newb, more of a perforce person) btw, here's what I'm currently using in my bash build scripts after manually setting DEVELOPER_DIR based on the xcode selected:

export DYLD_FRAMEWORK_PATH=${DEVELOPER_DIR}/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks:$(dirname "${DEVELOPER_DIR}")/OtherFrameworks

Also, if you want an even BETTER solution you can enumerate the versions of xcode installed and list ALL the available simulators/sdks for ALL xcode apps installed and then enumerate through all the available frameworks :)
(see below python script) Actually, what I would do is re-write ios-sim in python using ctypes, it would be cooler and be even better for my workflows, hehe :)

def findXCodeVersions(verbose=False):
    plist = plistlib.readPlistFromString(runCMD("system_profiler", ["-xml", "SPDeveloperToolsDataType"], verbose=verbose))[0]
    result = { }
    for item in plist["_items"]:
        version = item["spdevtools_version"].split(" ")[0]
        app_path = dev_path = item["spdevtools_path"]
        if not dev_path.endswith("Developer"): dev_path += "/Contents/Developer"

        sdks = item["spdevtools_sdks"]
        iphonesdks = osxsdks = []

        if "spiphoneos_sdks" in sdks:
            iphonesdks = list(sdks["spiphoneos_sdks"].keys())
        elif "spios_sdks" in sdks:
            iphonesdks = list(sdks["spios_sdks"].keys())

        if "spmacosx_sdks" in sdks:
            osxsdks = list(sdks["spmacosx_sdks"].keys())
        elif "sposx_sdks" in sdks:
            osxsdks = list(sdks["sposx_sdks"].keys())

        result[version] = { "apppath" : app_path, "devpath" : dev_path, "iossdks" : iphonesdks, "osxsdks" : osxsdks }

    return result

Thanks for the quick response btw!

from ios-sim.

fpotter avatar fpotter commented on June 24, 2024

FWIW, we had this same issue come up in xctool.

Here's how we solved it --
https://github.com/facebook/xctool/blob/master/xctool/xctool/main.m#L25

from ios-sim.

shazron avatar shazron commented on June 24, 2024

With Xcode 5.1, iPhoneSimulatorRemoteClient has been removed, so ios-sim is using DVTiPhoneSimulatorRemoteClient now with v1.9.0

from ios-sim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.