I have two projects: One made for the iPad and one for the iPhone. The iPad version is using CoreData and .xib files.
Both project use CocoaPods.
I want to convert each project to a library, make a new universal app, link the two libraries into it and then set the AppDelegate class according to the device.
How can I convert my project to a library ?
Related
I am trying to build a crossplatform framework that can be embeded both in and iOS and a tvOS application.
This framework does NOT contain anything related to UI but is a wrapper around CoreBluetooth.
What I explored ?
It compiles when I set the base sdk to tvOS, and when I set the base sdk to iOS. But I do not know how to make it work for both
Do you know how I could have both at the same time ?
Thanks
Stan
You'll have to create two different targets in your xcodeproj, one for iOS, and one for tvOS.
Then simply add both target as Target Membership for your swift files.
I am developing two iOS apps in Swift that have common code and resources, so I moved the shared parts to a Swift-only Framework. The app projects and the Framework are grouped together in an Xcode Workspace. Everything works fine when I build and run the apps in Xcode.
Problems arise, however, when I try to Archive an app, validate the Archive, and upload the Archive to iTunes Connect. I have tried various combinations of embedding a binary, linking a Framework, and dragging the Framework into the app's projects. I don't really understand what I am doing, so it's just groping in the dark.
Can somebody tell me the correct way to link/embed my Framework into my app for distribution? I would like to know how to do this without a third-party dependency manager. Thank you!
I've countered such situation.
Did you use Framework project in your workspace?
If so, you have to add the framework in embedded binary in project's setting.
You can find it in first tab in setting.
When you test it in simulator, there is no error.
But if you want to build it for device or archive for uploading binary, you need to add it in embedded binary setting.
If you want I can help you to do it through teamviewer.
I have very simple requirement for my iOS SDK
-Support iOS 7 and above.
-Include some swift code to my SDK
Problems:
-With iOS 8, Xcode allowed us to develop cocoa touch frameworks, but they can only be run on iOS 8 and above.
-If I create a static library, I cannot include swift code.
-I was using using Real Framework, but Real Framework does not get installed with Xcode 7.
So, What does a poor developer do ?
You can always have an alternative distribution method for your SDK for users that are targeting iOS 7.
You can offer an SDK in a single concatenated file, that is simply merging all your project source files, which user can drop into project tree and compile together with all the other source files. This applies only when you have either Swift-only or Objective-C only SDK
If SDK user uses workspaces, he may embed your SDKs .xcodeproj directly in his project
Anyway both methods require source code distribution as the user needs to compile the code from within his project. Dependency maintenance is also more difficult.
For a reference you can check how it is done in:
https://github.com/SwiftyJSON/SwiftyJSON
It is a Swift library, but integration with iOS 7 based projects is the same.
I could not find any solution for this. I compromised:
I am NOT using swift code.
I am distributing static library (.a file and a .h header file) instead of a framework. (this is to support iOS 7)
I'm adding a 'Cocoa Touch Framework' target to an existing project on XCode 6. Will I be able to use the built framework on older iOS versions? (iOS 6 & 7)
As far as I know you can work around and support iOS7 with dynamic libraries.
The application must weak link against the framework. To do so, in
your application target’s “Link Binary With Libraries” Build Phase,
designate the framework as “Optional”. This will weakly link against
the framework.
Then, you need to follow the guidelines provided by apple.
You can have more information and a sample project in this blog article.
I have a view-based iOS cocoa touch application built and is running on iPhone.Now I need to convert it as an universal application in order to run that on both iPhone and iPad.I dont know how to change a view-based as an universal build application.How can I convert it?
Open the project in Xcode. Under the Targets menu (in Groups & Files), right click on your app. Select "Upgrade current target for iPad...".