bytedance / Fastbot_iOS

About Fastbot(2.0) is a model-based testing tool for modeling GUI transitions to discover app stability problems
Other
556 stars 112 forks source link

模拟器上命令行报错:Building for iOS Simulator for architecture arm64 #88

Open blooming2017 opened 2 years ago

blooming2017 commented 2 years ago

命令行运行在模拟器上测试时报错: 多次尝试多个命令,分别如下:

1,BUNDLEID=xxx duration=240 throttle=300 xcodebuild test -workspace Fastbot-iOS.xcworkspace -scheme FastbotRunner -configuration Debug -destination 'platform=iOS Simulator,OS=15.2,name=iPhone 13' -arch x86_64 -only-testing:FastbotRunner/FastbotRunner/testFastbot

2,BUNDLEID=xxx duration=240 throttle=300 xcodebuild test -workspace Fastbot-iOS.xcworkspace -scheme FastbotRunner -configuration Debug -destination 'platform=iOS Simulator,OS=15.2,name=iPhone 13,arch=x86_64' -only-testing:FastbotRunner/FastbotRunner/testFastbot

3,BUNDLEID=xxx duration=240 throttle=300 xcodebuild test -workspace Fastbot-iOS.xcworkspace -scheme FastbotRunner -configuration Debug -destination 'platform=iOS Simulator,OS=15.2,name=iPhone 13' -only-testing:FastbotRunner/FastbotRunner/testFastbot

都报错: Testing failed: Building for iOS Simulator, but linking in dylib built for iOS, file '/Users/huang/Downloads/Fastbot_iOS-main/Fastbot-iOS/fastbot/FastbotLib.framework/FastbotLib' for architecture arm64

对于模拟器,应该是怎样的命令呢,谢了

geron-cn commented 2 years ago

refer this: https://stackoverflow.com/questions/63607158/xcode-building-for-ios-simulator-but-linking-in-an-object-file-built-for-ios-f

 Go to Targets section, select each target and do the following:

Set Build Active Architecture Only to YES
Add Excluded Architectures and set its value to arm64 (See attached)
Set Active scheme (on toolbar next to project name) to any iOS Simulator
Clean Build folder from Product Menu and build.