Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing iOS app Display Name breaks @testable import

When I update the display name in this field enter image description here

all my tests fail as @testable import HomeApp needs to be updates to match.

I was always under the impression Display Name simply appeared under your app and a few other places, I cannot work out why this is being linked to the @testable import in my modules.

I also the following error:

Could not find test host for HomeTests: TEST_HOST evaluates to "/Users/dev/Library/Developer/Xcode/DerivedData/Home-hjxpvhyfkcwsqwfqzladedveshpm/Build/Products/Development-iphonesimulator/HomeApp.app/HomeApp"

like image 780
Teddy K Avatar asked Oct 19 '25 14:10

Teddy K


1 Answers

When you update the display name field, you would also need to update Test Host field in Build Settings of your test target. The value of Test Host should be $(BUILT_PRODUCTS_DIR)/(name).app/name. Let's say if your app name is HomeAppUpdated it would be $(BUILT_PRODUCTS_DIR)/HomeAppUpdated.app/HomeAppUpdated. You can find Test Host field in build settings of your test target. Refer screenshot below. Hope it helps.

enter image description here

like image 65
Subramanian Mariappan Avatar answered Oct 21 '25 03:10

Subramanian Mariappan