Is there a way to turn off the new objc stubs optimizations in Xcode 14?

My app depends on some precompiled libraries that aren't built with Xcode 14 and I'm running into linker errors when building for device like the following:

Undefined symbol: _objc_msgSend$CGColor

Undefined symbol: _objc_msgSend$CGImage

Undefined symbol: _objc_msgSend$CGPointValue

Undefined symbol: _objc_msgSend$CGRectValue

Undefined symbol: _objc_msgSend$CPUArchForCPUType:subType:

Undefined symbol: _objc_msgSend$HTTPBody

Undefined symbol: _objc_msgSend$HTTPCookieRepresentationForDomain:

Undefined symbol: _objc_msgSend$HTTPHeaders

Undefined symbol: _objc_msgSend$HTTPMaximumConnectionsPerHost

Undefined symbol: _objc_msgSend$HTTPMethod

Can I turn off this optimization?

Replies

The same problem,Xcode14 compiler framework, used in Xcode13

Undefined symbols for architecture arm64:
\"_objc_msgSend$setInsidequote:\", referenced from:
+[JSBCGovrmentUtil setInsidequote:] in JSBCGovermentSDK(JSBCGovrmentUtil.o)
\"_objc_msgSend$setInsideApp:\", referenced from:
+[JSBCGovrmentUtil setInsideApp:] in JSBCGovermentSDK(JSBCGovrmentUtil.o)
\"_objc_msgSend$setNav_color:\", referenced from:
+[JSBCGovrmentUtil setNavColor:] in JSBCGovermentSDK(JSBCGovrmentUtil.o)
\"_objc_msgSend$setINTERFACE_DOMIAN:\", referenced from:
+[JSBCGovrmentUtil setDomain:] in JSBCGovermentSDK(JSBCGovrmentUtil.o)
\"_objc_msgSend$setRealNameAppId:\", referenced from:
+[JSBCGovrmentUtil startReregister] in JSBCGovermentSDK(JSBCGovrmentUtil.o)
\"_objc_msgSend$arrayWithObjects:count:\", referenced from:
+[JSBCGovrmentUtil load] in JSBCGovermentSDK(JSBCGovrmentUtil.o)
\"_objc_msgSend$bundleIdentifier\", referenced from:
+[JSBCGovrmentUtil load] in JSBCGovermentSDK(JSBCGovrmentUtil.o)
\"_objc_msgSend$containsObject:\", referenced from:
+[JSBCGovrmentUtil load] in JSBCGovermentSDK(JSBCGovrmentUtil.o)

The same problem,Xcode14 compiler framework, used in Xcode13


Showing Recent Messages
Undefined symbol: _objc_msgSend$setAudioRouterState:

Undefined symbol: _objc_msgSend$onListenExitWithNotify:error:

Undefined symbol: _objc_msgSend$role

Undefined symbol: _objc_msgSend$setRole:

Undefined symbol: _objc_msgSend$notifyRoomNotifyWithAccount:

Undefined symbol: _objc_msgSend$onListenKickoutWithNotify:error:

Undefined symbol: _objc_msgSend$notifyLeaveWithAccount:

Undefined symbol: _objc_msgSend$onListenRoomBeginWithNotify:error:

Undefined symbol: _objc_msgSend$onListenRoomEndedWithNotify:error:

Undefined symbol: _objc_msgSend$notifyRoomNotifyWithMyAccount:

Undefined symbol: _objc_msgSend$onListenMyAccountWithNotify:error:firstNotify:

Undefined symbol: _objc_msgSend$onListenPassthroughWithNotify:error:

Undefined symbol: _objc_msgSend$onListenChatWithNotify:error:

Undefined symbol: _objc_msgSend$onListenRoomRecoveryHostWithNotify:error:

Undefined symbol: _objc_msgSend$onListenRoomMoveHostWithNotify:error:

Undefined symbol: _objc_msgSend$onListenRoomChatEventWithNotify:error:

The same problem,Xcode14 compiler framework, used in Xcode13

The same problem,Xcode14 compiler framework, used in Xcode13

 
 "_objc_msgSend$backgroundColor", referenced from:
 "_objc_msgSend$instancesRespondToSelector:", referenced from:
 "_objc_msgSend$initWithTitle:message:delegate:cancelButtonTitle:otherButtonTitles:", referenced from:
 "_objc_msgSend$dataWithContentsOfURL:", referenced from:
 "_objc_msgSend$indexPathForRow:inSection:", referenced from:
 "_objc_msgSend$setObject:forKey:", referenced from:
   ...
 "_objc_msgSend$actionWithTitle:style:handler:", referenced from:
   ...
 "_objc_msgSend$norImg", referenced from:
 "_objc_msgSend$whiteColor", referenced from:
   ...
 "_objc_msgSend$string", referenced from:
 "_objc_msgSend$clearSubView", referenced from:
 "_objc_msgSend$viewControllers", referenced from:
 "_objc_msgSend$setFlashMode:", referenced from:
 "_objc_msgSend$setAttributedText:", referenced from:
 "_objc_msgSend$openFileWithPaths:", referenced from:
 "_objc_msgSend$setZoomScale:animated:", referenced from:
 "_objc_msgSend$setSafeBottom:", referenced from:
 "_objc_msgSend$isEqualToString:", referenced from:
   ...
 "_objc_msgSend$deviceInputWithDevice:error:", referenced from:
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)