About Store Forum Documentation Contact
Donations:
327$/mo



Post Reply 
can not compile for ios with latest version, xcode dev tools installed
Author Message
Esenthel Offline
Administrator

Post: #16
RE: can not compile for ios with latest version, xcode dev tools installed
Yes, but I'm trying to solve this issue:
Dyld Error Message:
Library not loaded: @executable_path/../Library/Frameworks/Cg.framework/Cg
It only occurs on Mac (not iOS) and only in Debug mode (in Release I don't link to CG).

It's trying to load the CG from app folder, but I'm trying to find a way to force it to load from absolute path in EE folder.
03-17-2013 10:23 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #17
RE: can not compile for ios with latest version, xcode dev tools installed
Hello,

The problem will be resolved in next release.

The best solution that I found is for Editor to automatically copy the CG framework into User Frameworks folder (/Users/*/Library/Frameworks/Cg.framework)

This will be handled by the Editor so it will work automatically when compiling for Mac targets.
03-18-2013 04:53 PM
Find all posts by this user Quote this message in a reply
xzessmedia Offline
Member

Post: #18
RE: can not compile for ios with latest version, xcode dev tools installed
Hey esenthel i guess this is indeed the best Solution! Other Engines do it the same way

Royality Free Game Ressources
www.xzessmedia.de
03-18-2013 10:28 PM
Find all posts by this user Quote this message in a reply
lordofdest Offline
Member

Post: #19
RE: can not compile for ios with latest version, xcode dev tools installed
(03-18-2013 04:53 PM)Esenthel Wrote:  Hello,

The problem will be resolved in next release.

The best solution that I found is for Editor to automatically copy the CG framework into User Frameworks folder (/Users/*/Library/Frameworks/Cg.framework)

This will be handled by the Editor so it will work automatically when compiling for Mac targets.

Why you don’t use standard solution to resolve this issue:
1. Add framework to link build phase.
2. Copy framework to application bundle in Copy Phase.
3. Change rpath in Cg.framework using Terminal tool.
install_name_tool -id @executable_path/../Frameworks/Cg.framework/Cg /some_path/Esenthel/Bin/Cg.framework/Versions/1.0/Cg

Looks like:
   

If you have some questions about Apple platforms, please fill free to ask them. =)

Sorry for my english. =)
(This post was last modified: 03-19-2013 10:40 AM by lordofdest.)
03-19-2013 09:04 AM
Find all posts by this user Quote this message in a reply
lordofdest Offline
Member

Post: #20
RE: can not compile for ios with latest version, xcode dev tools installed
Some fixes for iOS platform:

1.Add some keys to Info.plist:
<key>LSRequiresIPhoneOS</key>
<true/>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>UIApplicationExitsOnSuspend</key>
<false/>

2. To run product on device or simulator from Xcode:
Applications doesn’t run if you build Mac OS X version before iOS.
Solution to remove this problem:
Remove CONFIGURATION_BUILD_DIR build option from project build settings to prevent conflict.

Sorry for my english. =)
(This post was last modified: 03-19-2013 10:54 AM by lordofdest.)
03-19-2013 10:53 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #21
RE: can not compile for ios with latest version, xcode dev tools installed
(03-19-2013 09:04 AM)lordofdest Wrote:  Why you don’t use standard solution to resolve this issue:
1. Add framework to link build phase.
2. Copy framework to application bundle in Copy Phase.
3. Change rpath in Cg.framework using Terminal tool.
install_name_tool -id @executable_path/../Frameworks/Cg.framework/Cg /some_path/Esenthel/Bin/Cg.framework/Versions/1.0/Cg
Many thanks for the suggestion smile
I've posted my reasons for not doing this in another similar thread http://www.esenthel.com/community/showth...6#pid37956

Quote:If you have some questions about Apple platforms, please fill free to ask them. =)
I see we have an Apple expert here, that's great smile

