2013-12-09

ShareKit.bundle missing in project with ShareKit + Cocoapods!



I have a project app (My-ShareKit-App) with ShareKit  CocoaPods method (Podfile + Pods install).
Podfile content:
platform :ios, '5.0'
pod 'ShareKit', '~> 2.4.6'
xcodeproj '/Users/AppCofe/My-ShareKit-App-cocoapods/My-ShareKit-App.xcodeproj'
Build Passed, but  when running My-ShareKit-App on simulator or device
Crashed in SHK.m line 528 :NSAssert(sharersDictionary != nil, @"ShareKit: You do not have properly set sharersPlistName");
The Reason is: Could not find “ShareKit.bundle” with CocoaPods method.
I try to drag and drop the ShareKit.bundle from Pods.xcodeproj into My-ShareKit-App.xcodeproj -> Build Phase->Copy Bundle Resources
But I still find the  following
error: /Users/AppCofe/My-ShareKit-App-cocoapods/ShareKit.bundle: No such file or directory
Meanwhile, I can find the ShareKit.bundle under the $(DERIVED_FILE_DIR) folder.
Solution:
in Pods-resources.sh change following line( add red-colored parts: )
install_resource "${BUILT_PRODUCTS_DIR}/$(CONTENTS_FOLDER_PATH)/ShareKit.bundle”
BTW:Find -> View -> Show View Options ->Show Library Folder,  you can see the "User/AppCofe/Library" folder in Find App.
Hope it can help you.

No comments:

Post a Comment