Cosmos icon indicating copy to clipboard operation
Cosmos copied to clipboard

xCode8 , Swift 2.3 and Storyboard

Open renanstig opened this issue 8 years ago • 9 comments

Hello,

First of all , congratulations for your library. It's amazing! I'm working on update my project to xCode 8, but I got an issue with Cosmos framework. This is the message I get from xCode:

error: IB Designables: Failed to update auto layout status: dlopen(Cosmos.framework, 1): Symbol not found: __TWPSis16ForwardIndexTypes
  Referenced from: Cosmos.framework
  Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/../../../../../../Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCore.dylib
 in Cosmos.framework

Do you have any idea of how to solve this problem?

Thanks in advance, Renan.

renanstig avatar Sep 19 '16 01:09 renanstig

Hi @renanstig, thank you for kind words. I think I saw this issue before, I do not remember how exactly I fixed it but it was probably a combination of the following:

  1. Clean the project in Xcode and restart.
  2. In the Simulator menu select "Reset Content and Settings".
  3. Clear the DerivedData directory either manually from Preferences > Locations (see screenshot) or from command line:
rm -rfd ~/Library/Developer/Xcode/DerivedData/*
rm -rfd ~/Library/Caches/com.apple.dt.Xcode/*

Sorry for the vague answer. Let me know if it works for you.

clear-derived-data

evgenyneu avatar Sep 19 '16 04:09 evgenyneu

Hi. I Have the same problem of Renan.

One of the third party libraries of my project is compiled with Swift 2.3. So I have to stuck with Xcode 8 and Swift 2.3.

I try the above mentioned steps without success. The storyboard scene with the CosmosView seems "crashed" and the error doesn't disappear, despite the project compile normally.

I try to use your library directly from code, but in Objective-c seems that I cannot access the settings object for the CosmosView. I can instantitate the view, but how can I change the default settings like, starsize, fillmode etc?

-> CosmosView *rating = [[CosmosView alloc] initWithFrame:CGRectMake(0,0, 199,40)];

Thanks in advance.

Cristiano

ctenuta avatar Sep 20 '16 12:09 ctenuta

The problem seems related to the Xcode automatically refreshing views (Editor -> Automatically Refresh Views) on the Story Board.

ctenuta avatar Sep 20 '16 13:09 ctenuta

Hi @ctenuta, thanks for your report. To be honest, I have no idea why this is happening. However, here is a way to access Cosmos settings from Objective-C as a workaround: https://github.com/marketplacer/Cosmos/wiki/Using-Cosmos-settings-in-Objective-C

Let me know how it works for you.

evgenyneu avatar Sep 20 '16 22:09 evgenyneu

I'll try to use the library direct from code. That's not a big deal! Thanks!!

ctenuta avatar Sep 21 '16 14:09 ctenuta

same here :( after updating to xcode8

valentinjahanmanesh avatar Dec 12 '16 07:12 valentinjahanmanesh

same here :/ xcode 8.2.1

andre991 avatar Feb 02 '17 10:02 andre991

Thanks for reporting, people. Feel free to share your solution if anyone managed to fix it (since I can't reproduce this issue).

evgenyneu avatar Feb 04 '17 04:02 evgenyneu

Great library! Thanks for creating it. I'm also experiencing this issue. I'm on Xcode 10 swift 4.2. I included the swift file directly (so not using cocoapods or carthage). Not sure if that could cause this?

No biggie, but would be nice if it would work from storyboard. In the mean time I just use in code.

Thanks again!

guidove avatar Jan 08 '19 21:01 guidove