Nativescript iOS questions on info.plist - nativescript

In the info.plist file, I see $(PRODUCT_NAME) and $(EXECUTABLE_NAME) - where are these names derived from.
Also, is there a way for me to get the Bundle version at run-time from within the app?
Thanks.

For the bundle version you can use the nativescript-appversion plugin: https://github.com/EddyVerbruggen/nativescript-appversion

Related

How can I use react-native-fbsdk with build platform?

I am using buddybuild to build our app & I'm not sure how I'm supposed to use the react-native-fbsdk? The docs tell us to put the Library in ~/Documents/FacebookSDK. But for build tools such as Buddybuild (travis, circle, etc...), I'm not sure what we're supposed todo here?
Our app does not use cocoapods, it uses carthage.
Any ideas?
So far the only option would be to install cocoapods & install the dependency from there?
Update:
I found that Carthage supports the swift SDK: https://developers.facebook.com/docs/swift/login
However I don't think the react-native-fbsdk package works with the swift implementation
Related:
https://developers.facebook.com/bugs/110631459337469/
https://github.com/Carthage/Carthage/issues/1183
For those who are not using CocoaPods for any reason, here´s how replicate https://stackoverflow.com/a/45642866/165622 main idea into AppCenter:
First of all, you need to copy the Facebook Sdk files somewhere into your project. In my case I´d put them at {PROJECT}/ios/Facebook
Then you need to create a appcenter-post-clone.sh file at the root of your react-native project (as described here: https://learn.microsoft.com/en-us/appcenter/build/custom/scripts/) making sure to add:
ln -s $APPCENTER_SOURCE_DIRECTORY/ios/Facebook $HOME/Documents/FacebookSDK
Note that the Documents folder already exists there, so need to create it.
Yes, this is an issue which is currently waiting for the patch here bug report, meanwhile, a solution for buddybuild could by creating a symbolic link for the hard-coded path.
For more information regarding post-clone see postclone docs
# File: buddybuild_postclone.sh
# Creating virtual symbolic link for FB SDK for buddybuild
mkdir ~/Documents
ln -s $BUDDYBUILD_WORKSPACE/ios/libs/FacebookSDK ~/Documents/FacebookSDK

The application bundle does not contain a valid identifier

I try to run my project but i get the following error "The application bundle does not contain a valid identifier."
here my info.plist
I followed other answer on the question. I don't have any "Ressources" folder inside my project.
Thanks for your help
I solve this problem after I delete all build files by Xcode.
Your build file path at Xcode > Preferences > Locations > Derived Data
If you didn't change the default path, Your path is like
I just deleted all files under DerivedData
In my case, this problem occurred when I manually removed a pod from my file browser in XCode.
In order to fix it, I deleted the associated entry in my podfile, and ran 'pod install' from the terminal.
Additionally, I had to delete the relevant search paths and other references to that pod. And of course I had to clean the project.
In my case, my app's bundle contained a dash like com.some-thing.app so I just changed it to com.something.app and the problem was fixed.
In my case, the value for "Bundle Identifier" key was missing in Info.plist
In my case the info.plist had the wrong encoding format, I still don't know why it changed. So I had to create a new one from Xcode and copy paste all the keys.
Cleaning the project solves my issue. Product -> Clean
I was building the wrong target on a device in my case. I was building the Test target rather than the normal app target.
In my case, I've added a framework into Embed Binaries phase, but it was already in my Link Frameworks and Binaries phase, which created a duplicate entry. Once I deleted one of them, this error starting appearing.
To fix it, I've removed the framework from both build phases and added it one more time
For my case, it's caused by a wrong Info.plist in a framework(lack of Bundle identifier and Executable file)
Use ideviceinstaller -i xx.app can see the detailed error log.
I ran into this issue trying to run flutter build ios, where the errors were related to trying to access WatchOS and TvOS simulators. For now, not sure how to disable that.
What worked was to run flutter run
In my case, the framework info.plist lack of Bundle identifier.
use cmake create dynamic framwork misss Bundle identifier of the info.plist

Parse/Parse.h file not found - Xcode 6

I created project with cordova and ionic. I installed a Parse plugin (http://plugins.cordova.io/#/package/com.parse.cordova.core.pushplugin).
When I open my project with Xcode I have an error:
Parse/Parse.h file not found
I tried a lot of solutions found on stackoverflow, but none corrects my problem.
Framework Search Paths
"MyApp/Plugins/com.parse.cordova.core.pushplugin"
Try this plugin, it has updated Parse SDK framework.
https://github.com/avivais/phonegap-parse-plugin
Install the plugin like this (do not use Installation method url from README) -
phonegap plugin add https://github.com/avivais/phonegap-parse-plugin.git
OR
cordova plugin add https://github.com/avivais/phonegap-parse-plugin.git
I am having the same issue and posted it on GitHub (https://github.com/avivais/phonegap-parse-plugin/issues/49).
My temporary workaround is:
$ cordova plugin add https://github.com/avivais/phonegap-parse-plugin
$ ionic platform rm ios
$ ionic platform add ios
XCode complains about the Parse.h file not found. It is in fact there. All I need to do is:
open the project in XCode,
go to General > Linked Frameworks and libraries
remove, then add the Parse.framework from the same directory
build
Actually, a better workaround is to make the Platform search path recursive, like so:
https://stackoverflow.com/a/20856145/3889068

Way to specify Info.plist NSPrincipalClass using cmake

I'm very new to cmake and I'm trying to build os x application using it, the problem I've faced is that I need to specify NSPrincipalClass inside Info.plist to be able to launch it. (otherwise I'm getting "No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file" error). The problem is that there is no way to do it using cmake MACOSX_BUNDLE_xxx variables.
I probably can use some workarounds like script that will add it after building or something like this but is there a better way? I might also modify default plist template but than is there a way to include it inside project repo so there will be no need to modify it on every machine or after reinstalling cmake etc?
I've solved this issue. I've created my own template (file name is MacOSXBundleInfo.plist.in) put it into cmake/modules/ folder inside project root, from there the only think left is to add
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
into your CMakeLists.txt

plist bundle version values

I want to set the Bundle Version in my plist. However, it appears that the value that is actually LOOKED at by finder to put the version when you look at more info is "bundle versions string, short" Editing this, however, requires opening the plist file, rather than just editing the "version" in the target settings.
Is there a way to either a) make the bundle version always equal the bundle version short, b) make finder look at the bundle version instead of the short string or c) make the short version appear in the edit target settings window?
Or, is there some better way I should be dealing with this?
thanks.
Yes, you can use ${VARIABLE} style macros the Info.plist file.
We make a user-defined setting in the project called APP_VERSION, and then use ${APP_VERSION} in the CFBundleGetInfoString (Get Info string), CFBundleShortVersionString (Bundle versions string, short) and CFBundleVersion (Bundle version) keys. At build time, the variable gets filled in with the correct version.
Watch out though because sometimes a clean build is necessary for Xcode to update the Info.plist file as it does not do dependency checking against the variables.

Resources