ios-frameworks

Class X is implemented in both <framework> and <application> one of the two will be used, which one is undefined

北城余情 提交于 2019-11-29 22:10:41
I'm getting this warning: Class X is implemented in both <framework> and <application> one of the two will be used, which one is undefined This warning is covered quite a bit across the web but i haven't found anything that answers the specific problem I'm having. Scenario I've built MyFramework and MyApplication (as a test/demo application for MyFramework). MyFramework uses a CocoaPod (which I'll refer to as CoolPod), which I also want to use in MyApplication (and it is reasonable to assume a consumer of MyFramework would also). I need to be able to distribute MyFramework as a .framework (for

Prefix Static Library iOS

拟墨画扇 提交于 2019-11-29 21:56:16
I'm building an iOS static library (as per https://github.com/jverkoey/iOS-Framework ). I depend on SBJson and AFNetworking. I would like to include these libraries to avoid version issues and for installation simplicity; to do so, I need to prefix these libraries to avoid naming conflicts. How can I prefix other static libraries in a simple way? Ideally, it would be part of my build process. Less ideally, but acceptable, are tips on how to refactor and rename in a sane manner. The only safe solution (other than not doing this at all) is to build any dependencies with a prefix on all symbols.

Building a Swift framework with references to Objective-C code

不打扰是莪最后的温柔 提交于 2019-11-29 16:46:29
问题 I'm working on an iOS project written in Swift, and I would like to take some classes out of the regular "app" project, and bundle it into a reusable Swift framework instead (and maybe make it publicly available on Github and via Cocoapods). I'm running into issues because frameworks seemingly can't have Objective-C bridging headers, but in order to compile my framework code, I need to reference several Objective-C classes (in this case: the Google Maps iOS SDK). I've also added GoogleMaps

XCode6: Receiving error “Include of non-modular header inside framework module”

末鹿安然 提交于 2019-11-29 13:12:40
I have an iOS app that consists of an app, a bunch of my custom frameworks, and a bunch of third party framweorks: App MyFramework1 MyFramework2 AFNetworking.framework Mantle.framework .. I get the error "Include of non-modular header inside framework module" with the following structure: App/AppDelegate.m #import <MyFramework2/MyFramework2.h> MyFramework2/MyFramework2.h #import "MyClass.h" MyClass.h #import <Mantle/Mantle.h> <-- Error happens here MyFramework2 builds by itself . Trying to build App fails with the error "Include of non-modular header inside framework module" at the line that

How to suppress `warning: linking against dylib not safe for use in application extensions`?

喜欢而已 提交于 2019-11-29 10:36:41
问题 I have a dynamic framework that is shared between an iOS application and an extension. There is some code in that framework that references UIApplication , that is of course, not usable in an extension. Those calls are completely isolated and so I am not worried about them causing problems with my extension. Since there isn't a flag specified in the warning message, perhaps there isn't way to do it, but how do I suppress warning: linking against dylib not safe for use in application

Error “No known class method for selector 'Hello:'” in custom-made framework

跟風遠走 提交于 2019-11-29 06:26:37
I am making a framework for a company and I have completed all the code. I'm now trying to package it into a framework. As a test I made a method with this name: -(void)Hello:(NSString *)worldText; When I try to call it in the application with the framework using this code [CompanyMobile Hello:@"World"]; , I'm getting a compiler error which says No known class method for selector 'Hello:' The .m in my framework is as follows: #import "Hello.h" @implementation Hello - (id)init { self = [super init]; if (self) { // Initialization code here. } return self; } -(void)Hello:(NSString *)world { }

IBDesignable from External Framework?

◇◆丶佛笑我妖孽 提交于 2019-11-29 02:30:11
问题 I'd like to create some custom views that use the @IBDesignable and @IBInspectable tags. I have added these to my Framework and then linked my Framework to my test application. But the Designables never show up in the StoryBoard. How can I use @IBDesignable and @IBInspectable to create custom views from an external framework? Can you use @IBDesignable and @IBInspectable in an application from a non-embedded Framework? Thank you. 回答1: I have found a way to use designables and inspectables with

Can I build my own networking framework (which is dependent on AFNetworking) as a watchOS2 framework?

爱⌒轻易说出口 提交于 2019-11-28 23:46:43
I've been trying to modify my project to support WatchOS2 architecture. Currently I have a networking framework that is based on AFNetworking. I've been using it with my watch app so far. Now I'm trying to build the framework for watchos/watchsimulator platforms. What I'm getting is 'SystemConfiguration/SystemConfiguration.h' file not found error for some AFNetworking classes. I know that system configuration is not one of the available system frameworks for watchOS2. And for networking apple says : Networking Support for network-based operations includes the following technologies: WatchKit

iOS8 Dynamic Frameworks -> CodeSign error: code signing is required for product type 'Framework' in SDK 'iOS 8.3'

我是研究僧i 提交于 2019-11-28 23:14:46
I am using the iOS8 Dynamic Frameworks that I build myself and link within my iOS app. It was working fine in the simulator and on device, but when trying to archive a Release build for it, I keep getting this error: Code Sign error: No matching provisioning profiles found: None of the valid provisioning profiles allowed the specified entitlements: com.apple.developer.ubiquity-kvstore-identifier, keychain-access-groups, com.apple.developer.icloud-container-identifiers, com.apple.developer.icloud-services, com.apple.security.application-groups, com.apple.developer.ubiquity-container-identifiers

Adding libxml2 in XCode

允我心安 提交于 2019-11-28 19:33:37
I have added libxml2 to my Xcode 4 project following this guide . But it's not working. Xcode gives me error saying it no such libxml2 directory. What am I doing wrong? Here's the screenshots of the target settings of my project: Thanks. jazzcat add ${SDKROOT}/usr/include/libxml2 to "Header Search Paths" instead of "User Header Search Paths" under yourtarget -> Build Settings -> Search Paths link with libxml2.dylib in yourtarget -> Build Phases -> Link Binary With Libraries include libxml2 headers with, for instance, #include <libxml/HTMLparser.h> and you're off for better explanation see to