0

I want to create objective-c framework. I generate podspec,test with "lib lint" push trunk. Part of my podspec : s.source_files = 'MyFramework/*.{h,m}'

s.public_header_files = 'MyFramework/*.h'

s.private_header_files = 'MyFramework/Private.h'

But after all I saw that all my files is public.

enter image description here

Help me smbd, how can I hide .m files?

  • 1
    Possible duplicate of [Lint Fail for Cocoapods](https://stackoverflow.com/questions/40634963/lint-fail-for-cocoapods) – Alex Shubin May 23 '17 at 12:13

3 Answers3

0

Your XCode is probably on swift 3.1. just run in your pod folder:

echo "3.1" > .swift-version

Or replace it with another version of swift if you're on 2.3 for example.

It will create .swift-version file so after that you can run pod lib lint or trunk push command again.

Alex Shubin
  • 3,549
  • 1
  • 27
  • 32
0

I have found a way of a solution. I make archive my frameworks and add it in the project folder. Later in podspec I wrote s.vendored_frameworks = archive (necessary to specify a full way). Also in s.source_files I wrote my headers.

 s.source_files = 'MyFramework/Classes/*.{h}'
 s.vendored_frameworks = 'Frameworks/MyFramework.framework'
-1

just follow this link, and when it says to do below command

pod trunk push xyz.podspec

instead follow this

pod trunk push xyz.podspec --allow-warnings

Hope, this will help you.

Zღk
  • 854
  • 7
  • 25
  • Please use the [edit] link to explain how this code works and don't just give the code, as an explanation is more likely to help future readers. See also [answer]. [source](http://stackoverflow.com/users/5244995) – Jed Fox May 23 '17 at 21:14