Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

please show an example of using this in swift 3 or 4. #99

Open
gaming-hacker opened this issue Sep 29, 2017 · 4 comments
Open

please show an example of using this in swift 3 or 4. #99

gaming-hacker opened this issue Sep 29, 2017 · 4 comments

Comments

@gaming-hacker
Copy link

No description provided.

@tkirby
Copy link

tkirby commented Oct 19, 2017

+1.
I added the code to my project and nothing happens. No error, no shimmer. The example project doesn't work in latest Xcode:

"Compiling IB documents for earlier than iOS 7 is no longer supported."

@apptekstudios
Copy link

@tkirby The example project has target version of iOS set to 6, change it to something more recent and it will work :)

@GodsEye-07
Copy link

GodsEye-07 commented Feb 4, 2018

@gaming-hacker @tkirby the default version of the code that was written for the pod is for iOS 6 Set it to the current version and you will be able to use the same again in the latest version.

Also you may face the same issue since the code is been written in Obj-C and what you are using now is Swift so there may be a problem with the bridging of the files as you imported them.

for this:
Select the APP NAME under the project root in the Project Navigator (press Command-1 if it’s not showing), select File\New\File… from the menu, and then select iOS\Source\Header File. Click Next, name the file APP NAME-Bridging-Header.h and click Create.

Replace the contents of the new file with the following:

#import "FBShimmering.h"
#import "FBShimmeringLayer.h"
#import "FBShimmeringView.h"

Next, select the project root in the Project Navigator, and then select the APP_NAME target.
Choose the Build Settings tab, and find the Swift Compiler – Code Generation\Objective-C Bridging Header item. As a shortcut, you can type bridging in the search field at the top of the settings to find the item quickly.
Double-click the value field to the right of the Objective-C Bridging Header label and enter the location of the bridging header that you just created: APP_NAME/APP_NAME-Bridging-Header.h.

also for further reference and visual understanding you may visit:
https://www.raywenderlich.com/93138/using-facebook-shimmer-swift

this may be helpful

@FBente
Copy link

FBente commented May 10, 2018

Try #import <Shimmer/FBShimmeringView.h> in your NAME-Bridging-Header.h file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants