How to get bundle ID?

前端 未结 7 2159
太阳男子
太阳男子 2020-12-29 01:19

I am working on getting the facebook API working for iOS, and the FB registration page requires the Bundle ID of the project. How can I get this information? I read someth

7条回答
  •  忘掉有多难
    2020-12-29 02:01

    Details

    • Xcode 11.2.1 (11B500), Swift 5.1

    Programmatically

    Solution 1

    let bundleId = Bundle.main.bundleIdentifier
    

    Solution 2

    let bundleId = Bundle.main.infoDictionary?["CFBundleIdentifier"] as? String
    

    From Xcode

    Solution 1

    Solution 2

提交回复
热议问题