cocoapods-packager icon indicating copy to clipboard operation
cocoapods-packager copied to clipboard

Undefined symbols for architecture armv7

Open wanyakun opened this issue 7 years ago • 5 comments

Hi

first, I clone UICKeyChainStore from Github and use cocoapods packager make a dynamic framework. Then push it to my private spec.

second, In another development pods, it dependency the UICKeyChainStore framework which made in the first step. And in one class PPDBLDevice i use the UICKeyChainStore like follow:

    UICKeyChainStore *keyChainStore = [UICKeyChainStore keyChainStore];
    NSString *deviceID = [keyChainStore stringForKey:key];

When i use cocoapods packager to make dynamic framework for development pods in step second, i got an error as follow:

Undefined symbols for architecture armv7:
      "_OBJC_CLASS_$_UICKeyChainStore", referenced from:
          objc-class-ref in PPDBLDevice.o
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

The packager command is : pod package PPDBLUtils.podspec --force --dynamic --spec-sources=http://git.xxxxx.com/wireless/Specs.git

I think the reason is the UICKeyChainStore binary is not linked to the target framework. In fact it is in a customer framework use another customer framework. And how to solve this problem when make framework.

wanyakun avatar Apr 28 '17 03:04 wanyakun

+1 meet this problem too. I have two development pods, APod & BPod. I use cocoapods packager make APod to a dynamic framework, then push it to my private spec success (same as @wanyakun ). And BPod dependency APod framework. Then package failed, throw errors Undefined symbols for architecture XXX ...

yooomark avatar Jun 17 '17 07:06 yooomark

+1 i had the same problem

jakciehoo avatar Sep 19 '17 08:09 jakciehoo

because it does't add -framework xx in LDFLAGS, and not set FRAMEWORK_SEARCH_PATHS. I just fix this problem. see it https://github.com/silan-liu/cocoapods-packager。

1.uninstall cocoapods-packager first,bacause here we want use our local cocoapods-packager gem. 2.check out the project. 3.cd project dir 4.gem build cocoapods-packager.gemspec 5.gem install cocoapods-packager-1.5.0.gem

silan-liu avatar Jan 26 '18 12:01 silan-liu

+1 . I had the same problem. May add the --no-mangle param

KhazanGu avatar Oct 16 '18 03:10 KhazanGu

because it does't add -framework xx in LDFLAGS, and not set FRAMEWORK_SEARCH_PATHS. I just fix this problem. see it https://github.com/silan-liu/cocoapods-packager。

1.uninstall cocoapods-packager first,bacause here we want use our local cocoapods-packager gem. 2.check out the project. 3.cd project dir 4.gem build cocoapods-packager.gemspec 5.gem install cocoapods-packager-1.5.0.gem

because it does't add -framework xx in LDFLAGS, and not set FRAMEWORK_SEARCH_PATHS. I just fix this problem. see it https://github.com/silan-liu/cocoapods-packager。

1.uninstall cocoapods-packager first,bacause here we want use our local cocoapods-packager gem. 2.check out the project. 3.cd project dir 4.gem build cocoapods-packager.gemspec 5.gem install cocoapods-packager-1.5.0.gem

Does not work!

taozaizai avatar Feb 15 '19 09:02 taozaizai