kstenerud / iOS-Universal-Framework

An XCode project template to build universal frameworks (arm7, arm7s, and simulator) for iOS / iPhone.
2.95k stars 474 forks source link

XCode 7 invalid framework packaging #214

Closed look1n closed 8 years ago

look1n commented 8 years ago

I've faced an issue after updating my XCode to version 7. Generated framework has flat structure without Current/A subfolders, script lines that generates symbolic links failed with "No such file or directory" messages. How can I solve this problem? Attaching error log below. Thanks.

File "/Users/User/Xcode/DerivedData/general-hfruqhxpfbpvyyaxsnswjqazacxd/Build/Intermediates/sdk.build/Debug-iphoneos/SDK.build/Script-5C7F07D71A2636850090AA35.sh", line 817, in run_build() File "/Users/User/Xcode/DerivedData/general-hfruqhxpfbpvyyaxsnswjqazacxd/Build/Intermediates/sdk.build/Debug-iphoneos/SDK.build/Script-5C7F07D71A2636850090AA35.sh", line 792, in run_build add_symlinks_to_framework(project) File "/Users/User/Xcode/DerivedData/general-hfruqhxpfbpvyyaxsnswjqazacxd/Build/Intermediates/sdk.build/Debug-iphoneos/SDK.build/Script-5C7F07D71A2636850090AA35.sh", line 680, in add_symlinks_to_framework attempt_symlink(os.path.join(base_dir, "Versions", "Current"), os.environ['FRAMEWORK_VERSION']) File "/Users/User/Xcode/DerivedData/general-hfruqhxpfbpvyyaxsnswjqazacxd/Build/Intermediates/sdk.build/Debug-iphoneos/SDK.build/Script-5C7F07D71A2636850090AA35.sh", line 493, in attempt_symlink os.stat(os.path.abspath(os.path.join(link_path, "..", link_to))) OSError: [Errno 2] No such file or directory: '/Users/User/Xcode/DerivedData/general-hfruqhxpfbpvyyaxsnswjqazacxd/Build/Products/Debug-iphoneos/SDK.framework/Versions/A' Command /bin/sh failed with exit code 1

bjtufang commented 8 years ago

hi,if xcode6 have used universal framework, and update to xcode7. firstly do not reinstall universal framework. you can run auto_xcode_edit/main.py to resolve your problem. please link to https://github.com/bjtufang/run-universal-framework-in-xcode7

look1n commented 8 years ago

Solved my issue by overriding build settings constants: CONTENTS_FOLDER_PATH=$WRAPPER_NAME/Versions/$FRAMEWORK_VERSION INFOPLIST_PATH=$CONTENTS_FOLDER_PATH/Resources/Info.plist

neilyoung commented 8 years ago

@look1n: Could you please a bit more specific, where you changed these settings? TIA

look1n commented 8 years ago

You should set user-defined variables in your project target build settings.

neilyoung commented 8 years ago

@look1n : Thank you very much. Made my day :)