Integrating SwiftUI in UIKit and Build Settings to Xcode.

Badarinath Venkatnarayansetty
1 min readJan 18, 2020

Follow below steps

  1. Make SwiftUI View ready

2. Include it in UIKit Code like below.

3. If the project is supporting version ≤= iOS 12.0 , Update the Build Settings of Xcode like below.

Expand Link Binary With Libraries then Click on + and then Add SwiftUI.framework and make it Optional

4. In case, if you have added SwiftUI View as part of Development pod, make sure to update the podspec file with below config.

spec.xcconfig = { ‘OTHER_LDFLAGS’ => ‘-weak_framework “SwiftUI”’ }

Then perform pod install , make to validate the other Linker Flags should like below.

--

--

Badarinath Venkatnarayansetty

Staff Engineer @ Intuit | Building Mobile App experiences , Generative AI , Data