Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ace2600

macrumors member
Original poster
Mar 16, 2008
71
0
Austin, Texas
A few of my apps use the same base code set. I tried turning this shared code into a framework (like I would when creating a Cocoa framework). I ran into this issue: "Target specifies product type 'com.apple.product-type.framework', but there's no such product type for the 'iphonesimulator' platform" when building.

I saw a similar problem online and someone mentioned:
"3.3.2 An Application may not itself install or launch other executable code by any means, including without limitation through the use of a plug-in architecture, calling other frameworks, other APIs or otherwise. No interpreted code may be downloaded and used in an Application except for code that is interpreted and run by Apple's Published APIs and built-in interpreter(s). " However, this was dated June 10th.

1) Does the iPhone allow custom frameworks?
2) If it allows custom frameworks, any ideas on the error above?
3) If it does not allow custom frameworks, how would you recommend managing the shared code? If XCode supports two SVN repositories for the project, maybe I could checkout the app-specific code and the shared code and changes to the shared code could be reflected in my other apps?
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
1) Does the iPhone allow custom frameworks?
No.

3) If it does not allow custom frameworks, how would you recommend managing the shared code? If XCode supports two SVN repositories for the project, maybe I could checkout the app-specific code and the shared code and changes to the shared code could be reflected in my other apps?

I don't think Xcode supports more than one repository for one project (that would be confusing).

If you have shared code in multiple repositories, you will just have duplicates. I'd suggest putting all your projects in one repository, just in different folders. Then you could link in the shared code to all projects.
 

tacoman667

macrumors regular
Mar 27, 2008
143
0
No.



I don't think Xcode supports more than one repository for one project (that would be confusing).

If you have shared code in multiple repositories, you will just have duplicates. I'd suggest putting all your projects in one repository, just in different folders. Then you could link in the shared code to all projects.


Are you sure about this? GData, entropydb, and many others claim that their frameworks will work in the iPhone projects.
 

Palad1

macrumors 6502a
Feb 24, 2004
647
0
London, UK
Have you tried svn externals?

MyLib root : checked in svn://myserver/MyRoot/MyLib

MyApp root checked in svn://myserver/MyRoot/MyApp


declare an svn-external property in MyApp/trunk/lib named MyApp pointing to MyLib/trunk then update / commit... voila!

watch out when branching and merging, you have to start by working on the externals first, then change the svn-external property to point to the branch/trunk created/merged.

Have fnu!

ps: having externals pointing to a trunk is a bad idea, you want to point to a 'fixed' version such as /release/v1.2.3 so you don't get totally screwed if someone else changes something in the trunk... you won't see the external updates in detail and may miss important info in the svn log.

pps: anyone knows how to decode mp3 / access the iTunes library from an iPod touch app?

Cheers!
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
Are you sure about this? GData, entropydb, and many others claim that their frameworks will work in the iPhone projects.

They probably mean for you to add it into your project. From the iPhone SDK agreement:
An Application may not itself install or launch other executable code by any means, including without limitation through the use of a plug-in architecture, calling other frameworks, other APIs or otherwise.

pps: anyone knows how to decode mp3 / access the iTunes library from an iPod touch app?
It's not possible (to access the library) using the public SDK.
 

ace2600

macrumors member
Original poster
Mar 16, 2008
71
0
Austin, Texas
Thanks for the help.

I'm not tied to any source code management software right now. I wanted SVN because I've used it in the past and its integration with XCode. After looking at my needs and svn externals, I'm going to try Git for its superproject/submodule feature.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.