ios-frameworks

Error in linking of a static iOS framework to both app's and XCTest targets

◇◆丶佛笑我妖孽 提交于 2020-01-02 16:57:39
问题 I have an app which has Objective-C and Swift combined. It has an XCTest target. I have a static framework written in Objective-C which is linked to a main target and is used by main target and test target. I have tested 3 different cases, in which two of them compile but with warnings, while I want to see no warnings when I run my tests: 1) Static framework is not linked to test target (via Link Binary With Libraries ), but is included to the test target's Framework search paths . The test

Xcode sometimes removes linked library

天涯浪子 提交于 2019-12-30 18:57:13
问题 When using different Frameworks in Xcode, the compiler and linker sometimes do not include that Framework in the library. The result is an immediate crash during the startup with the following message: dyld: Library not loaded: /System/Library/Frameworks/UserNotifications.framework/UserNotifications Referenced from: /var/containers/Bundle/Application/1D41BD68-9B88-4D5D-B7AB-0D1C31979964/App.app/App Reason: image not found I found one way to avoid this. Its just mentioning the parts of that

How to open up View Controller included in framework as static library for iOS?

狂风中的少年 提交于 2019-12-24 00:49:29
问题 I have a View Controller which displays many nested UIViews. I want this project which displays many views to be embedded in another project as framework. So, how can I open View Controller of my framework from another project which has included this framework for third party use. 回答1: You can use a method on your framework to return your viewController something like this - (UIViewController*)viewControllerForWidgetType:(WidgetType)widgetType; and then in the app that uses your framework use

Xcode reference a framework instead of link binary with libraries

泪湿孤枕 提交于 2019-12-22 05:40:11
问题 When developing cocoa touch framework, how can i use code from third party framework by referencing it other then including it in the "link binary with libraries" option? I dont want to link to binary in order to prevent symbol conflicts between hosting project and the framework (project which will use the framework) Additionally i will need the framework code to use the hosting project reference to the third party framework, how can it be done? Or should i take different approach for example

Framework was built without full bitcode - Framework bitcode already enabled

◇◆丶佛笑我妖孽 提交于 2019-12-22 04:07:23
问题 Getting this error on Archiving my app. Framework used is my own. So I cross checked. Bitcode in framework is Enabled. Not sure why am I getting this issue. These are the build settings in my framework : I followed this link but didn't work. Tried to set -fembed-bitcode in framework's project (not target, but project, since it is recommended in the link) setting. 回答1: Try to set Skip Install to YES and Enable Bitcode to Yes in framework build settings. 回答2: Bitcode is an abstract encoding of

Framework was built without full bitcode - Framework bitcode already enabled

六眼飞鱼酱① 提交于 2019-12-22 04:07:17
问题 Getting this error on Archiving my app. Framework used is my own. So I cross checked. Bitcode in framework is Enabled. Not sure why am I getting this issue. These are the build settings in my framework : I followed this link but didn't work. Tried to set -fembed-bitcode in framework's project (not target, but project, since it is recommended in the link) setting. 回答1: Try to set Skip Install to YES and Enable Bitcode to Yes in framework build settings. 回答2: Bitcode is an abstract encoding of

Hide source code in swift framework when distributing

≡放荡痞女 提交于 2019-12-21 12:29:53
问题 I have created a swift framework for distribution to private customers and its the first time I have created an iOS framework so I am very clueless about a lot of things. Is it possible that my source codes can be hidden.I have searched everywhere but I can't find a proper answer to this. I'm not sure if Im explaining it thoroughly but to simplify I don't want developers to be able to modify or see the code in my framework. Can't developers just go and edit my code that they embedded in their

iOS9: Using dynamic framework with Simulator and Device

孤人 提交于 2019-12-21 04:34:12
问题 I created a dynamic cocoa framework that I would like to use across my apps. After I build the framework for an actual device, I bring it over to an app. I can only run the app on that device. When I try to run it on a simulator, framework files are not recognized. I get error messages: 'ViewController' is unavailable: cannot find swift for declaration for this class I tried building the framework for an iPhone 6 simulator and running the app on an iPhone 6 simulator, but the same problem

iOS: Clarify different Search Paths

谁说胖子不能爱 提交于 2019-12-20 08:23:03
问题 There are three different search paths in XCode Build Settings: Framework Search Path Header Search Path Library Search Path Could anyone clarify what those paths do and what they are used for? 回答1: Framework search path : where to search frameworks ( .framework bundles) in addition to system frameworks paths. Not used very much in iOS development, officially there is no developer iOS frameworks. In Mac development, it's set automatically if you drag a 3rd party framework into the project.

Compiled framework provides bitcode error when archiving

随声附和 提交于 2019-12-19 07:18:51
问题 have been struggling for few days... Basically I have build a compiled released framework and distribute it with cocoaPods. The problem is that then archiving this framework application gets the following error: ld: bitcode bundle could not be generated because '/.../testingPodsAcrossversions/Pods/Pod/Pod.framework/Pod' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/.../testingPodsAcrossversions/Pods/Pod/Pod