GithubHelp home page GithubHelp logo

Comments (11)

KazuCocoa avatar KazuCocoa commented on August 12, 2024 1

https://github.com/appium/appium-desktop/releases/tag/v1.20.0 and appium 1.20 have

from webdriveragent.

KazuCocoa avatar KazuCocoa commented on August 12, 2024

This happens on macOS 10.15 as well

from webdriveragent.

mykola-mokhnach avatar mykola-mokhnach commented on August 12, 2024

This was expected. We'd need to dynamically adjust https://github.com/appium/WebDriverAgent/blob/master/Scripts/carthage-wrapper.sh to select either x86_64 or arm64 arch depending on the current Mac architecture.

Also, it is necessary to dynamically adjust .xcconfig files to build arm64 for simulators on such macs as well. "Adjust" simply means to perform a sed/replace operation on the file

Unfortunately I cannot do it myself, since I don't have such machine to test on

from webdriveragent.

KazuCocoa avatar KazuCocoa commented on August 12, 2024

Yeah, I think so. > dynamic something

https://flutter.dev/docs/development/ios-project-migration is probably a similar thing.

Xcode 12.2 had no issue on both M1 (Big Sur) mac and Intel mac (10.15.7), but Xcode 12.3 RC had in both environments.
Carthage builds itself succeeded on both (Xcode 12.2 and 12.3) env via the wrapper.

from webdriveragent.

mykola-mokhnach avatar mykola-mokhnach commented on August 12, 2024

Carthage builds itself succeeded on both (Xcode 12.2 and 12.3) env via the wrapper.

They did succeed, although I assume these frameworks were only built for x64 on arm-based OS

from webdriveragent.

KazuCocoa avatar KazuCocoa commented on August 12, 2024

With below diff and removing tvOS and Mac stuff from Carthage directory, WDA for iOS simulator succeeded to build and run via Xcode 12.3 on Intel mac
It seems we must specify sdk target in carthage build as well.

--- a/Scripts/carthage-wrapper.sh
+++ b/Scripts/carthage-wrapper.sh
@@ -21,5 +21,6 @@ trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
 # the build will fail on lipo due to duplicate architectures.
 echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
 echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig
+echo 'SUPPORTED_PLATFORMS = iphonesimulator' >> $xcconfig

Haven't tried, but echo 'SUPPORTED_PLATFORMS = iphoneos' >> $xcconfig for real devices.
appletvos and appletvsimulator for tvOS.


removing tvOS and Mac stuff

This was because --platform iOS argument also built tvOS and Mac when I added SUPPORTED_PLATFORMS.

Probably I did not know well around this point...

from webdriveragent.

KazuCocoa avatar KazuCocoa commented on August 12, 2024

They did succeed, although I assume these frameworks were only built for x64 on arm-based OS

Yeah, I confirmed this.
Simulators got this architectural issue on M1 macOS. Real devices had no issue. (expected)

from webdriveragent.

KazuCocoa avatar KazuCocoa commented on August 12, 2024

Tried a bit.

--platform iOS seems it does not work with SUPPORTED_PLATFORMS. All schemes ran.
example:
./Scripts/carthage-wrapper.sh build --platform iOS --verbose built Mac and tvOS stuff.
https://github.com/appium/WebDriverAgent/compare/master...KazuCocoa:set-supported-platform?expand=1

Potentially, we should copy what carthage does in build.
But in this case, probably it is better to include libraries into this project to control build configuration only in this project...

from webdriveragent.

KazuCocoa avatar KazuCocoa commented on August 12, 2024

Potentially #434 will fix this issue as well. Will test tomorrow

(This idea is the same as mine in the above comment, But in this case, probably it is better to include libraries into this project to control build configuration only in this project..., so this should work well.)

from webdriveragent.

KazuCocoa avatar KazuCocoa commented on August 12, 2024

#434

from webdriveragent.

napsta32 avatar napsta32 commented on August 12, 2024

Hi @KazuCocoa
Do you know if this fix is available in latest Appium Desktop / Appium projects? I am receiving same error message when trying iOS inspector.

error: Building for iOS Simulator, but the embedded framework 'CocoaAsyncSocket.framework' was built for iOS + iOS Simulator. (in target 'WebDriverAgentRunner' from project 'WebDriverAgent')
error: Building for iOS Simulator, but the embedded framework 'YYCache.framework' was built for iOS + iOS Simulator. (in target 'WebDriverAgentRunner' from project 'WebDriverAgent')
error: Building for iOS Simulator, but the linked and embedded framework 'YYCache.framework' was built for iOS + iOS Simulator. (in target 'WebDriverAgentLib' from project 'WebDriverAgent')
error: Building for iOS Simulator, but the linked and embedded framework 'CocoaAsyncSocket.framework' was built for iOS + iOS Simulator. (in target 'WebDriverAgentLib' from project 'WebDriverAgent')

from webdriveragent.

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.