orta / ARAnalytics

Simplify your iOS/Mac analytics
MIT License
1.84k stars 217 forks source link

Increased deployment target for Localytics and Intercom. #284

Closed BenchR267 closed 8 years ago

BenchR267 commented 8 years ago

This is a smaller change to achieve https://github.com/orta/ARAnalytics/pull/282, fixes https://github.com/orta/ARAnalytics/issues/283. When building with a lower deployment target, the user will get an error.

delebedev commented 8 years ago

@BenchR267 that looks good, but does not fix the podspec which caused actual trouble - Intercom

BenchR267 commented 8 years ago

@garnett I wanted to do both in different pull requests, but it's of course possible to do both in this one. I'll do it in a few hours :)

BenchR267 commented 8 years ago

Sorry, took a bit longer. I will merge this.

delebedev commented 8 years ago

@BenchR267 @orta sorry for posting it here, doing it for keeping the context. Intercom actually won't allow it to compile. I don't know how framework embedding works in CocoPods and how macro on screenshot does but it looks like it still takes into account main ARAnalytics target, which is 7.0

BenchR267 commented 8 years ago

I'm not getting it. Isn't the prohibiting of compilation the aim to achieve? We wanted to increase the deployment target for the specific subspecs, so that others are not effected.

delebedev commented 8 years ago

Deployment target of my app is iOS 9. Expected result for me is to include Intercom + Localytics via ARAnalytics and compile it altogether. However, during compilation Xcode complains that Intercom is compiled with deployment target<8.0, which is obviously not what I expected.

In podfile I still have platform :ios, '8.0'

Does it help @BenchR267 ?

BenchR267 commented 8 years ago

Can you please take a look and say what is the deployment target of the generated Pods-project?

delebedev commented 8 years ago

@BenchR267 Pods project itself is iOS8. ARAnalytics sublibrary target is 7.0

BenchR267 commented 8 years ago

I tried this Podfile in an example project (deployment target iOS 9.0) and have no problems..

platform :ios, '8.0'

target 'TestARAnalytics' do
  use_frameworks!

  pod 'ARAnalytics/Intercom', :git => 'git@github.com:orta/ARAnalytics.git', :commit => '1ee9fe3c6453f9f710a3b33822337cef17d9813e'

end

Deployment target of ARAnalytics framework target in Pods project is 8.0.

delebedev commented 8 years ago

That is really strange. However I see the difference which might be important: I'm not using use_frameworks, can you please check without this option?

BenchR267 commented 8 years ago

Ah ok, I see the problem...

BenchR267 commented 8 years ago

I'll try something :)

BenchR267 commented 8 years ago

Hm, it's not that trivial. Is it possible to depend the deployment target on the subspecs that are used @orta?

orta commented 8 years ago

I'm not sure, @segiddins - any idea?

segiddins commented 8 years ago

CocoaPods will build the PBXNativeTarget with the highest deployment target of any of the subspecs

orta commented 8 years ago

Thanks, sounds like it should work then

BenchR267 commented 8 years ago

Yeah, but I can not confirm this. Having the subspec at deployment target 8.0 does not increase the deployment target of the target. (Using static linking, with dynamic frameworks everything works fine)