core-plot / core-plot

Core Plot source code and example applications
BSD 3-Clause "New" or "Revised" License
2.77k stars 610 forks source link

Problem with cocoapods and Core Plot HEAD #163

Closed trondkr closed 9 years ago

trondkr commented 9 years ago

Hi. If I understand it correctly the cocoapods podspecs for Core Plot now points to the HEAD. In the latest version there are a couple of lines that should be commented out for Core Plot to compile properly. The lines are in CPTAnimation:

IMP setterMethod = [boundObject methodForSelector:boundSetter]; setterMethod(boundObject, boundSetter, tweenedValue);

IMP setterMethod = [boundObject methodForSelector:boundSetter]; setterMethod(boundObject, boundSetter, buffer);

And in CPTAnimationPlotRangePeriod: IMP getterMethod = [boundObject methodForSelector:boundGetter]; CPTPlotRange *current = getterMethod(boundObject, boundGetter);

I assume these are upcoming implementations. I can of course edit these out myself, but its a problem when running CI unit test with automatic pod update.

Thanks for a great product. Cheers, Trond

eskroch commented 9 years ago

These are fixed on the Master branch. Your podfile should include the following line to use the latest Core Plot code from Master:

pod 'CorePlot', :git => 'https://github.com/core-plot/core-plot.git'
trondkr commented 9 years ago

Thank you

trondkr commented 9 years ago

Erich. I must be doing something wrong here. When I use your suggested settings and install from Master (Installing CorePlot 99.99.99 (was 1.5.1)), I get an error "CorePlot/CPTAnimation.h file not found" when I build my target. Core Plot builds correctly. Do I need to add a search path in build settings or something else when I use this approach? Thanks for your help. T

maslovsa commented 9 years ago

I have the same issue using Pods and getting error "CorePlot/CPTAnimation.h file not found". I try to use different releases and can't build my project.

It's great case for me - to remove "Pods" from .gitignore!

May be someone fix it - may be with with Searching path on Pods internal directories.

eskroch commented 9 years ago

This issue should be fixed now. I created a new Core Plot header file for CocoaPods. The old Mac framework header doesn't work because CocoaPods builds a static library, not a framework. The new header can be used from iOS, too, or you can continue to use the old CorePlot-CocoaTouch.h.

#import "CorePlot.h"
trondkr commented 9 years ago

Thanks Erich! This solved the problem.

pravinmaske2325 commented 5 years ago

Hello seniors, I am not a iOS developer. Due to some problems i have to work on a iOS application. And i am having some problems , i have used the core-plot coco pods in my application(core plot 2.2) After that i am facing some problems please help me , i am not able to describe it in words due not knowing the concepts of iOS development. i have attached some screen shots please check it and help me find the solution . Thank You in advance. screen shot 2018-09-26 at 3 22 30 pm screen shot 2018-09-26 at 3 23 22 pm screen shot 2018-09-26 at 3 21 51 pm

eskroch commented 5 years ago

Try using the release-2.3 branch.

pod 'CorePlot', :git => 'https://github.com/core-plot/core-plot.git', :branch => 'release-2.3'
pravinmaske2325 commented 5 years ago

Thank you for your answer #eskroch After i update the pod file and run the pod install in terminal, it is showing following error while installing through coco pods screen shot 2018-09-26 at 4 04 18 pm

eskroch commented 5 years ago

Could you post your podfile?

pravinmaske2325 commented 5 years ago

Uncomment the next line to define a global platform for your project platform :ios, '9.0'

target 'Atlas Copco' do Uncomment the next line if you're using Swift or would like to use dynamic frameworks use_frameworks!

Pods for Atlas Copco pod 'CorePlot', '~> 2.2'

end

pravinmaske2325 commented 5 years ago

Hello #eskroch
any update on this, i am still stuck here

eskroch commented 5 years ago

Replace

pod 'CorePlot', '~> 2.2'

with

pod 'CorePlot', :git => 'https://github.com/core-plot/core-plot.git', :branch => 'release-2.3'
pravinmaske2325 commented 5 years ago

Hi eskrochh

I have done that all ready and still got the following errors

My pod File code

platform :ios, '9.0'

target 'Atlas Copco' do Uncomment the next line if you're using Swift or would like to use dynamic frameworks use_frameworks!

Pods for Atlas Copco pod 'CorePlot', :git => 'https://github.com/core-plot/core-plot.git', :branch => 'release-2.3'

end

The error while installing pod file is screen shot 2018-10-01 at 11 59 06 am

iDevelopper commented 5 years ago

Try to comment this line: platform :ios, '9.0'

pravinmaske2325 commented 5 years ago

Thank you for your answer's #eskroch and #iDevelopper. I have successfully integrated core plot in my application. The application is running now. But it gives following error If i pass

x.majorIntervalLength = CPTDecimalFromInt(2);

then it gives following error

Assigning to 'NSNumber * _Nullable' from incompatible type 'NSDecimal

Form #eskroch answer in google group i have changed the

x.majorIntervalLength = [NSDecimalNumber decimalNumberWithString:@"2"];

it removes the error but after running the application on device it hung on the chart page and chart are not showing.

is there any suggestion to resolve this issue.

eskroch commented 5 years ago

x.majorIntervalLength = @(2); is more concise.

I don't think that would cause the problem, though. Run the app with the debugger or look at the crash log to see where it's getting hung up.

pravinmaske2325 commented 5 years ago

Hi #eskroch

Thank for your help the issue is something else. It seems that i have to use trailing/trading instead on right/left in my application

pravinmaske25 commented 5 years ago

HI #eskroch

Thanks for all your support all this time.

Few days ago i created the application build successfuly.

Yestarday after updating Xcode to 10 i am facing some issues and not able to found the correct solution if possible can you help me.

The error is following screen shot 2018-10-11 at 3 54 53 pm

Since i am developing the application for iPhone why it is giving me errors in mac specific .

If you have any solution to tell please help me. Thank in advance.

eskroch commented 5 years ago

I've been trying to fix a similar issue in a couple of the Core Plot example apps, too. Xcode gets confused looking for header files in the Core Plot framework. I've tried a bunch of different things, but haven't found the solution yet.