Quote:<key>LSRequiresIPhoneOS</key>
<true/>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>UIApplicationExitsOnSuspend</key>
<false/>
Could you let me know why do you propose adding those options? How do they affect the app?

Quote:2. To run product on device or simulator from Xcode:
Applications doesn’t run if you build Mac OS X version before iOS.
Solution to remove this problem:
Remove CONFIGURATION_BUILD_DIR build option from project build settings to prevent conflict.
Thank you! I will investigate this.
03-19-2013 01:57 PM
Find all posts by this user Quote this message in a reply
lordofdest Offline
Member

Post: #22
RE: can not compile for ios with latest version, xcode dev tools installed
(03-19-2013 01:57 PM)Esenthel Wrote:  
(03-19-2013 09:04 AM)lordofdest Wrote:  Why you don’t use standard solution to resolve this issue:
1. Add framework to link build phase.
2. Copy framework to application bundle in Copy Phase.
3. Change rpath in Cg.framework using Terminal tool.
install_name_tool -id @executable_path/../Frameworks/Cg.framework/Cg /some_path/Esenthel/Bin/Cg.framework/Versions/1.0/Cg
Many thanks for the suggestion smile
I've posted my reasons for not doing this in another similar thread http://www.esenthel.com/community/showth...6#pid37956

Quote:<key>LSRequiresIPhoneOS</key>
<true/>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>UIApplicationExitsOnSuspend</key>
<false/>
Could you let me know why do you propose adding those options? How do they affect the app?

1.
Before build Xcode monitor modifications in DerivedData folder and don’t copy framework to application at next times. To simplify search of DerivedData you can change location in workspace settings to locate this folder near the project.

I have two reason to promote you use default solution.
1. To deploy application in AppStore, you must support of sandboxing and contains all data in bundle.
2. Best Mac OS X user experience is copy bundle to Application folder and don’t setup any application dependencies.

2.
CFBundleName, CFBundleDisplayName – is standard keys in Info.plist
LSRequiresIPhoneOS – To reduce any problems with Mac OS X and Xcode.
UIApplicationExitsOnSuspend – my bad =) By default it’s NO.

Sorry for my english. =)
03-20-2013 09:24 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #23
RE: can not compile for ios with latest version, xcode dev tools installed
Quote:Before build Xcode monitor modifications in DerivedData folder and don’t copy framework to application at next times.
Many thanks, however that will still be required in case you use "Clean/Rebuild", or build the project from Esenthel Editor, which cleans the APP folder to make sure it has only required files, as I've detected xcode does not remove useless files stored inside APP folder.

Quote:1. To deploy application in AppStore, you must support of sandboxing and contains all data in bundle.
2. Best Mac OS X user experience is copy bundle to Application folder and don’t setup any application dependencies.
Yes and I would probably do that what you suggest, however please know that the Cg.framework is used only in Debug mode, and only for compilation of custom shaders.
Once app is compiled to Release mode, it does not use/require that framework at all smile

Quote:CFBundleName, CFBundleDisplayName – is standard keys in Info.plist
LSRequiresIPhoneOS – To reduce any problems with Mac OS X and Xcode.
Thanks, but I meant some example of practical situations when those elements are required, and how do they affect the app. (an example)

Thank you!
03-20-2013 12:35 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #24
RE: can not compile for ios with latest version, xcode dev tools installed
(03-19-2013 10:53 AM)lordofdest Wrote:  2. To run product on device or simulator from Xcode:
Applications doesn’t run if you build Mac OS X version before iOS.
Solution to remove this problem:
Remove CONFIGURATION_BUILD_DIR build option from project build settings to prevent conflict.
Hi,
I've just tried this:
1. from EE - open in Xcode
2. from Xcode set Mac target and compile - OK
3. from Xcode set iOS target and compile - OK

Please provide more details about your issue, thank you
03-29-2013 02:28 PM
Find all posts by this user Quote this message in a reply
Post Reply