Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 1, 2008, 09:16 PM   #1
russell.h
macrumors regular
 
Join Date: Jul 2007
Third Party Libraries on iPhone?

Is it possible to use third party libraries (libpurple comes to mind) on the iPhone? If so, can someone explain how, or link me to some information on it?

Thanks,

Russell
russell.h is offline   0 Reply With Quote
Old Apr 1, 2008, 09:44 PM   #2
ChrisA
macrumors G4
 
Join Date: Jan 2006
Location: Redondo Beach, California
Quote:
Originally Posted by russell.h View Post
Is it possible to use third party libraries (libpurple comes to mind) on the iPhone? If so, can someone explain how, or link me to some information on it?

Thanks,

Russell
I'd assume it would have to be statically linked
ChrisA is offline   0 Reply With Quote
Old Apr 2, 2008, 12:34 AM   #3
Sayer
macrumors 6502a
 
Sayer's Avatar
 
Join Date: Jan 2002
Location: Austin, TX
iPhone is not a desktop or laptop computer. It is a PDA/Phone with severe memory restrictions, tight battery usage and only a subset of full OS X features. An app can't remain running in the background and constantly poll the network on an iPhone, it just isn't intended to be used that way.

I suggest learning to program on Mac OS X, sign up and get the iPhone SDK, learn the differences, and then figure out what to do as far as iPhone software.
__________________
Obama is a true statesman whose experience as a state senator, half-term US Senator & guest lecturer in a Constitutional Law class has fully prepared him to take control of our nuclear arsenal.-Me
Sayer is offline   0 Reply With Quote
Old Apr 2, 2008, 01:44 AM   #4
russell.h
Thread Starter
macrumors regular
 
Join Date: Jul 2007
I know what I'm trying to do and how I'm trying to do it, and it will work fine on an iPhone in terms of the hardware limitations. Using libraries (dynamically linked) can actually reduce memory usage if you have more than one program that needs access to the same functionality, as the library only needs to be loaded into memory once. And one way or another, re-implementing chat protocols is a complete waste of my time.

I'm just wondering:

1. Is it possible to use dynamically linked libraries? (I think not)

2. Is it possible to use statically linked libraries, in light of the different architecture, etc?

3. If any of the above is possible, how?
russell.h is offline   0 Reply With Quote
Old Apr 2, 2008, 02:49 AM   #5
gnasher729
macrumors G5
 
gnasher729's Avatar
 
Join Date: Nov 2005
Quote:
Originally Posted by russell.h View Post
I know what I'm trying to do and how I'm trying to do it, and it will work fine on an iPhone in terms of the hardware limitations. Using libraries (dynamically linked) can actually reduce memory usage if you have more than one program that needs access to the same functionality, as the library only needs to be loaded into memory once.
Since only one application is running at a time, there will be only one copy of a library in memory anyway. No savings there.
gnasher729 is offline   0 Reply With Quote
Old Apr 2, 2008, 09:01 AM   #6
fishkorp
macrumors 68000
 
Join Date: Apr 2006
I think part of Apple's "rules" for app development state you can't use 3rd party libraries. Better read them over again.
fishkorp is offline   0 Reply With Quote
Old Apr 2, 2008, 09:38 AM   #7
iSee
macrumors 68030
 
iSee's Avatar
 
Join Date: Oct 2004
Quote:
Originally Posted by russell.h View Post
I know what I'm trying to do and how I'm trying to do it, and it will work fine on an iPhone in terms of the hardware limitations. Using libraries (dynamically linked) can actually reduce memory usage if you have more than one program that needs access to the same functionality, as the library only needs to be loaded into memory once. And one way or another, re-implementing chat protocols is a complete waste of my time.

I'm just wondering:

1. Is it possible to use dynamically linked libraries? (I think not)

2. Is it possible to use statically linked libraries, in light of the different architecture, etc?

3. If any of the above is possible, how?
I didn't read the docs exhaustively, but the parts I read said you are only allowed to install files to your app's folder. So you could use a dynamic library, but not a shared one--you'd have the library installed with your app's bundle.

But any library you use (dynamic or static) is going to have to be ported to the iPhone--either by you or by someone else.

libpurple is an IM libaray, right? You can do an IM app for the iPhone, but, because you aren't allowed to run background tasks (as far as I know), you're only going to be able to receive IMs while the app is running.


Quote:
I think part of Apple's "rules" for app development state you can't use 3rd party libraries. Better read them over again.
Are you sure about that? That doesn't sound right. I know you aren't allowed to host third-party plugins for some reason, but I didn't see anything about third-party libraries.

Quote:
iPhone is not a desktop or laptop computer. It is a PDA/Phone with severe memory restrictions, tight battery usage and only a subset of full OS X features. An app can't remain running in the background and constantly poll the network on an iPhone, it just isn't intended to be used that way.

I suggest learning to program on Mac OS X, sign up and get the iPhone SDK, learn the differences, and then figure out what to do as far as iPhone software.
??? I'm not sure how this relates to the question.
iSee is offline   0 Reply With Quote
Old Apr 2, 2008, 10:31 AM   #8
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
I can't believe you won't be able to use third party libraries on the iPhone. Send ADC an email and ask if you are unsure.
__________________
If they have to tell you every day they are fair you can bet they arent, if they tell you they are balanced then you should know they are not - Don't Hurt me
Eraserhead is offline   0 Reply With Quote
Old Apr 2, 2008, 10:42 AM   #9
ChrisA
macrumors G4
 
