An attempt to build the static fat framework directly from the line-sdk-ios-swift project.

Pre condition, Condition to reproduce

I tried to build a static fat framework directly from the line-sdk-ios-swift project.

  1. Download the source code from the release page on github
  2. Modify the mach-o configuration to static
  3. Build a fat framework that supports iphoneos (arm64) and iphonesimulator (i386, x86_64) architectures

Issue/ Error Message details

dyld: Library not loaded: @rpath/LineSDKObjC.framework/LineSDKObjC Referenced from: /private/var/containers/Bundle/Application/4EE64ADA-D1AE-4044-9596-34B0ACEC62FE/SDKDevelopment.app/SDKDevelopment Reason: image not found dyld: launch, loading dependent libraries DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib

Accompanying respective source code

Resolution Tried

These are problems when applying the fat framework.

  1. (Solved) Swift undefined symbol problem, solved by adding bridge-header to the project under development.

  2. Partially modified ResourceLoading.swift file to reference lineSDK resource, create resource inside linkSDK as Resource.Bundle file and add it to the project under development. (Necessary because static framework does not contain resources)

  3. I added it in the form of a static framework, but an error occurred dyld: Library not loaded: @rpath/LineSDKObjC.framework/LineSDKObjC error occurred.

To solve the Library not loaded error, I checked all the possible causes, but the same error still occurs.

I've spent 4 days trying to solve a problem like this, but I'm confused as I can't figure out the cause.

Is there any developer who proceeded to build with static method fat framework and applied link sdk normally? This static framework method is essential to make a product that can be applied to both objective c-based projects, unity and unreal.

thank you.

Reference information (Version / Platform/ environment)

  • 0
  • 1
  • 717
  • twitter facebook

I solved this problem today.

  1. There was a problem with how to make the fat framework. Don't forget to include architecture-specific swiftmodules.

  2. There are LineSDK, LineSDKObjC, LineSDKObjCBinary Target. The project under development is based on Objective c, in this case you only need to build the LineSDKObjCBinary Target.

  3. If a Swift reference error occurs, create a bridge header or add a reference related to swift to the library search path.

thank you.

  • 0
Are you sure? question.vm