Add *.framework to Build phases > Copy Files in Xcode template - ios

Is there any opportunity to add my *.framework to Build phases > Copy Files from Xcode template (UITest Target)?

Related

*.app is missing and can't build my project

I cleaned my project and *.app file under product folder removed.
now I can't make a build of my project
error :
Showing Recent Messages
:-1: Unable to load contents of file list: '/Users/user/Library/Developer/Xcode/DerivedData/Driver-deamxuxagojqlbazpefgfkovfwid/Build/Products/Debug-iphonesimulator/Driver.app/Info.plist' (in target 'Driver')
The error is pretty clear. It can not read info.plist from Driver.app because there is no Driver.app
How can I build or make one?
This is what I've done till now :
Tried to build from product -> build
Clean from product menu
Clean cocoa pods and install again
Clean all caches
Try,
Navigate to the project (select it in the Project navigator)
Select the application target in the list of targets
Click the Build Settings tab
Under the Packaging section, make sure the Info.plist file is
properly set to the location/file name

How to make .framework file using Xcode

I want to build cocoa framework project, but when I build the project I get the .a file not .framework.
What setting is needed for this?
First, when you are creating the project, be sure that you are selecting the "Cocoa Touch Framework" template.
After you build the project, the .framework file will be created and will show up in the "Projects" folder in the project navigator.

Add Library and Headers in Xcode workspace

I have a Workspace which has one project and I have added a static Library to that project.
WorkSpace
MainProject
A Static Library (ex: myLib.a).
Folder structure is as follows
Main Folder
.xcworkspace
MainProject -> .xcodeproj
MyStaticLibrary-> .xcodeproj
I have added myLib.a to "Linked Frameworks and Libraries".
The build settings are "OTHER_LDFlags"="-all_load" , "ALWAYS_SEARCH_USER_PATHS" = NO.
But, how do I add header files?

Unable to build framework

I am unable to build a framework doing following->
1.Select a simulator in run devices
2.Under Product -> build in Xcode tool bar
3.Right click on the product section ->show in finder
now in terminal I execute following command->
lipo -info /path/to/debugfolder/
it gives me follwing error -
fatal error: /Applications/Xcode
app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo:
can't map input file:
/Users/Imacshubhendra/Library/Developer/Xcode/DerivedData/SendOTPFramework-hkrvnvttlmwijudmlfcaxdowqhpz/Build/Products/Debug-iphoneos/SendOTPFramework.framework
(Invalid argument)
I am follwing these steps->
In the framework project:
Set the build setting for the target (and for the project, just to be safe) 'Build Active Architectures only' to NO. We want to build all architectures so that the binary can be used in all supported devices, not just the one we happen to build for. Depending on your deployment target (and as a consequence of that, the devices you support), you might need to add the architecture ARMv7s
Build for simulator and build for device, this will produce two frameworks in the derived data folder.
In Terminal:
Find the derived data path for the project. Look for the folder 'Build->Products'. Inside it should be '-iphoneos' and '-iphonesimulator'. Inside each is a .framework folder. Copy one of those to some nice folder. From each of those .frawework folders, copy the binary that is in there to one folder.
In terminal run the command 'lipo -create -output '. This will create a fat binary with all architectures for both simulator and devices. Replace the one in the copied .framework directory with the newly generated one.
To use the framework in another app:
Select the Project in the Project Navigator, select the target, and select 'General' tab.
drag the .framework folder onto where it says 'Add embedded binaries here'.
In the build settings of the target, add the path to the .framework folder to 'Framework Search Paths'.
Import files in your source code using #import

Adding Cocos2d (2.0) to existing iPhone Project

(Posting for reference purpose only. So I will answer right away)
I used Cocos2d 2.0 on Xcode 4.6.3.
I faced a 'Lexical or Preprocessor issue' about kazmath/SomeFile.h file not found.
Looked around but could find only outdated questions.
I added Cocos2d to iPhone project and will discuss the steps i have taken so that it can help people looking for doing this and facing issues...
I will point out the steps that I have taken , so someone can take a look
Step 1.
Create a test project in Cocos2d and find the “libs” folder in finder, and then just copy it into your project’s folder in finder. Then from finder, drag-and-drop the “libs” folder into Xcode’s “Project Navigator” sidebar and check the “add files to destination”.
Step 2.
In Project > Targets > Build Phases > Link Binaries with libraries > Hit the + and Check if following frameworks are there if not add them:
AVFoundation.framework
GameKit.framework
CoreText.framework
AudioToolbox.framework
OpenAL.framework
QuartzCore.framework
CoreGraphics.framework
UIKit.framework
Foundation.framework
OpenGLES.framework
Step 3.
In Project > Targets > Build Settings > Search Paths > Header Search Paths
Add (quotes included) this
“(your Project's folder name in finder)/libs/kazmath/include”
Step 4.
In Project > Targets > Build Phases > Link Binaries with libraries > Compile Sources
Select all files except classes that are your project already and hit enter and add the Compiler Flag -fno-objc-arc.
By doing that, hopefully all the Cocos2D files are now ARC-disabled.
Try to Build at this moment….
If there are issues then continue
Step 5.
Go to Project > Targets > Build Settings > Linking > “Other linker flags”
Add -lz and -ObjC .
Build again to check any issue still exists…
Step 6.
Go to Project > Targets > Build Settings >Search Paths > User Header Search Paths
Add this
./(your Project's folder name in finder)/libs/kazmath/include
Now try to build.. The issues might have gone by now.
I got help from the Coco2d forum and would like to thank the forum members..
Cocos2d Forum Thread
I am a newbie in programming, so please don't be rough on me if there is any mistake.

Resources