Wowza GoCoder SDK 샘플 소스 빌드 문제 및 해결 방법

2017. 4. 9. 12:40아이폰 개발

Wowza GoCoder SDK 샘플 소스를 다운 받아서 빌드를 하려는데, 자꾸만 "No Such Module WowzaGoCoderSDK" 에러가 뜬다. 온갖 레퍼런스를 찾아서 빌드가 되게 해보려 했으나 왠지 안되는 모양새가 이상했다.

iOS Reference
https://www.wowza.com/resources/gocodersdk/docs/1.0/api-reference-ios/
iOS Sample App
https://github.com/WowzaMediaSystems/gocoder-sdk-samples-ios?utm_medium=email&utm_source=sys_email


그래서 혹시나 해서 Wowza 도큐먼트 대로 새로운 Xcode 프로젝트를 생성하고 WowzaGoCoderSDK.framework를 추가해주니 잘만 빌드가 된다. 샘플 소스의 경우 Xcode 버전이 다르기 때문에 그런 문제가 있는지 모르겠지만, 엉뚱한 문제 때문에 시간 낭비를 또 해버렸다. -_-;;


Swift로 개발하는 경우에는 정적 라이브러리(.a) 보다는 framework 파일을 연동하는 것이 좋을 것 같다.

샘플 소스들을 메인 프로젝트에 붙여보았는데, 큰 문제 없이 잘 붙어서 연동된다. 굿!!!

https://www.wowza.com/docs/how-to-install-gocoder-sdk-for-ios

Add the Wowza GoCoder SDK framework to your project (recommended)


  1. Copy WowzaGoCoderSDK.framework from the SDK distribution folder to your project folder.
  2. Drag WowzaGoCoderSDK.framework that you just copied into your Xcode project's Project navigator.
  3. In the dialog box that appears, select Copy items if needed.
  4. Select your project in the Project navigator, and click General at the top of the project editor.
  5. Under Embedded Binaries, click the + (add) button, select WowzaGoCoderSDK.framework, and then click Add.
  6. Add the SDK umbrella header to the source files you'll be referencing the SDK classes.

    Objective-C:  #import <WowzaGoCoderSDK/WowzaGoCoderSDK.h>

    Swift:  import WowzaGoCoderSDK

  7. (Optional) WowzaGoCoderSDK.framework contains both ARM and x86 code, which allows you to use it on a device or in the simulator. If you intend to submit your app to the App Store, run the following script to strip the inactive code from the binary.
    1. Select your target in the Project navigator, and click Build Phases at the top of the project editor.
    2. From the Editor menu, select Add Build Phase, then Add Run Script Build Phase (or click the + button in the upper-left corner of the Build Phases editor).
    3. Expand the disclosure triangle next to the new Run Script build phase that was just added. In the script editor box, paste the following:
      bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/WowzaGoCoderSDK.framework/strip-frameworks.sh"