For our game, in the Info.plist file, our CFBundleIdentifier
is set as,
<key>CFBundleIdentifier</key>
<string>com.sixminute.$(PRODUCT_NAME:rfc1034identifier)</string>
But then, for Google Play Sign in, we need the following URL Types in CFBundleURLTypes
,
<key>CFBundleURLName</key>
<string>com.sixminute.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.sixminute.$(PRODUCT_NAME:rfc1034identifier)</string>
</array>
is there any way we could instead reference the CFBundleIdentifier
dynamically like $(BUNDLE_IDENTIFIER)
or similar?
You can define user-variables in XCode in your target properties by following these steps :
Then in your plist file you can simply use :
<key>CFBundleIdentifier</key>
<string>${BundleId}</string>
you can not dynamically update CFBundleIdentifier later(or programmatically) and you can only add value to it compile time. Your question is also not clear, if you are referring something else.
BTW, CFBundleIdentifier and CFBundleURLName/CFBundleURLSchemes are completely orthogonal.
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.