简体   繁体   中英

Will Parse working correctly if I set StoreKit's status to optional in Build Phases

I would like to use the Appirater library in my project, but after reading its install tutorial one thing is not clear.

Be sure to change Required to Optional for StoreKit in your target's Build Phases » Link Binary with Libraries section.

If I set the status of the StoreKit framework to Optional from Required , will this affect anything that is related to my Parse implementations? Because the Parse iOS SDK also requires StoreKit. Or switching to Optional means the framework will be loaded when it's needed only and don't have any side effects so Parse will also work properly? Am I right or it's not easy like that?

I would really appreciate if somebody could give me some guidance, thanks.

tl;dr It doesn't matter. Optional or Required are effectively the same for StoreKit in 2015.

Setting a framework to be Optional is essentially telling the system "Don't crash this app if you can't find this framework on the iOS device you are running on". StoreKit was introduced a long time ago in iOS so it's very unlikely that there are still devices with iOS versions before 3 (when StoreKit was introduced).

The only reason the Appirater instructions say to set it to Optional is because at the time those instructions were written, there were still a lot of iOS devices out there with versions of iOS that didn't have StoreKit, and Appirater could run without it, so there was no reason to crash the app over it. Thus, the instructions say to make it Optional .

That said, I should just simplify the Appirater setup and @import StoreKit in Appirater.h so nobody has to deal with that anymore.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM