satismeter / satismeter-ios

SatisMeter iOS SDK
https://satismeter.com
MIT License
7 stars 6 forks source link

ManualInstallation doesn't work. #22

Closed wangjiejacques closed 3 years ago

wangjiejacques commented 3 years ago

After manual installation, I can build my app, but when I call identifyUser, I have this exception

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSBundle initWithURL:]: nil URL argument'

from here, https://stackoverflow.com/questions/707429/can-you-reference-xib-files-from-static-libraries-on-the-iphone, you can see that bundle doesn't work with static library.

Am I missing something?

jsedlacek commented 3 years ago

We are working on a fix. Should be ready in a couple of days.

antongorb commented 3 years ago

Hi @wangjiejacques, please follow these steps:

  1. Drag and Drop SatisMeter folder. Make sure that 'Copy items if needed' is checked.
  2. In your project, move to Build Settings and setup 'Other Linker Flags' with the following string: -ObjC -l"SatisMeter" -framework "UIKit"
  3. Create Bridging-Header.h in your project and add this line to it #import "SatisMeter/SatisMeter.h"
  4. In your project, move to Build Settings and setup 'Objective-C Bridging Header' with the following string: AppName/Bridging-Header.h
  5. Copy SatisMeterResources.bundle from SatisMeter folder that we added in the first step. You should add it by tapping on 'plus' button under Build Phases in section Copy Bundle Reosurces Sample app: https://drive.google.com/file/d/1XTdj3td3fM0PWtS_oLwUSvZGFEt62gu1/view?usp=sharing
wangjiejacques commented 3 years ago

it works, thanks.