Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove test frameworks in Frameworks and add device local references as rpath for real devices #780

Merged
merged 10 commits into from
Sep 25, 2023
6 changes: 4 additions & 2 deletions .github/workflows/publish.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ jobs:
-scheme WebDriverAgentRunner \
-destination generic/platform=iOS \
CODE_SIGNING_ALLOWED=NO ARCHS=arm64
- name: Creating a zip of WebDriverAgentRunner-Runner.app for iOS
- name: Creating a zip of WebDriverAgentRunner-Runner.app for iOS after removing test frameworks
run: |
pushd appium_wda_ios/Build/Products/Debug-iphoneos
rm -rf WebDriverAgentRunner-Runner.app/Frameworks/XCT*.framework
KazuCocoa marked this conversation as resolved.
Show resolved Hide resolved
zip -r $ZIP_PKG_NAME_IOS WebDriverAgentRunner-Runner.app
popd
mv $PKG_PATH_IOS/Build/Products/Debug-iphoneos/$ZIP_PKG_NAME_IOS ./
Expand All @@ -58,9 +59,10 @@ jobs:
-scheme WebDriverAgentRunner_tvOS \
-destination generic/platform=tvOS \
CODE_SIGNING_ALLOWED=NO ARCHS=arm64
- name: Creating a zip of WebDriverAgentRunner-Runner.app for tvOS
- name: Creating a zip of WebDriverAgentRunner-Runner.app for tvOS after removing test frameworks
run: |
pushd appium_wda_tvos/Build/Products/Debug-appletvos
rm -rf WebDriverAgentRunner_tvOS-Runner.app/Frameworks/XCT*.framework
zip -r $ZIP_PKG_NAME_TVOS WebDriverAgentRunner_tvOS-Runner.app
popd
mv $PKG_PATH_TVOS/Build/Products/Debug-appletvos/$ZIP_PKG_NAME_TVOS ./
Expand Down
6 changes: 6 additions & 0 deletions Scripts/ci/build-real.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ xcodebuild clean build-for-testing \
# Only .app is needed.

pushd $WD

# to remove test packages to refer to the device local instead of embedded ones
# XCTAutomationSupport.framework, XCTest.framewor, XCTestCore.framework,
# XCUIAutomation.framework, XCUnit.framework
rm -rf $SCHEME-Runner.app/Frameworks/XC*.framework

zip -r $ZIP_PKG_NAME $SCHEME-Runner.app
popd
mv $WD/$ZIP_PKG_NAME ./
11 changes: 8 additions & 3 deletions WebDriverAgent.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2414,7 +2414,6 @@
641EE6C02240C5CA00173FCB /* XCUIApplication+FBHelpers.h in Headers */,
641EE6C12240C5CA00173FCB /* _XCTestObservationCenterImplementation.h in Headers */,
714EAA0E2673FDFE005C5B47 /* FBCapabilities.h in Headers */,
716F0DA22A16CA1000CDD977 /* NSDictionary+FBUtf8SafeDictionary.h in Headers */,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems like Xcode generated this diff automatically...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed this file is not built in tvOS, so added it in tvOS as well

641EE6C22240C5CA00173FCB /* XCUIDevice+FBHelpers.h in Headers */,
71D3B3D6267FC7260076473D /* XCUIElement+FBResolve.h in Headers */,
641EE6C32240C5CA00173FCB /* FBClassChainQueryParser.h in Headers */,
Expand Down Expand Up @@ -3117,7 +3116,6 @@
641EE5FF2240C5CA00173FCB /* XCUIElement+FBForceTouch.m in Sources */,
716C9E0327315EFF005AD475 /* XCUIApplication+FBUIInterruptions.m in Sources */,
641EE6002240C5CA00173FCB /* FBTouchActionCommands.m in Sources */,
716F0DA42A16CA1000CDD977 /* NSDictionary+FBUtf8SafeDictionary.m in Sources */,
719DCF182601EAFB000E765F /* FBNotificationsHelper.m in Sources */,
714EAA102673FDFE005C5B47 /* FBCapabilities.m in Sources */,
641EE6012240C5CA00173FCB /* FBImageIOScaler.m in Sources */,
Expand Down Expand Up @@ -3172,7 +3170,6 @@
buildActionMask = 2147483647;
files = (
64B26508228C5514002A5025 /* XCUIElementDouble.m in Sources */,
716F0DA72A17323300CDD977 /* NSDictionaryFBUtf8SafeTests.m in Sources */,
64B26504228C5299002A5025 /* FBTVNavigationTrackerTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -3496,6 +3493,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "iPhone Developer";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_TESTING_SEARCH_PATHS = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = WebDriverAgentRunner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -3551,6 +3549,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "iPhone Developer";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_TESTING_SEARCH_PATHS = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = WebDriverAgentRunner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -3603,6 +3602,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_TESTING_SEARCH_PATHS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
"$(PLATFORM_DIR)/Developer/Library/PrivateFrameworks",
Expand Down Expand Up @@ -3664,6 +3664,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_TESTING_SEARCH_PATHS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
"$(PLATFORM_DIR)/Developer/Library/PrivateFrameworks",
Expand Down Expand Up @@ -3915,6 +3916,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_TESTING_SEARCH_PATHS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
"$(PLATFORM_DIR)/Developer/Library/PrivateFrameworks",
Expand Down Expand Up @@ -3974,6 +3976,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_TESTING_SEARCH_PATHS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
"$(PLATFORM_DIR)/Developer/Library/PrivateFrameworks",
Expand Down Expand Up @@ -4212,6 +4215,7 @@
buildSettings = {
CLANG_STATIC_ANALYZER_MODE = deep;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_TESTING_SEARCH_PATHS = YES;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = WebDriverAgentRunner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -4259,6 +4263,7 @@
baseConfigurationReference = EEE5CABF1C80361500CBBDD9 /* IOSSettings.xcconfig */;
buildSettings = {
CLANG_STATIC_ANALYZER_MODE = deep;
ENABLE_TESTING_SEARCH_PATHS = YES;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = WebDriverAgentRunner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
Loading