Open g0ld2k opened 9 years ago
Thats a new one! The solution, I suppose, would be to rename the framework as something else while keeping the name for compiled projects?
+1
Got rejected for the same reason. I'd rather not remove use_frameworks!
. Is there another quick solution for this?
+1
Our's got rejected due to this, too.
time for a rename it seems.
I agree - I have a lot of work right now, but I'd like to look into if you can detect when being compiled as a framework and change the class name dynamically.
Why not just TMReachability? We'll know it's still Reachability under the hood. :)
On Mon, Apr 20, 2015 at 11:09 AM, Tony Million notifications@github.com wrote:
I agree - I have a lot of work right now, but I'd like to look into if you can detect when being compiled as a framework and change the class name dynamically.
— Reply to this email directly or view it on GitHub https://github.com/tonymillion/Reachability/issues/95#issuecomment-94414026 .
Faced the same problem today. Renaming should fix it.
:+1:
I'm also facing this problem. Can't remove use_frameworks!
because we're using some Swift pods.
None of the forks I've looked at seem to rename everything properly for CocoaPods.
@cpatterson I forked and use this regularly to get my app into the app-store. It might be a few fixes behind. I was planning on bringing it up-to-date soon™ (if needed): https://github.com/albertbori/Reachability
@tonymillion I recommend renaming the items in question to TMReachability
instead of chasing the golden helicopter solution. Especially since this issue is a) a blocking issue, and b) over two months old.
@tonymillion: you added the big warning in the README for this issue; but if you don't mind me saying, that's not really a solution that helps a CocoaPods user, which is where this issue was discovered. :wink:
TMReachability
?
I'm struggling a bit with this. I renamed Reachability's files and classes and successfully submitted to Apple but after a pod install
I am getting linker errors with TMReachability. Is there a correct way to fix this via the pod or should I just ditch the pod in favor of my own fork or copying in the files manually?
@warpling: as per @albertbori suggestion, that's what I'm currently doing:
pod 'TMReachability', :git => 'https://github.com/albertbori/Reachability', :commit => 'e34782b386307e386348b481c02c176d58ba45e6'
Thanks @Cinamonas, I missed that! I ended up just pulling in the two files and renaming them.
@albertbori thanks for sharing your fork. fixed this issue for me!
+1
+1
@Cinamonas solution somehow works for me when I run it on the phone, but fails when I attempt an App Store archive. Anyone else run into this?
@DaveCole different target for release/debug perhaps? Can you run it on your phone in release mode? (You can change the mode in Product > Edit Scheme
)
@Cinamonas Thanks so much for creating that fork! Works great. 👍
With CocoaPods 0.36, they added the capability to generate frameworks for pods. For Swift projects, using frameworks eliminates the need for a Objective-C bridge.
Podfile:
Reachability works great as a Framework, however when submitting the app to Apple, Apple incorrectly identifies Reachability as being a private API (it looks like there is a private API class called Reachability), which causes the app to be rejected.
None of the other Pods in my project caused this issue.
I was able to work around the issue by removing the
use_frameworks!
line from my Podfile and creating a Objective-C bridging file, no other code was changed. My submission withoutuse_frameworks!
passed Apple's initial checks without a problem.I'm not sure what the solution would be, but it sounds like there is a collision occurring with Apple's private frameworks due to the naming of your project.