How to create custom cocoa touch framework with storyboard - ios

I'm following this tutorial to create a custom framework. I have tried the source code as in that tutorial, excepts that when building the framework, I just select "Build Only Device>Generic iOS Device" and press Command+B, instead of using the build scripts introduced in that tutorial. It works fine for me with the source code copied from that tutorial.
After that, I tried to build my own framework with storyboard and build it like above, then try using it in a simple test app. The framework built successful but when I include it in the test app, it doesn't work. The error message is:
I am using the latest version of xcode and mac osx. My entire source code for both test application and simple framework is in this link. Please take a look and help me find what is going wrong. Thanks so much!
Solved
I just find out why. It seems like that is because I have opened both Test Application and the framework project in two workspaces. Closing the framework project before import it to the Test Application solve the problem.

Can you check target membership at right pane for this class?
Check all boxes if it is empty.

Related

Xcode automatically renames libraries inside the library

I have an issue and I guess somebody can help me to resolve it.
So, I created my own framework from my code and I added dependent frameworks in it. That's OK.
There is the struct of it:
After that I've implemented my own framework into my app. I can launch app without any issues on my real device. There are no any issues with it. My framework works as expected.
I need publish my app with implementation of my own framework. And I see that for some reason the frameworks inside my framework have the same name:
Although it should be 7 frameworks with names as in the structure. As result I see the error from Apple:
The question is: why did my internal frameworks get the same name when trying to publish and how to fix it?
Please check under your "Build Settings" option, there is "Build Options", check if below setting is switched to "Yes".

Adding a GitHub framework to an XCode Project using Swift

Sorry if this is too basic, I'm a kind of a rookie on app development.
I've been trying to add this GitHub framework for SpriteKit easing to my XCode project. The only steps for installation (that doesn't require CocoaPods) the framework provides are: 1: Drag the Pod/Classes folder into your project. 2: Import the frameworks in the _Archive folder.
However, it doesn't seem to work after doing this. I can't import the framework into my swift files, and I can't use the actions. I may've done the 2nd step wrong, I may not have done it as it's supposed. I've searched all over the internet for ways to import a GitHub framework into XCode, but every answer seems to be different and specific for each case.
I think you may have missed the second step (you say there is 'only step'). The second step is to drag the framework from the _Archive folder. You can find it in the clone of the project folder. Also, try the sample project and see how it's organized. Make sure that you add the framework to the Link Binaries... section in the project Build Phases.

Adding an Objective-C framework to a Swift XCode project

I know this is a very simple - maybe obvious - question, but I've been struggling with it for a while. I'm working on a SpriteKit project in XCode (using Swift) and I'm trying to add this SKEasing Framework from GitHub.
I've already downloaded and extracted the zip file, and I did everything that 孙博弘 answered including the bridging header (which I made the with the help of this site);
However, the framework doesn't seem to be working. I can't use any of the actions provided by this library. Is there something I'm missing? What am I doing wrong?
You don't add the project to your project.
First open the SKEasing project in xcode by itself. Set the build target to generic iOS device. (With the pop up in the top left corner of the xocde project window.) Then use the Build command (under Product) and when that's done run Archive. There should be a library built now under the products folder (left side of project window). Control click on the library name and select Show in Finder. This will lead you to the library. Copy this file to your project and you should be good to go.
if you use .a, you should use it as follow img.

XCode framework/library development workflow

I'm new to OSX/iOS development and I'm developing a library project (Cocoa Touch Framework) for iOS. While working on the library I would like to test changes to the code, but because it's a library, I can't run it straight away from XCode and view it's output. What I'm used to do in other platforms, (Windows for example) is to create a another project under the same solution (Visual Studio), add the library to this project and write my test code there. Unfortunately I didn't find a way to do something similar in XCode, my workflow now consists of quitting/opening two different projects, copying frameworks around and re-adding framework dependencies.
Surely there must be a better way to do this...
There are lots of post already in the SO .
But keeping it simple just follow these steps :
1.) Drag and drop Xcode project to your Xcode project 2.) go to build phase and then select your project (which u have imported ) to target. 3.) Search path - > user header search path (select your library) and also enter other linker flag.
Simple !
Is't exactly the same in Xcode :)
If you have a project (without a test build accompanying it) is:
1) See, no test Target :(
2) Click on the target that you want a test environment for (in my case, locates) so it's highlighted.
3) Click on the "edit" menu, then pop down to "Conver to" then "XCTest"
(yet another one of Apple's ambiguous places to hide things!)
Follow the wizard and that'll create you an XCTest build target that can be run on demand and through CI.
Have fun!

Stripe API gives 'SenTestingKit/SenTestingKit.h' file not found

I've read through the article referring to this in xcode 4.5, but it didn't help me in xcode 5.0.2.
I have a project that compiles successfully. If I add the Stripe framework to my project then it immediately fails to compile and gives me this file not found error for an #import made in this header file:
Stripe/Vendor/PaymentKit/PaymentKit Example/PaymentKit Test/PKCardNumberTest.h:9:9: 'SenTestingKit/SenTestingKit.h' file not found
I do not have the SenTesting framework in my link libraries. If I add it I get an error about it being an OSX library and not an ios. None of the Stripe documentation gives any indication that you need to add this library. I sent their support an email and they told me they don't have any information.
Anyone out there have any suggestions? Again, as soon as I add the framework to my project (and I am making sure it copies the files to my project) it fails to compile.
I tried adding quotes around my framework search paths, but it just changed the error so now Parse/Parse.h was no longer found.
The two framework search paths I have are: $(inherited) and /Users/ctam/Documents/development/Chw
See the Xcode 5.0 Release Notes:
Unit Testing
The CPlusTest unit testing framework has been removed
from Xcode 5. To write unit tests for C++ code, use the new XCTest
framework and create Objective-C++ (.mm) test case subclasses. 8273037
SenTestingKit and OCUnit are deprecated. Use the migrator to move to
XCTest. 14857574
When you download the Stripe library via the link in their documentation there are a bunch of subfolders for a test project they don't tell you about. I looked through and removed the test application files and everything works fine now. Curious that their explicit directions lead to this problem.

Resources