Join Date: Jan 2006
Location: Redondo Beach, California
Quote:
Originally Posted by russell.h View Post
Using libraries (dynamically linked) can actually reduce memory usage if you have more than one program that needs access to the same functionality, as the library only needs to be loaded into memory once.
Re-read the part about no background processes. There will never be more then one program running at a time. The advantage of dymanic linking goes away. As I said statically linked.

Dunamically linked libraries would not work well with Apple's distribution model either.
ChrisA is offline   0 Reply With Quote
Old Apr 2, 2008, 10:53 AM   #10
Monkaaay
macrumors 6502
 
Join Date: Jun 2006
Location: Richmond, VA
Did anyone email ADC about this yet? I'm guessing a statically linked library will work but I haven't seen anyone talk about it yet. Let us know if you're able to get it working.
Monkaaay is offline   0 Reply With Quote
Old Apr 2, 2008, 11:05 AM   #11
3247
macrumors regular
 
Join Date: Feb 2008
Location: Germany
Quote:
Originally Posted by russell.h View Post
Is it possible to use third party libraries (libpurple comes to mind) on the iPhone? If so, can someone explain how, or link me to some information on it?
Libpurple (and other GPLv2'd libraries) are not compatible with the conditions Apple sets for it's SDK and distribution through iTunes Store. You can't use them.
3247 is offline   0 Reply With Quote
Old Apr 2, 2008, 11:36 AM   #12
gnasher729
macrumors G5
 
gnasher729's Avatar
 
Join Date: Nov 2005
Quote:
Originally Posted by 3247 View Post
Libpurple (and other GPLv2'd libraries) are not compatible with the conditions Apple sets for it's SDK and distribution through iTunes Store. You can't use them.
You'd have to explain why that would be the case. All applications are shipped as packages, you can just put the source code into the package, and you are fine.
gnasher729 is offline   0 Reply With Quote
Old Apr 2, 2008, 11:49 AM   #13
russell.h
Thread Starter
macrumors regular
 
Join Date: Jul 2007
Quote:
Originally Posted by gnasher729 View Post
You'd have to explain why that would be the case. All applications are shipped as packages, you can just put the source code into the package, and you are fine.
I hadn't thought about that, but now that I do, it could definitely be a problem. As the distributor of the binary, I believe that Apple would be required to offer the source code as well. And I'm not sure that encapsulating the source in the package destined for the iPhone would be considered a sufficiently standard or transparent means of doing so. But I'm more interested in the technical aspects of this.
russell.h is offline   0 Reply With Quote
Old Apr 2, 2008, 03:06 PM   #14
iSee
macrumors 68030
 
iSee's Avatar
 
Join Date: Oct 2004
Ah, couldn't you simply provide a link to the source? This is the common method of satisfying the license requirements, right?
iSee is offline   0 Reply With Quote
Old Apr 2, 2008, 03:33 PM   #15
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
^^ Exactly otherwise they wouldn't be able to distribute any open-source software at all, which would be crazy.
__________________
If they have to tell you every day they are fair you can bet they arent, if they tell you they are balanced then you should know they are not - Don't Hurt me
Eraserhead is offline   0 Reply With Quote
Old Apr 2, 2008, 04:10 PM   #16
gnasher729
macrumors G5
 
gnasher729's Avatar
 
Join Date: Nov 2005
Quote:
Originally Posted by russell.h View Post
I hadn't thought about that, but now that I do, it could definitely be a problem. As the distributor of the binary, I believe that Apple would be required to offer the source code as well. And I'm not sure that encapsulating the source in the package destined for the iPhone would be considered a sufficiently standard or transparent means of doing so. But I'm more interested in the technical aspects of this.
What does GPL conformance have to do with Apple? They will just offer a service that allows an end user to download software created by a developer. I don't think you are giving any good argument for your scare mongering against GPL software.

Supplying source code inside the application package is exactly one of the methods suggested by the GPL to supply source code: Deliver it together with the executable code. And very easy to handle, because as the supplier, you don't need any infrastructure, and you have no future obligations at all.
gnasher729 is offline   0 Reply With Quote
Old Apr 2, 2008, 05:02 PM   #17
3247
macrumors regular
 
Join Date: Feb 2008
Location: Germany
Quote:
Originally Posted by gnasher729 View Post
You'd have to explain why that would be the case. All applications are shipped as packages, you can just put the source code into the package, and you are fine.
Well, you can't modify it and install it on your iPhone.

Granted, that's only a violation of the terms of GPL v3, not v2. So it might be ok with GPL v2 programs in the US and other Common Law countries. However, in other legislations, there are methods of construction that allow to close such gaps.
3247 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Synching Apps with multiple libraries across iPhone and iPad jcchristopher iPhone Tips, Help and Troubleshooting 0 Mar 5, 2013 10:18 PM
Best app for party Banquet planners - Party Ideas Gyonen iPhone and iPod touch Apps 0 Dec 20, 2012 11:24 PM
Retired Colonel Lawrence Wilkerson On Republican Party: My Party Is Full Of Racists Coleman2010 Politics, Religion, Social Issues 93 Oct 31, 2012 03:54 PM
Will TEA Party become an independant party? PracticalMac Politics, Religion, Social Issues 19 Aug 9, 2012 09:48 PM

Forum Jump

All times are GMT -5. The time now is 08:41 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC